git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f13fb0
)
check for EPERM or EACCESS in file_utime()
author
Andrew Tridgell
<tridge@samba.org>
Tue, 21 Oct 1997 13:03:46 +0000
(13:03 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Tue, 21 Oct 1997 13:03:46 +0000
(13:03 +0000)
(This used to be commit
afd7592ffd74fbc77f4b177b007291df95f418ef
)
source3/smbd/server.c
patch
|
blob
|
history
diff --git
a/source3/smbd/server.c
b/source3/smbd/server.c
index 28364d9c0c91b37bc27ace55390cc147423f0a7e..5f925df68721f05b5d4a3c0a0aee8ec114c3e9bd 100644
(file)
--- a/
source3/smbd/server.c
+++ b/
source3/smbd/server.c
@@
-318,10
+318,15
@@
int file_utime(int cnum, char *fname, struct utimbuf *times)
struct stat sb;
int ret = -1;
+ errno = 0;
+
if(sys_utime(fname, times) == 0)
return 0;
- if((errno != EPERM) || !lp_dos_filetimes(SNUM(cnum)))
+ if((errno != EPERM) && (errno != EACCESS))
+ return -1;
+
+ if(!lp_dos_filetimes(SNUM(cnum)))
return -1;
/* We have permission (given by the Samba admin) to