fedora-cvs-commits@redhat.com
[Top] [All Lists]

rpms/samba/devel pam_winbind.conf, NONE, 1.1 samba-3-0-25rc1-bugday-apr1

Subject: rpms/samba/devel pam_winbind.conf, NONE, 1.1 samba-3-0-25rc1-bugday-apr10.patch, NONE, 1.1 samba-3.0.25rc1-inotifiy.patch, NONE, 1.1 samba3_idmap_loop.patch, NONE, 1.1 samba.spec, 1.106, 1.107
From:
Date: Mon, 16 Apr 2007 10:40:11 -0400
Author: ssorce

Update of /cvs/dist/rpms/samba/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv12414

Modified Files:
        samba.spec 
Added Files:
        pam_winbind.conf samba-3-0-25rc1-bugday-apr10.patch 
        samba-3.0.25rc1-inotifiy.patch samba3_idmap_loop.patch 
Log Message:

Release 3.0.25 RC1.
Final will be out very soon.




--- NEW FILE pam_winbind.conf ---
#
# pam_winbind configuration file
#
# /etc/security/pam_winbind.conf
#

[global]

# turn on debugging
;debug = yes

# request a cached login if possible
# (needs "winbind offline logon = yes" in smb.conf)
;cached_login = yes

# authenticate using kerberos
;krb5_auth = yes

# when using kerberos, request a "FILE" krb5 credential cache type
# (leave empty to just do krb5 authentication but not have a ticket
# afterwards)
;krb5_ccache_type = FILE

# make successful authentication dependend on membership of one SID
# (can also take a name)
;require_membership_of =

samba-3-0-25rc1-bugday-apr10.patch:
 packaging/RHEL/samba.spec.tmpl      |    3 -
 source/client/client.c              |    4 -
 source/include/smb_share_modes.h    |    8 ---
 source/lib/replace/README           |    2 
 source/lib/replace/libreplace.m4    |    5 -
 source/lib/replace/replace.c        |   27 ----------
 source/lib/replace/test/testsuite.c |    7 --
 source/libsmb/smb_share_modes.c     |    5 +
 source/modules/vfs_gpfs.c           |    3 -
 source/modules/vfs_readahead.c      |    4 -
 source/nmbd/nmbd_subnetdb.c         |    7 ++
 source/nsswitch/idmap.c             |   94 ++++++++++++++++++++----------------
 source/nsswitch/idmap_ad.c          |   49 +++++++++++-------
 source/rpc_parse/parse_prs.c        |   32 ++++++------
 source/smbd/process.c               |    4 -
 source/smbd/quotas.c                |    2 
 source/smbd/reply.c                 |    4 +
 source/tdb/common/transaction.c     |    2 
 18 files changed, 132 insertions(+), 130 deletions(-)

--- NEW FILE samba-3-0-25rc1-bugday-apr10.patch ---
Index: source/smbd/quotas.c
===================================================================
--- source/smbd/quotas.c        (revision 22167)
+++ source/smbd/quotas.c        (working copy)
@@ -662,7 +662,7 @@
                BOOL retval;
                DEBUG(5,("disk_quotas: looking for mountpath (NFS) \"%s\"\n", 
mnt.mnt_special));
                retval = nfs_quotas(mnt.mnt_special, euser_id, bsize, dfree, 
dsize);
-               unbecome();
+               unbecome_root();
                return retval;
        }
 
Index: source/smbd/process.c
===================================================================
--- source/smbd/process.c       (revision 22167)
+++ source/smbd/process.c       (working copy)
@@ -1153,8 +1153,8 @@
        char outbuf_saved[smb_wct];
        int outsize = smb_len(outbuf) + 4;
 
-       /* maybe its not chained */
-       if (smb_com2 == 0xFF) {
+       /* Maybe its not chained, or it's an error packet. */
+       if (smb_com2 == 0xFF || SVAL(outbuf,smb_rcls) != 0) {
                SCVAL(outbuf,smb_vwv0,0xFF);
                return outsize;
        }
Index: source/smbd/reply.c
===================================================================
--- source/smbd/reply.c (revision 22167)
+++ source/smbd/reply.c (working copy)
@@ -2705,8 +2705,10 @@
        }
 
        nread = send_file_readX(conn, inbuf, outbuf, length, bufsize, fsp, 
startpos, smb_maxcnt);
-       if (nread != -1)
+       /* Only call chain_reply if not an error. */
+       if (nread != -1 && SVAL(outbuf,smb_rcls) == 0) {
                nread = chain_reply(inbuf,outbuf,length,bufsize);
+       }
 
        END_PROFILE(SMBreadX);
        return nread;
