diff options
author | Jeremy Allison <jra@samba.org> | 2007-12-03 18:48:41 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-03 18:48:41 -0800 |
commit | adf6d848de8ae32a83c7271d8ccd24d2cf8b47f7 (patch) | |
tree | a6b9ac6f4175a10b4e71829d61db9e076aad969e /source3/utils/pdbedit.c | |
parent | 328a57e1ca5fc0e0206fdb565d5951912e84dc5e (diff) | |
download | samba-adf6d848de8ae32a83c7271d8ccd24d2cf8b47f7.tar.gz samba-adf6d848de8ae32a83c7271d8ccd24d2cf8b47f7.tar.bz2 samba-adf6d848de8ae32a83c7271d8ccd24d2cf8b47f7.zip |
Getting to the home stretch for elimination of pstrings...
Jeremy.
(This used to be commit 041163551194102ca67fef52c57d87020a1d09bc)
Diffstat (limited to 'source3/utils/pdbedit.c')
-rw-r--r-- | source3/utils/pdbedit.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 7af417098a..c72d98953d 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -221,11 +221,11 @@ static int print_sam_info (struct samu *sam_pwent, bool verbosity, bool smbpwdst /* TODO: chaeck if entry is a user or a workstation */ if (!sam_pwent) return -1; - + if (verbosity) { - pstring temp; + char temp[44]; const uint8 *hours; - + printf ("Unix username: %s\n", pdb_get_username(sam_pwent)); printf ("NT username: %s\n", pdb_get_nt_username(sam_pwent)); printf ("Account Flags: %s\n", pdb_encode_acct_ctrl(pdb_get_acct_ctrl(sam_pwent), NEW_PW_FORMAT_SPACE_PADDED_LEN)); @@ -242,34 +242,34 @@ static int print_sam_info (struct samu *sam_pwent, bool verbosity, bool smbpwdst printf ("Account desc: %s\n", pdb_get_acct_desc(sam_pwent)); printf ("Workstations: %s\n", pdb_get_workstations(sam_pwent)); printf ("Munged dial: %s\n", pdb_get_munged_dial(sam_pwent)); - + tmp = pdb_get_logon_time(sam_pwent); printf ("Logon time: %s\n", tmp ? http_timestring(tmp) : "0"); - + tmp = pdb_get_logoff_time(sam_pwent); printf ("Logoff time: %s\n", tmp ? http_timestring(tmp) : "0"); - + tmp = pdb_get_kickoff_time(sam_pwent); printf ("Kickoff time: %s\n", tmp ? http_timestring(tmp) : "0"); - + tmp = pdb_get_pass_last_set_time(sam_pwent); printf ("Password last set: %s\n", tmp ? http_timestring(tmp) : "0"); - + tmp = pdb_get_pass_can_change_time(sam_pwent); printf ("Password can change: %s\n", tmp ? http_timestring(tmp) : "0"); - + tmp = pdb_get_pass_must_change_time(sam_pwent); printf ("Password must change: %s\n", tmp ? http_timestring(tmp) : "0"); tmp = pdb_get_bad_password_time(sam_pwent); printf ("Last bad password : %s\n", tmp ? http_timestring(tmp) : "0"); - printf ("Bad password count : %d\n", + printf ("Bad password count : %d\n", pdb_get_bad_password_count(sam_pwent)); - + hours = pdb_get_hours(sam_pwent); pdb_sethexhours(temp, hours); printf ("Logon hours : %s\n", temp); - + } else if (smbpwdstyle) { char lm_passwd[33]; char nt_passwd[33]; @@ -277,7 +277,7 @@ static int print_sam_info (struct samu *sam_pwent, bool verbosity, bool smbpwdst uid = nametouid(pdb_get_username(sam_pwent)); pdb_sethexpwd(lm_passwd, pdb_get_lanman_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent)); pdb_sethexpwd(nt_passwd, pdb_get_nt_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent)); - + printf("%s:%lu:%s:%s:%s:LCT-%08X:\n", pdb_get_username(sam_pwent), (unsigned long)uid, |