diff options
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_samr_util.c | 36 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 3 | ||||
-rw-r--r-- | source3/rpc_server/srv_unixinfo_nt.c | 27 |
3 files changed, 29 insertions, 37 deletions
diff --git a/source3/rpc_server/srv_samr_util.c b/source3/rpc_server/srv_samr_util.c index c4bec79c9c..4fbd9d07d2 100644 --- a/source3/rpc_server/srv_samr_util.c +++ b/source3/rpc_server/srv_samr_util.c @@ -76,7 +76,7 @@ void copy_id21_to_sam_passwd(struct samu *to, SAM_USER_INFO_21 *from) return; if (from->fields_present & ACCT_LAST_LOGON) { - unix_time=nt_time_to_unix(&from->logon_time); + unix_time=nt_time_to_unix(from->logon_time); stored_time = pdb_get_logon_time(to); DEBUG(10,("INFO_21 LOGON_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -84,7 +84,7 @@ void copy_id21_to_sam_passwd(struct samu *to, SAM_USER_INFO_21 *from) } if (from->fields_present & ACCT_LAST_LOGOFF) { - unix_time=nt_time_to_unix(&from->logoff_time); + unix_time=nt_time_to_unix(from->logoff_time); stored_time = pdb_get_logoff_time(to); DEBUG(10,("INFO_21 LOGOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -92,7 +92,7 @@ void copy_id21_to_sam_passwd(struct samu *to, SAM_USER_INFO_21 *from) } if (from->fields_present & ACCT_EXPIRY) { - unix_time=nt_time_to_unix(&from->kickoff_time); + unix_time=nt_time_to_unix(from->kickoff_time); stored_time = pdb_get_kickoff_time(to); DEBUG(10,("INFO_21 KICKOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -100,7 +100,7 @@ void copy_id21_to_sam_passwd(struct samu *to, SAM_USER_INFO_21 *from) } if (from->fields_present & ACCT_ALLOW_PWD_CHANGE) { - unix_time=nt_time_to_unix(&from->pass_can_change_time); + unix_time=nt_time_to_unix(from->pass_can_change_time); stored_time = pdb_get_pass_can_change_time(to); DEBUG(10,("INFO_21 PASS_CAN_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -108,7 +108,7 @@ void copy_id21_to_sam_passwd(struct samu *to, SAM_USER_INFO_21 *from) } if (from->fields_present & ACCT_LAST_PWD_CHANGE) { - unix_time=nt_time_to_unix(&from->pass_last_set_time); + unix_time=nt_time_to_unix(from->pass_last_set_time); stored_time = pdb_get_pass_last_set_time(to); DEBUG(10,("INFO_21 PASS_LAST_SET: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -116,7 +116,7 @@ void copy_id21_to_sam_passwd(struct samu *to, SAM_USER_INFO_21 *from) } if (from->fields_present & ACCT_FORCE_PWD_CHANGE) { - unix_time=nt_time_to_unix(&from->pass_must_change_time); + unix_time=nt_time_to_unix(from->pass_must_change_time); stored_time=pdb_get_pass_must_change_time(to); DEBUG(10,("INFO_21 PASS_MUST_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -324,7 +324,7 @@ void copy_id23_to_sam_passwd(struct samu *to, SAM_USER_INFO_23 *from) return; if (from->fields_present & ACCT_LAST_LOGON) { - unix_time=nt_time_to_unix(&from->logon_time); + unix_time=nt_time_to_unix(from->logon_time); stored_time = pdb_get_logon_time(to); DEBUG(10,("INFO_23 LOGON_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -332,7 +332,7 @@ void copy_id23_to_sam_passwd(struct samu *to, SAM_USER_INFO_23 *from) } if (from->fields_present & ACCT_LAST_LOGOFF) { - unix_time=nt_time_to_unix(&from->logoff_time); + unix_time=nt_time_to_unix(from->logoff_time); stored_time = pdb_get_logoff_time(to); DEBUG(10,("INFO_23 LOGOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -340,7 +340,7 @@ void copy_id23_to_sam_passwd(struct samu *to, SAM_USER_INFO_23 *from) } if (from->fields_present & ACCT_EXPIRY) { - unix_time=nt_time_to_unix(&from->kickoff_time); + unix_time=nt_time_to_unix(from->kickoff_time); stored_time = pdb_get_kickoff_time(to); DEBUG(10,("INFO_23 KICKOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -348,7 +348,7 @@ void copy_id23_to_sam_passwd(struct samu *to, SAM_USER_INFO_23 *from) } if (from->fields_present & ACCT_ALLOW_PWD_CHANGE) { - unix_time=nt_time_to_unix(&from->pass_can_change_time); + unix_time=nt_time_to_unix(from->pass_can_change_time); stored_time = pdb_get_pass_can_change_time(to); DEBUG(10,("INFO_23 PASS_CAN_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -356,7 +356,7 @@ void copy_id23_to_sam_passwd(struct samu *to, SAM_USER_INFO_23 *from) } if (from->fields_present & ACCT_LAST_PWD_CHANGE) { - unix_time=nt_time_to_unix(&from->pass_last_set_time); + unix_time=nt_time_to_unix(from->pass_last_set_time); stored_time = pdb_get_pass_last_set_time(to); DEBUG(10,("INFO_23 PASS_LAST_SET: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -364,7 +364,7 @@ void copy_id23_to_sam_passwd(struct samu *to, SAM_USER_INFO_23 *from) } if (from->fields_present & ACCT_FORCE_PWD_CHANGE) { - unix_time=nt_time_to_unix(&from->pass_must_change_time); + unix_time=nt_time_to_unix(from->pass_must_change_time); stored_time=pdb_get_pass_must_change_time(to); DEBUG(10,("INFO_23 PASS_MUST_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -562,7 +562,7 @@ void copy_id25_to_sam_passwd(struct samu *to, SAM_USER_INFO_25 *from) return; if (from->fields_present & ACCT_LAST_LOGON) { - unix_time=nt_time_to_unix(&from->logon_time); + unix_time=nt_time_to_unix(from->logon_time); stored_time = pdb_get_logon_time(to); DEBUG(10,("INFO_25 LOGON_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -570,7 +570,7 @@ void copy_id25_to_sam_passwd(struct samu *to, SAM_USER_INFO_25 *from) } if (from->fields_present & ACCT_LAST_LOGOFF) { - unix_time=nt_time_to_unix(&from->logoff_time); + unix_time=nt_time_to_unix(from->logoff_time); stored_time = pdb_get_logoff_time(to); DEBUG(10,("INFO_25 LOGOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -578,7 +578,7 @@ void copy_id25_to_sam_passwd(struct samu *to, SAM_USER_INFO_25 *from) } if (from->fields_present & ACCT_EXPIRY) { - unix_time=nt_time_to_unix(&from->kickoff_time); + unix_time=nt_time_to_unix(from->kickoff_time); stored_time = pdb_get_kickoff_time(to); DEBUG(10,("INFO_25 KICKOFF_TIME: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -586,7 +586,7 @@ void copy_id25_to_sam_passwd(struct samu *to, SAM_USER_INFO_25 *from) } if (from->fields_present & ACCT_ALLOW_PWD_CHANGE) { - unix_time=nt_time_to_unix(&from->pass_can_change_time); + unix_time=nt_time_to_unix(from->pass_can_change_time); stored_time = pdb_get_pass_can_change_time(to); DEBUG(10,("INFO_25 PASS_CAN_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -594,7 +594,7 @@ void copy_id25_to_sam_passwd(struct samu *to, SAM_USER_INFO_25 *from) } if (from->fields_present & ACCT_LAST_PWD_CHANGE) { - unix_time=nt_time_to_unix(&from->pass_last_set_time); + unix_time=nt_time_to_unix(from->pass_last_set_time); stored_time = pdb_get_pass_last_set_time(to); DEBUG(10,("INFO_25 PASS_LAST_SET: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) @@ -602,7 +602,7 @@ void copy_id25_to_sam_passwd(struct samu *to, SAM_USER_INFO_25 *from) } if (from->fields_present & ACCT_FORCE_PWD_CHANGE) { - unix_time=nt_time_to_unix(&from->pass_must_change_time); + unix_time=nt_time_to_unix(from->pass_must_change_time); stored_time=pdb_get_pass_must_change_time(to); DEBUG(10,("INFO_25 PASS_MUST_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time)); if (stored_time != unix_time) diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 6548bf3c6d..e60a431846 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -5287,8 +5287,7 @@ static void fill_printer_driver_info_6(DRIVER_INFO_6 *info, NT_PRINTER_DRIVER_IN info->previousdrivernames=NULL; init_unistr_array(&info->previousdrivernames, &nullstr, servername); - info->driver_date.low=0; - info->driver_date.high=0; + info->driver_date=0; info->padding=0; info->driver_version_low=0; diff --git a/source3/rpc_server/srv_unixinfo_nt.c b/source3/rpc_server/srv_unixinfo_nt.c index 79756f20a7..2d479b42f6 100644 --- a/source3/rpc_server/srv_unixinfo_nt.c +++ b/source3/rpc_server/srv_unixinfo_nt.c @@ -34,12 +34,11 @@ NTSTATUS _unixinfo_sid_to_uid(pipes_struct *p, { uid_t uid; - r_u->uid.low = 0; - r_u->uid.high = 0; + r_u->uid = 0; r_u->status = sid_to_uid(&q_u->sid, &uid) ? NT_STATUS_OK : NT_STATUS_NONE_MAPPED; if (NT_STATUS_IS_OK(r_u->status)) - r_u->uid.low = uid; + r_u->uid = uid; return r_u->status; } @@ -54,8 +53,8 @@ NTSTATUS _unixinfo_uid_to_sid(pipes_struct *p, r_u->status = NT_STATUS_NO_SUCH_USER; - if (q_u->uid.high == 0) { - uid_to_sid(&sid, q_u->uid.low); + if (q_u->uid == 0) { + uid_to_sid(&sid, q_u->uid); r_u->status = NT_STATUS_OK; } @@ -73,12 +72,11 @@ NTSTATUS _unixinfo_sid_to_gid(pipes_struct *p, { gid_t gid; - r_u->gid.low = 0; - r_u->gid.high = 0; + r_u->gid = 0; r_u->status = sid_to_gid(&q_u->sid, &gid) ? NT_STATUS_OK : NT_STATUS_NONE_MAPPED; if (NT_STATUS_IS_OK(r_u->status)) - r_u->gid.low = gid; + r_u->gid = gid; return r_u->status; } @@ -93,8 +91,8 @@ NTSTATUS _unixinfo_gid_to_sid(pipes_struct *p, r_u->status = NT_STATUS_NO_SUCH_USER; - if (q_u->gid.high == 0) { - gid_to_sid(&sid, q_u->gid.low); + if (q_u->gid == 0) { + gid_to_sid(&sid, q_u->gid); r_u->status = NT_STATUS_OK; } @@ -135,15 +133,10 @@ NTSTATUS _unixinfo_getpwuid(pipes_struct *p, r_u->info[i].homedir = ""; r_u->info[i].shell = ""; - if (q_u->uid[i].high != 0) { - DEBUG(10, ("64-bit uids not yet supported...\n")); - continue; - } - - pw = getpwuid(q_u->uid[i].low); + pw = getpwuid(q_u->uid[i]); if (pw == NULL) { - DEBUG(10, ("Did not find uid %d\n", q_u->uid[i].low)); + DEBUG(10, ("Did not find uid %lld\n", q_u->uid[i])); continue; } |