in create_token_from_username(). This caused set_nt_acl to
partially fail in certain circumstances.
This is expected to bring an improvement to bug #4308.
Michael
}
if (sid_check_is_in_our_domain(&user_sid)) {
+ BOOL ret;
/* This is a passdb user, so ask passdb */
goto done;
}
- if (!pdb_getsampwsid(sam_acct, &user_sid)) {
+ become_root();
+ ret = pdb_getsampwsid(sam_acct, &user_sid);
+ unbecome_root();
+
+ if (!ret) {
DEBUG(1, ("pdb_getsampwsid(%s) for user %s failed\n",
sid_string_static(&user_sid), username));
DEBUGADD(1, ("Fall back to unix user %s\n", username));