Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/modules/vfs_zfsacl.c

    r414 r745  
    2424
    2525#include "includes.h"
     26#include "system/filesys.h"
     27#include "smbd/smbd.h"
    2628#include "nfs4_acls.h"
     29
     30#if HAVE_FREEBSD_SUNACL_H
     31#include "sunacl.h"
     32#endif
    2733
    2834#undef DBGC_CLASS
     
    107113        SMB4ACE_T *smbace;
    108114        TALLOC_CTX      *mem_ctx;
     115        bool have_special_id = false;
    109116
    110117        /* allocate the field of ZFS aces */
     
    124131                acebuf[i].a_flags       = aceprop->aceFlags;
    125132                acebuf[i].a_access_mask = aceprop->aceMask;
     133                /* SYNC on acls is a no-op on ZFS.
     134                   See bug #7909. */
     135                acebuf[i].a_access_mask &= ~SMB_ACE4_SYNCHRONIZE;
    126136                acebuf[i].a_who         = aceprop->who.id;
    127137                if(aceprop->flags & SMB_ACE4_ID_SPECIAL) {
     
    141151                                continue; /* don't add it !!! */
    142152                        }
     153                        have_special_id = true;
    143154                }
    144155        }
     156
     157        if (!have_special_id
     158            && lp_parm_bool(fsp->conn->params->service, "zfsacl",
     159                            "denymissingspecial", false)) {
     160                errno = EACCES;
     161                return false;
     162        }
     163
    145164        SMB_ASSERT(i == naces);
    146165
     
    209228                         files_struct *fsp,
    210229                         uint32 security_info_sent,
    211                          const SEC_DESC *psd)
     230                         const struct security_descriptor *psd)
    212231{
    213232        return zfs_set_nt_acl(handle, fsp, security_info_sent, psd);
     
    245264*/
    246265
    247 SMB_ACL_T zfsacl_fail__sys_acl_get_file(vfs_handle_struct *handle,
    248                                         const char *path_p,
    249                                         SMB_ACL_TYPE_T type)
     266static SMB_ACL_T zfsacl_fail__sys_acl_get_file(vfs_handle_struct *handle,
     267                                               const char *path_p,
     268                                               SMB_ACL_TYPE_T type)
    250269{
    251270        return (SMB_ACL_T)NULL;
    252271}
    253 SMB_ACL_T zfsacl_fail__sys_acl_get_fd(vfs_handle_struct *handle,
    254                                       files_struct *fsp,
    255                                       int fd)
     272
     273static SMB_ACL_T zfsacl_fail__sys_acl_get_fd(vfs_handle_struct *handle,
     274                                             files_struct *fsp)
    256275{
    257276        return (SMB_ACL_T)NULL;
    258277}
    259278
    260 int zfsacl_fail__sys_acl_set_file(vfs_handle_struct *handle,
    261                                   const char *name,
    262                                   SMB_ACL_TYPE_T type,
    263                                   SMB_ACL_T theacl)
     279static int zfsacl_fail__sys_acl_set_file(vfs_handle_struct *handle,
     280                                        const char *name,
     281                                        SMB_ACL_TYPE_T type,
     282                                        SMB_ACL_T theacl)
    264283{
    265284        return -1;
    266285}
    267286
    268 int zfsacl_fail__sys_acl_set_fd(vfs_handle_struct *handle,
    269                                 files_struct *fsp,
    270                                 int fd, SMB_ACL_T theacl)
     287static int zfsacl_fail__sys_acl_set_fd(vfs_handle_struct *handle,
     288                                       files_struct *fsp,
     289                                      SMB_ACL_T theacl)
    271290{
    272291        return -1;
    273292}
    274293
    275 int zfsacl_fail__sys_acl_delete_def_file(vfs_handle_struct *handle,
    276                                          const char *path)
     294static int zfsacl_fail__sys_acl_delete_def_file(vfs_handle_struct *handle,
     295                                                const char *path)
    277296{
    278297        return -1;
Note: See TracChangeset for help on using the changeset viewer.