summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-30 13:04:27 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-11 18:46:09 +1000
commit3bb77516b841def60e08e50bafc37517dd9d3ae0 (patch)
tree6e2731a3ec26268648c42c09387c180b778f5cda /source3/smbd
parentb057867de3fbb423ef6afb9b7038ab99c83124d8 (diff)
downloadsamba-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/smbd')
-rw-r--r--source3/smbd/posix_acls.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index db8b2529f2..9470447f53 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3547,10 +3547,8 @@ int try_chown(connection_struct *conn, struct smb_filename *smb_fname,
/* Case (2) / (3) */
if (lp_enable_privileges()) {
- bool has_take_ownership_priv = user_has_privileges(get_current_nttok(conn),
- &se_take_ownership);
- bool has_restore_priv = user_has_privileges(get_current_nttok(conn),
- &se_restore);
+ bool has_take_ownership_priv = security_token_has_privilege(get_current_nttok(conn), SEC_PRIV_TAKE_OWNERSHIP);
+ bool has_restore_priv = security_token_has_privilege(get_current_nttok(conn), SEC_PRIV_RESTORE);
/* Case (2) */
if ( ( has_take_ownership_priv && ( uid == get_current_uid(conn) ) ) ||