~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to source/modules/vfs_gpfs.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2009-05-18 13:26:04 UTC
  • mfrom: (0.28.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090518132604-ebyuqimgymtr3h0k
Tags: 2:3.3.4-2ubuntu1
* Merge from debian unstable, remaining changes:
  + debian/patches/VERSION.patch:
    - setup 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/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted (LP: #312449)
  + debian/mksambapasswd.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 ctdb.
    - Add suggests keyutils for smbfs. (LP: #300221)
  + debian/rules:
    - enable "native" PIE hardening.
    - remove --with-ctdb and --with-cluster-support=yes
  + Add ufw integration:
    - Created debian/samba.ufw profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install 
      profile
    - debian/control: have samba sugguest ufw.
* Dropped patches:
  + debian/patches/fix-upstream-bug-6186.patch: Merged upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
 
97
97
        TALLOC_FREE(full_path);
98
98
 
 
99
        if ((result == -1) && (errno == ENOSYS)) {
 
100
                return SMB_VFS_NEXT_GET_REAL_FILENAME(
 
101
                        handle, path, name, mem_ctx, found_name);
 
102
        }
 
103
 
99
104
        if (result == -1) {
100
105
                DEBUG(10, ("smbd_gpfs_get_realfilename_path returned %s\n",
101
106
                           strerror(errno)));
336
341
        gacl_len = sizeof(struct gpfs_acl) +
337
342
                (smb_get_naces(smbacl)-1)*sizeof(gpfs_ace_v4_t);
338
343
 
339
 
        gacl = TALLOC_SIZE(mem_ctx, gacl_len);
 
344
        gacl = (struct gpfs_acl *)TALLOC_SIZE(mem_ctx, gacl_len);
340
345
        if (gacl == NULL) {
341
346
                DEBUG(0, ("talloc failed\n"));
342
347
                errno = ENOMEM;
551
556
        return result;  
552
557
}
553
558
 
554
 
SMB_ACL_T gpfsacl_sys_acl_get_file(vfs_handle_struct *handle,
555
 
                                    const char *path_p,
556
 
                                    SMB_ACL_TYPE_T type)
 
559
static SMB_ACL_T gpfsacl_sys_acl_get_file(vfs_handle_struct *handle,
 
560
                                          const char *path_p,
 
561
                                          SMB_ACL_TYPE_T type)
557
562
{
558
563
        gpfs_aclType_t gpfs_type;
559
564
 
572
577
        return gpfsacl_get_posix_acl(path_p, gpfs_type);
573
578
}
574
579
 
575
 
SMB_ACL_T gpfsacl_sys_acl_get_fd(vfs_handle_struct *handle,
576
 
                                 files_struct *fsp)
 
580
static SMB_ACL_T gpfsacl_sys_acl_get_fd(vfs_handle_struct *handle,
 
581
                                        files_struct *fsp)
577
582
{
578
583
        return gpfsacl_get_posix_acl(fsp->fsp_name, GPFS_ACL_TYPE_ACCESS);
579
584
}
595
600
        len = sizeof(struct gpfs_acl) - sizeof(union gpfs_ace_union) +
596
601
                (pacl->count)*sizeof(gpfs_ace_v1_t);
597
602
 
598
 
        result = SMB_MALLOC(len);
 
603
        result = (struct gpfs_acl *)SMB_MALLOC(len);
599
604
        if (result == NULL) {
600
605
                errno = ENOMEM;
601
606
                return result;
665
670
        return result;
666
671
}
667
672
 
668
 
int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle,
669
 
                              const char *name,
670
 
                              SMB_ACL_TYPE_T type,
671
 
                              SMB_ACL_T theacl)
 
673
static int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle,
 
674
                                    const char *name,
 
675
                                    SMB_ACL_TYPE_T type,
 
676
                                    SMB_ACL_T theacl)
672
677
{
673
678
        struct gpfs_acl *gpfs_acl;
674
679
        int result;
684
689
        return result;
685
690
}
686
691
 
687
 
int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
688
 
                            files_struct *fsp,
689
 
                            SMB_ACL_T theacl)
 
692
static int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
 
693
                                  files_struct *fsp,
 
694
                                  SMB_ACL_T theacl)
690
695
{
691
696
        return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name, SMB_ACL_TYPE_ACCESS, theacl);
692
697
}
693
698
 
694
 
int gpfsacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
695
 
                                     const char *path)
 
699
static int gpfsacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
 
700
                                           const char *path)
696
701
{
697
702
        errno = ENOTSUP;
698
703
        return -1;