|
Lines 73-78
Link Here
|
| 73 |
#define DOM_SID_STR_BUFLEN (15*11+25) |
73 |
#define DOM_SID_STR_BUFLEN (15*11+25) |
| 74 |
// From openldap/servers/slapd/slap.h |
74 |
// From openldap/servers/slapd/slap.h |
| 75 |
#define SLAP_LDAPDN_MAXLEN 8192 |
75 |
#define SLAP_LDAPDN_MAXLEN 8192 |
|
|
76 |
#define UF_SERVER_TRUST_ACCOUNT 0x00002000 |
| 76 |
|
77 |
|
| 77 |
char *sid_to_string(const struct dom_sid *sid) |
78 |
char *sid_to_string(const struct dom_sid *sid) |
| 78 |
{ |
79 |
{ |
|
Lines 134-139
static int univention_samaccountname_ldap_check_add(struct ldb_module *module, s
Link Here
|
| 134 |
struct ldb_context *ldb; |
135 |
struct ldb_context *ldb; |
| 135 |
struct ldb_message *msg; |
136 |
struct ldb_message *msg; |
| 136 |
struct ldb_message_element *attribute; |
137 |
struct ldb_message_element *attribute; |
|
|
138 |
uint32_t attribute_uac; |
| 137 |
struct ldb_request *down_req = NULL; |
139 |
struct ldb_request *down_req = NULL; |
| 138 |
bool is_computer = false; |
140 |
bool is_computer = false; |
| 139 |
bool is_group = false; |
141 |
bool is_group = false; |
|
Lines 181-186
static int univention_samaccountname_ldap_check_add(struct ldb_module *module, s
Link Here
|
| 181 |
return ldb_next_request(module, req); |
183 |
return ldb_next_request(module, req); |
| 182 |
} |
184 |
} |
| 183 |
|
185 |
|
|
|
186 |
attribute_uac = ldb_msg_find_attr_as_uint(req->op.add.message, "userAccountControl", 0); |
| 187 |
if (attribute_uac & UF_SERVER_TRUST_ACCOUNT) { |
| 188 |
// It's a DC, we can't handle this in selectiveudm/create_windows_computer |
| 189 |
ldb_debug(ldb, LDB_DEBUG_WARNING, ("%s: new computer object '%s' is a DC, that's ok\n"), ldb_module_get_name(module), attribute->values[0].data); |
| 190 |
return ldb_next_request(module, req); |
| 191 |
} |
| 192 |
|
| 184 |
char *opt_name = malloc(5 + attribute->values[0].length + 1); |
193 |
char *opt_name = malloc(5 + attribute->values[0].length + 1); |
| 185 |
if (opt_name == NULL) { |
194 |
if (opt_name == NULL) { |
| 186 |
return ldb_module_oom(module); |
195 |
return ldb_module_oom(module); |