Add ntfs_sid_is_valid() and exports for ntfs_sid_to_mbs_size() and

ntfs_sid_to_mbs().

(Logical change 1.368)
edge.strict_endians
cantab.net!aia21 2004-04-15 11:10:40 +00:00
parent 7fa7b339af
commit e44d450539
1 changed files with 19 additions and 1 deletions

View File

@ -31,6 +31,24 @@ extern const GUID *const zero_guid;
extern BOOL ntfs_guid_is_zero(const GUID *guid);
extern char *ntfs_guid_to_mbs(const GUID *guid, char *guid_str);
extern char *ntfs_sid_to_mbs(const SID *sid, char *sid_str);
/**
* ntfs_sid_is_valid - determine if a SID is valid
* @sid: [IN] SID for which to determine if it is valid
*
* Determine if the SID pointed to by @sid is valid.
*
* Return TRUE if it is valid and FALSE otherwise.
*/
static __inline__ BOOL ntfs_sid_is_valid(const SID *sid)
{
if (!sid || sid->revision != SID_REVISION ||
sid->sub_authority_count > SID_MAX_SUB_AUTHORITIES)
return FALSE;
return TRUE;
}
extern int ntfs_sid_to_mbs_size(const SID *sid);
extern char *ntfs_sid_to_mbs(const SID *sid, char *sid_str,
size_t sid_str_size);
#endif /* defined _NTFS_SECURITY_H */