Changeset 618 for vendor/current/source3


Ignore:
Timestamp:
Aug 5, 2011, 7:52:23 AM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update vendor to version 3.5.11

Location:
vendor/current/source3
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/VERSION

    r615 r618  
    2626SAMBA_VERSION_MAJOR=3
    2727SAMBA_VERSION_MINOR=5
    28 SAMBA_VERSION_RELEASE=10
     28SAMBA_VERSION_RELEASE=11
    2929
    3030########################################################
  • vendor/current/source3/configure

    r597 r618  
    96229622done
    96239623
    9624 for ac_header in sys/acl.h acl/libacl.h
     9624for ac_header in sys/acl.h acl/libacl.h sys/file.h
    96259625do :
    96269626  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    1633016330
    1633116331$as_echo "#define HAVE_STAT_DOS_FLAGS 1" >>confdefs.h
     16332
     16333fi
     16334
     16335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile with __attribute__((destructor))" >&5
     16336$as_echo_n "checking whether we can compile with __attribute__((destructor))... " >&6; }
     16337if test "${samba_cv_function_attribute_destructor+set}" = set; then :
     16338  $as_echo_n "(cached) " >&6
     16339else
     16340
     16341                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     16342/* end confdefs.h.  */
     16343
     16344                                __attribute__((destructor))
     16345                                static void cleanup(void) { }
     16346
     16347_ACEOF
     16348if ac_fn_c_try_compile "$LINENO"; then :
     16349  samba_cv_function_attribute_destructor=yes
     16350fi
     16351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     16352
     16353fi
     16354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_function_attribute_destructor" >&5
     16355$as_echo "$samba_cv_function_attribute_destructor" >&6; }
     16356
     16357if test x"$samba_cv_function_attribute_destructor" = xyes ; then
     16358
     16359$as_echo "#define HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR 1" >>confdefs.h
    1633216360
    1633316361fi
  • vendor/current/source3/configure.in

    r597 r618  
    13321332fi
    13331333
     1334AC_CACHE_CHECK([whether we can compile with __attribute__((destructor))],
     1335               samba_cv_function_attribute_destructor,
     1336               [
     1337                 AC_COMPILE_IFELSE(
     1338                        [
     1339                                __attribute__((destructor))
     1340                                static void cleanup(void) { }
     1341                        ],
     1342                        samba_cv_function_attribute_destructor=yes)
     1343                ])
     1344
     1345if test x"$samba_cv_function_attribute_destructor" = xyes ; then
     1346   AC_DEFINE(HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR, 1,
     1347             [whether we can compile with __attribute__((destructor))])
     1348fi
     1349
    13341350#####################################
    13351351# needed for SRV lookups
  • vendor/current/source3/include/config.h.in

    r597 r618  
    707707/* Truncate extend */
    708708#undef HAVE_FTRUNCATE_EXTEND
     709
     710/* whether we can compile with __attribute__((destructor)) */
     711#undef HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR
    709712
    710713/* Whether there is a __FUNCTION__ macro */
  • vendor/current/source3/include/version.h

    r615 r618  
    22#define SAMBA_VERSION_MAJOR 3
    33#define SAMBA_VERSION_MINOR 5
    4 #define SAMBA_VERSION_RELEASE 10
    5 #define SAMBA_VERSION_OFFICIAL_STRING "3.5.10"
     4#define SAMBA_VERSION_RELEASE 11
     5#define SAMBA_VERSION_OFFICIAL_STRING "3.5.11"
    66#ifdef SAMBA_VERSION_VENDOR_FUNCTION
    77#  define SAMBA_VERSION_STRING SAMBA_VERSION_VENDOR_FUNCTION
  • vendor/current/source3/lib/smbldap.c

    r414 r618  
    10941094 connect to the ldap server under system privilege.
    10951095******************************************************************/
    1096 static int smbldap_connect_system(struct smbldap_state *ldap_state, LDAP * ldap_struct)
    1097 {
     1096static int smbldap_connect_system(struct smbldap_state *ldap_state)
     1097{
     1098        LDAP *ldap_struct = ldap_state->ldap_struct;
    10981099        int rc;
    10991100        int version;
     
    11061107                if (!fetch_ldap_pw(&bind_dn, &bind_secret)) {
    11071108                        DEBUG(0, ("ldap_connect_system: Failed to retrieve password from secrets.tdb\n"));
    1108                         return LDAP_INVALID_CREDENTIALS;
     1109                        rc = LDAP_INVALID_CREDENTIALS;
     1110                        goto done;
    11091111                }
    11101112                smbldap_set_creds(ldap_state, false, bind_dn, bind_secret);
     
    11521154                SAFE_FREE(ld_error);
    11531155                ldap_state->num_failures++;
    1154                 return rc;
     1156                goto done;
    11551157        }
    11561158
     
    11671169        DEBUGADD(10, ("ldap_connect_system: LDAP server %s support paged results\n",
    11681170                ldap_state->paged_results ? "does" : "does not"));
     1171done:
     1172        if (rc != 0) {
     1173                ldap_unbind(ldap_struct);
     1174                ldap_state->ldap_struct = NULL;
     1175        }
    11691176        return rc;
    11701177}
     
    12211228        }
    12221229
    1223         if ((rc = smbldap_connect_system(ldap_state, ldap_state->ldap_struct))) {
    1224                 ldap_unbind(ldap_state->ldap_struct);
    1225                 ldap_state->ldap_struct = NULL;
     1230        if ((rc = smbldap_connect_system(ldap_state))) {
    12261231                return rc;
    12271232        }
     
    12351240        if (ldap_state->event_context != NULL) {
    12361241                ldap_state->idle_event = event_add_timed(
    1237                         ldap_state->event_context, NULL,
     1242                        ldap_state->event_context, ldap_state,
    12381243                        timeval_current_ofs(SMBLDAP_IDLE_TIME, 0),
    12391244                        smbldap_idle_fn, ldap_state);
     
    12591264
    12601265        smbldap_delete_state(ldap_state);
     1266
     1267        TALLOC_FREE(ldap_state->idle_event);
    12611268
    12621269        DEBUG(5,("The connection to the LDAP server was closed\n"));
     
    17461753
    17471754                state->idle_event = event_add_timed(
    1748                         event_ctx, NULL,
     1755                        event_ctx, state,
    17491756                        timeval_add(&now, SMBLDAP_IDLE_TIME, 0),
    17501757                        smbldap_idle_fn,
     
    17721779        SAFE_FREE((*ldap_state)->bind_secret);
    17731780
    1774         TALLOC_FREE((*ldap_state)->idle_event);
    1775 
    1776         *ldap_state = NULL;
     1781        TALLOC_FREE(*ldap_state);
    17771782
    17781783        /* No need to free any further, as it is talloc()ed */
     1784}
     1785
     1786static int smbldap_state_destructor(struct smbldap_state *state)
     1787{
     1788        smbldap_free_struct(&state);
     1789        return 0;
    17791790}
    17801791
     
    18021813        (*smbldap_state)->event_context = event_ctx;
    18031814
     1815        talloc_set_destructor(*smbldap_state, smbldap_state_destructor);
    18041816        return NT_STATUS_OK;
    18051817}
  • vendor/current/source3/librpc/gen_ndr/cli_wbint.c

    r594 r618  
    25092509                                                struct tevent_context *ev,
    25102510                                                struct rpc_pipe_client *cli,
     2511                                                struct dom_sid *_domain_sid /* [in] [ref] */,
    25112512                                                struct wbint_RidArray *_rids /* [in] [ref] */,
    25122513                                                const char **_domain_name /* [out] [ref,charset(UTF8)] */,
     
    25262527
    25272528        /* In parameters */
     2529        state->orig.in.domain_sid = _domain_sid;
    25282530        state->orig.in.rids = _rids;
    25292531
     
    26152617NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
    26162618                                 TALLOC_CTX *mem_ctx,
     2619                                 struct dom_sid *domain_sid /* [in] [ref] */,
    26172620                                 struct wbint_RidArray *rids /* [in] [ref] */,
    26182621                                 const char **domain_name /* [out] [ref,charset(UTF8)] */,
     
    26232626
    26242627        /* In parameters */
     2628        r.in.domain_sid = domain_sid;
    26252629        r.in.rids = rids;
    26262630
  • vendor/current/source3/librpc/gen_ndr/cli_wbint.h

    r594 r618  
    224224                                                struct tevent_context *ev,
    225225                                                struct rpc_pipe_client *cli,
     226                                                struct dom_sid *_domain_sid /* [in] [ref] */,
    226227                                                struct wbint_RidArray *_rids /* [in] [ref] */,
    227228                                                const char **_domain_name /* [out] [ref,charset(UTF8)] */,
     
    232233NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
    233234                                 TALLOC_CTX *mem_ctx,
     235                                 struct dom_sid *domain_sid /* [in] [ref] */,
    234236                                 struct wbint_RidArray *rids /* [in] [ref] */,
    235237                                 const char **domain_name /* [out] [ref,charset(UTF8)] */,
  • vendor/current/source3/librpc/gen_ndr/ndr_wbint.c

    r594 r618  
    20772077{
    20782078        if (flags & NDR_IN) {
     2079                if (r->in.domain_sid == NULL) {
     2080                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     2081                }
     2082                NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.domain_sid));
    20792083                if (r->in.rids == NULL) {
    20802084                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     
    21052109{
    21062110        uint32_t _ptr_domain_name;
     2111        TALLOC_CTX *_mem_save_domain_sid_0;
    21072112        TALLOC_CTX *_mem_save_rids_0;
    21082113        TALLOC_CTX *_mem_save_domain_name_0;
     
    21122117                ZERO_STRUCT(r->out);
    21132118
     2119                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     2120                        NDR_PULL_ALLOC(ndr, r->in.domain_sid);
     2121                }
     2122                _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
     2123                NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_sid, LIBNDR_FLAG_REF_ALLOC);
     2124                NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.domain_sid));
     2125                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, LIBNDR_FLAG_REF_ALLOC);
    21142126                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    21152127                        NDR_PULL_ALLOC(ndr, r->in.rids);
     
    21712183                ndr_print_struct(ndr, "in", "wbint_LookupRids");
    21722184                ndr->depth++;
     2185                ndr_print_ptr(ndr, "domain_sid", r->in.domain_sid);
     2186                ndr->depth++;
     2187                ndr_print_dom_sid(ndr, "domain_sid", r->in.domain_sid);
     2188                ndr->depth--;
    21732189                ndr_print_ptr(ndr, "rids", r->in.rids);
    21742190                ndr->depth++;
  • vendor/current/source3/librpc/gen_ndr/wbint.h

    r594 r618  
    277277struct wbint_LookupRids {
    278278        struct {
     279                struct dom_sid *domain_sid;/* [ref] */
    279280                struct wbint_RidArray *rids;/* [ref] */
    280281        } in;
  • vendor/current/source3/librpc/idl/wbint.idl

    r594 r618  
    141141
    142142    NTSTATUS wbint_LookupRids(
     143        [in] dom_sid *domain_sid,
    143144        [in] wbint_RidArray *rids,
    144145        [out,string,charset(UTF8)] char **domain_name,
  • vendor/current/source3/nmbd/nmbd_packets.c

    r591 r618  
    17301730                if (subrec->nmb_sock < 0 || subrec->nmb_sock >= FD_SETSIZE) {
    17311731                        /* We have to ignore sockets outside FD_SETSIZE. */
    1732                         continue;
    1733                 }
    1734                 FD_SET(subrec->nmb_sock,pset);
    1735                 sock_array[num++] = subrec->nmb_sock;
    1736                 *maxfd = MAX( *maxfd, subrec->nmb_sock);
     1732                        sock_array[num++] = -1;
     1733                } else {
     1734                        FD_SET(subrec->nmb_sock,pset);
     1735                        sock_array[num++] = subrec->nmb_sock;
     1736                        *maxfd = MAX( *maxfd, subrec->nmb_sock);
     1737                }
    17371738
    17381739                if (subrec->nmb_bcast < 0 || subrec->nmb_bcast >= FD_SETSIZE) {
    17391740                        /* We have to ignore sockets outside FD_SETSIZE. */
    1740                         continue;
    1741                 }
    1742                 sock_array[num++] = subrec->nmb_bcast;
    1743                 FD_SET(subrec->nmb_bcast,pset);
    1744                 *maxfd = MAX( *maxfd, subrec->nmb_bcast);
     1741                        sock_array[num++] = -1;
     1742                } else {
     1743                        sock_array[num++] = subrec->nmb_bcast;
     1744                        if (subrec->nmb_bcast != -1) {
     1745                                FD_SET(subrec->nmb_bcast,pset);
     1746                                *maxfd = MAX( *maxfd, subrec->nmb_bcast);
     1747                        }
     1748                }
    17451749        }
    17461750
     
    17621766                if (subrec->dgram_sock < 0 || subrec->dgram_sock >= FD_SETSIZE) {
    17631767                        /* We have to ignore sockets outside FD_SETSIZE. */
    1764                         continue;
    1765                 }
    1766                 FD_SET(subrec->dgram_sock,pset);
    1767                 sock_array[num++] = subrec->dgram_sock;
    1768                 *maxfd = MAX( *maxfd, subrec->dgram_sock);
     1768                        sock_array[num++] = -1;
     1769                } else {
     1770                        FD_SET(subrec->dgram_sock,pset);
     1771                        sock_array[num++] = subrec->dgram_sock;
     1772                        *maxfd = MAX( *maxfd, subrec->dgram_sock);
     1773                }
    17691774
    17701775                if (subrec->dgram_bcast < 0 || subrec->dgram_bcast >= FD_SETSIZE) {
    17711776                        /* We have to ignore sockets outside FD_SETSIZE. */
    1772                         continue;
    1773                 }
    1774                 sock_array[num++] = subrec->dgram_bcast;
    1775                 if (subrec->dgram_bcast != -1) {
    1776                         FD_SET(subrec->dgram_bcast,pset);
    1777                         *maxfd = MAX( *maxfd, subrec->dgram_bcast);
    1778                 }
    1779         }
     1777                        sock_array[num++] = -1;
     1778                } else {
     1779                        sock_array[num++] = subrec->dgram_bcast;
     1780                        if (subrec->dgram_bcast != -1) {
     1781                                FD_SET(subrec->dgram_bcast,pset);
     1782                                *maxfd = MAX( *maxfd, subrec->dgram_bcast);
     1783                        }
     1784                }
     1785        }
     1786
     1787        SMB_ASSERT(count == num);
    17801788
    17811789        *listen_number = count;
  • vendor/current/source3/nmbd/nmbd_subnetdb.c

    r414 r618  
    5656void close_subnet(struct subnet_record *subrec)
    5757{
     58        if (subrec->nmb_sock != -1) {
     59                close(subrec->nmb_sock);
     60                subrec->nmb_sock = -1;
     61        }
     62        if (subrec->nmb_bcast != -1) {
     63                close(subrec->nmb_bcast);
     64                subrec->nmb_bcast = -1;
     65        }
    5866        if (subrec->dgram_sock != -1) {
    5967                close(subrec->dgram_sock);
    6068                subrec->dgram_sock = -1;
    6169        }
    62         if (subrec->nmb_sock != -1) {
    63                 close(subrec->nmb_sock);
    64                 subrec->nmb_sock = -1;
     70        if (subrec->dgram_bcast != -1) {
     71                close(subrec->dgram_bcast);
     72                subrec->dgram_bcast = -1;
    6573        }
    6674
  • vendor/current/source3/smbd/file_access.c

    r414 r618  
    7676        if (!CAN_WRITE(conn)) {
    7777                return False;
     78        }
     79
     80        if (!lp_acl_check_permissions(SNUM(conn))) {
     81                /* This option means don't check. */
     82                return true;
    7883        }
    7984
  • vendor/current/source3/smbd/negprot.c

    r414 r618  
    383383                        return;
    384384                }
     385                p += ret;
    385386                DEBUG(3,("not using SPNEGO\n"));
    386387        } else {
  • vendor/current/source3/smbd/open.c

    r597 r618  
    8686        NTSTATUS status;
    8787        struct security_descriptor *sd = NULL;
     88
     89        if ((access_mask & DELETE_ACCESS) && !lp_acl_check_permissions(SNUM(conn))) {
     90                *access_granted = access_mask;
     91
     92                DEBUG(10,("smbd_check_open_rights: not checking ACL "
     93                        "on DELETE_ACCESS on file %s. Granting 0x%x\n",
     94                        smb_fname_str_dbg(smb_fname),
     95                        (unsigned int)*access_granted ));
     96                return NT_STATUS_OK;
     97        }
    8898
    8999        status = SMB_VFS_GET_NT_ACL(conn, smb_fname->base_name,
     
    29682978        /* Setting FILE_SHARE_DELETE is the hint. */
    29692979
    2970         if (lp_acl_check_permissions(SNUM(conn))
    2971             && (create_disposition != FILE_CREATE)
     2980        if ((create_disposition != FILE_CREATE)
    29722981            && (access_mask & DELETE_ACCESS)
    29732982            && (!(can_delete_file_in_directory(conn, smb_fname) ||
  • vendor/current/source3/smbd/server.c

    r597 r618  
    279279        }
    280280
    281         DEBUG(0, ("Could not find child %d -- ignoring\n", (int)pid));
     281        /* not all forked child processes are added to the children list */
     282        DEBUG(1, ("Could not find child %d -- ignoring\n", (int)pid));
    282283}
    283284
  • vendor/current/source3/winbindd/winbindd_dual_srv.c

    r594 r618  
    374374
    375375        status = domain->methods->rids_to_names(
    376                 domain, talloc_tos(), &domain->sid, r->in.rids->rids,
     376                domain, talloc_tos(), r->in.domain_sid, r->in.rids->rids,
    377377                r->in.rids->num_rids, &domain_name, &names, &types);
    378378        if (!NT_STATUS_IS_OK(status)) {
     
    389389
    390390        for (i=0; i<r->in.rids->num_rids; i++) {
    391                 sid_compose(&result[i].sid, &domain->sid, r->in.rids->rids[i]);
     391                sid_compose(&result[i].sid, r->in.domain_sid,
     392                            r->in.rids->rids[i]);
    392393                result[i].type = types[i];
    393394                result[i].name = talloc_move(result, &names[i]);
  • vendor/current/source3/winbindd/winbindd_lookuprids.c

    r594 r618  
    2424struct winbindd_lookuprids_state {
    2525        struct tevent_context *ev;
     26        struct dom_sid domain_sid;
    2627        const char *domain_name;
    2728        struct wbint_RidArray rids;
     
    4243        struct winbindd_lookuprids_state *state;
    4344        struct winbindd_domain *domain;
    44         struct dom_sid sid;
    4545
    4646        req = tevent_req_create(mem_ctx, &state,
     
    5656        DEBUG(3, ("lookuprids (%s)\n", request->data.sid));
    5757
    58         if (!string_to_sid(&sid, request->data.sid)) {
     58        if (!string_to_sid(&state->domain_sid, request->data.sid)) {
    5959                DEBUG(5, ("%s not a SID\n", request->data.sid));
    6060                tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
     
    6262        }
    6363
    64         domain = find_lookup_domain_from_sid(&sid);
     64        domain = find_lookup_domain_from_sid(&state->domain_sid);
    6565        if (domain == NULL) {
    6666                DEBUG(5, ("Domain for sid %s not found\n",
    67                           sid_string_dbg(&sid)));
     67                          sid_string_dbg(&state->domain_sid)));
    6868                tevent_req_nterror(req, NT_STATUS_NO_SUCH_DOMAIN);
    6969                return tevent_req_post(req, ev);
     
    8484
    8585        subreq = rpccli_wbint_LookupRids_send(
    86                 state, ev, domain->child.rpccli, &state->rids,
    87                 &state->domain_name, &state->names);
     86                state, ev, domain->child.rpccli, &state->domain_sid,
     87                &state->rids, &state->domain_name, &state->names);
    8888        if (tevent_req_nomem(subreq, req)) {
    8989                return tevent_req_post(req, ev);
Note: See TracChangeset for help on using the changeset viewer.