1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +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 commit is contained in:
Tim Potter 0001-01-01 00:00:00 +00:00
parent f0b8ff4eeb
commit 9ee43d61be

View File

@ -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
*****************************************************************/