mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 07:51:00 +00:00
STABLE14-windows-symlink-access-20041003
FIXES 15250
One more fix for the symlink problem. Access control checks cannot be
performed until after we have walked all of the symlinks. Otherwise,
we are checking access to the symlink itself and not to the file.
(cherry picked from commit fdaf6f7933
)
This commit is contained in:
parent
15e0bc5f3f
commit
97253c8650
@ -5030,16 +5030,6 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
* scp is NULL.
|
||||
*/
|
||||
if (code == 0 && !treeCreate) {
|
||||
code = cm_CheckNTOpen(scp, desiredAccess, createDisp, userp,
|
||||
&req);
|
||||
if (code) {
|
||||
if (dscp) cm_ReleaseSCache(dscp);
|
||||
cm_ReleaseSCache(scp);
|
||||
cm_ReleaseUser(userp);
|
||||
free(realPathp);
|
||||
return code;
|
||||
}
|
||||
|
||||
if (createDisp == FILE_CREATE) {
|
||||
/* oops, file shouldn't be there */
|
||||
if (dscp) cm_ReleaseSCache(dscp);
|
||||
@ -5073,7 +5063,18 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
code = cm_SetAttr(scp, &setAttr, userp, &req);
|
||||
openAction = 3; /* truncated existing file */
|
||||
}
|
||||
else openAction = 1; /* found existing file */
|
||||
else
|
||||
openAction = 1; /* found existing file */
|
||||
|
||||
code = cm_CheckNTOpen(scp, desiredAccess, createDisp, userp,
|
||||
&req);
|
||||
if (code) {
|
||||
if (dscp) cm_ReleaseSCache(dscp);
|
||||
cm_ReleaseSCache(scp);
|
||||
cm_ReleaseUser(userp);
|
||||
free(realPathp);
|
||||
return code;
|
||||
}
|
||||
}
|
||||
else if (createDisp == FILE_OPEN || createDisp == FILE_OVERWRITE) {
|
||||
/* don't create if not found */
|
||||
|
Loading…
Reference in New Issue
Block a user