diff options
Diffstat (limited to 'source3/utils/pdbedit.c')
-rw-r--r-- | source3/utils/pdbedit.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index d0629fa258..ce5195a810 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -128,12 +128,12 @@ static int print_user_info (char *username, BOOL verbosity, BOOL smbpwdstyle) if (ret==False) { fprintf (stderr, "Username not found!\n"); - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return -1; } ret=print_sam_info (sam_pwent, verbosity, smbpwdstyle); - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return ret; } @@ -151,7 +151,7 @@ static int print_users_list (BOOL verbosity, BOOL smbpwdstyle) ret = pdb_setsampwent(False); if (ret && errno == ENOENT) { fprintf (stderr,"Password database not found!\n"); - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); exit(1); } @@ -163,7 +163,7 @@ static int print_users_list (BOOL verbosity, BOOL smbpwdstyle) } pdb_endsampwent (); - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return 0; } @@ -181,7 +181,7 @@ static int set_user_info (char *username, char *fullname, char *homedir, char *d ret = pdb_getsampwnam (sam_pwent, username); if (ret==False) { fprintf (stderr, "Username not found!\n"); - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return -1; } @@ -200,10 +200,10 @@ static int set_user_info (char *username, char *fullname, char *homedir, char *d print_user_info (username, True, False); else { fprintf (stderr, "Unable to modify entry!\n"); - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return -1; } - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return 0; } @@ -222,7 +222,7 @@ static int new_user (char *username, char *fullname, char *homedir, char *drive, if (!(pwd = sys_getpwnam(username))) { fprintf (stderr, "User %s does not exist in system passwd!\n", username); - pdb_free_sam (sam_pwent); + pdb_free_sam (&sam_pwent); return -1; } @@ -230,7 +230,7 @@ static int new_user (char *username, char *fullname, char *homedir, char *drive, password2 = getpass("retype new password:"); if (strcmp (password1, password2)) { fprintf (stderr, "Passwords does not match!\n"); - pdb_free_sam (sam_pwent); + pdb_free_sam (&sam_pwent); return -1; } @@ -260,10 +260,10 @@ static int new_user (char *username, char *fullname, char *homedir, char *drive, print_user_info (username, True, False); } else { fprintf (stderr, "Unable to add user! (does it alredy exist?)\n"); - pdb_free_sam (sam_pwent); + pdb_free_sam (&sam_pwent); return -1; } - pdb_free_sam (sam_pwent); + pdb_free_sam (&sam_pwent); return 0; } @@ -297,7 +297,7 @@ static int new_machine (char *machinename) for (uid=BASE_MACHINE_UID; uid<=MAX_MACHINE_UID; uid++) { pdb_init_sam (&sam_trust); if (pdb_getsampwuid (sam_trust, uid)) { - pdb_free_sam (sam_trust); + pdb_free_sam (&sam_trust); } else { break; } @@ -305,7 +305,7 @@ static int new_machine (char *machinename) if (uid>MAX_MACHINE_UID) { fprintf (stderr, "No more free UIDs available to Machine accounts!\n"); - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return -1; } @@ -319,10 +319,10 @@ static int new_machine (char *machinename) print_user_info (name, True, False); } else { fprintf (stderr, "Unable to add machine! (does it already exist?)\n"); - pdb_free_sam (sam_pwent); + pdb_free_sam (&sam_pwent); return -1; } - pdb_free_sam (sam_pwent); + pdb_free_sam (&sam_pwent); return 0; } @@ -383,7 +383,7 @@ static int import_users (char *filename) fgets(linebuf, 256, fp); if (ferror(fp)) { fprintf (stderr, "%s\n", strerror (ferror (fp))); - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return -1; } if ((linebuf_len = strlen(linebuf)) == 0) { @@ -401,7 +401,7 @@ static int import_users (char *filename) linebuf[linebuf_len] = '\0'; if ((linebuf[0] == 0) && feof(fp)) { /*end of file!!*/ - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return 0; } line++; @@ -558,7 +558,7 @@ static int import_users (char *filename) pdb_reset_sam (sam_pwent); } printf ("%d lines read.\n%d entryes imported\n", line, good); - pdb_free_sam(sam_pwent); + pdb_free_sam(&sam_pwent); return 0; } |