* security.cc (set_process_privileges): Removed `static'.

(get_nt_attribute): Returns uid and gid additionally. Removed call
        to set_process_privileges().
        (get_file_attribute): Returns uid and gid additionally. Don't
        call ntea if ntsec is ON.
        (set_nt_attribute): Removed call to set_process_privileges().
        Don't call ntea if ntsec is ON.
        (acl): Removed call to set_process_privileges().
        * dcrt0.cc (dll_crt0_1): Calls set_process_privileges() now.
        * winsup.h: New prototype for set_process_privileges(),
        changed prototype for get_file_attribute().
        * fhandler.cc (get_file_owner): Discarded.
        (get_file_group): Ditto.
        (fhandler_disk_file::fstat): Discard calls to get_file_owner() and
        get_file_group().
        * path.cc (path_conv::path_conv): Added debugging output for result
        of GetVolumeInformation().
        (mount_info::conv_to_win32_path): Call backslashify() with pathbuf
        instead of src_path.
        * syscalls.cc (chown): Reformatted.
        (chmod): Replace get_file_owner() and get_file_group() calls
        by a call to get_file_attribute(). Discard local variable has_acls.
        Slightly reformatted.
        (stat_worker): Replaced idiot's (it's me) root dir check by call
        to rootdir(). Don't call num_entries() on remote drives.
        Discard local variable has_acls.
This commit is contained in:
Corinna Vinschen
2000-03-16 19:35:18 +00:00
parent 6bc4ac717b
commit 5d4af61e5d
7 changed files with 125 additions and 122 deletions

View File

@@ -380,9 +380,17 @@ out:
strcpy (root, full_path);
if (!rootdir (root) ||
!GetVolumeInformation (root, NULL, 0, &serial, NULL, &volflags, NULL, 0))
set_has_acls (FALSE);
{
debug_printf ("GetVolumeInformation(%s) = ERR, full_path(%s), set_has_acls(FALSE)",
root, full_path, GetLastError ());
set_has_acls (FALSE);
}
else
set_has_acls (volflags & FS_PERSISTENT_ACLS);
{
debug_printf ("GetVolumeInformation(%s) = OK, full_path(%s), set_has_acls(%d)",
root, full_path, volflags & FS_PERSISTENT_ACLS);
set_has_acls (volflags & FS_PERSISTENT_ACLS);
}
}
#define deveq(s) (strcasematch (name, (s)))
@@ -997,7 +1005,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *win32_path,
if (slash_drive_prefix_p (pathbuf))
slash_drive_to_win32_path (pathbuf, dst, trailing_slash_p);
else
backslashify (src_path, dst, trailing_slash_p); /* just convert */
backslashify (pathbuf, dst, trailing_slash_p); /* just convert */
*flags = 0;
}
else
@@ -2370,7 +2378,7 @@ get_current_directory_name ()
/* getcwd */
static char *
char *
getcwd_inner (char *buf, size_t ulen, int posix_p)
{
char *resbuf = NULL;