Ignore:
Timestamp:
May 24, 2009, 7:55:48 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 branch to 3.3.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/utils/smbpasswd.c

    r206 r224  
    431431               
    432432                if((local_flags & LOCAL_SET_PASSWORD) && (new_passwd == NULL)) {
    433                         struct passwd *passwd = getpwnam_alloc(NULL, user_name);
    434 
    435                         if (!passwd) {
    436                                 fprintf(stderr, "Cannot locate Unix account for "
    437                                         "'%s'!\n", user_name);
    438                                 exit(1);
     433                        struct passwd *passwd;
     434
     435                        if (remote_machine == NULL) {
     436                                passwd = getpwnam_alloc(NULL, user_name);
     437
     438                                if (!passwd) {
     439                                        fprintf(stderr, "Cannot locate Unix account for "
     440                                                "'%s'!\n", user_name);
     441                                        exit(1);
     442                                }
     443                                TALLOC_FREE(passwd);
    439444                        }
    440                         TALLOC_FREE(passwd);
    441445
    442446                        new_passwd = prompt_for_new_password(stdin_passwd_get);
Note: See TracChangeset for help on using the changeset viewer.