Index: source/nsswitch/idmap_ad.c
===================================================================
--- source/nsswitch/idmap_ad.c  (revision 22167)
+++ source/nsswitch/idmap_ad.c  (working copy)
@@ -164,14 +164,9 @@
 {
        struct idmap_ad_context *ctx;
        char *config_option;
-       const char *range;
-       ADS_STRUCT *ads;
+       const char *range = NULL;
+       const char *schema_mode = NULL; 
 
-       /* verify AD is reachable (not critical, we may just be offline at 
start) */
-       if ( (ads = ad_idmap_cached_connection()) == NULL ) {
-               DEBUG(1, ("WARNING: Could not init an AD connection! Mapping 
might not work.\n"));
-       }
-
        if ( (ctx = talloc_zero(dom, struct idmap_ad_context)) == NULL ) {
                DEBUG(0, ("Out of memory!\n"));
                return NT_STATUS_NO_MEMORY;
@@ -194,6 +189,20 @@
                }
        }
 
+       /* schema mode */
+       if ( ad_map_type == WB_POSIX_MAP_UNKNOWN )
+               ad_map_type = WB_POSIX_MAP_RFC2307;
+       schema_mode = lp_parm_const_string(-1, config_option, "schema_mode", 
NULL);
+       if ( schema_mode && schema_mode[0] ) {
+               if ( strequal(schema_mode, "sfu") )
+                       ad_map_type = WB_POSIX_MAP_SFU;
+               else if ( strequal(schema_mode, "rfc2307" ) )
+                       ad_map_type = WB_POSIX_MAP_RFC2307;
+               else
+                       DEBUG(0,("idmap_ad_initialize: Unknown schema_mode 
(%s)\n",
+                                schema_mode));
+       }
+
        dom->private_data = ctx;
 
        talloc_free(config_option);
@@ -251,6 +260,7 @@
                                NULL, /* gidnumber */
                                NULL };
        LDAPMessage *res = NULL;
+       LDAPMessage *entry = NULL;
        char *filter = NULL;
        int idx = 0;
        int bidx = 0;
@@ -329,7 +339,7 @@
        }
        filter = talloc_asprintf_append(filter, ")");
        CHECK_ALLOC_DONE(filter);
-       DEBUG(10, ("Filter: [%s]\n", filter));
+
        rc = ads_search_retry(ads, &res, filter, attrs);
        if (!ADS_ERR_OK(rc)) {
                DEBUG(1, ("ERROR: ads search returned: %s\n", ads_errstr(rc)));
@@ -341,8 +351,8 @@
                DEBUG(10, ("No IDs found\n"));
        }
 
