mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-15 08:12:45 -05:00
sys: security: turns out that the AccessToken is not needed
This commit is contained in:
@ -603,7 +603,7 @@ FSP_API VOID FspDebugLogRequest(FSP_FSCTL_TRANSACT_REQ *Request)
|
||||
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
|
||||
&Sddl, 0);
|
||||
FspDebugLog("%S[TID=%04lx]: %p: >>SetSecurity %s%S%s%s, "
|
||||
"SecurityInformation=%lx, AccessToken=%p, Security=%s%s%s\n",
|
||||
"SecurityInformation=%lx, Security=%s%s%s\n",
|
||||
FspDiagIdent(), GetCurrentThreadId(), Request->Hint,
|
||||
Request->FileName.Size ? "\"" : "",
|
||||
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
|
||||
@ -612,7 +612,6 @@ FSP_API VOID FspDebugLogRequest(FSP_FSCTL_TRANSACT_REQ *Request)
|
||||
Request->Req.SetSecurity.UserContext, Request->Req.SetSecurity.UserContext2,
|
||||
UserContextBuf),
|
||||
Request->Req.SetSecurity.SecurityInformation,
|
||||
(PVOID)Request->Req.SetSecurity.AccessToken,
|
||||
Sddl ? "\"" : "",
|
||||
Sddl ? Sddl : "NULL",
|
||||
Sddl ? "\"" : "");
|
||||
|
@ -1208,8 +1208,7 @@ FSP_API NTSTATUS FspFileSystemOpSetSecurity(FSP_FILE_SYSTEM *FileSystem,
|
||||
return FileSystem->Interface->SetSecurity(FileSystem,
|
||||
(PVOID)ValOfFileContext(Request->Req.SetSecurity),
|
||||
Request->Req.SetSecurity.SecurityInformation,
|
||||
(PSECURITY_DESCRIPTOR)Request->Buffer,
|
||||
(HANDLE)Request->Req.SetSecurity.AccessToken);
|
||||
(PSECURITY_DESCRIPTOR)Request->Buffer);
|
||||
}
|
||||
|
||||
FSP_API NTSTATUS FspFileSystemOpQueryStreamInformation(FSP_FILE_SYSTEM *FileSystem,
|
||||
|
@ -143,8 +143,6 @@ NTSTATUS fsp_fuse_op_enter(FSP_FILE_SYSTEM *FileSystem,
|
||||
FileName = (PWSTR)(Request->Buffer + Request->Req.SetInformation.Info.Rename.NewFileName.Offset);
|
||||
Token = (HANDLE)Request->Req.SetInformation.Info.Rename.AccessToken;
|
||||
}
|
||||
else if (FspFsctlTransactSetSecurityKind == Request->Kind)
|
||||
Token = (HANDLE)Request->Req.SetSecurity.AccessToken;
|
||||
|
||||
if (0 != FileName)
|
||||
{
|
||||
@ -1516,8 +1514,7 @@ static NTSTATUS fsp_fuse_intf_GetSecurity(FSP_FILE_SYSTEM *FileSystem,
|
||||
|
||||
static NTSTATUS fsp_fuse_intf_SetSecurity(FSP_FILE_SYSTEM *FileSystem,
|
||||
PVOID FileNode,
|
||||
SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR ModificationDescriptor,
|
||||
HANDLE AccessToken)
|
||||
SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR ModificationDescriptor)
|
||||
{
|
||||
struct fuse *f = FileSystem->UserContext;
|
||||
struct fsp_fuse_file_desc *filedesc = FileNode;
|
||||
@ -1548,7 +1545,6 @@ static NTSTATUS fsp_fuse_intf_SetSecurity(FSP_FILE_SYSTEM *FileSystem,
|
||||
SecurityDescriptor,
|
||||
SecurityInformation,
|
||||
ModificationDescriptor,
|
||||
AccessToken,
|
||||
&NewSecurityDescriptor);
|
||||
if (!NT_SUCCESS(Result))
|
||||
goto exit;
|
||||
|
@ -402,7 +402,6 @@ FSP_API NTSTATUS FspSetSecurityDescriptor(
|
||||
PSECURITY_DESCRIPTOR InputDescriptor,
|
||||
SECURITY_INFORMATION SecurityInformation,
|
||||
PSECURITY_DESCRIPTOR ModificationDescriptor,
|
||||
HANDLE AccessToken,
|
||||
PSECURITY_DESCRIPTOR *PSecurityDescriptor)
|
||||
{
|
||||
*PSecurityDescriptor = 0;
|
||||
|
Reference in New Issue
Block a user