Ignore:
Timestamp:
Aug 4, 2009, 8:51:22 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.3 to 3.3.7

Location:
branches/samba-3.3.x/source
Files:
1 deleted
24 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/VERSION

    r285 r309  
    2626SAMBA_VERSION_MAJOR=3
    2727SAMBA_VERSION_MINOR=3
    28 SAMBA_VERSION_RELEASE=6
     28SAMBA_VERSION_RELEASE=7
    2929
    3030########################################################
     
    8585#                                                      #
    8686########################################################
    87 SAMBA_VERSION_VENDOR_SUFFIX=
     87SAMBA_VERSION_VENDOR_SUFFIX="eCS 1.1.beta2"
    8888SAMBA_VERSION_VENDOR_PATCH=
    8989
  • branches/samba-3.3.x/source/configure

    r274 r309  
    7757577575
    7757677576
    77577 if test x"$enable_dnssd" == x"yes"; then
     77577if test x"$enable_dnssd" = x"yes"; then
    7757877578    have_dnssd_support=yes
    7757977579
  • branches/samba-3.3.x/source/configure.in

    r274 r309  
    61826182
    61836183AC_SUBST(DNSSD_LIBS)
    6184 if test x"$enable_dnssd" == x"yes"; then
     6184if test x"$enable_dnssd" = x"yes"; then
    61856185    have_dnssd_support=yes
    61866186
  • branches/samba-3.3.x/source/include/version.h

    r285 r309  
    22#define SAMBA_VERSION_MAJOR 3
    33#define SAMBA_VERSION_MINOR 3
    4 #define SAMBA_VERSION_RELEASE 6
    5 #define SAMBA_VERSION_OFFICIAL_STRING "3.3.6"
     4#define SAMBA_VERSION_RELEASE 7
     5#define SAMBA_VERSION_OFFICIAL_STRING "3.3.7"
     6#define SAMBA_VERSION_VENDOR_SUFFIX "eCS 1.1.beta2"
    67#define SAMBA_VERSION_STRING samba_version_string()
  • branches/samba-3.3.x/source/lib/netapi/joindomain.c

    r206 r309  
    208208        u->in.domain_name = domain;
    209209        u->in.unjoin_flags = r->in.unjoin_flags;
     210        u->in.delete_machine_account = false;
    210211        u->in.modify_config = true;
    211212        u->in.debug = true;
  • branches/samba-3.3.x/source/lib/netapi/user.c

    r224 r309  
    17721772        switch (r->in.level) {
    17731773                case 0:
     1774                        user_mask = SAMR_USER_ACCESS_SET_ATTRIBUTES;
     1775                        break;
    17741776                case 1003:
    17751777                        user_mask = SAMR_USER_ACCESS_SET_PASSWORD;
  • branches/samba-3.3.x/source/lib/system.c

    r248 r309  
    117117A read wrapper that will deal with EINTR.
    118118********************************************************************/
     119
    119120ssize_t sys_read(int fd, void *buf, size_t count)
    120121{
    121122        ssize_t ret;
     123
    122124        do {
    123125                ret = read(fd, buf, count);
     
    129131A write wrapper that will deal with EINTR.
    130132********************************************************************/
     133
    131134ssize_t sys_write(int fd, const void *buf, size_t count)
    132135{
    133136        ssize_t ret;
     137
    134138        do {
    135139                ret = write(fd, buf, count);
  • branches/samba-3.3.x/source/lib/util.c

    r248 r309  
    27232723                }
    27242724                if (name) {
    2725                         *name = "";
     2725                        *name = dir;
    27262726                }
    27272727                return True;
  • branches/samba-3.3.x/source/libnet/libnet_join.c

    r224 r309  
    19241924        }
    19251925
     1926        if (!(r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE) &&
     1927            !r->in.delete_machine_account) {
     1928                libnet_join_unjoindomain_remove_secrets(mem_ctx, r);
     1929                return WERR_OK;
     1930        }
     1931
    19261932        if (!r->in.dc_name) {
    19271933                struct netr_DsRGetDCNameInfo *info;
     
    19491955        }
    19501956
    1951         status = libnet_join_unjoindomain_rpc(mem_ctx, r);
    1952         if (!NT_STATUS_IS_OK(status)) {
    1953                 libnet_unjoin_set_error_string(mem_ctx, r,
    1954                         "failed to disable machine account via rpc: %s",
    1955                         get_friendly_nt_error_msg(status));
    1956                 if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
    1957                         return WERR_SETUP_NOT_JOINED;
    1958                 }
    1959                 return ntstatus_to_werror(status);
    1960         }
    1961 
    1962         r->out.disabled_machine_account = true;
    1963 
    19641957#ifdef WITH_ADS
    1965         if (r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE) {
     1958        /* for net ads leave, try to delete the account.  If it works,
     1959           no sense in disabling.  If it fails, we can still try to
     1960           disable it. jmcd */
     1961
     1962        if (r->in.delete_machine_account) {
    19661963                ADS_STATUS ads_status;
    1967                 libnet_unjoin_connect_ads(mem_ctx, r);
    1968                 ads_status = libnet_unjoin_remove_machine_acct(mem_ctx, r);
     1964                ads_status = libnet_unjoin_connect_ads(mem_ctx, r);
     1965                if (ADS_ERR_OK(ads_status)) {
     1966                        /* dirty hack */
     1967                        r->out.dns_domain_name =
     1968                                talloc_strdup(mem_ctx,
     1969                                              r->in.ads->server.realm);
     1970                        ads_status =
     1971                                libnet_unjoin_remove_machine_acct(mem_ctx, r);
     1972                }
    19691973                if (!ADS_ERR_OK(ads_status)) {
    19701974                        libnet_unjoin_set_error_string(mem_ctx, r,
     
    19731977                } else {
    19741978                        r->out.deleted_machine_account = true;
    1975                         /* dirty hack */
    1976                         r->out.dns_domain_name = talloc_strdup(mem_ctx,
    1977                                                                r->in.ads->server.realm);
    19781979                        W_ERROR_HAVE_NO_MEMORY(r->out.dns_domain_name);
     1980                        libnet_join_unjoindomain_remove_secrets(mem_ctx, r);
     1981                        return WERR_OK;
    19791982                }
    19801983        }
    19811984#endif /* WITH_ADS */
     1985
     1986        /* The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag really means
     1987           "disable".  */
     1988        if (r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE) {
     1989                status = libnet_join_unjoindomain_rpc(mem_ctx, r);
     1990                if (!NT_STATUS_IS_OK(status)) {
     1991                        libnet_unjoin_set_error_string(mem_ctx, r,
     1992                                "failed to disable machine account via rpc: %s",
     1993                                get_friendly_nt_error_msg(status));
     1994                        if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
     1995                                return WERR_SETUP_NOT_JOINED;
     1996                        }
     1997                        return ntstatus_to_werror(status);
     1998                }
     1999
     2000                r->out.disabled_machine_account = true;
     2001        }
     2002
     2003        /* If disable succeeded or was not requested at all, we
     2004           should be getting rid of our end of things */
    19822005
    19832006        libnet_join_unjoindomain_remove_secrets(mem_ctx, r);
  • branches/samba-3.3.x/source/librpc/gen_ndr/libnet_join.h

    r206 r309  
    5959                const char * machine_password;
    6060                uint32_t unjoin_flags;
     61                uint8_t delete_machine_account;
    6162                uint8_t modify_config;
    6263                struct dom_sid *domain_sid;/* [ref] */
  • branches/samba-3.3.x/source/librpc/gen_ndr/ndr_libnet_join.c

    r206 r309  
    9090#endif
    9191                ndr_print_wkssvc_joinflags(ndr, "unjoin_flags", r->in.unjoin_flags);
     92                ndr_print_uint8(ndr, "delete_machine_account", r->in.delete_machine_account);
    9293                ndr_print_uint8(ndr, "modify_config", r->in.modify_config);
    9394                ndr_print_ptr(ndr, "domain_sid", r->in.domain_sid);
  • branches/samba-3.3.x/source/librpc/idl/libnet_join.idl

    r206 r309  
    5454                [in] string machine_password,
    5555                [in] wkssvc_joinflags unjoin_flags,
     56                [in] boolean8 delete_machine_account,
    5657                [in] boolean8 modify_config,
    5758                [in] dom_sid *domain_sid,
  • branches/samba-3.3.x/source/libsmb/passchange.c

    r274 r309  
    187187                        if (asprintf(err_str, "SAMR connection to machine %s "
    188188                                 "failed. Error was %s, but LANMAN password "
    189                                  "changed are disabled\n",
     189                                 "changes are disabled\n",
    190190                                 remote_machine, nt_errstr(result)) == -1) {
    191191                                *err_str = NULL;
  • branches/samba-3.3.x/source/nsswitch/pam_winbind.c

    r224 r309  
    915915        /* good catch from Ralf Haferkamp: an expiry of "never" is translated
    916916         * to -1 */
    917         if (policy->expire <= 0) {
     917        if ((policy->expire == (int64_t)-1) ||
     918            (policy->expire == 0)) {
    918919                return;
    919920        }
     
    22842285        char *domain;
    22852286        char *name;
     2287        char *p;
    22862288
    22872289        /* This cannot work when the winbind separator = @ */
     
    22922294        }
    22932295
     2296        name = talloc_strdup(ctx, upn);
     2297        if (!name) {
     2298                return NULL;
     2299        }
     2300
     2301        if ((p = strchr(name, '@')) != NULL) {
     2302                *p = 0;
     2303                domain = p + 1;
     2304        }
     2305
    22942306        /* Convert the UPN to a SID */
    22952307
    2296         wbc_status = wbcLookupName("", upn, &sid, &type);
     2308        wbc_status = wbcLookupName(domain, name, &sid, &type);
    22972309        if (!WBC_ERROR_IS_OK(wbc_status)) {
    22982310                return NULL;
  • branches/samba-3.3.x/source/rpc_server/srv_lsa_nt.c

    r224 r309  
    10911091        status = _lsa_LookupNames(p, &q);
    10921092
     1093        sid_array2->count = sid_array->count;
    10931094        sid_array2->sids = TALLOC_ARRAY(p->mem_ctx, struct lsa_TranslatedSid2, sid_array->count);
    10941095        if (!sid_array2->sids) {
  • branches/samba-3.3.x/source/script/tests/test_posix_s3.sh

    r224 r309  
    3939rpc="$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC"
    4040rpc="$rpc RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME"
    41 rpc="$rpc RPC-LSA-LOOKUPSIDS RPC-JOIN"
     41rpc="$rpc RPC-LSA-LOOKUPSIDS RPC-JOIN RPC-SAMR-MACHINE-AUTH"
    4242
    4343# NOTE: to enable the UNIX-WHOAMI test, we need to change the default share
  • branches/samba-3.3.x/source/smbd/lanman.c

    r206 r309  
    12151215                }
    12161216                fstrcpy(s->comment, p);
     1217                string_truncate(s->comment, MAX_SERVER_STRING_LENGTH);
    12171218
    12181219                s->domain[0] = '\0';
  • branches/samba-3.3.x/source/smbd/open.c

    r224 r309  
    318318        if (!CAN_WRITE(conn)) {
    319319                /* It's a read-only share - fail if we wanted to write. */
    320                 if(accmode != O_RDONLY) {
     320                if(accmode != O_RDONLY || (flags & O_TRUNC) || (flags & O_APPEND)) {
    321321                        DEBUG(3,("Permission denied opening %s\n", path));
    322322                        return NT_STATUS_ACCESS_DENIED;
     
    326326                           access into the directory.
    327327                        */
    328                         flags &= ~O_CREAT;
    329                         local_flags &= ~O_CREAT;
     328                        flags &= ~(O_CREAT|O_EXCL);
     329                        local_flags &= ~(O_CREAT|O_EXCL);
    330330                }
    331331        }
  • branches/samba-3.3.x/source/smbd/server.c

    r274 r309  
    356356        unsigned dns_port = 0;
    357357
    358         if (!is_daemon) {
    359                 return open_sockets_inetd();
    360         }
    361 
    362358#ifdef HAVE_ATEXIT
    363359        {
     
    369365        }
    370366#endif
     367
     368        if (!is_daemon) {
     369                /*
     370                 * Stop zombies the old way.
     371                 * We aren't forking any new
     372                 * 'normal' connections when
     373                 * run from [x]inetd.
     374                 */
     375                CatchChild();
     376                return open_sockets_inetd();
     377        }
    371378
    372379        /* Stop zombies */
     
    12601267        BlockSignals(False, SIGTERM);
    12611268
     1269        /* Ensure we leave no zombies until we
     1270         * correctly set up child handling below. */
     1271        CatchChild();
     1272
    12621273        /* we want total control over the permissions on created files,
    12631274           so set our umask to 0 */
  • branches/samba-3.3.x/source/smbd/trans2.c

    r222 r309  
    49384938        if (setting_write_time) {
    49394939                /*
    4940                  * This was a setfileinfo on an open file.
     4940                 * This was a Windows setfileinfo on an open file.
    49414941                 * NT does this a lot. We also need to
    49424942                 * set the time here, as it can be read by
     
    60166016        bool delete_on_fail = False;
    60176017        enum perm_type ptype;
     6018        files_struct *all_fsps = NULL;
     6019        bool modify_mtime = true;
     6020        struct file_id id;
    60186021
    60196022        if (total_data < 100) {
     
    61626165
    61636166        /* Deal with any time changes. */
    6164 
    6165         return smb_set_file_time(conn,
     6167        id = vfs_file_id_from_sbuf(conn, psbuf);
     6168        for(all_fsps = file_find_di_first(id); all_fsps;
     6169                        all_fsps = file_find_di_next(all_fsps)) {
     6170                /*
     6171                 * We're setting the time explicitly for UNIX.
     6172                 * Cancel any pending changes over all handles.
     6173                 */
     6174                all_fsps->update_write_time_on_close = false;
     6175                TALLOC_FREE(all_fsps->update_write_time_event);
     6176        }
     6177
     6178        /*
     6179         * Override the "setting_write_time"
     6180         * parameter here as it almost does what
     6181         * we need. Just remember if we modified
     6182         * mtime and send the notify ourselves.
     6183         */
     6184        if (null_timespec(ts[1])) {
     6185                modify_mtime = false;
     6186        }
     6187
     6188        status = smb_set_file_time(conn,
    61666189                                fsp,
    61676190                                fname,
    61686191                                psbuf,
    61696192                                ts,
    6170                                 true);
     6193                                false);
     6194
     6195        if (modify_mtime) {
     6196                notify_fname(conn, NOTIFY_ACTION_MODIFIED,
     6197                        FILE_NOTIFY_CHANGE_LAST_WRITE, fname);
     6198        }
     6199        return status;
    61716200}
    61726201
     
    67956824        }
    67966825
    6797         if (!CAN_WRITE(conn)) {
    6798                 reply_doserror(req, ERRSRV, ERRaccess);
    6799                 return;
    6800         }
    6801 
    68026826        if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) {
    68036827                reply_nterror(req, NT_STATUS_INVALID_LEVEL);
    68046828                return;
     6829        }
     6830
     6831        if (!CAN_WRITE(conn)) {
     6832                /* Allow POSIX opens. The open path will deny
     6833                 * any non-readonly opens. */
     6834                if (info_level != SMB_POSIX_PATH_OPEN) {
     6835                        reply_doserror(req, ERRSRV, ERRaccess);
     6836                        return;
     6837                }
    68056838        }
    68066839
     
    71097142
    71107143        DEBUG(3,("call_trans2mkdir : name = %s\n", directory));
     7144
     7145        status = resolve_dfspath(ctx,
     7146                                conn,
     7147                                req->flags2 & FLAGS2_DFS_PATHNAMES,
     7148                                directory,
     7149                                &directory);
     7150        if (!NT_STATUS_IS_OK(status)) {
     7151                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
     7152                        reply_botherror(req,
     7153                                        NT_STATUS_PATH_NOT_COVERED,
     7154                                        ERRSRV, ERRbadpath);
     7155                }
     7156                reply_nterror(req, status);
     7157                return;
     7158        }
    71117159
    71127160        status = unix_convert(ctx, conn, directory, False, &directory, NULL, &sbuf);
  • branches/samba-3.3.x/source/utils/net_ads.c

    r206 r309  
    902902        r->in.admin_password    = net_prompt_pass(c, c->opt_user_name);
    903903        r->in.modify_config     = lp_config_backend_is_registry();
     904
     905        /* Try to delete it, but if that fails, disable it.  The
     906           WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE really means "disable */
    904907        r->in.unjoin_flags      = WKSSVC_JOIN_FLAGS_JOIN_TYPE |
    905908                                  WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE;
     909        r->in.delete_machine_account = true;
    906910
    907911        werr = libnet_Unjoin(ctx, r);
     
    913917        }
    914918
    915         if (W_ERROR_IS_OK(werr)) {
     919        if (r->out.deleted_machine_account) {
    916920                d_printf("Deleted account for '%s' in realm '%s'\n",
    917921                        r->in.machine_name, r->out.dns_domain_name);
     
    927931        }
    928932
    929         d_fprintf(stderr, "Failed to disable machine account for '%s' in realm '%s'\n",
     933        /* Based on what we requseted, we shouldn't get here, but if
     934           we did, it means the secrets were removed, and therefore
     935           we have left the domain */
     936        d_fprintf(stderr, "Machine '%s' Left domain '%s'\n",
    930937                  r->in.machine_name, r->out.dns_domain_name);
    931938
  • branches/samba-3.3.x/source/utils/net_rpc.c

    r224 r309  
    57645764        char *cleartextpwd = NULL;
    57655765        uint8_t nt_hash[16];
    5766         DATA_BLOB data;
     5766        DATA_BLOB data = data_blob_null;
    57675767
    57685768        nt_status = rpccli_lsa_QueryTrustedDomainInfoBySid(pipe_hnd, mem_ctx,
  • branches/samba-3.3.x/source/winbindd/winbindd_sid.c

    r206 r309  
    9494                name_domain = state->request.data.name.name;
    9595                name_user = p+1;
     96        } else if ((p = strchr(state->request.data.name.name, '@')) != NULL) {
     97                /* upn */
     98                name_domain = p + 1;
     99                *p = 0;
     100                name_user = state->request.data.name.name;
    96101        } else {
    97102                name_domain = state->request.data.name.dom_name;
  • branches/samba-3.3.x/source/winbindd/winbindd_util.c

    r206 r309  
    11451145                        fstrcpy(domain, lp_workgroup());
    11461146                } else if ((p = strchr(domuser, '@')) != NULL) {
    1147                         fstrcpy(domain, "");                   
     1147                        fstrcpy(domain, p + 1);
     1148                        user[PTR_DIFF(p, domuser)] = 0;
    11481149                } else {
    11491150                        return False;
Note: See TracChangeset for help on using the changeset viewer.