Ignore:
Timestamp:
Jun 16, 2009, 5:52:30 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 to 3.2.12

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/auth/auth_util.c

    r233 r272  
    293293        unsigned char key[16];
    294294       
    295         ZERO_STRUCT(key);
    296         memcpy(key, dc_sess_key, 8);
     295        memcpy(key, dc_sess_key, 16);
    297296       
    298297        if (lm_interactive_pwd)
     
    868867                                                pdb_get_username(sam_acct));
    869868
     869                /*
     870                 * If the SID from lookup_name() was the guest sid, passdb knows
     871                 * about the mapping of guest sid to lp_guestaccount()
     872                 * username and will return the unix_pw info for a guest
     873                 * user. Use it if it's there, else lookup the *uid details
     874                 * using getpwnam_alloc(). See bug #6291 for details. JRA.
     875                 */
     876
     877                /* We must always assign the *uid. */
     878                if (sam_acct->unix_pw == NULL) {
     879                        struct passwd *pwd = getpwnam_alloc(sam_acct, *found_username );
     880                        if (!pwd) {
     881                                DEBUG(10, ("getpwnam_alloc failed for %s\n",
     882                                        *found_username));
     883                                result = NT_STATUS_NO_SUCH_USER;
     884                                goto done;
     885                        }
     886                        result = samu_set_unix(sam_acct, pwd );
     887                        if (!NT_STATUS_IS_OK(result)) {
     888                                DEBUG(10, ("samu_set_unix failed for %s\n",
     889                                        *found_username));
     890                                result = NT_STATUS_NO_SUCH_USER;
     891                                goto done;
     892                        }
     893                }
     894                *uid = sam_acct->unix_pw->pw_uid;
     895
    870896        } else  if (sid_check_is_in_unix_users(&user_sid)) {
    871897
     
    884910
    885911                if (!sid_to_uid(&user_sid, uid)) {
    886                         DEBUG(1, ("sid_to_uid for %s (%s) failed\n",
     912                        DEBUG(1, ("unix_user case, sid_to_uid for %s (%s) failed\n",
    887913                                  username, sid_string_dbg(&user_sid)));
     914                        result = NT_STATUS_NO_SUCH_USER;
    888915                        goto done;
    889916                }
     
    937964
    938965                uint32 dummy;
     966
     967                /* We must always assign the *uid. */
     968                if (!sid_to_uid(&user_sid, uid)) {
     969                        DEBUG(1, ("winbindd case, sid_to_uid for %s (%s) failed\n",
     970                                  username, sid_string_dbg(&user_sid)));
     971                        result = NT_STATUS_NO_SUCH_USER;
     972                        goto done;
     973                }
    939974
    940975                num_group_sids = 1;
Note: See TracChangeset for help on using the changeset viewer.