diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-11 05:41:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:31 -0500 |
commit | 6ca874f71ad77c82d6e161a3e4772100de2ad6c5 (patch) | |
tree | 6379d5d502d779df1da563911d40249030268ac6 /source4/ntvfs | |
parent | 280bb1cf0fc84c61e20f6f557cecbeba726e2749 (diff) | |
download | samba-6ca874f71ad77c82d6e161a3e4772100de2ad6c5.tar.gz samba-6ca874f71ad77c82d6e161a3e4772100de2ad6c5.tar.bz2 samba-6ca874f71ad77c82d6e161a3e4772100de2ad6c5.zip |
r4147: converted from NT_USER_TOKEN to struct security_token
this is mostly just a tidyup, but also adds the privilege_mask, which
I will be using shortly in ACL checking.
note that I had to move the definition of struct security_token out of
security.idl as pidl doesn't yet handle arrays of pointers, and the
usual workaround (to use a intermediate structure) would make things
too cumbersome for this structure, especially given we never encode it
to NDR.
(This used to be commit 7b446af09b8050746bfc2c50e9d56aa94397cc1a)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/unixuid/vfs_unixuid.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 6eb4c13804..e2d779f91c 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -350,7 +350,7 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs, struct pvfs_filename *name, uint32_t *access_mask) { - struct nt_user_token *token = req->session->session_info->nt_user_token; + struct security_token *token = req->session->session_info->security_token; struct xattr_NTACL *acl; NTSTATUS status; struct security_descriptor *sd; diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c index 0535475dd3..1c4572969f 100644 --- a/source4/ntvfs/unixuid/vfs_unixuid.c +++ b/source4/ntvfs/unixuid/vfs_unixuid.c @@ -28,7 +28,7 @@ struct unixuid_private { struct sidmap_context *sidmap; struct unix_sec_ctx *last_sec_ctx; - struct nt_user_token *last_token; + struct security_token *last_token; }; @@ -90,11 +90,11 @@ static NTSTATUS set_unix_security(struct unix_sec_ctx *sec) } /* - form a unix_sec_ctx from the current nt_user_token + form a unix_sec_ctx from the current security_token */ static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req, - struct nt_user_token *token, + struct security_token *token, struct unix_sec_ctx **sec) { struct unixuid_private *private = ntvfs->private_data; @@ -108,13 +108,13 @@ static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs, } status = sidmap_sid_to_unixuid(private->sidmap, - token->user_sids[0], &(*sec)->uid); + token->user_sid, &(*sec)->uid); if (!NT_STATUS_IS_OK(status)) { return status; } status = sidmap_sid_to_unixgid(private->sidmap, - token->user_sids[1], &(*sec)->gid); + token->group_sid, &(*sec)->gid); if (!NT_STATUS_IS_OK(status)) { return status; } @@ -127,7 +127,7 @@ static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs, for (i=0;i<(*sec)->ngroups;i++) { status = sidmap_sid_to_unixgid(private->sidmap, - token->user_sids[i+2], &(*sec)->groups[i]); + token->sids[i+2], &(*sec)->groups[i]); if (!NT_STATUS_IS_OK(status)) { return status; } @@ -143,7 +143,7 @@ static NTSTATUS unixuid_setup_security(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req, struct unix_sec_ctx **sec) { struct unixuid_private *private = ntvfs->private_data; - struct nt_user_token *token = req->session->session_info->nt_user_token; + struct security_token *token = req->session->session_info->security_token; void *ctx = talloc(req, 0); struct unix_sec_ctx *newsec; NTSTATUS status; @@ -157,7 +157,7 @@ static NTSTATUS unixuid_setup_security(struct ntvfs_module_context *ntvfs, return NT_STATUS_NO_MEMORY; } - if (req->session->session_info->nt_user_token == private->last_token) { + if (req->session->session_info->security_token == private->last_token) { newsec = private->last_sec_ctx; } else { status = nt_token_to_unix_security(ntvfs, req, token, &newsec); @@ -169,7 +169,7 @@ static NTSTATUS unixuid_setup_security(struct ntvfs_module_context *ntvfs, talloc_free(private->last_sec_ctx); } private->last_sec_ctx = newsec; - private->last_token = req->session->session_info->nt_user_token; + private->last_token = req->session->session_info->security_token; talloc_steal(private, newsec); } |