1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

r14025: Remove unused code. When we want to export samsync, we better first port

pidl...

Fix Coverity # 15.

Volker
This commit is contained in:
Volker Lendecke 2006-03-08 06:51:38 +00:00 committed by Gerald (Jerry) Carter
parent 9c55bf74ca
commit 29b4b986cc

View File

@ -2239,86 +2239,6 @@ static BOOL net_io_sam_passwd_info(const char *desc, SAM_PWD * pwd,
return True;
}
/*******************************************************************
makes a SAM_ACCOUNT_INFO structure.
********************************************************************/
BOOL make_sam_account_info(SAM_ACCOUNT_INFO * info,
const UNISTR2 *user_name,
const UNISTR2 *full_name,
uint32 user_rid, uint32 group_rid,
const UNISTR2 *home_dir,
const UNISTR2 *dir_drive,
const UNISTR2 *log_scr,
const UNISTR2 *desc,
uint32 acb_info,
const UNISTR2 *prof_path,
const UNISTR2 *wkstas,
const UNISTR2 *unk_str, const UNISTR2 *mung_dial)
{
int len_user_name = user_name != NULL ? user_name->uni_str_len : 0;
int len_full_name = full_name != NULL ? full_name->uni_str_len : 0;
int len_home_dir = home_dir != NULL ? home_dir->uni_str_len : 0;
int len_dir_drive = dir_drive != NULL ? dir_drive->uni_str_len : 0;
int len_logon_script = log_scr != NULL ? log_scr->uni_str_len : 0;
int len_profile_path = prof_path != NULL ? prof_path->uni_str_len : 0;
int len_description = desc != NULL ? desc->uni_str_len : 0;
int len_workstations = wkstas != NULL ? wkstas->uni_str_len : 0;
int len_unknown_str = unk_str != NULL ? unk_str->uni_str_len : 0;
int len_munged_dial = mung_dial != NULL ? mung_dial->uni_str_len : 0;
DEBUG(5, ("make_sam_account_info\n"));
make_uni_hdr(&info->hdr_acct_name, len_user_name);
make_uni_hdr(&info->hdr_full_name, len_full_name);
make_uni_hdr(&info->hdr_home_dir, len_home_dir);
make_uni_hdr(&info->hdr_dir_drive, len_dir_drive);
make_uni_hdr(&info->hdr_logon_script, len_logon_script);
make_uni_hdr(&info->hdr_profile, len_profile_path);
make_uni_hdr(&info->hdr_acct_desc, len_description);
make_uni_hdr(&info->hdr_workstations, len_workstations);
make_uni_hdr(&info->hdr_comment, len_unknown_str);
make_uni_hdr(&info->hdr_parameters, len_munged_dial);
/* not present */
make_bufhdr2(&info->hdr_sec_desc, 0, 0, 0);
info->user_rid = user_rid;
info->group_rid = group_rid;
init_nt_time(&info->logon_time);
init_nt_time(&info->logoff_time);
init_nt_time(&info->pwd_last_set_time);
init_nt_time(&info->acct_expiry_time);
info->logon_divs = 0xA8;
info->ptr_logon_hrs = 0; /* Don't care right now */
info->bad_pwd_count = 0;
info->logon_count = 0;
info->acb_info = acb_info;
info->nt_pwd_present = 0;
info->lm_pwd_present = 0;
info->pwd_expired = 0;
info->country = 0;
info->codepage = 0;
info->unknown1 = 0x4EC;
info->unknown2 = 0;
copy_unistr2(&info->uni_acct_name, user_name);
copy_unistr2(&info->uni_full_name, full_name);
copy_unistr2(&info->uni_home_dir, home_dir);
copy_unistr2(&info->uni_dir_drive, dir_drive);
copy_unistr2(&info->uni_logon_script, log_scr);
copy_unistr2(&info->uni_profile, prof_path);
copy_unistr2(&info->uni_acct_desc, desc);
copy_unistr2(&info->uni_workstations, wkstas);
copy_unistr2(&info->uni_comment, unk_str);
copy_unistr2(&info->uni_parameters, mung_dial);
return True;
}
/*******************************************************************
reads or writes a structure.
********************************************************************/