1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-24 21:49:29 +03:00

r9946: allow the priv-based chown (se_take_ownership) to chown to other users

(not only to the current_user.uid).

Jeremy, please have a look.

Guenther
This commit is contained in:
Günther Deschner
2005-09-02 09:16:08 +00:00
committed by Gerald (Jerry) Carter
parent 12029e9022
commit 8e48e8936e

View 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. */