From 8f13fb0bdcb77d44091fa5bb4ab60fd1ac5650c6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 21 Oct 1997 12:55:49 +0000 Subject: don't check lp_alternate_permissions() in the new utime workaround code. lp_alternate_permissions() is intended only to affect the display of file permissions, not what you can actually do with the files. (This used to be commit 454802d5922bf2b2c6df1f084e183611937ee5fb) --- source3/smbd/server.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'source3/smbd/server.c') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 6fe89b8e95..28364d9c0c 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -334,20 +334,18 @@ int file_utime(int cnum, char *fname, struct utimbuf *times) return -1; /* Check if we have write access. */ - if (CAN_WRITE(cnum) && !lp_alternate_permissions(SNUM(cnum))) - { - if (((sb.st_mode & S_IWOTH) || - Connections[cnum].admin_user || - ((sb.st_mode & S_IWUSR) && current_user.uid==sb.st_uid) || - ((sb.st_mode & S_IWGRP) && - in_group(sb.st_gid,current_user.gid, - current_user.ngroups,current_user.igroups)))) - { - /* We are allowed to become root and change the filetime. */ - become_root(False); - ret = sys_utime(fname, times); - unbecome_root(False); - } + if (CAN_WRITE(cnum)) { + if (((sb.st_mode & S_IWOTH) || + Connections[cnum].admin_user || + ((sb.st_mode & S_IWUSR) && current_user.uid==sb.st_uid) || + ((sb.st_mode & S_IWGRP) && + in_group(sb.st_gid,current_user.gid, + current_user.ngroups,current_user.igroups)))) { + /* We are allowed to become root and change the filetime. */ + become_root(False); + ret = sys_utime(fname, times); + unbecome_root(False); + } } return ret; -- cgit