Changeset 454


Ignore:
Timestamp:
Jun 4, 2010, 3:11:43 PM (16 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: merged changes from 3.3

Location:
trunk/server/source3
Files:
8 added
46 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/Makefile.in

    r429 r454  
    391391          $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
    392392          lib/interface.o lib/pidfile.o \
    393           lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
     393          lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
    394394          lib/username.o \
    395395          ../libds/common/flag_mapping.o \
     
    17851785                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
    17861786
    1787 bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
     1787bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
    17881788        @echo Linking $@
    17891789        @$(CC) -o $@ $(LDBEDIT_OBJ) $(DYNEXP) $(LDFLAGS) \
     
    17911791                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
    17921792
    1793 bin/ldbsearch: $(BINARY_PREREQS) $(LDBSEARCH_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
     1793bin/ldbsearch: $(BINARY_PREREQS) $(LDBSEARCH_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
    17941794        @echo Linking $@
    17951795        @$(CC) -o $@ $(LDBSEARCH_OBJ) $(DYNEXP) $(LDFLAGS) \
     
    17971797                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
    17981798
    1799 bin/ldbadd: $(BINARY_PREREQS) $(LDBADD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
     1799bin/ldbadd: $(BINARY_PREREQS) $(LDBADD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
    18001800        @echo Linking $@
    18011801        @$(CC) -o $@ $(LDBADD_OBJ) $(DYNEXP) $(LDFLAGS) \
     
    18031803                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
    18041804
    1805 bin/ldbmodify: $(BINARY_PREREQS) $(LDBMODIFY_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
     1805bin/ldbmodify: $(BINARY_PREREQS) $(LDBMODIFY_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
    18061806        @echo Linking $@
    18071807        @$(CC) -o $@ $(LDBMODIFY_OBJ) $(DYNEXP) $(LDFLAGS) \
     
    18091809                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
    18101810
    1811 bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
     1811bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
    18121812        @echo Linking $@
    18131813        @$(CC) -o $@ $(LDBDEL_OBJ) $(DYNEXP) $(LDFLAGS) \
     
    18151815                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
    18161816
    1817 bin/ldbrename: $(BINARY_PREREQS) $(LDBRENAME_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
     1817bin/ldbrename: $(BINARY_PREREQS) $(LDBRENAME_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
    18181818        @echo Linking $@
    18191819        @$(CC) $(FLAGS) -o $@ $(LDBRENAME_OBJ) $(DYNEXP) $(LDFLAGS) \
     
    18211821                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
    18221822
    1823 bin/versiontest: $(BINARY_PREREQS) lib/version_test.o $(VERSION_OBJ)
     1823bin/versiontest: $(BINARY_PREREQS) lib/version_test.o $(VERSION_OBJ)
    18241824        @echo Linking $@
    18251825        @$(CC) $(FLAGS) -o $@ $(VERSION_OBJ) lib/version_test.o
  • trunk/server/source3/dynconfig.c

    r414 r454  
    4141 **/
    4242
     43
    4344#define DEFINE_DYN_CONFIG_PARAM(name) \
    4445static char *dyn_##name; \
     
    6566        return (dyn_##name == NULL);\
    6667}
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
    6786
    6887DEFINE_DYN_CONFIG_PARAM(SBINDIR)
     
    83102DEFINE_DYN_CONFIG_PARAM(SMB_PASSWD_FILE)
    84103DEFINE_DYN_CONFIG_PARAM(PRIVATE_DIR)
     104
     105
     106
     107
     108
     109
     110
     111
     112
     113
     114
     115
     116
     117
     118
     119
     120
     121
     122
     123
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
     134
     135
     136
     137
     138
     139
     140
     141
     142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
     180
     181
     182
     183
     184
     185
     186
     187
     188
     189
     190
     191
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
     242
     243
     244
     245
     246
     247
     248
     249
     250
     251
     252
     253
     254
     255
     256
     257
     258
     259
     260
     261
     262
     263
     264
     265
     266
     267
     268
     269
     270
     271
     272
     273
     274
     275
     276
     277
     278
     279
     280
     281
     282
     283
     284
     285
     286
     287
     288
     289
     290
     291
     292
     293
     294
     295
     296
     297
     298
     299
     300
     301
     302
     303
     304
     305
     306
     307
     308
     309
     310
     311
     312
     313
     314
     315
     316
     317
     318
     319
     320
     321
     322
     323
     324
     325
     326
     327
     328
     329
     330
     331
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
     350
     351
     352
     353
     354
     355
     356
     357
     358
     359
     360
     361
     362
     363
     364
     365
     366
     367
     368
     369
     370
     371
     372
     373
     374
     375
     376
     377
     378
     379
     380
     381
     382
     383
     384
     385
     386
     387
     388
     389
     390
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
     404
     405
     406
     407
     408
     409
     410
     411
     412
     413
     414
     415
     416
  • trunk/server/source3/groupdb/mapping_ldb.c

    r414 r454  
    8181        /* force the permissions on the ldb to 0600 - this will fix
    8282           existing databases as well as new ones */
     83
    8384        if (chmod(db_path, 0600) != 0) {
    8485                goto failed;
    8586        }
     87
    8688
    8789        if (!existed) {
  • trunk/server/source3/include/version.h

    r429 r454  
    44#define SAMBA_VERSION_RELEASE 2
    55#define SAMBA_VERSION_OFFICIAL_STRING "3.5.2"
     6
     7
     8
    69#ifdef SAMBA_VERSION_VENDOR_FUNCTION
    710#  define SAMBA_VERSION_STRING SAMBA_VERSION_VENDOR_FUNCTION
  • trunk/server/source3/lib/charcnv.c

    r414 r454  
    18041804*/
    18051805
     1806
    18061807codepoint_t next_codepoint(const char *str, size_t *size)
    18071808{
  • trunk/server/source3/lib/fault.c

    r414 r454  
    5454        if (cont_fn) {
    5555                cont_fn(NULL);
     56
    5657#ifdef SIGSEGV
    5758                CatchSignal(SIGSEGV,SIGNAL_CAST SIG_DFL);
     
    6263#ifdef SIGABRT
    6364                CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL);
     65
    6466#endif
    6567                return; /* this should cause a core dump */
     
    8385        cont_fn = fn;
    8486
     87
    8588#ifdef SIGSEGV
    8689        CatchSignal(SIGSEGV,SIGNAL_CAST sig_fault);
     
    9194#ifdef SIGABRT
    9295        CatchSignal(SIGABRT,SIGNAL_CAST sig_fault);
     96
    9397#endif
    9498}
  • trunk/server/source3/lib/iconv.c

    r414 r454  
    128128}
    129129
     130
     131
     132
     133
     134
     135
     136
     137
     138
     139
     140
     141
     142
     143
    130144#ifdef HAVE_NATIVE_ICONV
    131145/* if there was an error then reset the internal state,
     
    136150                        char **outbuf, size_t *outbytesleft)
    137151{
     152
     153
     154
     155
     156
    138157        size_t ret = iconv((iconv_t)cd,
    139158                           (void *)inbuf, inbytesleft,
     
    144163                errno = saved_errno;
    145164        }
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
     180
     181
     182
     183
     184
     185
    146186        return ret;
    147187}
     
    161201        char *bufp = cvtbuf;
    162202        size_t bufsize;
     203
     204
     205
    163206
    164207        /* in many cases we can go direct */
  • trunk/server/source3/lib/ldb/common/ldb.c

    r414 r454  
    117117        ldb_connect_fn fn;
    118118
     119
    119120        if (strchr(url, ':') != NULL) {
     121
     122
     123
    120124                backend = talloc_strndup(ldb, url, strchr(url, ':')-url);
    121125        } else {
  • trunk/server/source3/lib/ldb/ldb_tdb/ldb_tdb.c

    r414 r454  
    10121012
    10131013        /* parse the url */
     1014
    10141015        if (strchr(url, ':')) {
     1016
     1017
     1018
    10151019                if (strncmp(url, "tdb://", 6) != 0) {
    10161020                        ldb_debug(ldb, LDB_DEBUG_ERROR, "Invalid tdb URL '%s'", url);
  • trunk/server/source3/lib/pidfile.c

    r414 r454  
    6868        }
    6969
     70
    7071        if (fcntl_lock(fd,SMB_F_SETLK,0,1,F_RDLCK)) {
    7172                /* we could get the lock - it can't be a Samba process */
    7273                goto noproc;
    7374        }
     75
    7476
    7577        SAFE_FREE(pidFile);
     
    9597        /* Add a suffix to the program name if this is a process with a
    9698         * none default configuration file name. */
     99
     100
     101
     102
     103
    97104        if (strcmp( CONFIGFILE, get_dyn_CONFIGFILE()) == 0) {
    98105                name = SMB_STRDUP(program_name);
     
    111118                }
    112119        }
     120
     121
     122
    113123
    114124        if (asprintf(&pidFile_name, "%s/%s.pid", lp_piddir(), name) == -1) {
     
    144154                exit(1);
    145155        }
     156
    146157        /* Leave pid file open & locked for the duration... */
    147158        SAFE_FREE(name);
     159
     160
     161
    148162}
    149163
  • trunk/server/source3/lib/readline.c

    r414 r454  
    102102                        return ret;
    103103                }
     104
     105
     106
     107
     108
     109
     110
     111
     112
     113
     114
     115
     116
     117
     118
     119
     120
     121
     122
     123
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
     134
     135
     136
     137
     138
     139
     140
     141
     142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
    104153                if (callback) {
    105154                        callback();
  • trunk/server/source3/lib/select.c

    r414 r454  
    6363
    6464        if (initialised != sys_getpid()) {
     65
    6566                if (pipe(select_pipe) == -1)
     67
     68
     69
    6670                {
    6771                        DEBUG(0, ("sys_select: pipe failed (%s)\n",
  • trunk/server/source3/lib/smbrun.c

    r414 r454  
    8383        }
    8484
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
     101
     102
     103
     104
     105
     106
     107
     108
     109
     110
     111
     112
    85113        /* in this method we will exec /bin/sh with the correct
    86114           arguments, after first setting stdout to point at the file */
     
    202230        exit(83);
    203231        return 1;
     232
    204233}
    205234
  • trunk/server/source3/lib/system.c

    r429 r454  
    641641#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_FTRUNCATE64)
    642642        return ftruncate64(fd, offset);
     643
     644
    643645#else
    644646        return ftruncate(fd, offset);
     
    15711573        }
    15721574        return ret;
     1575
     1576
    15731577#else
    15741578        errno = ENOSYS;
     
    16221626        }
    16231627        return ret;
     1628
     1629
    16241630#else
    16251631        errno = ENOSYS;
     
    16751681        }
    16761682        return ret;
     1683
     1684
    16771685#else
    16781686        errno = ENOSYS;
     
    18671875        }
    18681876        return ret;
     1877
     1878
    18691879#else
    18701880        errno = ENOSYS;
     
    18961906        }
    18971907        return ret;
     1908
     1909
    18981910#else
    18991911        errno = ENOSYS;
     
    19271939        }
    19281940        return ret;
     1941
     1942
    19291943#else
    19301944        errno = ENOSYS;
     
    19661980        }
    19671981        return ret;
     1982
     1983
    19681984#else
    19691985        errno = ENOSYS;
     
    20032019        }
    20042020        return ret;
     2021
     2022
    20052023#else
    20062024        errno = ENOSYS;
     
    20422060        }
    20432061        return ret;
     2062
     2063
    20442064#else
    20452065        errno = ENOSYS;
     
    21072127        }
    21082128        return ret;
     2129
     2130
    21092131#else
    21102132        errno = ENOSYS;
     
    21712193        }
    21722194        return ret;
     2195
     2196
    21732197#else
    21742198        errno = ENOSYS;
     
    22362260        }
    22372261        return ret;
     2262
     2263
    22382264#else
    22392265        errno = ENOSYS;
  • trunk/server/source3/lib/system_smbd.c

    r414 r454  
    4141                                  int *grpcnt)
    4242{
     43
    4344        gid_t *gids_saved;
    4445        int ret, ngrp_saved, num_gids;
     
    112113        free(gids_saved);
    113114        return ret;
     115
     116
     117
     118
    114119}
    115120#endif
  • trunk/server/source3/lib/util.c

    r414 r454  
    20272027int set_maxfiles(int requested_max)
    20282028{
    2029 #if (defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE))
     2029#if (defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE))
    20302030        struct rlimit rlp;
    20312031        int saved_current_limit;
  • trunk/server/source3/lib/util_sec.c

    r414 r454  
    9393static void assert_uid(uid_t ruid, uid_t euid)
    9494{
     95
    9596        if ((euid != (uid_t)-1 && geteuid() != euid) ||
    9697            (ruid != (uid_t)-1 && getuid() != ruid)) {
     
    103104                }
    104105        }
     106
    105107}
    106108
     
    110112static void assert_gid(gid_t rgid, gid_t egid)
    111113{
     114
    112115        if ((egid != (gid_t)-1 && getegid() != egid) ||
    113116            (rgid != (gid_t)-1 && getgid() != rgid)) {
     
    121124                }
    122125        }
     126
    123127}
    124128
  • trunk/server/source3/lib/util_sock.c

    r414 r454  
    16791679        /* Create the socket directory or reuse the existing one */
    16801680
     1681
    16811682        if (lstat(socket_dir, &st) == -1) {
    16821683                if (errno == ENOENT) {
     
    17071708                }
    17081709        }
     1710
    17091711
    17101712        /* Create the socket file */
     
    17181720        }
    17191721
     1722
     1723
     1724
    17201725        if (asprintf(&path, "%s/%s", socket_dir, socket_name) == -1) {
     1726
    17211727                goto out_close;
    17221728        }
  • trunk/server/source3/lib/util_str.c

    r414 r454  
    22642264*******************************************************************/
    22652265
     2266
     2267
     2268
    22662269#define INCLUDE_LIST "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_/ \t.,"
     2270
    22672271#define INSIDE_DQUOTE_LIST "$`\n\"\\"
    22682272
  • trunk/server/source3/libaddns/dns.h

    r414 r454  
    4141#include <fcntl.h>
    4242#include <time.h>
     43
    4344#include <string.h>
     45
    4446#include <errno.h>
    4547#include <netdb.h>
  • trunk/server/source3/libaddns/dnserr.h

    r414 r454  
    3636/* Setup the DNS_ERROR typedef.  Technique takes from nt_status.h */
    3737
    38 #if defined(HAVE_IMMEDIATE_STRUCTURES)
     38#if defined(HAVE_IMMEDIATE_STRUCTURES)
    3939typedef struct {uint32 v;} DNS_ERROR;
    4040#define ERROR_DNS(x) ((DNS_ERROR) { x })
  • trunk/server/source3/libsmb/clientgen.c

    r429 r454  
    567567        bool mandatory_signing = false;
    568568
     569
    569570        /* Check the effective uid - make sure we are not setuid */
    570571        if (is_setuid_root()) {
     
    572573                return NULL;
    573574        }
     575
    574576
    575577        cli = TALLOC_ZERO_P(NULL, struct cli_state);
  • trunk/server/source3/libsmb/clifile.c

    r414 r454  
    43604360                        &setup, 1, 0,   /* setup, length, max */
    43614361                        param, param_len, 10, /* param, length, max */
     4362
     4363
     4364
    43624365                        NULL, data_len, cli->max_xmit /* data, length, max */
     4366
    43634367                                )) {
    43644368                return False;
     
    45024506        memset(param, 0, 6);
    45034507        SSVAL(param,0,fnum);
     4508
    45044509        SSVAL(param,2,SMB_INFO_SET_EA);
     4510
     4511
     4512
    45054513
    45064514        return cli_get_ea_list(cli, setup, param, 6, ctx, pnum_eas, pea_list);
  • trunk/server/source3/locking/posix.c

    r414 r454  
    252252        ret = SMB_VFS_GETLOCK(fsp, poffset, pcount, ptype, &pid);
    253253
     254
    254255        if (!ret && ((errno == EFBIG) || (errno == ENOLCK) || (errno ==  EINVAL))) {
    255256
     
    277278                }
    278279        }
     280
    279281
    280282        DEBUG(8,("posix_fcntl_getlock: Lock query call %s\n", ret ? "successful" : "failed"));
  • trunk/server/source3/nmbd/asyncdns.c

    r414 r454  
    141141        CatchChild();
    142142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
    143158        if (pipe(fd1) || pipe(fd2)) {
    144159                DEBUG(0,("can't create asyncdns pipes\n"));
    145160                return;
    146161        }
     162
    147163
    148164        child_pid = sys_fork();
  • trunk/server/source3/nmbd/nmbd.c

    r414 r454  
    3030extern bool global_in_nmbd;
    3131
     32
     33
     34
     35
    3236extern bool override_logfile;
    3337
     
    384388                reload_nmbd_services( True );
    385389        }
     390
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
    386402
    387403        return(ret);
     
    776792        TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */
    777793
     794
     795
     796
     797
    778798        load_case_tables();
    779799
  • trunk/server/source3/nmbd/nmbd_serverlistdb.c

    r414 r454  
    331331                return;
    332332        }
     333
    333334        fnamenew = talloc_asprintf(ctx, "%s.",
     335
     336
     337
    334338                                fname);
    335339        if (!fnamenew) {
     
    418422
    419423        x_fclose(fp);
     424
     425
     426
    420427        unlink(fname);
    421428        chmod(fnamenew,0644);
  • trunk/server/source3/nmbd/nmbd_winsserver.c

    r414 r454  
    23892389
    23902390        x_fclose(fp);
     2391
     2392
     2393
    23912394        chmod(fnamenew,0644);
    23922395        unlink(fname);
  • trunk/server/source3/param/loadparm.c

    r414 r454  
    46654665                case PRINT_AIX:
    46664666                case PRINT_LPRNT:
     4667
    46674668                case PRINT_LPROS2:
     4669
    46684670                        string_set(&pService->szLpqcommand, "lpq -P'%p'");
    46694671                        string_set(&pService->szLprmcommand, "lprm -P'%p' %j");
    46704672                        string_set(&pService->szPrintcommand, "lpr -r -P'%p' %s");
    46714673                        break;
     4674
     4675
     4676
     4677
     4678
     4679
     4680
    46724681
    46734682                case PRINT_LPRNG:
     
    49384947        string_set(&Globals.szGuestaccount, GUEST_ACCOUNT);
    49394948
     4949
     4950
     4951
     4952
     4953
     4954
     4955
     4956
     4957
     4958
     4959
     4960
    49404961        /* using UTF8 by default allows us to support all chars */
    49414962        string_set(&Globals.unix_charset, DEFAULT_UNIX_CHARSET);
     4963
     4964
     4965
     4966
     4967
    49424968
    49434969#if defined(HAVE_NL_LANGINFO) && defined(CODESET)
    49444970        /* If the system supports nl_langinfo(), try to grab the value
    49454971           from the user's locale */
     4972
    49464973        string_set(&Globals.display_charset, "LOCALE");
     4974
     4975
     4976
     4977
     4978
     4979
    49474980#else
    49484981        string_set(&Globals.display_charset, DEFAULT_DISPLAY_CHARSET);
    49494982#endif
    49504983
     4984
    49514985        /* Use codepage 850 as a default for the dos character set */
    49524986        string_set(&Globals.dos_charset, DEFAULT_DOS_CHARSET);
     4987
     4988
     4989
     4990
     4991
    49534992
    49544993        /*
  • trunk/server/source3/passdb/pdb_smbpasswd.c

    r414 r454  
    277277                         */
    278278
     279
    279280                        if (sys_stat(pfile, &sbuf1, false) != 0) {
    280281                                DEBUG(0, ("startsmbfilepwent_internal: unable to stat file %s. \
     
    294295
    295296                        if( sbuf1.st_ex_ino == sbuf2.st_ex_ino) {
     297
    296298                                /* No race. */
     299
     300
    297301                                break;
    298302                        }
     
    315319        setvbuf(fp, (char *)NULL, _IOFBF, 1024);
    316320
     321
    317322        /* Make sure it is only rw by the owner */
    318323#ifdef HAVE_FCHMOD
     
    327332                return NULL;
    328333        }
     334
    329335
    330336        /* We have a lock on the file. */
     
    11681174         * Do an atomic rename - then release the locks.
    11691175         */
     1176
     1177
     1178
     1179
    11701180
    11711181        if(rename(pfile2,pfile) != 0) {
     
    11731183        }
    11741184
     1185
    11751186        endsmbfilepwent(fp, &smbpasswd_state->pw_file_lock_depth);
    11761187        endsmbfilepwent(fp_write,&pfile2_lockdepth);
     1188
    11771189        return True;
    11781190}
  • trunk/server/source3/printing/printing.c

    r414 r454  
    14311431        DEBUG(3,("start_background_queue: Starting background LPQ thread\n"));
    14321432
     1433
    14331434        if (pipe(pause_pipe) == -1) {
     1435
     1436
     1437
    14341438                DEBUG(5,("start_background_queue: cannot create pipe. %s\n", strerror(errno) ));
    14351439                exit(1);
  • trunk/server/source3/rpc_server/srv_srvsvc_nt.c

    r414 r454  
    179179
    180180        if ( strcmp( fname, "." ) == 0 ) {
     181
    181182                fullpath = talloc_asprintf(fenum->ctx, "C:%s", sharepath );
     183
     184
     185
     186
    182187        } else {
     188
    183189                fullpath = talloc_asprintf(fenum->ctx, "C:%s/%s",
    184190                                sharepath, fname );
     191
     192
     193
     194
    185195        }
    186196        if (!fullpath) {
     
    294304                        "", remark);
    295305        }
     306
     307
     308
     309
     310
     311
    296312        path = talloc_asprintf(p->mem_ctx,
    297313                        "C:%s", lp_pathname(snum));
     
    386402                        "", remark);
    387403        }
     404
     405
     406
     407
     408
    388409        path = talloc_asprintf(ctx, "C:%s", lp_pathname(snum));
    389410        if (path) {
     
    14891510        }
    14901511
     1512
     1513
     1514
     1515
     1516
    14911517        /* NT is braindead - it wants a C: prefix to a pathname ! So strip it. */
    14921518        if (strlen(ptr) > 2 && ptr[1] == ':' && ptr[0] != '/')
     
    14961522        if (*ptr != '/')
    14971523                return NULL;
     1524
    14981525
    14991526        return ptr;
     
    23382365***********************************************************************************/
    23392366
     2367
    23402368static const char *server_disks[] = {"C:"};
     2369
     2370
     2371
     2372
    23412373
    23422374static uint32 get_server_disk_count(void)
  • trunk/server/source3/smbd/dosmode.c

    r414 r454  
    180180        if (ro_opts == MAP_READONLY_YES) {
    181181                /* Original Samba method - map inverse of user "w" bit. */
     182
    182183                if ((smb_fname->st.st_ex_mode & S_IWUSR) == 0) {
     184
     185
     186
    183187                        result |= aRONLY;
    184188                }
     
    190194        } /* Else never set the readonly bit. */
    191195
     196
    192197        if (MAP_ARCHIVE(conn) && ((smb_fname->st.st_ex_mode & S_IXUSR) != 0))
     198
     199
     200
    193201                result |= aARCH;
    194202
     203
    195204        if (MAP_SYSTEM(conn) && ((smb_fname->st.st_ex_mode & S_IXGRP) != 0))
     205
     206
     207
    196208                result |= aSYSTEM;
    197209
     210
    198211        if (MAP_HIDDEN(conn) && ((smb_fname->st.st_ex_mode & S_IXOTH) != 0))
     212
     213
     214
    199215                result |= aHIDDEN;   
    200216
     
    249265#else
    250266                                ) {
     267
     268
     269
     270
    251271#endif
    252272                        DEBUG(1,("get_ea_dos_attributes: Cannot get attribute "
  • trunk/server/source3/smbd/password.c

    r414 r454  
    219219                return -1;
    220220        }
     221
     222
     223
     224
     225
     226
     227
     228
     229
    221230
    222231        DEBUG(3, ("Adding homes service for user '%s' using home directory: "
  • trunk/server/source3/smbd/reply.c

    r429 r454  
    56525652        bool dst_exists, old_is_stream, new_is_stream;
    56535653
     5654
     5655
     5656
     5657
     5658
     5659
     5660
    56545661        status = check_name(conn, smb_fname_dst_in->base_name);
    56555662        if (!NT_STATUS_IS_OK(status)) {
     
    57895796        dst_exists = SMB_VFS_STAT(conn, smb_fname_dst) == 0;
    57905797
    5791         if(!replace_if_exists && dst_exists) {
     5798        if(!replace_if_exists && dst_exists) {
    57925799                DEBUG(3, ("rename_internals_fsp: dest exists doing rename "
    57935800                          "%s -> %s\n", smb_fname_str_dbg(fsp->fsp_name),
  • trunk/server/source3/smbd/server.c

    r429 r454  
    11171117        reopen_logs();
    11181118
     1119
     1120
     1121
     1122
     1123
     1124
     1125
     1126
     1127
     1128
     1129
    11191130        DEBUG(0,("smbd version %s started.\n", samba_version_string()));
    11201131        DEBUGADD(0,("%s\n", COPYRIGHT_STARTUP_MESSAGE));
  • trunk/server/source3/smbd/service.c

    r429 r454  
    6868        d = destname;
    6969
     70
    7071        *d++ = '/'; /* Always start with root. */
    7172
     
    159160                *(d-1) = '\0';
    160161        }
     162
     163
     164
     165
    161166
    162167        DEBUG(10,("set_conn_connectpath: service %s, connectpath = %s\n",
  • trunk/server/source3/smbd/sesssetup.c

    r429 r454  
    7575        result = 0;
    7676
     77
    7778        tmp = message_push_string(outbuf, "Unix", STR_TERMINATE);
     79
     80
     81
    7882
    7983        if (tmp == -1) return -1;
  • trunk/server/source3/smbd/trans2.c

    r414 r454  
    128128
    129129        pea->flags = 0;
     130
    130131        if (strnequal(ea_name, "user.", 5)) {
    131132                pea->name = talloc_strdup(mem_ctx, &ea_name[5]);
    132133        } else {
     134
     135
     136
    133137                pea->name = talloc_strdup(mem_ctx, ea_name);
    134138        }
     
    287291                fstring dos_ea_name;
    288292
     293
    289294                if (strnequal(names[i], "system.", 7)
    290295                    || samba_private_attr_name(names[i]))
     296
     297
     298
    291299                        continue;
    292300
     
    492500                fstring unix_ea_name;
    493501
     502
     503
     504
     505
    494506                fstrcpy(unix_ea_name, "user."); /* All EA's must start with user. */
    495507                fstrcat(unix_ea_name, ea_list->ea.name);
     508
    496509
    497510                canonicalize_ea_name(conn, fsp, fname, unix_ea_name);
     
    54545467        }
    54555468
     5469
     5470
     5471
     5472
     5473
     5474
     5475
    54565476        DEBUG(10,("smb_set_file_time: setting utimes to modified values.\n"));
    54575477
     
    54635483                return map_nt_error_from_unix(errno);
    54645484        }
     5485
     5486
     5487
    54655488
    54665489        notify_fname(conn, NOTIFY_ACTION_MODIFIED, action,
  • trunk/server/source3/smbd/vfs.c

    r414 r454  
    716716                return(0);
    717717
     718
     719
     720
    718721        if (*path == '/' && strcsequal(LastDir,path))
     722
    719723                return(0);
    720724
     
    938942                  resolved_name));
    939943
     944
     945
     946
    940947        if (*resolved_name != '/') {
     948
    941949                DEBUG(0,("check_reduced_name: realpath doesn't return "
    942950                         "absolute paths !\n"));
  • trunk/server/source3/torture/torture.c

    r429 r454  
    50265026        printf("num_eas = %d\n", (int)num_eas);
    50275027
     5028
     5029
     5030
    50285031        if (num_eas != 20) {
     5032
    50295033                printf("Should be 20 EA's stored... failing.\n");
    50305034                correct = False;
     
    50405044        printf("Now deleting all EA's - case indepenent....\n");
    50415045
    5042 #if 1
     5046#if
    50435047        cli_set_ea_path(cli, fname, "", "", 0);
    50445048#else
  • trunk/server/source3/utils/net_usershare.c

    r414 r454  
    946946
    947947        /* Attempt to replace any existing share by this name. */
     948
     949
     950
    948951        if (rename(full_path_tmp, full_path) != 0) {
    949952                unlink(full_path_tmp);
     
    957960        }
    958961
     962
    959963        close(tmpfd);
     964
    960965
    961966        if (c->opt_long_list_entries) {
  • trunk/server/source3/utils/net_util.c

    r414 r454  
    100100        int flags = 0;
    101101
     102
     103
     104
     105
     106
     107
     108
    102109        c->opt_password = net_prompt_pass(c, c->opt_user_name);
    103110
  • trunk/server/source3/web/cgi.c

    r414 r454  
    315315        }
    316316
     317
    317318        pwd = getpwnam_alloc(talloc_autofree_context(), user);
    318319        if (!pwd) {
     
    329330        }
    330331        TALLOC_FREE(pwd);
     332
    331333}
    332334
  • trunk/server/source3/web/startstop.c

    r414 r454  
    1919
    2020#include "includes.h"
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
    2132#include "web/swat_proto.h"
    2233#include "dynconfig.h"
     
    3243        }
    3344
     45
     46
     47
     48
     49
    3450        if (fork()) {
    3551                return;
     
    4157        }
    4258        exit(0);
     59
    4360}
    4461
     
    5269        }
    5370
     71
     72
     73
     74
     75
    5476        if (fork()) {
    5577                return;
     
    6183        }
    6284        exit(0);
     85
    6386}
    6487
     
    7295        }
    7396
     97
     98
     99
     100
     101
    74102        if (fork()) {
    75103                return;
     
    81109        }
    82110        exit(0);
     111
    83112}
    84113
     
    91120        if (geteuid() != 0) return;
    92121
     122
     123
     124
     125
     126
     127
    93128        if (pid <= 0) return;
    94129
    95130        kill(pid, SIGTERM);
     131
    96132}
    97133
     
    103139        if (geteuid() != 0) return;
    104140
     141
     142
     143
     144
     145
     146
    105147        if (pid <= 0) return;
    106148
    107149        kill(pid, SIGTERM);
     150
    108151}
    109152#ifdef WITH_WINBIND
     
    115158        if (geteuid() != 0) return;
    116159
     160
     161
     162
     163
     164
     165
    117166        if (pid <= 0) return;
    118167
    119168        kill(pid, SIGTERM);
     169
    120170}
    121171#endif
  • trunk/server/source3/web/swat.c

    r414 r454  
    14371437        load_printers();
    14381438
     1439
    14391440        cgi_setup(get_dyn_SWATDIR(), !demo_mode);
     1441
     1442
     1443
     1444
     1445
     1446
     1447
     1448
     1449
     1450
     1451
    14401452
    14411453        print_header();
Note: See TracChangeset for help on using the changeset viewer.