diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-08-30 13:04:27 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-09-11 18:46:09 +1000 |
commit | 3bb77516b841def60e08e50bafc37517dd9d3ae0 (patch) | |
tree | 6e2731a3ec26268648c42c09387c180b778f5cda /source3/rpc_server/srv_winreg_nt.c | |
parent | b057867de3fbb423ef6afb9b7038ab99c83124d8 (diff) | |
download | samba-3bb77516b841def60e08e50bafc37517dd9d3ae0.tar.gz samba-3bb77516b841def60e08e50bafc37517dd9d3ae0.tar.bz2 samba-3bb77516b841def60e08e50bafc37517dd9d3ae0.zip |
s3-privs Convert from user_has_privileges() -> security_token_has_privilege()
This new call is available in the merged privileges code, and
takes an enum as the parameter, rather than a bitmask.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/rpc_server/srv_winreg_nt.c')
-rw-r--r-- | source3/rpc_server/srv_winreg_nt.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c index de15f9f82f..ab43f6580a 100644 --- a/source3/rpc_server/srv_winreg_nt.c +++ b/source3/rpc_server/srv_winreg_nt.c @@ -575,8 +575,7 @@ WERROR _winreg_InitiateSystemShutdownEx(struct pipes_struct *p, return WERR_NOMEM; } - can_shutdown = user_has_privileges( p->server_info->ptok, - &se_remote_shutdown ); + can_shutdown = security_token_has_privilege(p->server_info->ptok, SEC_PRIV_REMOTE_SHUTDOWN); /* IF someone has privs, run the shutdown script as root. OTHERWISE run it as not root Take the error return from the script and provide it as the Windows return code. */ @@ -613,8 +612,7 @@ WERROR _winreg_AbortSystemShutdown(struct pipes_struct *p, if (!*abort_shutdown_script) return WERR_ACCESS_DENIED; - can_shutdown = user_has_privileges( p->server_info->ptok, - &se_remote_shutdown ); + can_shutdown = security_token_has_privilege(p->server_info->ptok, SEC_PRIV_REMOTE_SHUTDOWN); /********** BEGIN SeRemoteShutdownPrivilege BLOCK **********/ @@ -704,8 +702,9 @@ WERROR _winreg_RestoreKey(struct pipes_struct *p, /* user must posses SeRestorePrivilege for this this proceed */ - if ( !user_has_privileges( p->server_info->ptok, &se_restore ) ) + if ( !security_token_has_privilege(p->server_info->ptok, SEC_PRIV_RESTORE)) { return WERR_ACCESS_DENIED; + } DEBUG(2,("_winreg_RestoreKey: Restoring [%s] from %s in share %s\n", regkey->key->name, fname, lp_servicename(snum) )); |