mirror of
https://github.com/samba-team/samba.git
synced 2025-11-27 08:23:49 +03:00
r13316: Let the carnage begin....
Sync with trunk as off r13315
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
50c894a6e9
commit
17e63ac4ed
@@ -1396,7 +1396,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
|
||||
uint32 user_flgs, uchar user_session_key[16],
|
||||
uchar lm_session_key[16],
|
||||
const char *logon_srv, const char *logon_dom,
|
||||
const DOM_SID *dom_sid, const char *other_sids)
|
||||
const DOM_SID *dom_sid)
|
||||
{
|
||||
/* only cope with one "other" sid, right now. */
|
||||
/* need to count the number of space-delimited sids */
|
||||
@@ -1454,7 +1454,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
|
||||
memcpy(usr->lm_sess_key, lm_session_key, sizeof(usr->lm_sess_key));
|
||||
}
|
||||
|
||||
num_other_sids = init_dom_sid2s(ctx, other_sids, &usr->other_sids);
|
||||
num_other_sids = init_dom_sid2s(ctx, NULL, &usr->other_sids);
|
||||
|
||||
usr->num_other_sids = num_other_sids;
|
||||
usr->buffer_other_sids = (num_other_sids != 0) ? 1 : 0;
|
||||
@@ -1488,6 +1488,47 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
|
||||
|
||||
init_dom_sid2(&usr->dom_sid, dom_sid);
|
||||
/* "other" sids are set up above */
|
||||
}
|
||||
|
||||
void dump_acct_flags(uint32 acct_flags) {
|
||||
|
||||
int lvl = 10;
|
||||
DEBUG(lvl,("dump_acct_flags\n"));
|
||||
if (acct_flags & ACB_NORMAL) {
|
||||
DEBUGADD(lvl,("\taccount has UF_NORMAL_ACCOUNT\n"));
|
||||
}
|
||||
if (acct_flags & ACB_PWNOEXP) {
|
||||
DEBUGADD(lvl,("\taccount has UF_DONT_EXPIRE_PASSWD\n"));
|
||||
}
|
||||
if (acct_flags & ACB_ENC_TXT_PWD_ALLOWED) {
|
||||
DEBUGADD(lvl,("\taccount has UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED\n"));
|
||||
}
|
||||
if (acct_flags & ACB_NOT_DELEGATED) {
|
||||
DEBUGADD(lvl,("\taccount has UF_NOT_DELEGATED\n"));
|
||||
}
|
||||
if (acct_flags & ACB_USE_DES_KEY_ONLY) {
|
||||
DEBUGADD(lvl,("\taccount has UF_USE_DES_KEY_ONLY set, sig verify wont work\n"));
|
||||
}
|
||||
}
|
||||
|
||||
void dump_user_flgs(uint32 user_flags) {
|
||||
|
||||
int lvl = 10;
|
||||
DEBUG(lvl,("dump_user_flgs\n"));
|
||||
if (user_flags & LOGON_EXTRA_SIDS) {
|
||||
DEBUGADD(lvl,("\taccount has LOGON_EXTRA_SIDS\n"));
|
||||
}
|
||||
if (user_flags & LOGON_RESOURCE_GROUPS) {
|
||||
DEBUGADD(lvl,("\taccount has LOGON_RESOURCE_GROUPS\n"));
|
||||
}
|
||||
if (user_flags & LOGON_NTLMV2_ENABLED) {
|
||||
DEBUGADD(lvl,("\taccount has LOGON_NTLMV2_ENABLED\n"));
|
||||
}
|
||||
if (user_flags & LOGON_CACHED_ACCOUNT) {
|
||||
DEBUGADD(lvl,("\taccount has LOGON_CACHED_ACCOUNT\n"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
@@ -1562,7 +1603,7 @@ BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps,
|
||||
return False;
|
||||
if(!prs_uint32("user_flgs ", ps, depth, &usr->user_flgs)) /* user flags */
|
||||
return False;
|
||||
|
||||
dump_user_flgs(usr->user_flgs);
|
||||
if(!prs_uint8s(False, "user_sess_key", ps, depth, usr->user_sess_key, 16)) /* user session key */
|
||||
return False;
|
||||
|
||||
@@ -1579,7 +1620,7 @@ BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps,
|
||||
|
||||
if(!prs_uint32("acct_flags ", ps, depth, &usr->acct_flags)) /* Account flags */
|
||||
return False;
|
||||
|
||||
dump_acct_flags(usr->acct_flags);
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
if (!prs_uint32("unkown", ps, depth, &usr->unknown[i])) /* unknown */
|
||||
|
||||
Reference in New Issue
Block a user