diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-08-05 09:27:03 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-08-05 09:27:03 +0000 |
commit | d292b1940c9cc327810627c486cbcfa7e12ce8ad (patch) | |
tree | 13bd3168e6624f0173ae245e9929e1e0697f00ce /sys/kern/vfs_subr.c | |
parent | 2b86f9d6d013a9ad8b1f8d03286018e785d5b3f6 (diff) | |
download | src-d292b1940c9cc327810627c486cbcfa7e12ce8ad.tar.gz src-d292b1940c9cc327810627c486cbcfa7e12ce8ad.zip |
vfs: remove the obsolete privused argument from vaccess
This brings argument count down to 6, which is passable without the
stack on amd64.
Notes
Notes:
svn path=/head/; revision=363893
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index d13150c2c7cf..8b1e6553452f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -5299,14 +5299,12 @@ vaccess_vexec_smr(mode_t file_mode, uid_t file_uid, gid_t file_gid, struct ucred /* * Common filesystem object access control check routine. Accepts a - * vnode's type, "mode", uid and gid, requested access mode, credentials, - * and optional call-by-reference privused argument allowing vaccess() - * to indicate to the caller whether privilege was used to satisfy the - * request (obsoleted). Returns 0 on success, or an errno on failure. + * vnode's type, "mode", uid and gid, requested access mode, and credentials. + * Returns 0 on success, or an errno on failure. */ int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid, - accmode_t accmode, struct ucred *cred, int *privused) + accmode_t accmode, struct ucred *cred) { accmode_t dac_granted; accmode_t priv_granted; @@ -5321,9 +5319,6 @@ vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid, * as requested. If it exists, go with that. */ - if (privused != NULL) - *privused = 0; - dac_granted = 0; /* Check the owner. */ @@ -5409,9 +5404,6 @@ privcheck: priv_granted |= VADMIN; if ((accmode & (priv_granted | dac_granted)) == accmode) { - /* XXX audit: privilege used */ - if (privused != NULL) - *privused = 1; return (0); } |