Ignore:
Timestamp:
Nov 12, 2012, 7:37:04 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.19

Location:
branches/samba-3.5.x/source3
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/Makefile.in

    r732 r739  
    25482548        @echo "Linking $@"
    25492549        @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT_LIBS) $(KRB5LIBS) \
    2550                 @SONAMEFLAG@`basename $@`
     2550                $(LIBREPLACE_LIBS) @SONAMEFLAG@`basename $@`
    25512551
    25522552bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) $(LIBWBCLIENT)
  • branches/samba-3.5.x/source3/VERSION

    r738 r739  
    2626SAMBA_VERSION_MAJOR=3
    2727SAMBA_VERSION_MINOR=5
    28 SAMBA_VERSION_RELEASE=18
     28SAMBA_VERSION_RELEASE=19
    2929
    3030########################################################
  • branches/samba-3.5.x/source3/configure

    r738 r739  
    17831783  --with-acl-support      Include ACL support (default=auto)
    17841784  --with-aio-support      Include asynchronous io support (default=no)
    1785   --with-sendfile-support Check for sendfile support (default=yes)
     1785  --with-sendfile-support Whether sendfile support should be built in
     1786                          (default=auto)
    17861787  --with-wbclient         Use external wbclient (optional)
    17871788  --with-winbind          Build winbind (default, if supported by OS)
     
    3356833569# check for sendfile support
    3356933570
    33570 with_sendfile_support=yes
    33571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to check to support sendfile" >&5
    33572 $as_echo_n "checking whether to check to support sendfile... " >&6; }
     33571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sendfile support should be built in" >&5
     33572$as_echo_n "checking whether sendfile support should be built in... " >&6; }
    3357333573
    3357433574# Check whether --with-sendfile-support was given.
    3357533575if test "${with_sendfile_support+set}" = set; then :
    3357633576  withval=$with_sendfile_support;  case "$withval" in
    33577   yes)
    33578 
     33577  yes|no)
     33578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
     33579$as_echo "$withval" >&6; };
     33580        with_sendfile_support=$withval
     33581        ;;
     33582  *)
    3357933583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    33580 $as_echo "yes" >&6; };
    33581 
    33582         case "$host_os" in
     33584$as_echo "yes" >&6; }
     33585        with_sendfile_support=auto
     33586        ;;
     33587  esac
     33588fi
     33589
     33590
     33591if test x$with_sendfile_support != xno ; then
     33592    case "$host_os" in
    3358333593        *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
    3358433594                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linux sendfile64 support" >&5
     
    3412634136        *)
    3412734137        ;;
    34128         esac
    34129         ;;
    34130   *)
    34131     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    34132 $as_echo "no" >&6; }
    34133     ;;
    34134   esac
    34135 else
    34136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    34137 $as_echo "yes" >&6; }
    34138 
    34139 fi
    34140 
     34138    esac
     34139fi
     34140
     34141if test x$with_sendfile_support = xyes -a x"$samba_cv_HAVE_SENDFILE" != xyes ; then
     34142        as_fn_error $? "sendfile support requested but sendfile not available " "$LINENO" 5
     34143fi
    3414134144
    3414234145############################################
  • branches/samba-3.5.x/source3/configure.in

    r620 r739  
    57155715# check for sendfile support
    57165716
    5717 with_sendfile_support=yes
    5718 AC_MSG_CHECKING(whether to check to support sendfile)
     5717AC_MSG_CHECKING(whether sendfile support should be built in)
    57195718AC_ARG_WITH(sendfile-support,
    5720 [AS_HELP_STRING([--with-sendfile-support], [Check for sendfile support (default=yes)])],
     5719[AS_HELP_STRING([--with-sendfile-support], [Whether sendfile support should be built in (default=auto)])],
    57215720[ case "$withval" in
    5722   yes)
    5723 
    5724         AC_MSG_RESULT(yes);
    5725 
    5726         case "$host_os" in
     5721  yes|no)
     5722        AC_MSG_RESULT($withval);
     5723        with_sendfile_support=$withval
     5724        ;;
     5725  *)
     5726        AC_MSG_RESULT(yes)
     5727        with_sendfile_support=auto
     5728        ;;
     5729  esac ],
     5730)
     5731
     5732if test x$with_sendfile_support != xno ; then
     5733    case "$host_os" in
    57275734        *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
    57285735                AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[
     
    59605967        *)
    59615968        ;;
    5962         esac
    5963         ;;
    5964   *)
    5965     AC_MSG_RESULT(no)
    5966     ;;
    5967   esac ],
    5968   AC_MSG_RESULT(yes)
    5969 )
     5969    esac
     5970fi
     5971
     5972if test x$with_sendfile_support = xyes -a x"$samba_cv_HAVE_SENDFILE" != xyes ; then
     5973        AC_MSG_ERROR(sendfile support requested but sendfile not available )
     5974fi
    59705975
    59715976############################################
  • branches/samba-3.5.x/source3/lib/sysquotas.c

    r414 r739  
    177177#ifdef HAVE_XFS_QUOTAS
    178178        {"xfs", sys_get_xfs_quota,      sys_set_xfs_quota},
     179        {"gfs", sys_get_xfs_quota,      sys_set_xfs_quota},
     180        {"gfs2", sys_get_xfs_quota,     sys_set_xfs_quota},
    179181#endif /* HAVE_XFS_QUOTAS */
    180182        {NULL,  NULL,                   NULL}
  • branches/samba-3.5.x/source3/libaddns/dnsmarshall.c

    r414 r739  
    2828        struct dns_buffer *result;
    2929
    30         if (!(result = talloc(mem_ctx, struct dns_buffer))) {
     30        if (!(result = talloc_zero(mem_ctx, struct dns_buffer))) {
    3131                return NULL;
    3232        }
     
    4040        result->size = 2;
    4141
    42         if (!(result->data = TALLOC_ARRAY(result, uint8, result->size))) {
     42        if (!(result->data = TALLOC_ZERO_ARRAY(result, uint8, result->size))) {
    4343                TALLOC_FREE(result);
    4444                return NULL;
     
    217217        }
    218218
    219         if (!(label = talloc(mem_ctx, struct dns_domain_label))) {
     219        if (!(label = talloc_zero(mem_ctx, struct dns_domain_label))) {
    220220                buf->error = ERROR_DNS_NO_MEMORY;
    221221                return;
     
    224224        label->len = len;
    225225
    226         if (!(label->label = TALLOC_ARRAY(label, char, len+1))) {
     226        if (!(label->label = TALLOC_ZERO_ARRAY(label, char, len+1))) {
    227227                buf->error = ERROR_DNS_NO_MEMORY;
    228228                goto error;
     
    251251        if (!ERR_DNS_IS_OK(buf->error)) return;
    252252
    253         if (!(name = talloc(mem_ctx, struct dns_domain_name))) {
     253        if (!(name = talloc_zero(mem_ctx, struct dns_domain_name))) {
    254254                buf->error = ERROR_DNS_NO_MEMORY;
    255255                return;
     
    282282        if (!(ERR_DNS_IS_OK(buf->error))) return;
    283283
    284         if (!(q = talloc(mem_ctx, struct dns_question))) {
     284        if (!(q = talloc_zero(mem_ctx, struct dns_question))) {
    285285                buf->error = ERROR_DNS_NO_MEMORY;
    286286                return;
     
    315315        if (!(ERR_DNS_IS_OK(buf->error))) return;
    316316
    317         if (!(r = talloc(mem_ctx, struct dns_rrec))) {
     317        if (!(r = talloc_zero(mem_ctx, struct dns_rrec))) {
    318318                buf->error = ERROR_DNS_NO_MEMORY;
    319319                return;
     
    330330
    331331        if (r->data_length != 0) {
    332                 if (!(r->data = TALLOC_ARRAY(r, uint8, r->data_length))) {
     332                if (!(r->data = TALLOC_ZERO_ARRAY(r, uint8, r->data_length))) {
    333333                        buf->error = ERROR_DNS_NO_MEMORY;
    334334                        return;
     
    407407
    408408        if ((req->num_questions != 0) &&
    409             !(req->questions = TALLOC_ARRAY(req, struct dns_question *,
     409            !(req->questions = TALLOC_ZERO_ARRAY(req, struct dns_question *,
    410410                                            req->num_questions))) {
    411411                goto error;
    412412        }
    413413        if ((req->num_answers != 0) &&
    414             !(req->answers = TALLOC_ARRAY(req, struct dns_rrec *,
     414            !(req->answers = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,
    415415                                          req->num_answers))) {
    416416                goto error;
    417417        }
    418418        if ((req->num_auths != 0) &&
    419             !(req->auths = TALLOC_ARRAY(req, struct dns_rrec *,
     419            !(req->auths = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,
    420420                                        req->num_auths))) {
    421421                goto error;
    422422        }
    423423        if ((req->num_additionals != 0) &&
    424             !(req->additionals = TALLOC_ARRAY(req, struct dns_rrec *,
     424            !(req->additionals = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,
    425425                                              req->num_additionals))) {
    426426                goto error;
  • branches/samba-3.5.x/source3/libsmb/cliconnect.c

    r732 r739  
    11791179                *p = 0;
    11801180                user = p+1;
     1181                strupper_m(user2);
    11811182                workgroup = user2;
    11821183        }
  • branches/samba-3.5.x/source3/libsmb/clispnego.c

    r736 r739  
    137137        ASN1_DATA *data;
    138138
     139        for (i = 0; i < ASN1_MAX_OIDS; i++) {
     140                OIDs[i] = NULL;
     141        }
     142
    139143        data = asn1_init(talloc_tos());
    140144        if (data == NULL) {
     
    384388        ASN1_DATA *data;
    385389        int data_remaining;
     390        *ticket = data_blob_null;
    386391
    387392        data = asn1_init(talloc_tos());
  • branches/samba-3.5.x/source3/smbd/posix_acls.c

    r733 r739  
    13431343
    13441344static bool ensure_canon_entry_valid(canon_ace **pp_ace,
    1345                                      const struct share_params *params,
    1346                                      const bool is_directory,
    1347                                                         const DOM_SID *pfile_owner_sid,
    1348                                                         const DOM_SID *pfile_grp_sid,
    1349                                                         const SMB_STRUCT_STAT *pst,
    1350                                                         bool setting_acl)
     1345                                bool is_default_acl,
     1346                                const struct share_params *params,
     1347                                const bool is_directory,
     1348                                const DOM_SID *pfile_owner_sid,
     1349                                const DOM_SID *pfile_grp_sid,
     1350                                const SMB_STRUCT_STAT *pst,
     1351                                bool setting_acl)
    13511352{
    13521353        canon_ace *pace;
     
    13591360                if (pace->type == SMB_ACL_USER_OBJ) {
    13601361
    1361                         if (setting_acl)
     1362                        if (setting_acl && !is_default_acl) {
    13621363                                apply_default_perms(params, is_directory, pace, S_IRUSR);
     1364                        }
    13631365                        got_user = True;
    13641366
     
    13691371                         */
    13701372
    1371                         if (setting_acl)
     1373                        if (setting_acl && !is_default_acl) {
    13721374                                apply_default_perms(params, is_directory, pace, S_IRGRP);
     1375                        }
    13731376                        got_grp = True;
    13741377
     
    13791382                         */
    13801383
    1381                         if (setting_acl)
     1384                        if (setting_acl && !is_default_acl) {
    13821385                                apply_default_perms(params, is_directory, pace, S_IROTH);
     1386                        }
    13831387                        got_other = True;
    13841388                        pace_other = pace;
     1389
     1390                } else if (pace->type == SMB_ACL_USER || pace->type == SMB_ACL_GROUP) {
     1391
     1392                        /*
     1393                         * Ensure create mask/force create mode is respected on set.
     1394                         */
     1395
     1396                        if (setting_acl && !is_default_acl) {
     1397                                apply_default_perms(params, is_directory, pace, S_IRGRP);
     1398                        }
    13851399                }
    13861400        }
     
    14261440                        }
    14271441
    1428                         apply_default_perms(params, is_directory, pace, S_IRUSR);
     1442                        if (!is_default_acl) {
     1443                                apply_default_perms(params, is_directory, pace, S_IRUSR);
     1444                        }
    14291445                } else {
    14301446                        pace->perms = unix_perms_to_acl_perms(pst->st_ex_mode, S_IRUSR, S_IWUSR, S_IXUSR);
     
    14521468                        else
    14531469                                pace->perms = 0;
    1454                         apply_default_perms(params, is_directory, pace, S_IRGRP);
     1470                        if (!is_default_acl) {
     1471                                apply_default_perms(params, is_directory, pace, S_IRGRP);
     1472                        }
    14551473                } else {
    14561474                        pace->perms = unix_perms_to_acl_perms(pst->st_ex_mode, S_IRGRP, S_IWGRP, S_IXGRP);
     
    14741492                if (setting_acl) {
    14751493                        pace->perms = 0;
    1476                         apply_default_perms(params, is_directory, pace, S_IROTH);
     1494                        if (!is_default_acl) {
     1495                                apply_default_perms(params, is_directory, pace, S_IROTH);
     1496                        }
    14771497                } else
    14781498                        pace->perms = unix_perms_to_acl_perms(pst->st_ex_mode, S_IROTH, S_IWOTH, S_IXOTH);
     
    23192339        print_canon_ace_list( "file ace - before valid", file_ace);
    23202340
    2321         if (!ensure_canon_entry_valid(&file_ace, fsp->conn->params,
     2341        if (!ensure_canon_entry_valid(&file_ace, false, fsp->conn->params,
    23222342                        fsp->is_directory, pfile_owner_sid, pfile_grp_sid, pst, True)) {
    23232343                free_canon_ace_list(file_ace);
     
    23282348        print_canon_ace_list( "dir ace - before valid", dir_ace);
    23292349
    2330         if (dir_ace && !ensure_canon_entry_valid(&dir_ace, fsp->conn->params,
     2350        if (dir_ace && !ensure_canon_entry_valid(&dir_ace, true, fsp->conn->params,
    23312351                        fsp->is_directory, pfile_owner_sid, pfile_grp_sid, pst, True)) {
    23322352                free_canon_ace_list(file_ace);
     
    24172437        canon_ace *next_ace = NULL;
    24182438        int entry_id = SMB_ACL_FIRST_ENTRY;
     2439        bool is_default_acl = (the_acl_type == SMB_ACL_TYPE_DEFAULT);
    24192440        SMB_ACL_ENTRY_T entry;
    24202441        size_t ace_count;
     
    25042525                ace->unix_ug = unix_ug;
    25052526                ace->owner_type = owner_type;
    2506                 ace->ace_flags = get_pai_flags(pal, ace, (the_acl_type == SMB_ACL_TYPE_DEFAULT));
     2527                ace->ace_flags = get_pai_flags(pal, ace, is_default_acl);
    25072528
    25082529                DLIST_ADD(l_head, ace);
     
    25132534         */
    25142535
    2515         if (!ensure_canon_entry_valid(&l_head, conn->params,
     2536        if (!ensure_canon_entry_valid(&l_head, is_default_acl, conn->params,
    25162537                                      S_ISDIR(psbuf->st_ex_mode), powner, pgroup,
    25172538                                      psbuf, False))
     
    25232544         */
    25242545
    2525         DEBUG(10,("canonicalise_acl: %s ace entries before arrange :\n", the_acl_type == SMB_ACL_TYPE_ACCESS ? "Access" : "Default" ));
     2546        DEBUG(10,("canonicalise_acl: %s ace entries before arrange :\n", is_default_acl ?  "Default" : "Access"));
    25262547
    25272548        for ( ace_count = 0, ace = l_head; ace; ace = next_ace, ace_count++) {
  • branches/samba-3.5.x/source3/smbd/server.c

    r736 r739  
    561561        int i;
    562562        char *ports;
     563        char *tok;
     564        const char *ptr;
    563565        unsigned dns_port = 0;
    564566
     
    582584        }
    583585
     586        for (ptr = ports;
     587             next_token_talloc(talloc_tos(),&ptr, &tok, " \t,");) {
     588                unsigned port = atoi(tok);
     589
     590                if (port == 0 || port > 0xffff) {
     591                        exit_server_cleanly("Invalid port in the config or on "
     592                                            "the commandline specified!");
     593                }
     594        }
     595
    584596        if (lp_interfaces() && lp_bind_interfaces_only()) {
    585597                /* We have been given an interfaces line, and been
     
    593605                        const struct sockaddr_storage *ifss =
    594606                                        iface_n_sockaddr_storage(i);
    595                         char *tok;
    596                         const char *ptr;
    597607
    598608                        if (ifss == NULL) {
     
    606616                             next_token_talloc(talloc_tos(),&ptr, &tok, " \t,");) {
    607617                                unsigned port = atoi(tok);
    608                                 if (port == 0 || port > 0xffff) {
    609                                         continue;
    610                                 }
    611618
    612619                                /* Keep the first port for mDNS service
     
    626633                   from anywhere. */
    627634
    628                 char *tok;
    629                 const char *ptr;
    630635                const char *sock_addr = lp_socket_address();
    631636                char *sock_tok;
     
    645650                        for (ptr=ports; next_token_talloc(talloc_tos(), &ptr, &tok, " \t,"); ) {
    646651                                struct sockaddr_storage ss;
    647 
    648652                                unsigned port = atoi(tok);
    649                                 if (port == 0 || port > 0xffff) {
    650                                         continue;
    651                                 }
    652653
    653654                                /* Keep the first port for mDNS service
  • branches/samba-3.5.x/source3/winbindd/winbindd_cm.c

    r733 r739  
    16241624        }
    16251625
    1626         if (!winbindd_can_contact_domain(domain)) {
    1627                 invalidate_cm_connection(&domain->conn);
    1628                 domain->initialized = True;
    1629                 return NT_STATUS_OK;
    1630         }
    1631 
    16321626        if (connection_ok(domain)) {
    16331627                if (!domain->initialized) {
Note: See TracChangeset for help on using the changeset viewer.