* dir.cc (writable_directory): Comment out previous code,

return always 1 for now.
        (mkdir): Call set_file_attribute explicitely with S_IFDIR mode bit.
        * syscalls.cc (chown_worker): Ditto.
        (chmod): Ditto.
        * security.cc (get_nt_attribute): Fix error in debug output.
        Never set FILE_DELETE_CHILD for files.
        Construct appropriate inherit attribute according to file type.
This commit is contained in:
Corinna Vinschen
2000-05-24 20:09:43 +00:00
parent e6dfde6f82
commit 154110f5d3
4 changed files with 34 additions and 7 deletions

View File

@@ -701,6 +701,8 @@ chown_worker (const char *name, symlink_follow fmode, uid_t uid, gid_t gid)
uid = old_uid;
if (gid == (gid_t) -1)
gid = old_gid;
if (win32_path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)
attrib |= S_IFDIR;
res = set_file_attribute (win32_path.has_acls (),
win32_path.get_win32 (),
uid, gid, attrib,
@@ -805,9 +807,14 @@ chmod (const char *path, mode_t mode)
uid_t uid;
gid_t gid;
if (win32_path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)
mode |= S_IFDIR;
get_file_attribute (win32_path.has_acls (),
win32_path.get_win32 (),
NULL, &uid, &gid);
if (win32_path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)
mode |= S_IFDIR;
if (! set_file_attribute (win32_path.has_acls (),
win32_path.get_win32 (),
uid, gid,