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

« back to all changes in this revision

Viewing changes to source3/modules/vfs_default.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:
217
217
        if (lp_inherit_acls(SNUM(handle->conn))
218
218
            && parent_dirname(talloc_tos(), path, &parent, NULL)
219
219
            && (has_dacl = directory_has_default_acl(handle->conn, parent)))
220
 
                mode = 0777;
 
220
                mode = (0777 & lp_dir_mask(SNUM(handle->conn)));
221
221
 
222
222
        TALLOC_FREE(parent);
223
223
 
898
898
        } else {
899
899
                result = utimensat(AT_FDCWD, smb_fname->base_name, NULL, 0);
900
900
        }
901
 
#elif defined(HAVE_UTIMES)
 
901
        if (!((result == -1) && (errno == ENOSYS))) {
 
902
                goto out;
 
903
        }
 
904
#endif
 
905
#if defined(HAVE_UTIMES)
902
906
        if (ft != NULL) {
903
907
                struct timeval tv[2];
904
908
                tv[0] = convert_timespec_to_timeval(ft->atime);
907
911
        } else {
908
912
                result = utimes(smb_fname->base_name, NULL);
909
913
        }
910
 
#elif defined(HAVE_UTIME)
 
914
        if (!((result == -1) && (errno == ENOSYS))) {
 
915
                goto out;
 
916
        }
 
917
#endif
 
918
#if defined(HAVE_UTIME)
911
919
        if (ft != NULL) {
912
920
                struct utimbuf times;
913
921
                times.actime = convert_timespec_to_time_t(ft->atime);
916
924
        } else {
917
925
                result = utime(smb_fname->base_name, NULL);
918
926
        }
919
 
#else
 
927
        if (!((result == -1) && (errno == ENOSYS))) {
 
928
                goto out;
 
929
        }
 
930
#endif
920
931
        errno = ENOSYS;
921
932
        result = -1;
922
 
#endif
923
933
 
924
934
 out:
925
935
        END_PROFILE(syscall_ntimes);