git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2fb111f
)
libds:flag_mapping.c - introduce a call which maps the "userAccountControl" to the...
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Sun, 12 Sep 2010 16:00:21 +0000
(18:00 +0200)
committer
Matthias Dieter Wallnöfer
<mdw@samba.org>
Sun, 12 Sep 2010 17:23:06 +0000
(19:23 +0200)
libds/common/flag_mapping.c
patch
|
blob
|
history
diff --git
a/libds/common/flag_mapping.c
b/libds/common/flag_mapping.c
index d95780ed5443b12be2ad7db1a4e8b948d84e73e2..dfe619971f8382d4449fca5e933c495c0991224b 100644
(file)
--- a/
libds/common/flag_mapping.c
+++ b/
libds/common/flag_mapping.c
@@
-4,6
+4,7
@@
Copyright (C) Stefan (metze) Metzmacher 2002
Copyright (C) Andrew Tridgell 2004
Copyright (C) Stefan (metze) Metzmacher 2002
Copyright (C) Andrew Tridgell 2004
+ Copyright (C) Matthias Dieter Wallnöfer 2010
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-145,3
+146,15
@@
enum lsa_SidType ds_atype_map(uint32_t atype)
}
return SID_NAME_UNKNOWN;
}
}
return SID_NAME_UNKNOWN;
}
+
+/* get the default primary group RID for a given userAccountControl
+ * (informations according to MS-SAMR 3.1.1.8.1) */
+uint32_t ds_uf2prim_group_rid(uint32_t uf)
+{
+ uint32_t prim_group_rid = DOMAIN_RID_USERS;
+
+ if (uf & UF_SERVER_TRUST_ACCOUNT) prim_group_rid = DOMAIN_RID_DCS;
+ else if (uf & UF_WORKSTATION_TRUST_ACCOUNT) prim_group_rid = DOMAIN_RID_DOMAIN_MEMBERS;
+
+ return prim_group_rid;
+}