* path.cc (symlink): Create security attributes so that only the
user can modify the symlink. * security.cc (set_security_attribute): Remove symlink special handling.
This commit is contained in:
parent
0daf256192
commit
3dbafd873e
|
@ -1,3 +1,10 @@
|
||||||
|
2003-02-04 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* path.cc (symlink): Create security attributes so that only the
|
||||||
|
user can modify the symlink.
|
||||||
|
* security.cc (set_security_attribute): Remove symlink special
|
||||||
|
handling.
|
||||||
|
|
||||||
2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
|
2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* grp.cc (internal_getgroups): Do not return without closing
|
* grp.cc (internal_getgroups): Do not return without closing
|
||||||
|
|
|
@ -2643,7 +2643,7 @@ symlink (const char *topath, const char *frompath)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allow_ntsec && win32_path.has_acls ())
|
if (allow_ntsec && win32_path.has_acls ())
|
||||||
set_security_attribute (S_IFLNK | S_IRWXU | S_IRWXG | S_IRWXO,
|
set_security_attribute (S_IFLNK | STD_RBITS | STD_WBITS,
|
||||||
&sa, alloca (4096), 4096);
|
&sa, alloca (4096), 4096);
|
||||||
|
|
||||||
h = CreateFile (win32_path, GENERIC_WRITE, 0, &sa,
|
h = CreateFile (win32_path, GENERIC_WRITE, 0, &sa,
|
||||||
|
|
|
@ -1853,10 +1853,6 @@ void
|
||||||
set_security_attribute (int attribute, PSECURITY_ATTRIBUTES psa,
|
set_security_attribute (int attribute, PSECURITY_ATTRIBUTES psa,
|
||||||
void *sd_buf, DWORD sd_buf_size)
|
void *sd_buf, DWORD sd_buf_size)
|
||||||
{
|
{
|
||||||
/* symlinks are anything for everyone! */
|
|
||||||
if ((attribute & S_IFLNK) == S_IFLNK)
|
|
||||||
attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
|
|
||||||
|
|
||||||
psa->lpSecurityDescriptor = sd_buf;
|
psa->lpSecurityDescriptor = sd_buf;
|
||||||
InitializeSecurityDescriptor ((PSECURITY_DESCRIPTOR) sd_buf,
|
InitializeSecurityDescriptor ((PSECURITY_DESCRIPTOR) sd_buf,
|
||||||
SECURITY_DESCRIPTOR_REVISION);
|
SECURITY_DESCRIPTOR_REVISION);
|
||||||
|
|
Loading…
Reference in New Issue