From 272feb7bd133344e88864ffc75d251451ddd681c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 22 Oct 2010 15:58:40 -0700 Subject: Revert "Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed" Not needed - privileges code prevents "enable privileges = no" from adding privileges anyway. This reverts commit a8b95686a7bde3f96f141b6938e24e101567ef54. Autobuild-User: Jeremy Allison Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104 --- source3/smbd/open.c | 4 ++-- source3/smbd/posix_acls.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index b19aad9d5e..f5de607713 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2507,7 +2507,7 @@ static NTSTATUS open_directory(connection_struct *conn, } if ((access_mask & SEC_FLAG_SYSTEM_SECURITY) & - !s3_security_token_has_privilege(get_current_nttok(conn), + !security_token_has_privilege(get_current_nttok(conn), SEC_PRIV_SECURITY)) { DEBUG(10, ("open_directory: open on %s " "failed - SEC_FLAG_SYSTEM_SECURITY denied.\n", @@ -3031,7 +3031,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, } if ((access_mask & SEC_FLAG_SYSTEM_SECURITY) && - !s3_security_token_has_privilege(get_current_nttok(conn), + !security_token_has_privilege(get_current_nttok(conn), SEC_PRIV_SECURITY)) { DEBUG(10, ("create_file_unixpath: open on %s " "failed - SEC_FLAG_SYSTEM_SECURITY denied.\n", diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 4633b480a3..54fa5bfdfc 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -3556,8 +3556,8 @@ int try_chown(connection_struct *conn, struct smb_filename *smb_fname, /* Case (2) / (3) */ if (lp_enable_privileges()) { - bool has_take_ownership_priv = s3_security_token_has_privilege(get_current_nttok(conn), SEC_PRIV_TAKE_OWNERSHIP); - bool has_restore_priv = s3_security_token_has_privilege(get_current_nttok(conn), SEC_PRIV_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) ) ) || -- cgit