-       for (i = 0; i < count; i++) {
-               LDAPMessage *entry = NULL;
+       entry = res;
+       for (i = 0; (i < count) && entry; i++) {
                DOM_SID sid;
                enum id_type type;
                struct id_map *map;
@@ -350,13 +360,14 @@
                uint32_t atype;
 
                if (i == 0) { /* first entry */
-                       entry = ads_first_entry(ads, res);
+                       entry = ads_first_entry(ads, entry);
                } else { /* following ones */
                        entry = ads_next_entry(ads, entry);
                }
-               if ( ! entry) {
+
+               if ( !entry ) {
                        DEBUG(2, ("ERROR: Unable to fetch ldap entries from 
results\n"));
-                       continue;
+                       break;
                }
 
                /* first check if the SID is present */
@@ -457,6 +468,7 @@
                                NULL, /* attr_gidnumber */
                                NULL };
        LDAPMessage *res = NULL;
+       LDAPMessage *entry = NULL;
        char *filter = NULL;
        int idx = 0;
        int bidx = 0;
@@ -514,8 +526,8 @@
                DEBUG(10, ("No IDs found\n"));
        }
 
-       for (i = 0; i < count; i++) {
-               LDAPMessage *entry = NULL;
+       entry = res;    
+       for (i = 0; (i < count) && entry; i++) {
                DOM_SID sid;
                enum id_type type;
                struct id_map *map;
@@ -523,13 +535,14 @@
                uint32_t atype;
 
                if (i == 0) { /* first entry */
-                       entry = ads_first_entry(ads, res);
+                       entry = ads_first_entry(ads, entry);
                } else { /* following ones */
                        entry = ads_next_entry(ads, entry);
                }
-               if ( ! entry) {
+
+               if ( !entry ) {
                        DEBUG(2, ("ERROR: Unable to fetch ldap entries from 
results\n"));
-                       continue;
+                       break;
                }
 
                /* first check if the SID is present */
Index: source/nsswitch/idmap.c
===================================================================
--- source/nsswitch/idmap.c     (revision 22167)
+++ source/nsswitch/idmap.c     (working copy)
@@ -259,7 +259,7 @@
        char *compat_backend = NULL;
        char *compat_params = NULL;
        const char **dom_list = NULL;
-       char *alloc_backend;
+       char *alloc_backend = NULL;
        BOOL default_already_defined = False;
        BOOL pri_dom_is_in_list = False;
        int compat = 0;
@@ -561,11 +561,11 @@
        }
 
 
-       /***************************
-        * initialize alloc module
-        */
-       DEBUG(1, ("Initializing idmap alloc module\n"));
+       /* Initialize alloc module */
 
+       DEBUG(3, ("Initializing idmap alloc module\n"));
+
+       alloc_backend = NULL;
        if (compat) {
                alloc_backend = talloc_strdup(idmap_ctx, compat_backend);
        } else {
@@ -573,37 +573,37 @@
                
                if (ab && (ab[0] != '\0')) {
                        alloc_backend = talloc_strdup(idmap_ctx, 
lp_idmap_alloc_backend());
-               } else {
-                       alloc_backend = talloc_strdup(idmap_ctx, "tdb");
                }
        }
-       IDMAP_CHECK_ALLOC(alloc_backend);
 
-       alloc_methods = get_alloc_methods(alloc_backends, alloc_backend);
-       if ( ! alloc_methods) {
-               ret = smb_probe_module("idmap", alloc_backend);
-               if (NT_STATUS_IS_OK(ret)) {
-                       alloc_methods = get_alloc_methods(alloc_backends, 
alloc_backend);
+       if ( alloc_backend ) {
+
+               alloc_methods = get_alloc_methods(alloc_backends, 
alloc_backend);
+               if ( ! alloc_methods) {
+                       ret = smb_probe_module("idmap", alloc_backend);
+                       if (NT_STATUS_IS_OK(ret)) {
+                               alloc_methods = 
get_alloc_methods(alloc_backends, alloc_backend);
+                       }
                }
-       }
-       if ( alloc_methods) {
-               ret = alloc_methods->init(compat_params);
-               if ( ! NT_STATUS_IS_OK(ret)) {
-                       DEBUG(0, ("idmap_init: Initialization failed for alloc "
-                                 "backend %s\n", alloc_backend));
-                       ret = NT_STATUS_UNSUCCESSFUL;
-                       goto done;
+               if ( alloc_methods) {
+                       ret = alloc_methods->init(compat_params);
+                       if ( ! NT_STATUS_IS_OK(ret)) {
+                               DEBUG(0, ("idmap_init: Initialization failed 
for alloc "
+                                         "backend %s\n", alloc_backend));
+                               ret = NT_STATUS_UNSUCCESSFUL;
+                               goto done;
                }
-       } else {
-               DEBUG(2, ("idmap_init: Unable to get methods for alloc backend 
%s\n", 
-                         alloc_backend));
-               /* certain compat backends are just readonly */
-               if ( compat )
-                       ret = NT_STATUS_OK;
-               else
-                       ret = NT_STATUS_UNSUCCESSFUL;
+               } else {
+                       DEBUG(2, ("idmap_init: Unable to get methods for alloc 
backend %s\n", 
+                                 alloc_backend));
+                       /* certain compat backends are just readonly */
+                       if ( compat )
+                               ret = NT_STATUS_OK;
+                       else
+                               ret = NT_STATUS_UNSUCCESSFUL;
+               }
        }
-
+       
        /* cleanpu temporary strings */
        TALLOC_FREE( compat_backend );
        
@@ -633,6 +633,9 @@
                return ret;
        }
 
+       if ( !alloc_methods )
+               return NT_STATUS_NOT_SUPPORTED; 
+
        id->type = ID_TYPE_UID;
        return alloc_methods->allocate_id(id);
 }
@@ -645,6 +648,9 @@
                return ret;
        }
 
+       if ( !alloc_methods )
+               return NT_STATUS_NOT_SUPPORTED; 
+
        id->type = ID_TYPE_GID;
        return alloc_methods->allocate_id(id);
 }
@@ -657,6 +663,9 @@
                return ret;
        }
 
+       if ( !alloc_methods )
+               return NT_STATUS_NOT_SUPPORTED; 
+
        id->type = ID_TYPE_UID;
        return alloc_methods->set_id_hwm(id);
 }
@@ -669,6 +678,9 @@
                return ret;
        }
 
+       if ( !alloc_methods )
+               return NT_STATUS_NOT_SUPPORTED; 
+
        id->type = ID_TYPE_GID;
        return alloc_methods->set_id_hwm(id);
 }
@@ -1321,16 +1333,18 @@
                return;
        }
 
-       allid.type = ID_TYPE_UID;
-       allid.id = 0;
-       alloc_methods->get_id_hwm(&allid);
-       fprintf(dump, "USER HWM %lu\n", (unsigned long)allid.id);
-
-       allid.type = ID_TYPE_GID;
-       allid.id = 0;
-       alloc_methods->get_id_hwm(&allid);
-       fprintf(dump, "GROUP HWM %lu\n", (unsigned long)allid.id);
-
+       if ( alloc_methods ) {          
+               allid.type = ID_TYPE_UID;
+               allid.id = 0;
+               alloc_methods->get_id_hwm(&allid);
+               fprintf(dump, "USER HWM %lu\n", (unsigned long)allid.id);
+               
+               allid.type = ID_TYPE_GID;
+               allid.id = 0;
+               alloc_methods->get_id_hwm(&allid);
+               fprintf(dump, "GROUP HWM %lu\n", (unsigned long)allid.id);
+       }
+       
        maps = talloc(idmap_ctx, struct id_map);
        num_maps = 0;
 
Index: source/lib/replace/test/testsuite.c
===================================================================
--- source/lib/replace/test/testsuite.c (revision 22167)
+++ source/lib/replace/test/testsuite.c (working copy)
@@ -125,12 +125,6 @@
        return true;
 }
 
