* security.cc (set_file_attribute): Clean up. Don't call
`set_nt_attribute' when ntsec isn't set.
This commit is contained in:
parent
6825f8e75f
commit
842c741f98
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Aug 2 17:59:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* security.cc (set_file_attribute): Clean up. Don't call
|
||||||
|
`set_nt_attribute' when ntsec isn't set.
|
||||||
|
|
||||||
Sat Jul 28 22:30:55 2001 Christopher Faylor <cgf@cygnus.com>
|
Sat Jul 28 22:30:55 2001 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal
|
* dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal
|
||||||
|
|
|
@ -1587,18 +1587,16 @@ set_file_attribute (int use_ntsec, const char *file,
|
||||||
if ((attribute & S_IFLNK) == S_IFLNK)
|
if ((attribute & S_IFLNK) == S_IFLNK)
|
||||||
attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
|
attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
|
||||||
|
|
||||||
if (allow_ntea && (!use_ntsec || !allow_ntsec))
|
int ret = 0;
|
||||||
{
|
|
||||||
if (!NTWriteEA (file, ".UNIXATTR", (char *) &attribute,
|
|
||||||
sizeof (attribute)))
|
|
||||||
{
|
|
||||||
__seterrno ();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ret = set_nt_attribute (file, uid, gid, logsrv, attribute);
|
if (use_ntsec && allow_ntsec)
|
||||||
|
ret = set_nt_attribute (file, uid, gid, logsrv, attribute);
|
||||||
|
else if (allow_ntea && !NTWriteEA (file, ".UNIXATTR", (char *) &attribute,
|
||||||
|
sizeof (attribute)))
|
||||||
|
{
|
||||||
|
__seterrno ();
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
syscall_printf ("%d = set_file_attribute (%s, %d, %d, %p)",
|
syscall_printf ("%d = set_file_attribute (%s, %d, %d, %p)",
|
||||||
ret, file, uid, gid, attribute);
|
ret, file, uid, gid, attribute);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue