r9946: allow the priv-based chown (se_take_ownership) to chown to other users
authorGünther Deschner <gd@samba.org>
Fri, 2 Sep 2005 09:16:08 +0000 (09:16 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:03:28 +0000 (11:03 -0500)
(not only to the current_user.uid).

Jeremy, please have a look.

Guenther
(This used to be commit 8e48e8936ed59ed8d50b6eaa9954749168de3138)

source3/smbd/posix_acls.c

index 2f5bcb57faab5dc6ded9f566a38356c1ad134e8c..00ec3e009572f84662ebdcb603978dc9dc5311ce 100644 (file)
@@ -3021,7 +3021,6 @@ static int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_
 
        /* Case (2). */
        if (lp_enable_privileges() &&
-                       (uid == current_user.uid) &&
                        (user_has_privileges(current_user.nt_user_token,&se_take_ownership))) {
                become_root();
                /* Keep the current file gid the same - take ownership doesn't imply group change. */