-static int test_innetgr(void)
-{
-       /* FIXME */
-       return true;
-}
-
 static int test_initgroups(void)
 {
        /* FIXME */
@@ -426,7 +420,6 @@
        ret &= test_strlcpy();
        ret &= test_strlcat();
        ret &= test_mktime();
-       ret &= test_innetgr();
        ret &= test_initgroups();
        ret &= test_memmove();
        ret &= test_strdup();
Index: source/lib/replace/libreplace.m4
===================================================================
--- source/lib/replace/libreplace.m4    (revision 22167)
+++ source/lib/replace/libreplace.m4    (working copy)
@@ -147,7 +147,7 @@
 
 AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
 AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
-AC_CHECK_FUNCS(waitpid strlcpy strlcat innetgr initgroups memmove strdup)
+AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup)
 AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp socketpair)
 AC_HAVE_DECL(setresuid, [#include <unistd.h>])
 AC_HAVE_DECL(setresgid, [#include <unistd.h>])
@@ -327,8 +327,7 @@
 m4_include(timegm.m4)
 m4_include(repdir.m4)
 
-AC_CHECK_FUNCS([syslog memset setnetgrent getnetgrent endnetgrent memcpy],,
-                          [AC_MSG_ERROR([Required function not found])])
+AC_CHECK_FUNCS([syslog memset memcpy],,[AC_MSG_ERROR([Required function not 
found])])
 
 echo "LIBREPLACE_BROKEN_CHECKS: END"
 ]) dnl end AC_LIBREPLACE_BROKEN_CHECKS
Index: source/lib/replace/replace.c
===================================================================
--- source/lib/replace/replace.c        (revision 22167)
+++ source/lib/replace/replace.c        (working copy)
@@ -154,33 +154,6 @@
 #endif /* !HAVE_MKTIME */
 
 
-#ifndef HAVE_INNETGR
-#if defined(HAVE_SETNETGRENT) && defined(HAVE_GETNETGRENT) && 
defined(HAVE_ENDNETGRENT)
-/*
- * Search for a match in a netgroup. This replaces it on broken systems.
- */
-int rep_innetgr(const char *group, const char *host, const char *user, 
-                               const char *dom)
-{
-       char *hst, *usr, *dm;
-  
-       setnetgrent(group);
-       while (getnetgrent(&hst, &usr, &dm)) {
-               if (((host == 0) || (hst == 0) || !strcmp(host, hst)) &&
-                   ((user == 0) || (usr == 0) || !strcmp(user, usr)) &&
-                   ((dom == 0) || (dm == 0) || !strcmp(dom, dm))) {
-                       endnetgrent();
-                       return (1);
-               }
-       }
-       endnetgrent();
-       return (0);
-}
-#endif /* HAVE_SETNETGRENT HAVE_GETNETGRENT HAVE_ENDNETGRENT */
-#endif /* HAVE_INNETGR */
-
-
-
 #ifndef HAVE_INITGROUPS
 /****************************************************************************
  some systems don't have an initgroups call 
Index: source/lib/replace/README
===================================================================
--- source/lib/replace/README   (revision 22167)
+++ source/lib/replace/README   (working copy)
@@ -12,7 +12,6 @@
 strlcat
 mktime
 rename
-innetgr
 initgroups
 memmove
 strdup
@@ -84,5 +83,4 @@
 Prerequisites:
 memset (for bzero)
 syslog (for vsyslog)
-setnetgrent, getnetgrent, endnetgrent (for innetgr)
 mktemp (for mkstemp and mkdtemp)
Index: source/libsmb/smb_share_modes.c
===================================================================
--- source/libsmb/smb_share_modes.c     (revision 22167)
+++ source/libsmb/smb_share_modes.c     (working copy)
@@ -28,6 +28,11 @@
 #include "includes.h"
 #include "smb_share_modes.h"
 
+/* Database context handle. */
+struct smbdb_ctx {
+       TDB_CONTEXT *smb_tdb;
+};
+
 /* Remove the paranoid malloc checker. */
 #ifdef malloc
 #undef malloc
Index: source/modules/vfs_readahead.c
===================================================================
--- source/modules/vfs_readahead.c      (revision 22167)
+++ source/modules/vfs_readahead.c      (working copy)
@@ -101,12 +101,12 @@
                        (unsigned int)rhd->len,
                        err ));
 #elif defined(HAVE_POSIX_FADVISE)
