summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-21 12:55:49 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-21 12:55:49 +0000
commit8f13fb0bdcb77d44091fa5bb4ab60fd1ac5650c6 (patch)
tree69ad5ef0bb9c428516e81f0218daaa96e5e44101
parent0aa3935917e325afcb72fdab7a95e99bcfb074cc (diff)
downloadsamba-8f13fb0bdcb77d44091fa5bb4ab60fd1ac5650c6.tar.gz
samba-8f13fb0bdcb77d44091fa5bb4ab60fd1ac5650c6.tar.bz2
samba-8f13fb0bdcb77d44091fa5bb4ab60fd1ac5650c6.zip
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)
-rw-r--r--source3/smbd/server.c26
1 files changed, 12 insertions, 14 deletions
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;