Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Widen kauth_action_t so we can add KAUTH_VNODE_ADD_L...
details: https://anonhg.NetBSD.org/src/rev/a9fae3c5d882
branches: trunk
changeset: 364476:a9fae3c5d882
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 27 16:16:39 2022 +0000
description:
Widen kauth_action_t so we can add KAUTH_VNODE_ADD_LINK; welcome to 9.99.96.
diffstat:
sys/sys/kauth.h | 56 +++++++++++++++++++++++++++++---------------------------
sys/sys/param.h | 4 ++--
2 files changed, 31 insertions(+), 29 deletions(-)
diffs (107 lines):
diff -r 88fb45f15931 -r a9fae3c5d882 sys/sys/kauth.h
--- a/sys/sys/kauth.h Sun Mar 27 00:32:15 2022 +0000
+++ b/sys/sys/kauth.h Sun Mar 27 16:16:39 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kauth.h,v 1.86 2020/09/08 14:12:57 christos Exp $ */
+/* $NetBSD: kauth.h,v 1.87 2022/03/27 16:16:39 christos Exp $ */
/*-
* Copyright (c) 2005, 2006 Elad Efrat <elad%NetBSD.org@localhost>
@@ -51,7 +51,7 @@
/* Types. */
typedef struct kauth_scope *kauth_scope_t;
typedef struct kauth_listener *kauth_listener_t;
-typedef uint32_t kauth_action_t;
+typedef uint64_t kauth_action_t;
typedef int (*kauth_scope_callback_t)(kauth_cred_t, kauth_action_t,
void *, void *, void *, void *, void *);
typedef struct kauth_key *kauth_key_t;
@@ -383,36 +383,37 @@
/*
* Vnode scope - action bits.
*/
-#define KAUTH_VNODE_READ_DATA (1U << 0)
+#define KAUTH_VNODE_READ_DATA (1ULL << 0)
#define KAUTH_VNODE_LIST_DIRECTORY KAUTH_VNODE_READ_DATA
-#define KAUTH_VNODE_WRITE_DATA (1U << 1)
+#define KAUTH_VNODE_WRITE_DATA (1ULL << 1)
#define KAUTH_VNODE_ADD_FILE KAUTH_VNODE_WRITE_DATA
-#define KAUTH_VNODE_EXECUTE (1U << 2)
+#define KAUTH_VNODE_EXECUTE (1ULL << 2)
#define KAUTH_VNODE_SEARCH KAUTH_VNODE_EXECUTE
-#define KAUTH_VNODE_DELETE (1U << 3)
-#define KAUTH_VNODE_APPEND_DATA (1U << 4)
+#define KAUTH_VNODE_DELETE (1ULL << 3)
+#define KAUTH_VNODE_APPEND_DATA (1ULL << 4)
#define KAUTH_VNODE_ADD_SUBDIRECTORY KAUTH_VNODE_APPEND_DATA
-#define KAUTH_VNODE_READ_TIMES (1U << 5)
-#define KAUTH_VNODE_WRITE_TIMES (1U << 6)
-#define KAUTH_VNODE_READ_FLAGS (1U << 7)
-#define KAUTH_VNODE_WRITE_FLAGS (1U << 8)
-#define KAUTH_VNODE_READ_SYSFLAGS (1U << 9)
-#define KAUTH_VNODE_WRITE_SYSFLAGS (1U << 10)
-#define KAUTH_VNODE_RENAME (1U << 11)
-#define KAUTH_VNODE_CHANGE_OWNERSHIP (1U << 12)
-#define KAUTH_VNODE_READ_SECURITY (1U << 13)
-#define KAUTH_VNODE_WRITE_SECURITY (1U << 14)
-#define KAUTH_VNODE_READ_ATTRIBUTES (1U << 15)
-#define KAUTH_VNODE_WRITE_ATTRIBUTES (1U << 16)
-#define KAUTH_VNODE_READ_EXTATTRIBUTES (1U << 17)
-#define KAUTH_VNODE_WRITE_EXTATTRIBUTES (1U << 18)
-#define KAUTH_VNODE_RETAIN_SUID (1U << 19)
-#define KAUTH_VNODE_RETAIN_SGID (1U << 20)
-#define KAUTH_VNODE_REVOKE (1U << 21)
+#define KAUTH_VNODE_READ_TIMES (1ULL << 5)
+#define KAUTH_VNODE_WRITE_TIMES (1ULL << 6)
+#define KAUTH_VNODE_READ_FLAGS (1ULL << 7)
+#define KAUTH_VNODE_WRITE_FLAGS (1ULL << 8)
+#define KAUTH_VNODE_READ_SYSFLAGS (1ULL << 9)
+#define KAUTH_VNODE_WRITE_SYSFLAGS (1ULL << 10)
+#define KAUTH_VNODE_RENAME (1ULL << 11)
+#define KAUTH_VNODE_CHANGE_OWNERSHIP (1ULL << 12)
+#define KAUTH_VNODE_READ_SECURITY (1ULL << 13)
+#define KAUTH_VNODE_WRITE_SECURITY (1ULL << 14)
+#define KAUTH_VNODE_READ_ATTRIBUTES (1ULL << 15)
+#define KAUTH_VNODE_WRITE_ATTRIBUTES (1ULL << 16)
+#define KAUTH_VNODE_READ_EXTATTRIBUTES (1ULL << 17)
+#define KAUTH_VNODE_WRITE_EXTATTRIBUTES (1ULL << 18)
+#define KAUTH_VNODE_RETAIN_SUID (1ULL << 19)
+#define KAUTH_VNODE_RETAIN_SGID (1ULL << 20)
+#define KAUTH_VNODE_REVOKE (1ULL << 21)
-#define KAUTH_VNODE_IS_EXEC (1U << 29)
-#define KAUTH_VNODE_HAS_SYSFLAGS (1U << 30)
-#define KAUTH_VNODE_ACCESS (1U << 31)
+#define KAUTH_VNODE_IS_EXEC (1ULL << 29)
+#define KAUTH_VNODE_HAS_SYSFLAGS (1ULL << 30)
+#define KAUTH_VNODE_ACCESS (1ULL << 31)
+#define KAUTH_VNODE_ADD_LINK (1ULL << 32)
/*
* This is a special fs_decision indication that can be used by file-systems
@@ -494,6 +495,7 @@
gid_t kauth_cred_getegid(kauth_cred_t);
gid_t kauth_cred_getsvgid(kauth_cred_t);
int kauth_cred_ismember_gid(kauth_cred_t, gid_t, int *);
+int kauth_cred_groupmember(kauth_cred_t, gid_t);
u_int kauth_cred_ngroups(kauth_cred_t);
gid_t kauth_cred_group(kauth_cred_t, u_int);
diff -r 88fb45f15931 -r a9fae3c5d882 sys/sys/param.h
--- a/sys/sys/param.h Sun Mar 27 00:32:15 2022 +0000
+++ b/sys/sys/param.h Sun Mar 27 16:16:39 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.708 2022/03/19 13:53:32 hannken Exp $ */
+/* $NetBSD: param.h,v 1.709 2022/03/27 16:16:39 christos Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
* 2.99.9 (299000900)
*/
-#define __NetBSD_Version__ 999009500 /* NetBSD 9.99.95 */
+#define __NetBSD_Version__ 999009600 /* NetBSD 9.99.96 */
#define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
(m) * 1000000) + (p) * 100) <= __NetBSD_Version__)
Home |
Main Index |
Thread Index |
Old Index