~ubuntu-branches/ubuntu/oneiric/samba/oneiric-security

« back to all changes in this revision

Viewing changes to source3/auth/auth_util.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-03-10 10:03:01 UTC
  • mfrom: (0.39.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110310100301-jfjg41wv0iq05zj4
Tags: 2:3.5.8~dfsg-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access. 
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/mksmbpasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd
  + debian/control:
    - Make libwbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
    - Add cuups breaks to push the package to aslo upgrade cups (LP: #639768)
  + debian/rules:
    - enable "native" PIE hardening.
    - Add BIND_NOW to maximize benefit of RELRO hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
    - Don't ship the /etc/network/if-up.d file.
  + debian/samba.postinst: 
    - Fixed bashism.
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/samba.logrotate: Make it upstart compatible
  + debian/samba-common.dhcp: Fix typo to get a proper parsing in
    /etc/samba/dhcp.
  + Dropped:
    - debian/patches/fix-windows7-print-connection.patch: Merged upstream.
    - debian/patches/security-CVE-2011-0719.patch: Merged upstream. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
575
575
                return NT_STATUS_NO_MEMORY;
576
576
        }
577
577
 
578
 
        if ( !(pwd = getpwnam_alloc(result, username)) ) {
 
578
        if ( !(pwd = Get_Pwnam_alloc(result, username)) ) {
579
579
                DEBUG(1, ("User %s in passdb, but getpwnam() fails!\n",
580
580
                          pdb_get_username(sampass)));
581
581
                TALLOC_FREE(result);
903
903
                 * about the mapping of guest sid to lp_guestaccount()
904
904
                 * username and will return the unix_pw info for a guest
905
905
                 * user. Use it if it's there, else lookup the *uid details
906
 
                 * using getpwnam_alloc(). See bug #6291 for details. JRA.
 
906
                 * using Get_Pwnam_alloc(). See bug #6291 for details. JRA.
907
907
                 */
908
908
 
909
909
                /* We must always assign the *uid. */
910
910
                if (sam_acct->unix_pw == NULL) {
911
 
                        struct passwd *pwd = getpwnam_alloc(sam_acct, *found_username );
 
911
                        struct passwd *pwd = Get_Pwnam_alloc(sam_acct, *found_username );
912
912
                        if (!pwd) {
913
 
                                DEBUG(10, ("getpwnam_alloc failed for %s\n",
 
913
                                DEBUG(10, ("Get_Pwnam_alloc failed for %s\n",
914
914
                                        *found_username));
915
915
                                result = NT_STATUS_NO_SUCH_USER;
916
916
                                goto done;
1326
1326
        struct passwd *pwd;
1327
1327
        NTSTATUS status;
1328
1328
 
1329
 
        pwd = getpwnam_alloc(talloc_tos(), username);
 
1329
        pwd = Get_Pwnam_alloc(talloc_tos(), username);
1330
1330
        if (pwd == NULL) {
1331
1331
                return NT_STATUS_NO_SUCH_USER;
1332
1332
        }
2023
2023
 
2024
2024
        if (!pdb_set_pass_last_set_time(
2025
2025
                    sam_account,
2026
 
                    nt_time_to_unix(info->pass_last_set_time),
 
2026
                    info->pass_last_set_time,
2027
2027
                    PDB_CHANGED)) {
2028
2028
                TALLOC_FREE(result);
2029
2029
                return NT_STATUS_NO_MEMORY;
2031
2031
 
2032
2032
        if (!pdb_set_pass_can_change_time(
2033
2033
                    sam_account,
2034
 
                    nt_time_to_unix(info->pass_can_change_time),
 
2034
                    info->pass_can_change_time,
2035
2035
                    PDB_CHANGED)) {
2036
2036
                TALLOC_FREE(result);
2037
2037
                return NT_STATUS_NO_MEMORY;
2039
2039
 
2040
2040
        if (!pdb_set_pass_must_change_time(
2041
2041
                    sam_account,
2042
 
                    nt_time_to_unix(info->pass_must_change_time),
 
2042
                    info->pass_must_change_time,
2043
2043
                    PDB_CHANGED)) {
2044
2044
                TALLOC_FREE(result);
2045
2045
                return NT_STATUS_NO_MEMORY;