diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-10-21 12:55:49 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-10-21 12:55:49 +0000 |
commit | 454802d5922bf2b2c6df1f084e183611937ee5fb (patch) | |
tree | a1bb3a15502bff0fde40210e83eb789418fb005e /source/smbd | |
parent | 8e90e1ef276c4cc362e32985c2845fc4c5108273 (diff) | |
download | samba-454802d5922bf2b2c6df1f084e183611937ee5fb.tar.gz |
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.
Diffstat (limited to 'source/smbd')
-rw-r--r-- | source/smbd/server.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c index 6fe89b8e958..28364d9c0c9 100644 --- a/source/smbd/server.c +++ b/source/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; |