mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
Added sid_peek_rid() function to return the rid of a sid. Saves mucking
around with copying a sid to a temporary variable and using sid_split_rid(). (This used to be commit 9ee43d61be1284b72fd04054c44545847c73120f)
This commit is contained in:
parent
9051f1e2c7
commit
281629ac06
@ -444,6 +444,19 @@ BOOL sid_split_rid(DOM_SID *sid, uint32 *rid)
|
||||
return False;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
Return the last rid from the end of a sid
|
||||
*****************************************************************/
|
||||
|
||||
BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid)
|
||||
{
|
||||
if (sid->num_auths > 0) {
|
||||
*rid = sid->sub_auths[sid->num_auths - 1];
|
||||
return True;
|
||||
}
|
||||
return False;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
Copies a sid
|
||||
*****************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user