Possibly incorrect handling of SeBackupPrivilege and SeRestorePrivilege

Richard Sharpe realrichardsharpe at gmail.com
Wed Feb 29 09:36:21 MST 2012


2012/2/29 Richard Sharpe <realrichardsharpe at gmail.com>:
> Hi,
>
> I believe that the actual Windows semantics around SeBackupPrivilege
> and SeRestorePrivilege is that if the requester opens a file with the
> BACKUP INTENT (FILE_OPEN_FOR_BACKUP_INTENT) flag in CreateOptions and
> they have those privileges and they have the correct access mode
> specified then they get to open the file if the ACL does not give them
> access.
>
> In looking at se_access_check we do not take into account
> FILE_OPEN_FOR_BACKUP_INTENT when checking those two privilege bits,
> which is wrong, I believe.
>
> The good news is that Samba works. The bad news is that Samba will
> give access in cases where Windows would not.

If I get some agreement that there is a problem here I will file a bug
in bugzilla and create a patch. It is a small patch. I would pass the
CreateOptions (flag) along in the places where se_access_check is
eventually called and pass it into se_access_check ...

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list