summaryrefslogtreecommitdiffstats
path: root/source/utils/smbpasswd.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-20 20:09:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:15 -0500
commit19b7593972480540283c5bf02c02e5ecd8d2c3f0 (patch)
treee9f73bc16957b97a25feef09d7be31057d7edb12 /source/utils/smbpasswd.c
parentaf57e4a4cc5efc9c7aba35790cf10377c76b5e4a (diff)
downloadsamba-19b7593972480540283c5bf02c02e5ecd8d2c3f0.tar.gz
samba-19b7593972480540283c5bf02c02e5ecd8d2c3f0.tar.xz
samba-19b7593972480540283c5bf02c02e5ecd8d2c3f0.zip
r13576: This is the beginnings of moving the SAM_ACCOUNT data structure
to make full use of the new talloc() interface. Discussed with Volker and Jeremy. * remove the internal mem_ctx and simply use the talloc() structure as the context. * replace the internal free_fn() with a talloc_destructor() function * remove the unnecessary private nested structure * rename SAM_ACCOUNT to 'struct samu' to indicate the current an upcoming changes. Groups will most likely be replaced with a 'struct samg' in the future. Note that there are now passbd API changes. And for the most part, the wrapper functions remain the same. While this code has been tested on tdb and ldap based Samba PDC's as well as Samba member servers, there are probably still some bugs. The code also needs more testing under valgrind to ensure it's not leaking memory. But it's a start......
Diffstat (limited to 'source/utils/smbpasswd.c')
-rw-r--r--source/utils/smbpasswd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c
index a42361780eb..61e97fd692f 100644
--- a/source/utils/smbpasswd.c
+++ b/source/utils/smbpasswd.c
@@ -401,7 +401,7 @@ static int process_root(int local_flags)
*/
if(local_flags & LOCAL_ENABLE_USER) {
- SAM_ACCOUNT *sampass = NULL;
+ struct samu *sampass = NULL;
BOOL ret;
pdb_init_sam(&sampass);
@@ -410,7 +410,7 @@ static int process_root(int local_flags)
(pdb_get_lanman_passwd(sampass) == NULL)) {
local_flags |= LOCAL_SET_PASSWORD;
}
- pdb_free_sam(&sampass);
+ TALLOC_FREE(sampass);
}
}
@@ -435,7 +435,7 @@ static int process_root(int local_flags)
if(remote_machine) {
printf("Password changed for user %s on %s.\n", user_name, remote_machine );
} else if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD|LOCAL_SET_PASSWORD))) {
- SAM_ACCOUNT *sampass = NULL;
+ struct samu *sampass = NULL;
BOOL ret;
pdb_init_sam(&sampass);
@@ -447,7 +447,7 @@ static int process_root(int local_flags)
if((ret != False) && (pdb_get_acct_ctrl(sampass) & ACB_PWNOTREQ) )
printf(" User has no password flag set.");
printf("\n");
- pdb_free_sam(&sampass);
+ TALLOC_FREE(sampass);
}
done: