mirror of
https://github.com/altlinux/admc.git
synced 2025-03-22 14:50:36 +03:00
Add sid_copy() implementation to the old Samba sources
This commit is contained in:
parent
267a0f5e60
commit
f55182497e
@ -584,3 +584,20 @@ char *dom_sid_str_buf(const struct dom_sid *sid, struct dom_sid_buf *dst)
|
||||
}
|
||||
return dst->buf;
|
||||
}
|
||||
|
||||
// taken from libcli/security/util_sid.c
|
||||
|
||||
void sid_copy(struct dom_sid *dst, const struct dom_sid *src)
|
||||
{
|
||||
int i;
|
||||
|
||||
*dst = (struct dom_sid) {
|
||||
.sid_rev_num = src->sid_rev_num,
|
||||
.num_auths = src->num_auths,
|
||||
};
|
||||
|
||||
memcpy(&dst->id_auth[0], &src->id_auth[0], sizeof(src->id_auth));
|
||||
|
||||
for (i = 0; i < src->num_auths; i++)
|
||||
dst->sub_auths[i] = src->sub_auths[i];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user