diff options
author | Jeremy Allison <jra@samba.org> | 2002-04-30 13:28:41 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-04-30 13:28:41 +0000 |
commit | d04b55f2186fb8af998cf61c576771a5f72f4892 (patch) | |
tree | 9ff8c3a7cf34cefc0ee9a550a3bb1236a9e77595 /source/smbd/dosmode.c | |
parent | 73267ca42d9eddabb71b31b4c5068ebbe7bc9f7c (diff) | |
download | samba-d04b55f2186fb8af998cf61c576771a5f72f4892.tar.gz samba-d04b55f2186fb8af998cf61c576771a5f72f4892.tar.xz samba-d04b55f2186fb8af998cf61c576771a5f72f4892.zip |
Start of merge to 2_2_RELEASE branch for release.
Jeremy.
Diffstat (limited to 'source/smbd/dosmode.c')
-rw-r--r-- | source/smbd/dosmode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/smbd/dosmode.c b/source/smbd/dosmode.c index d7b40198771..ee54417c247 100644 --- a/source/smbd/dosmode.c +++ b/source/smbd/dosmode.c @@ -196,6 +196,8 @@ int file_chmod(connection_struct *conn,char *fname,int dosmode,SMB_STRUCT_STAT * if (S_ISDIR(st->st_mode)) dosmode |= aDIR; + else + dosmode &= ~aDIR; if (dos_mode(conn,fname,st) == dosmode) return(0); @@ -280,7 +282,7 @@ int file_utime(connection_struct *conn, char *fname, struct utimbuf *times) errno = 0; - if(conn->vfs_ops.utime(conn,dos_to_unix(fname, False), times) == 0) + if(conn->vfs_ops.utime(conn,dos_to_unix_static(fname), times) == 0) return 0; if((errno != EPERM) && (errno != EACCES)) @@ -308,7 +310,7 @@ int file_utime(connection_struct *conn, char *fname, struct utimbuf *times) current_user.ngroups,current_user.groups)))) { /* We are allowed to become root and change the filetime. */ become_root(); - ret = conn->vfs_ops.utime(conn,dos_to_unix(fname, False), times); + ret = conn->vfs_ops.utime(conn,dos_to_unix_static(fname), times); unbecome_root(); } } |