mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
r4336: Apply some other samba4 SAMR idl that is just too obvious. Don't hard
set the value "forcibly disconnect remote users from server when logon hours expire" to "no", instead take the value from our account-policy storage. Guenther
This commit is contained in:
parent
c3f9c81a8f
commit
e3bd2a22a5
@ -561,8 +561,7 @@ typedef struct sam_unknown_info_5_inf
|
||||
|
||||
typedef struct sam_unknown_info_2_inf
|
||||
{
|
||||
uint32 unknown_0; /* 0x0000 0000 */
|
||||
uint32 unknown_1; /* 0x8000 0000 */
|
||||
NTTIME logout; /* whether users are forcibly disconnected when logon hours expire */
|
||||
UNIHDR hdr_comment; /* comment according to samba4 idl */
|
||||
UNIHDR hdr_domain; /* domain name unicode header */
|
||||
UNIHDR hdr_server; /* server name unicode header */
|
||||
|
@ -697,10 +697,10 @@ inits a structure.
|
||||
|
||||
void init_unk_info2(SAM_UNK_INFO_2 * u_2,
|
||||
const char *comment, const char *domain, const char *server,
|
||||
uint32 seq_num, uint32 num_users, uint32 num_groups, uint32 num_alias)
|
||||
uint32 seq_num, uint32 num_users, uint32 num_groups, uint32 num_alias, NTTIME nt_logout)
|
||||
{
|
||||
u_2->unknown_0 = 0x00000000;
|
||||
u_2->unknown_1 = 0x80000000;
|
||||
u_2->logout.low = nt_logout.low;
|
||||
u_2->logout.high = nt_logout.high;
|
||||
|
||||
u_2->seq_num.low = seq_num;
|
||||
u_2->seq_num.high = 0x00000000;
|
||||
@ -736,9 +736,7 @@ static BOOL sam_io_unk_info2(const char *desc, SAM_UNK_INFO_2 * u_2,
|
||||
prs_debug(ps, depth, desc, "sam_io_unk_info2");
|
||||
depth++;
|
||||
|
||||
if(!prs_uint32("unknown_0", ps, depth, &u_2->unknown_0)) /* 0x0000 0000 */
|
||||
return False;
|
||||
if(!prs_uint32("unknown_1", ps, depth, &u_2->unknown_1)) /* 0x8000 0000 */
|
||||
if(!smb_io_time("logout", &u_2->logout, ps, depth))
|
||||
return False;
|
||||
if(!smb_io_unihdr("hdr_comment", &u_2->hdr_comment, ps, depth))
|
||||
return False;
|
||||
|
@ -2113,10 +2113,15 @@ NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SA
|
||||
}
|
||||
num_groups=info->disp_info.num_group_account;
|
||||
free_samr_db(info);
|
||||
|
||||
|
||||
account_policy_get(AP_TIME_TO_LOGOUT, &account_policy_temp);
|
||||
u_logout = account_policy_temp;
|
||||
|
||||
unix_to_nt_time_abs(&nt_logout, u_logout);
|
||||
|
||||
/* The time call below is to get a sequence number for the sam. FIXME !!! JRA. */
|
||||
init_unk_info2(&ctr->info.inf2, "", lp_workgroup(), global_myname(), (uint32) time(NULL),
|
||||
num_users, num_groups, num_aliases);
|
||||
num_users, num_groups, num_aliases, nt_logout);
|
||||
break;
|
||||
case 0x03:
|
||||
account_policy_get(AP_TIME_TO_LOGOUT, (unsigned int *)&u_logout);
|
||||
@ -4360,9 +4365,14 @@ NTSTATUS _samr_unknown_2e(pipes_struct *p, SAMR_Q_UNKNOWN_2E *q_u, SAMR_R_UNKNOW
|
||||
num_groups=info->disp_info.num_group_account;
|
||||
free_samr_db(info);
|
||||
|
||||
account_policy_get(AP_TIME_TO_LOGOUT, &account_policy_temp);
|
||||
u_logout = account_policy_temp;
|
||||
|
||||
unix_to_nt_time_abs(&nt_logout, u_logout);
|
||||
|
||||
/* The time call below is to get a sequence number for the sam. FIXME !!! JRA. */
|
||||
init_unk_info2(&ctr->info.inf2, "", lp_workgroup(), global_myname(), (uint32) time(NULL),
|
||||
num_users, num_groups, num_aliases);
|
||||
num_users, num_groups, num_aliases, nt_logout);
|
||||
break;
|
||||
case 0x03:
|
||||
account_policy_get(AP_TIME_TO_LOGOUT, &account_policy_temp);
|
||||
|
@ -161,9 +161,9 @@ static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2)
|
||||
printf("Total Aliases:\t%d\n", info2->num_local_grps);
|
||||
|
||||
printf("Sequence No:\t%d\n", info2->seq_num.low);
|
||||
|
||||
printf("Unknown 0:\t0x%x\n", info2->unknown_0);
|
||||
printf("Unknown 1:\t0x%x\n", info2->unknown_1);
|
||||
|
||||
printf("Force Logoff:\t%d\n", (int)nt_time_to_unix_abs(&info2->logout));
|
||||
|
||||
printf("Unknown 4:\t0x%x\n", info2->unknown_4);
|
||||
printf("Unknown 5:\t0x%x\n", info2->unknown_5);
|
||||
printf("Unknown 6:\t0x%x\n", info2->unknown_6);
|
||||
|
Loading…
Reference in New Issue
Block a user