Skip to content

Commit faa295b

Browse files
robnbehlendorf
authored andcommitted
libspl: move SID definitions from zfs_context.h; remove kernel gate
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #17861
1 parent 2b4a0dd commit faa295b

File tree

5 files changed

+47
-11
lines changed

5 files changed

+47
-11
lines changed

include/sys/zfs_context.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,16 +238,6 @@ extern int zfs_secpolicy_destroy_perms(const char *name, cred_t *cr);
238238
extern int secpolicy_zfs(const cred_t *cr);
239239
extern zoneid_t getzoneid(void);
240240

241-
/* SID stuff */
242-
typedef struct ksiddomain {
243-
uint_t kd_ref;
244-
uint_t kd_len;
245-
char *kd_name;
246-
} ksiddomain_t;
247-
248-
ksiddomain_t *ksid_lookupdomain(const char *);
249-
void ksiddomain_rele(ksiddomain_t *);
250-
251241
#define DDI_SLEEP KM_SLEEP
252242
#define ddi_log_sysevent(_a, _b, _c, _d, _e, _f, _g) \
253243
sysevent_post_event(_c, _d, _b, "libzpool", _e, _f)

lib/libspl/include/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ libspl_sys_HEADERS = \
5555
%D%/sys/procfs_list.h \
5656
%D%/sys/random.h \
5757
%D%/sys/rwlock.h \
58+
%D%/sys/sid.h \
5859
%D%/sys/simd.h \
5960
%D%/sys/stack.h \
6061
%D%/sys/stdtypes.h \

lib/libspl/include/sys/sid.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// SPDX-License-Identifier: CDDL-1.0
2+
/*
3+
* CDDL HEADER START
4+
*
5+
* The contents of this file are subject to the terms of the
6+
* Common Development and Distribution License (the "License").
7+
* You may not use this file except in compliance with the License.
8+
*
9+
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10+
* or https://opensource.org/licenses/CDDL-1.0.
11+
* See the License for the specific language governing permissions
12+
* and limitations under the License.
13+
*
14+
* When distributing Covered Code, include this CDDL HEADER in each
15+
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16+
* If applicable, add the following below this CDDL HEADER, with the
17+
* fields enclosed by brackets "[]" replaced with your own identifying
18+
* information: Portions Copyright [yyyy] [name of copyright owner]
19+
*
20+
* CDDL HEADER END
21+
*/
22+
/*
23+
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24+
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25+
* Copyright (c) 2012, 2018 by Delphix. All rights reserved.
26+
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
27+
*/
28+
29+
#ifndef _SYS_SID_H
30+
#define _SYS_SID_H
31+
32+
#include <sys/types.h>
33+
34+
/* SID stuff */
35+
typedef struct ksiddomain {
36+
uint_t kd_ref;
37+
uint_t kd_len;
38+
char *kd_name;
39+
} ksiddomain_t;
40+
41+
ksiddomain_t *ksid_lookupdomain(const char *);
42+
void ksiddomain_rele(ksiddomain_t *);
43+
44+
#endif

lib/libzpool/kernel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <sys/rrwlock.h>
4141
#include <sys/spa.h>
4242
#include <sys/spa_impl.h>
43+
#include <sys/sid.h>
4344
#include <sys/stat.h>
4445
#include <sys/systeminfo.h>
4546
#include <sys/time.h>

module/zfs/zfs_fuid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
#include <sys/avl.h>
2929
#include <sys/zap.h>
3030
#include <sys/nvpair.h>
31-
#ifdef _KERNEL
3231
#include <sys/sid.h>
32+
#ifdef _KERNEL
3333
#include <sys/zfs_vfsops.h>
3434
#include <sys/zfs_znode.h>
3535
#endif

0 commit comments

Comments
 (0)