-               int err = posix_fadvise(fromfd, offset, (off_t)rhd->len, 
POSIX_FADV_WILLNEED);
+               int err = posix_fadvise(fd, offset, (off_t)rhd->len, 
POSIX_FADV_WILLNEED);
                DEBUG(10,("readahead_pread: posix_fadvise on fd %u, offset 
%llu, len %u returned %d\n",
                        (unsigned int)fd,
                        (unsigned long long)offset,
                        (unsigned int)rhd->len,
-                       (err ));
+                       err ));
 #else
                if (!rhd->didmsg) {
                        DEBUG(0,("readahead_pread: no readahead on this 
platform\n"));
Index: source/modules/vfs_gpfs.c
===================================================================
--- source/modules/vfs_gpfs.c   (revision 22167)
+++ source/modules/vfs_gpfs.c   (working copy)
@@ -597,8 +597,7 @@
                            files_struct *fsp,
                            int fd, SMB_ACL_T theacl)
 {
-       errno = ENOTSUP;
-       return -1;
+       return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name, 
SMB_ACL_TYPE_ACCESS, theacl);
 }
 
 int gpfsacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
Index: source/rpc_parse/parse_prs.c
===================================================================
--- source/rpc_parse/parse_prs.c        (revision 22167)
+++ source/rpc_parse/parse_prs.c        (working copy)
@@ -1456,31 +1456,31 @@
 /* useful function to store a structure in rpc wire format */
 int tdb_prs_store(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps)
 {
-    TDB_DATA kbuf, dbuf;
-    kbuf.dptr = keystr;
-    kbuf.dsize = strlen(keystr)+1;
-    dbuf.dptr = ps->data_p;
-    dbuf.dsize = prs_offset(ps);
-    return tdb_trans_store(tdb, kbuf, dbuf, TDB_REPLACE);
+       TDB_DATA kbuf, dbuf;
+       kbuf.dptr = keystr;
+       kbuf.dsize = strlen(keystr)+1;
+       dbuf.dptr = ps->data_p;
+       dbuf.dsize = prs_offset(ps);
+       return tdb_trans_store(tdb, kbuf, dbuf, TDB_REPLACE);
 }
 
 /* useful function to fetch a structure into rpc wire format */
 int tdb_prs_fetch(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps, TALLOC_CTX 
*mem_ctx)
 {
-    TDB_DATA kbuf, dbuf;
-    kbuf.dptr = keystr;
-    kbuf.dsize = strlen(keystr)+1;
+       TDB_DATA kbuf, dbuf;
+       kbuf.dptr = keystr;
+       kbuf.dsize = strlen(keystr)+1;
 
-    prs_init(ps, 0, mem_ctx, UNMARSHALL);
+       prs_init(ps, 0, mem_ctx, UNMARSHALL);
 
-    dbuf = tdb_fetch(tdb, kbuf);
-    if (!dbuf.dptr)
-           return -1;
+       dbuf = tdb_fetch(tdb, kbuf);
+       if (!dbuf.dptr)
+               return -1;
 
-    prs_give_memory(ps, dbuf.dptr, dbuf.dsize, True);
+       prs_give_memory(ps, dbuf.dptr, dbuf.dsize, True);
 
-    return 0;
-} 
+       return 0;
+}
 
 /*******************************************************************
  hash a stream.
Index: source/nmbd/nmbd_subnetdb.c
===================================================================
--- source/nmbd/nmbd_subnetdb.c (revision 22167)
+++ source/nmbd/nmbd_subnetdb.c (working copy)
@@ -223,6 +223,13 @@
                        return False;
        }
 
+        /* We must have at least one subnet. */
+       if (subnetlist == NULL) {
+               DEBUG(0,("create_subnets: unable to create any subnet from "
+                               "given interfaces. nmbd is terminating\n"));
+               return False;
+       }
+
        if (lp_we_are_a_wins_server()) {
                /* Pick the first interface ip address as the WINS server ip. */
                struct in_addr *nip = iface_n_ip(0);
Index: source/include/smb_share_modes.h
===================================================================
--- source/include/smb_share_modes.h    (revision 22167)
+++ source/include/smb_share_modes.h    (working copy)
@@ -33,13 +33,9 @@
 # endif
 #endif
 
-#include "tdb.h"
+/* Opaque database context handle. */
+struct smbdb_ctx;
 
-/* Database context handle. */
-struct smbdb_ctx {
-       TDB_CONTEXT *smb_tdb;
-};
-
 /* Share mode entry. */
 /*
  We use 64 bit types for device and inode as
Index: source/tdb/common/transaction.c
===================================================================
--- source/tdb/common/transaction.c     (revision 22167)
+++ source/tdb/common/transaction.c     (working copy)
@@ -526,6 +526,8 @@
                                   F_UNLCK,F_SETLKW, 0, 1);
                }
                tdb->num_locks = 0;
+               tdb->num_lockrecs = 0;
+               SAFE_FREE(tdb->lockrecs);
        }
 
        /* restore the normal io methods */
Index: source/client/client.c
===================================================================
--- source/client/client.c      (revision 22167)
+++ source/client/client.c      (working copy)
@@ -3976,13 +3976,13 @@
                        /* We must use old option processing for this. Find the
                         * position of the -T option in the raw argv[]. */
                        {
-                               int i, optnum;
+                               int i;
                                for (i = 1; i < argc; i++) {
                                        if (strncmp("-T", argv[i],2)==0)
                                                break;
                                }
                                i++;
-                               if (!(optnum = tar_parseargs(argc, argv, 
poptGetOptArg(pc), i))) {
+                               if (!tar_parseargs(argc, argv, 
poptGetOptArg(pc), i)) {
                                        poptPrintUsage(pc, stderr, 0);
                                        exit(1);
                                }
Index: packaging/RHEL/samba.spec.tmpl
===================================================================
--- packaging/RHEL/samba.spec.tmpl      (revision 22167)
+++ packaging/RHEL/samba.spec.tmpl      (working copy)
@@ -149,7 +149,8 @@
        --with-shared-modules=idmap_rid,idmap_ad \
        --with-smbmount \
        --with-syslog \
-       --with-utmp 
+       --with-utmp \
+       --with-dnsupdate
 
 make showlayout
 

samba-3.0.25rc1-inotifiy.patch:
 notify_inotify.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

--- NEW FILE samba-3.0.25rc1-inotifiy.patch ---
=== modified file 'source/smbd/notify_inotify.c'
--- source/smbd/notify_inotify.c        2007-03-09 12:07:58 +0000
+++ source/smbd/notify_inotify.c        2007-04-10 16:27:47 +0000
@@ -66,6 +66,7 @@
        struct sys_notify_context *ctx;
        int fd;
        struct inotify_watch_context *watches;
+       BOOL broken_inotify;    /* Late stop for broken SELinux policy */
 };
 
 struct inotify_watch_context {
@@ -229,8 +230,16 @@
          filenames, and thus can't know how much to allocate
          otherwise
        */
-       if (ioctl(in->fd, FIONREAD, &bufsize) != 0 || 
-           bufsize == 0) {
+
+       if ((ioctl(in->fd, FIONREAD, &bufsize) != 0) && (errno == EACCES)) {
+               /*
+                * Workaround for broken SELinux policies on Fedora
+                */
+               TALLOC_FREE(fde);
+               in->broken_inotify = True;
+               return;
+       }
+       if (bufsize == 0) {
                DEBUG(0,("No data on inotify fd?!\n"));
                return;
        }
@@ -281,6 +290,7 @@
        }
        in->ctx = ctx;
        in->watches = NULL;
+       in->broken_inotify = False;
 
        ctx->private_data = in;
        talloc_set_destructor(in, inotify_destructor);
@@ -375,6 +385,10 @@
 
        in = talloc_get_type(ctx->private_data, struct inotify_private);
 
+       if (in->broken_inotify) {
+               return NT_STATUS_OK;
+       }
+
        mask = inotify_map(e);
        if (mask == 0) {
                /* this filter can't be handled by inotify */


samba3_idmap_loop.patch:
 idmap.c         |   36 ++++++++++++++++++++++++++++++------
 winbindd.c      |    3 +++
 winbindd_dual.c |    3 +++
 3 files changed, 36 insertions(+), 6 deletions(-)

--- NEW FILE samba3_idmap_loop.patch ---
Index: source/nsswitch/winbindd.c
===================================================================
--- source/nsswitch/winbindd.c  (revision 22203)
+++ source/nsswitch/winbindd.c  (working copy)
@@ -1010,6 +1010,9 @@
 
        namecache_enable();
 
+       /* quick hack to avoid a loop in idmap, proper fix later */
+       reset_idmap_in_own_child();
+
        /* Winbind daemon initialisation */
 
        if ( ! NT_STATUS_IS_OK(idmap_init_cache()) ) {
Index: source/nsswitch/winbindd_dual.c
===================================================================
--- source/nsswitch/winbindd_dual.c     (revision 22203)
+++ source/nsswitch/winbindd_dual.c     (working copy)
@@ -921,6 +921,9 @@
                        child);
        }
 
+       /* quick hack to avoid a loop in idmap, proper fix later */
+       set_idmap_in_own_child();
+
        while (1) {
 
                int ret;
Index: source/nsswitch/idmap.c
===================================================================
--- source/nsswitch/idmap.c     (revision 22203)
+++ source/nsswitch/idmap.c     (working copy)
@@ -84,6 +84,24 @@
        return NULL;
 }
 
+/* part of a quick hack to avoid loops, need to be sorted out correctly later 
on */
+static BOOL idmap_in_own_child;
+
+static BOOL idmap_is_in_own_child(void)
+{
+       return idmap_in_own_child;
+}
+
+void reset_idmap_in_own_child(void)
+{
+       idmap_in_own_child = False;
+}
+
+void set_idmap_in_own_child(void)
+{
+       idmap_in_own_child = True;
+}
+
 /**********************************************************************
  Allow a module to register itself as a method.
 **********************************************************************/
@@ -801,13 +819,18 @@
        if ( ! NT_STATUS_IS_OK(ret)) {
                return NT_STATUS_NONE_MAPPED;
        }
-       
-       /* by default calls to winbindd are disabled
-          the following call will not recurse so this is safe */
-       winbind_on();
-       wbret = winbind_lookup_sid(ctx, map->sid, &domname, &name, &sid_type);
-       winbind_off();
 
+       /* quick hack to make things work, will need proper fix later on */     
+       if (idmap_is_in_own_child()) {
+               /* by default calls to winbindd are disabled
+                  the following call will not recurse so this is safe */
+               winbind_on();
+               wbret = winbind_lookup_sid(ctx, map->sid, &domname, &name, 
&sid_type);
+               winbind_off();
+       } else {
+               wbret = winbindd_lookup_name_by_sid(ctx, map->sid, &domname, 
&name, &sid_type);
+       }
+
        /* check if this is a valid SID and then map it */
        if (wbret) {
                switch (sid_type) {
@@ -1395,3 +1418,4 @@
 
        return ret;
 }
+


Index: samba.spec
===================================================================
RCS file: /cvs/dist/rpms/samba/devel/samba.spec,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- samba.spec  10 Apr 2007 14:41:53 -0000      1.106
+++ samba.spec  16 Apr 2007 14:40:03 -0000      1.107
@@ -4,7 +4,7 @@
 Name: samba
 Epoch: 0
 Version: 3.0.25
-Release: 0.1.rc1%{?dist}
+Release: 0.7.rc1%{?dist}
 License: GPL
 Group: System Environment/Daemons
 URL: http://www.samba.org/
@@ -24,6 +24,7 @@
 Source8: winbind.init
 Source9: smb.conf.default
 Source10: nmb.init
+Source11: pam_winbind.conf
 
 # Don't depend on Net::LDAP
 Source999: filter-requires-samba.sh
@@ -46,6 +47,10 @@
 Patch111: samba-3.0.13-smbclient.patch
 #Patch112: samba-3.0.15pre2-bug106483.patch
 #Patch113: samba-3.0.21-warnings.patch
+Patch200: samba-3.0.25rc1-inotifiy.patch
+Patch201: samba-3-0-25rc1-bugday-apr10.patch
+Patch202: samba3_idmap_loop.patch
+
 
 Requires(pre): samba-common = %{epoch}:%{version}-%{release}
 Requires: pam >= 0:0.64 %{auth} 
@@ -149,6 +154,7 @@
 cp %{SOURCE8} packaging/Fedora/winbind.init
 cp %{SOURCE9} packaging/Fedora/
 cp %{SOURCE10} packaging/Fedora/
+cp %{SOURCE11} packaging/Fedora/
 
 # Upstream patches
 #(none)
@@ -165,6 +171,9 @@
 %patch111 -p1 -b .smbclient
 #%patch112 -p1 -b .bug106483
 #%patch113 -p1 -b .warnings
+%patch200 -p0 -b .inotify
+%patch201 -p0 -b .bugday
+%patch202 -p0 -b .idmap_loop
 
 # crap
 rm -f examples/VFS/.cvsignore
@@ -206,6 +215,7 @@
        --with-logfilebase=/var/log/samba \
        --with-libdir=%{_libdir}/samba \
        --with-configdir=%{_sysconfdir}/samba \
+       --with-pammodulesdir=%{_sysconfdir}/security \
        --with-swatdir=%{_datadir}/swat \
        --with-shared-modules=idmap_ad,idmap_rid \
 
@@ -233,7 +243,7 @@
 mkdir -p $RPM_BUILD_ROOT/sbin
 mkdir -p $RPM_BUILD_ROOT/usr/{sbin,bin}
 mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
-mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/{pam.d,logrotate.d}
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/{pam.d,logrotate.d,security}
 mkdir -p $RPM_BUILD_ROOT/var/{log,spool}/samba
 mkdir -p $RPM_BUILD_ROOT/var/lib/samba
 mkdir -p $RPM_BUILD_ROOT/var/lib/samba/private
@@ -271,6 +281,7 @@
 install -m755 packaging/Fedora/smb.init $RPM_BUILD_ROOT%{_initrddir}/smb
 install -m755 packaging/Fedora/nmb.init $RPM_BUILD_ROOT%{_initrddir}/nmb
 install -m755 packaging/Fedora/winbind.init 
$RPM_BUILD_ROOT%{_initrddir}/winbind
+install -m644 packaging/Fedora/pam_winbind.conf 
$RPM_BUILD_ROOT%{_sysconfdir}/security
 #ln -s ../..%{_initrddir}/smb  $RPM_BUILD_ROOT%{_sbindir}/samba
 install -m644 packaging/Fedora/samba.pamd 
$RPM_BUILD_ROOT%{_sysconfdir}/pam.d/samba
 install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/samba

-- 
fedora-cvs-commits mailing list
fedora-cvs-commits@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-cvs-commits

<Prev in Thread] Current Thread [Next in Thread>
  • rpms/samba/devel pam_winbind.conf, NONE, 1.1 samba-3-0-25rc1-bugday-apr10.patch, NONE, 1.1 samba-3.0.25rc1-inotifiy.patch, NONE, 1.1 samba3_idmap_loop.patch, NONE, 1.1 samba.spec, 1.106, 1.107, fedora-cvs-commits <=