Changeset 454
- Timestamp:
- Jun 4, 2010, 3:11:43 PM (16 years ago)
- Location:
- trunk/server/source3
- Files:
-
- 8 added
- 46 edited
-
Makefile.in (modified) (8 diffs)
-
build.cmd (added)
-
build.options (added)
-
dynconfig.c (modified) (3 diffs)
-
groupdb/mapping_ldb.c (modified) (1 diff)
-
include/g_lock.h (added)
-
include/version.h (modified) (1 diff)
-
lib/charcnv.c (modified) (1 diff)
-
lib/fault.c (modified) (4 diffs)
-
lib/g_lock.c (added)
-
lib/iconv.c (modified) (4 diffs)
-
lib/ldb/common/ldb.c (modified) (1 diff)
-
lib/ldb/ldb_tdb/ldb_tdb.c (modified) (1 diff)
-
lib/os2ea.c (added)
-
lib/os2path.c (added)
-
lib/pidfile.c (modified) (4 diffs)
-
lib/readline.c (modified) (1 diff)
-
lib/select.c (modified) (1 diff)
-
lib/smbrun.c (modified) (2 diffs)
-
lib/system.c (modified) (13 diffs)
-
lib/system_smbd.c (modified) (2 diffs)
-
lib/util.c (modified) (1 diff)
-
lib/util_sec.c (modified) (4 diffs)
-
lib/util_sock.c (modified) (3 diffs)
-
lib/util_str.c (modified) (1 diff)
-
libaddns/dns.h (modified) (1 diff)
-
libaddns/dnserr.h (modified) (1 diff)
-
libsmb/clientgen.c (modified) (2 diffs)
-
libsmb/clifile.c (modified) (2 diffs)
-
locking/posix.c (modified) (2 diffs)
-
nmbd/asyncdns.c (modified) (1 diff)
-
nmbd/nmbd.c (modified) (3 diffs)
-
nmbd/nmbd_serverlistdb.c (modified) (2 diffs)
-
nmbd/nmbd_winsserver.c (modified) (1 diff)
-
param/loadparm.c (modified) (2 diffs)
-
passdb/pdb_smbpasswd.c (modified) (6 diffs)
-
printing/printing.c (modified) (1 diff)
-
rpc_server/srv_srvsvc_nt.c (modified) (6 diffs)
-
smbd/dosmode.c (modified) (3 diffs)
-
smbd/password.c (modified) (1 diff)
-
smbd/reply.c (modified) (2 diffs)
-
smbd/server.c (modified) (1 diff)
-
smbd/service.c (modified) (2 diffs)
-
smbd/sesssetup.c (modified) (1 diff)
-
smbd/trans2.c (modified) (5 diffs)
-
smbd/vfs.c (modified) (2 diffs)
-
torture/torture.c (modified) (2 diffs)
-
utils/net_g_lock.c (added)
-
utils/net_usershare.c (modified) (2 diffs)
-
utils/net_util.c (modified) (1 diff)
-
version.ec_ (added)
-
web/cgi.c (modified) (2 diffs)
-
web/startstop.c (modified) (10 diffs)
-
web/swat.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/Makefile.in
r429 r454 391 391 $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \ 392 392 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 \ 394 394 lib/username.o \ 395 395 ../libds/common/flag_mapping.o \ … … 1785 1785 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS) 1786 1786 1787 bin/ldbedit : $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)1787 bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) 1788 1788 @echo Linking $@ 1789 1789 @$(CC) -o $@ $(LDBEDIT_OBJ) $(DYNEXP) $(LDFLAGS) \ … … 1791 1791 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) 1792 1792 1793 bin/ldbsearch : $(BINARY_PREREQS) $(LDBSEARCH_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)1793 bin/ldbsearch: $(BINARY_PREREQS) $(LDBSEARCH_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) 1794 1794 @echo Linking $@ 1795 1795 @$(CC) -o $@ $(LDBSEARCH_OBJ) $(DYNEXP) $(LDFLAGS) \ … … 1797 1797 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) 1798 1798 1799 bin/ldbadd : $(BINARY_PREREQS) $(LDBADD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)1799 bin/ldbadd: $(BINARY_PREREQS) $(LDBADD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) 1800 1800 @echo Linking $@ 1801 1801 @$(CC) -o $@ $(LDBADD_OBJ) $(DYNEXP) $(LDFLAGS) \ … … 1803 1803 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) 1804 1804 1805 bin/ldbmodify : $(BINARY_PREREQS) $(LDBMODIFY_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)1805 bin/ldbmodify: $(BINARY_PREREQS) $(LDBMODIFY_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) 1806 1806 @echo Linking $@ 1807 1807 @$(CC) -o $@ $(LDBMODIFY_OBJ) $(DYNEXP) $(LDFLAGS) \ … … 1809 1809 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) 1810 1810 1811 bin/ldbdel : $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)1811 bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) 1812 1812 @echo Linking $@ 1813 1813 @$(CC) -o $@ $(LDBDEL_OBJ) $(DYNEXP) $(LDFLAGS) \ … … 1815 1815 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) 1816 1816 1817 bin/ldbrename : $(BINARY_PREREQS) $(LDBRENAME_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)1817 bin/ldbrename: $(BINARY_PREREQS) $(LDBRENAME_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) 1818 1818 @echo Linking $@ 1819 1819 @$(CC) $(FLAGS) -o $@ $(LDBRENAME_OBJ) $(DYNEXP) $(LDFLAGS) \ … … 1821 1821 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) 1822 1822 1823 bin/versiontest : $(BINARY_PREREQS) lib/version_test.o $(VERSION_OBJ)1823 bin/versiontest: $(BINARY_PREREQS) lib/version_test.o $(VERSION_OBJ) 1824 1824 @echo Linking $@ 1825 1825 @$(CC) $(FLAGS) -o $@ $(VERSION_OBJ) lib/version_test.o -
trunk/server/source3/dynconfig.c
r414 r454 41 41 **/ 42 42 43 43 44 #define DEFINE_DYN_CONFIG_PARAM(name) \ 44 45 static char *dyn_##name; \ … … 65 66 return (dyn_##name == NULL);\ 66 67 } 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 67 86 68 87 DEFINE_DYN_CONFIG_PARAM(SBINDIR) … … 83 102 DEFINE_DYN_CONFIG_PARAM(SMB_PASSWD_FILE) 84 103 DEFINE_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 81 81 /* force the permissions on the ldb to 0600 - this will fix 82 82 existing databases as well as new ones */ 83 83 84 if (chmod(db_path, 0600) != 0) { 84 85 goto failed; 85 86 } 87 86 88 87 89 if (!existed) { -
trunk/server/source3/include/version.h
r429 r454 4 4 #define SAMBA_VERSION_RELEASE 2 5 5 #define SAMBA_VERSION_OFFICIAL_STRING "3.5.2" 6 7 8 6 9 #ifdef SAMBA_VERSION_VENDOR_FUNCTION 7 10 # define SAMBA_VERSION_STRING SAMBA_VERSION_VENDOR_FUNCTION -
trunk/server/source3/lib/charcnv.c
r414 r454 1804 1804 */ 1805 1805 1806 1806 1807 codepoint_t next_codepoint(const char *str, size_t *size) 1807 1808 { -
trunk/server/source3/lib/fault.c
r414 r454 54 54 if (cont_fn) { 55 55 cont_fn(NULL); 56 56 57 #ifdef SIGSEGV 57 58 CatchSignal(SIGSEGV,SIGNAL_CAST SIG_DFL); … … 62 63 #ifdef SIGABRT 63 64 CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL); 65 64 66 #endif 65 67 return; /* this should cause a core dump */ … … 83 85 cont_fn = fn; 84 86 87 85 88 #ifdef SIGSEGV 86 89 CatchSignal(SIGSEGV,SIGNAL_CAST sig_fault); … … 91 94 #ifdef SIGABRT 92 95 CatchSignal(SIGABRT,SIGNAL_CAST sig_fault); 96 93 97 #endif 94 98 } -
trunk/server/source3/lib/iconv.c
r414 r454 128 128 } 129 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 130 144 #ifdef HAVE_NATIVE_ICONV 131 145 /* if there was an error then reset the internal state, … … 136 150 char **outbuf, size_t *outbytesleft) 137 151 { 152 153 154 155 156 138 157 size_t ret = iconv((iconv_t)cd, 139 158 (void *)inbuf, inbytesleft, … … 144 163 errno = saved_errno; 145 164 } 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 146 186 return ret; 147 187 } … … 161 201 char *bufp = cvtbuf; 162 202 size_t bufsize; 203 204 205 163 206 164 207 /* in many cases we can go direct */ -
trunk/server/source3/lib/ldb/common/ldb.c
r414 r454 117 117 ldb_connect_fn fn; 118 118 119 119 120 if (strchr(url, ':') != NULL) { 121 122 123 120 124 backend = talloc_strndup(ldb, url, strchr(url, ':')-url); 121 125 } else { -
trunk/server/source3/lib/ldb/ldb_tdb/ldb_tdb.c
r414 r454 1012 1012 1013 1013 /* parse the url */ 1014 1014 1015 if (strchr(url, ':')) { 1016 1017 1018 1015 1019 if (strncmp(url, "tdb://", 6) != 0) { 1016 1020 ldb_debug(ldb, LDB_DEBUG_ERROR, "Invalid tdb URL '%s'", url); -
trunk/server/source3/lib/pidfile.c
r414 r454 68 68 } 69 69 70 70 71 if (fcntl_lock(fd,SMB_F_SETLK,0,1,F_RDLCK)) { 71 72 /* we could get the lock - it can't be a Samba process */ 72 73 goto noproc; 73 74 } 75 74 76 75 77 SAFE_FREE(pidFile); … … 95 97 /* Add a suffix to the program name if this is a process with a 96 98 * none default configuration file name. */ 99 100 101 102 103 97 104 if (strcmp( CONFIGFILE, get_dyn_CONFIGFILE()) == 0) { 98 105 name = SMB_STRDUP(program_name); … … 111 118 } 112 119 } 120 121 122 113 123 114 124 if (asprintf(&pidFile_name, "%s/%s.pid", lp_piddir(), name) == -1) { … … 144 154 exit(1); 145 155 } 156 146 157 /* Leave pid file open & locked for the duration... */ 147 158 SAFE_FREE(name); 159 160 161 148 162 } 149 163 -
trunk/server/source3/lib/readline.c
r414 r454 102 102 return ret; 103 103 } 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 104 153 if (callback) { 105 154 callback(); -
trunk/server/source3/lib/select.c
r414 r454 63 63 64 64 if (initialised != sys_getpid()) { 65 65 66 if (pipe(select_pipe) == -1) 67 68 69 66 70 { 67 71 DEBUG(0, ("sys_select: pipe failed (%s)\n", -
trunk/server/source3/lib/smbrun.c
r414 r454 83 83 } 84 84 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 85 113 /* in this method we will exec /bin/sh with the correct 86 114 arguments, after first setting stdout to point at the file */ … … 202 230 exit(83); 203 231 return 1; 232 204 233 } 205 234 -
trunk/server/source3/lib/system.c
r429 r454 641 641 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_FTRUNCATE64) 642 642 return ftruncate64(fd, offset); 643 644 643 645 #else 644 646 return ftruncate(fd, offset); … … 1571 1573 } 1572 1574 return ret; 1575 1576 1573 1577 #else 1574 1578 errno = ENOSYS; … … 1622 1626 } 1623 1627 return ret; 1628 1629 1624 1630 #else 1625 1631 errno = ENOSYS; … … 1675 1681 } 1676 1682 return ret; 1683 1684 1677 1685 #else 1678 1686 errno = ENOSYS; … … 1867 1875 } 1868 1876 return ret; 1877 1878 1869 1879 #else 1870 1880 errno = ENOSYS; … … 1896 1906 } 1897 1907 return ret; 1908 1909 1898 1910 #else 1899 1911 errno = ENOSYS; … … 1927 1939 } 1928 1940 return ret; 1941 1942 1929 1943 #else 1930 1944 errno = ENOSYS; … … 1966 1980 } 1967 1981 return ret; 1982 1983 1968 1984 #else 1969 1985 errno = ENOSYS; … … 2003 2019 } 2004 2020 return ret; 2021 2022 2005 2023 #else 2006 2024 errno = ENOSYS; … … 2042 2060 } 2043 2061 return ret; 2062 2063 2044 2064 #else 2045 2065 errno = ENOSYS; … … 2107 2127 } 2108 2128 return ret; 2129 2130 2109 2131 #else 2110 2132 errno = ENOSYS; … … 2171 2193 } 2172 2194 return ret; 2195 2196 2173 2197 #else 2174 2198 errno = ENOSYS; … … 2236 2260 } 2237 2261 return ret; 2262 2263 2238 2264 #else 2239 2265 errno = ENOSYS; -
trunk/server/source3/lib/system_smbd.c
r414 r454 41 41 int *grpcnt) 42 42 { 43 43 44 gid_t *gids_saved; 44 45 int ret, ngrp_saved, num_gids; … … 112 113 free(gids_saved); 113 114 return ret; 115 116 117 118 114 119 } 115 120 #endif -
trunk/server/source3/lib/util.c
r414 r454 2027 2027 int set_maxfiles(int requested_max) 2028 2028 { 2029 #if (defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE) )2029 #if (defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE)) 2030 2030 struct rlimit rlp; 2031 2031 int saved_current_limit; -
trunk/server/source3/lib/util_sec.c
r414 r454 93 93 static void assert_uid(uid_t ruid, uid_t euid) 94 94 { 95 95 96 if ((euid != (uid_t)-1 && geteuid() != euid) || 96 97 (ruid != (uid_t)-1 && getuid() != ruid)) { … … 103 104 } 104 105 } 106 105 107 } 106 108 … … 110 112 static void assert_gid(gid_t rgid, gid_t egid) 111 113 { 114 112 115 if ((egid != (gid_t)-1 && getegid() != egid) || 113 116 (rgid != (gid_t)-1 && getgid() != rgid)) { … … 121 124 } 122 125 } 126 123 127 } 124 128 -
trunk/server/source3/lib/util_sock.c
r414 r454 1679 1679 /* Create the socket directory or reuse the existing one */ 1680 1680 1681 1681 1682 if (lstat(socket_dir, &st) == -1) { 1682 1683 if (errno == ENOENT) { … … 1707 1708 } 1708 1709 } 1710 1709 1711 1710 1712 /* Create the socket file */ … … 1718 1720 } 1719 1721 1722 1723 1724 1720 1725 if (asprintf(&path, "%s/%s", socket_dir, socket_name) == -1) { 1726 1721 1727 goto out_close; 1722 1728 } -
trunk/server/source3/lib/util_str.c
r414 r454 2264 2264 *******************************************************************/ 2265 2265 2266 2267 2268 2266 2269 #define INCLUDE_LIST "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_/ \t.," 2270 2267 2271 #define INSIDE_DQUOTE_LIST "$`\n\"\\" 2268 2272 -
trunk/server/source3/libaddns/dns.h
r414 r454 41 41 #include <fcntl.h> 42 42 #include <time.h> 43 43 44 #include <string.h> 45 44 46 #include <errno.h> 45 47 #include <netdb.h> -
trunk/server/source3/libaddns/dnserr.h
r414 r454 36 36 /* Setup the DNS_ERROR typedef. Technique takes from nt_status.h */ 37 37 38 #if defined(HAVE_IMMEDIATE_STRUCTURES) 38 #if defined(HAVE_IMMEDIATE_STRUCTURES) 39 39 typedef struct {uint32 v;} DNS_ERROR; 40 40 #define ERROR_DNS(x) ((DNS_ERROR) { x }) -
trunk/server/source3/libsmb/clientgen.c
r429 r454 567 567 bool mandatory_signing = false; 568 568 569 569 570 /* Check the effective uid - make sure we are not setuid */ 570 571 if (is_setuid_root()) { … … 572 573 return NULL; 573 574 } 575 574 576 575 577 cli = TALLOC_ZERO_P(NULL, struct cli_state); -
trunk/server/source3/libsmb/clifile.c
r414 r454 4360 4360 &setup, 1, 0, /* setup, length, max */ 4361 4361 param, param_len, 10, /* param, length, max */ 4362 4363 4364 4362 4365 NULL, data_len, cli->max_xmit /* data, length, max */ 4366 4363 4367 )) { 4364 4368 return False; … … 4502 4506 memset(param, 0, 6); 4503 4507 SSVAL(param,0,fnum); 4508 4504 4509 SSVAL(param,2,SMB_INFO_SET_EA); 4510 4511 4512 4505 4513 4506 4514 return cli_get_ea_list(cli, setup, param, 6, ctx, pnum_eas, pea_list); -
trunk/server/source3/locking/posix.c
r414 r454 252 252 ret = SMB_VFS_GETLOCK(fsp, poffset, pcount, ptype, &pid); 253 253 254 254 255 if (!ret && ((errno == EFBIG) || (errno == ENOLCK) || (errno == EINVAL))) { 255 256 … … 277 278 } 278 279 } 280 279 281 280 282 DEBUG(8,("posix_fcntl_getlock: Lock query call %s\n", ret ? "successful" : "failed")); -
trunk/server/source3/nmbd/asyncdns.c
r414 r454 141 141 CatchChild(); 142 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 143 158 if (pipe(fd1) || pipe(fd2)) { 144 159 DEBUG(0,("can't create asyncdns pipes\n")); 145 160 return; 146 161 } 162 147 163 148 164 child_pid = sys_fork(); -
trunk/server/source3/nmbd/nmbd.c
r414 r454 30 30 extern bool global_in_nmbd; 31 31 32 33 34 35 32 36 extern bool override_logfile; 33 37 … … 384 388 reload_nmbd_services( True ); 385 389 } 390 391 392 393 394 395 396 397 398 399 400 401 386 402 387 403 return(ret); … … 776 792 TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */ 777 793 794 795 796 797 778 798 load_case_tables(); 779 799 -
trunk/server/source3/nmbd/nmbd_serverlistdb.c
r414 r454 331 331 return; 332 332 } 333 333 334 fnamenew = talloc_asprintf(ctx, "%s.", 335 336 337 334 338 fname); 335 339 if (!fnamenew) { … … 418 422 419 423 x_fclose(fp); 424 425 426 420 427 unlink(fname); 421 428 chmod(fnamenew,0644); -
trunk/server/source3/nmbd/nmbd_winsserver.c
r414 r454 2389 2389 2390 2390 x_fclose(fp); 2391 2392 2393 2391 2394 chmod(fnamenew,0644); 2392 2395 unlink(fname); -
trunk/server/source3/param/loadparm.c
r414 r454 4665 4665 case PRINT_AIX: 4666 4666 case PRINT_LPRNT: 4667 4667 4668 case PRINT_LPROS2: 4669 4668 4670 string_set(&pService->szLpqcommand, "lpq -P'%p'"); 4669 4671 string_set(&pService->szLprmcommand, "lprm -P'%p' %j"); 4670 4672 string_set(&pService->szPrintcommand, "lpr -r -P'%p' %s"); 4671 4673 break; 4674 4675 4676 4677 4678 4679 4680 4672 4681 4673 4682 case PRINT_LPRNG: … … 4938 4947 string_set(&Globals.szGuestaccount, GUEST_ACCOUNT); 4939 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4940 4961 /* using UTF8 by default allows us to support all chars */ 4941 4962 string_set(&Globals.unix_charset, DEFAULT_UNIX_CHARSET); 4963 4964 4965 4966 4967 4942 4968 4943 4969 #if defined(HAVE_NL_LANGINFO) && defined(CODESET) 4944 4970 /* If the system supports nl_langinfo(), try to grab the value 4945 4971 from the user's locale */ 4972 4946 4973 string_set(&Globals.display_charset, "LOCALE"); 4974 4975 4976 4977 4978 4979 4947 4980 #else 4948 4981 string_set(&Globals.display_charset, DEFAULT_DISPLAY_CHARSET); 4949 4982 #endif 4950 4983 4984 4951 4985 /* Use codepage 850 as a default for the dos character set */ 4952 4986 string_set(&Globals.dos_charset, DEFAULT_DOS_CHARSET); 4987 4988 4989 4990 4991 4953 4992 4954 4993 /* -
trunk/server/source3/passdb/pdb_smbpasswd.c
r414 r454 277 277 */ 278 278 279 279 280 if (sys_stat(pfile, &sbuf1, false) != 0) { 280 281 DEBUG(0, ("startsmbfilepwent_internal: unable to stat file %s. \ … … 294 295 295 296 if( sbuf1.st_ex_ino == sbuf2.st_ex_ino) { 297 296 298 /* No race. */ 299 300 297 301 break; 298 302 } … … 315 319 setvbuf(fp, (char *)NULL, _IOFBF, 1024); 316 320 321 317 322 /* Make sure it is only rw by the owner */ 318 323 #ifdef HAVE_FCHMOD … … 327 332 return NULL; 328 333 } 334 329 335 330 336 /* We have a lock on the file. */ … … 1168 1174 * Do an atomic rename - then release the locks. 1169 1175 */ 1176 1177 1178 1179 1170 1180 1171 1181 if(rename(pfile2,pfile) != 0) { … … 1173 1183 } 1174 1184 1185 1175 1186 endsmbfilepwent(fp, &smbpasswd_state->pw_file_lock_depth); 1176 1187 endsmbfilepwent(fp_write,&pfile2_lockdepth); 1188 1177 1189 return True; 1178 1190 } -
trunk/server/source3/printing/printing.c
r414 r454 1431 1431 DEBUG(3,("start_background_queue: Starting background LPQ thread\n")); 1432 1432 1433 1433 1434 if (pipe(pause_pipe) == -1) { 1435 1436 1437 1434 1438 DEBUG(5,("start_background_queue: cannot create pipe. %s\n", strerror(errno) )); 1435 1439 exit(1); -
trunk/server/source3/rpc_server/srv_srvsvc_nt.c
r414 r454 179 179 180 180 if ( strcmp( fname, "." ) == 0 ) { 181 181 182 fullpath = talloc_asprintf(fenum->ctx, "C:%s", sharepath ); 183 184 185 186 182 187 } else { 188 183 189 fullpath = talloc_asprintf(fenum->ctx, "C:%s/%s", 184 190 sharepath, fname ); 191 192 193 194 185 195 } 186 196 if (!fullpath) { … … 294 304 "", remark); 295 305 } 306 307 308 309 310 311 296 312 path = talloc_asprintf(p->mem_ctx, 297 313 "C:%s", lp_pathname(snum)); … … 386 402 "", remark); 387 403 } 404 405 406 407 408 388 409 path = talloc_asprintf(ctx, "C:%s", lp_pathname(snum)); 389 410 if (path) { … … 1489 1510 } 1490 1511 1512 1513 1514 1515 1516 1491 1517 /* NT is braindead - it wants a C: prefix to a pathname ! So strip it. */ 1492 1518 if (strlen(ptr) > 2 && ptr[1] == ':' && ptr[0] != '/') … … 1496 1522 if (*ptr != '/') 1497 1523 return NULL; 1524 1498 1525 1499 1526 return ptr; … … 2338 2365 ***********************************************************************************/ 2339 2366 2367 2340 2368 static const char *server_disks[] = {"C:"}; 2369 2370 2371 2372 2341 2373 2342 2374 static uint32 get_server_disk_count(void) -
trunk/server/source3/smbd/dosmode.c
r414 r454 180 180 if (ro_opts == MAP_READONLY_YES) { 181 181 /* Original Samba method - map inverse of user "w" bit. */ 182 182 183 if ((smb_fname->st.st_ex_mode & S_IWUSR) == 0) { 184 185 186 183 187 result |= aRONLY; 184 188 } … … 190 194 } /* Else never set the readonly bit. */ 191 195 196 192 197 if (MAP_ARCHIVE(conn) && ((smb_fname->st.st_ex_mode & S_IXUSR) != 0)) 198 199 200 193 201 result |= aARCH; 194 202 203 195 204 if (MAP_SYSTEM(conn) && ((smb_fname->st.st_ex_mode & S_IXGRP) != 0)) 205 206 207 196 208 result |= aSYSTEM; 197 209 210 198 211 if (MAP_HIDDEN(conn) && ((smb_fname->st.st_ex_mode & S_IXOTH) != 0)) 212 213 214 199 215 result |= aHIDDEN; 200 216 … … 249 265 #else 250 266 ) { 267 268 269 270 251 271 #endif 252 272 DEBUG(1,("get_ea_dos_attributes: Cannot get attribute " -
trunk/server/source3/smbd/password.c
r414 r454 219 219 return -1; 220 220 } 221 222 223 224 225 226 227 228 229 221 230 222 231 DEBUG(3, ("Adding homes service for user '%s' using home directory: " -
trunk/server/source3/smbd/reply.c
r429 r454 5652 5652 bool dst_exists, old_is_stream, new_is_stream; 5653 5653 5654 5655 5656 5657 5658 5659 5660 5654 5661 status = check_name(conn, smb_fname_dst_in->base_name); 5655 5662 if (!NT_STATUS_IS_OK(status)) { … … 5789 5796 dst_exists = SMB_VFS_STAT(conn, smb_fname_dst) == 0; 5790 5797 5791 if( !replace_if_exists && dst_exists) {5798 if(!replace_if_exists && dst_exists) { 5792 5799 DEBUG(3, ("rename_internals_fsp: dest exists doing rename " 5793 5800 "%s -> %s\n", smb_fname_str_dbg(fsp->fsp_name), -
trunk/server/source3/smbd/server.c
r429 r454 1117 1117 reopen_logs(); 1118 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1119 1130 DEBUG(0,("smbd version %s started.\n", samba_version_string())); 1120 1131 DEBUGADD(0,("%s\n", COPYRIGHT_STARTUP_MESSAGE)); -
trunk/server/source3/smbd/service.c
r429 r454 68 68 d = destname; 69 69 70 70 71 *d++ = '/'; /* Always start with root. */ 71 72 … … 159 160 *(d-1) = '\0'; 160 161 } 162 163 164 165 161 166 162 167 DEBUG(10,("set_conn_connectpath: service %s, connectpath = %s\n", -
trunk/server/source3/smbd/sesssetup.c
r429 r454 75 75 result = 0; 76 76 77 77 78 tmp = message_push_string(outbuf, "Unix", STR_TERMINATE); 79 80 81 78 82 79 83 if (tmp == -1) return -1; -
trunk/server/source3/smbd/trans2.c
r414 r454 128 128 129 129 pea->flags = 0; 130 130 131 if (strnequal(ea_name, "user.", 5)) { 131 132 pea->name = talloc_strdup(mem_ctx, &ea_name[5]); 132 133 } else { 134 135 136 133 137 pea->name = talloc_strdup(mem_ctx, ea_name); 134 138 } … … 287 291 fstring dos_ea_name; 288 292 293 289 294 if (strnequal(names[i], "system.", 7) 290 295 || samba_private_attr_name(names[i])) 296 297 298 291 299 continue; 292 300 … … 492 500 fstring unix_ea_name; 493 501 502 503 504 505 494 506 fstrcpy(unix_ea_name, "user."); /* All EA's must start with user. */ 495 507 fstrcat(unix_ea_name, ea_list->ea.name); 508 496 509 497 510 canonicalize_ea_name(conn, fsp, fname, unix_ea_name); … … 5454 5467 } 5455 5468 5469 5470 5471 5472 5473 5474 5475 5456 5476 DEBUG(10,("smb_set_file_time: setting utimes to modified values.\n")); 5457 5477 … … 5463 5483 return map_nt_error_from_unix(errno); 5464 5484 } 5485 5486 5487 5465 5488 5466 5489 notify_fname(conn, NOTIFY_ACTION_MODIFIED, action, -
trunk/server/source3/smbd/vfs.c
r414 r454 716 716 return(0); 717 717 718 719 720 718 721 if (*path == '/' && strcsequal(LastDir,path)) 722 719 723 return(0); 720 724 … … 938 942 resolved_name)); 939 943 944 945 946 940 947 if (*resolved_name != '/') { 948 941 949 DEBUG(0,("check_reduced_name: realpath doesn't return " 942 950 "absolute paths !\n")); -
trunk/server/source3/torture/torture.c
r429 r454 5026 5026 printf("num_eas = %d\n", (int)num_eas); 5027 5027 5028 5029 5030 5028 5031 if (num_eas != 20) { 5032 5029 5033 printf("Should be 20 EA's stored... failing.\n"); 5030 5034 correct = False; … … 5040 5044 printf("Now deleting all EA's - case indepenent....\n"); 5041 5045 5042 #if 15046 #if 5043 5047 cli_set_ea_path(cli, fname, "", "", 0); 5044 5048 #else -
trunk/server/source3/utils/net_usershare.c
r414 r454 946 946 947 947 /* Attempt to replace any existing share by this name. */ 948 949 950 948 951 if (rename(full_path_tmp, full_path) != 0) { 949 952 unlink(full_path_tmp); … … 957 960 } 958 961 962 959 963 close(tmpfd); 964 960 965 961 966 if (c->opt_long_list_entries) { -
trunk/server/source3/utils/net_util.c
r414 r454 100 100 int flags = 0; 101 101 102 103 104 105 106 107 108 102 109 c->opt_password = net_prompt_pass(c, c->opt_user_name); 103 110 -
trunk/server/source3/web/cgi.c
r414 r454 315 315 } 316 316 317 317 318 pwd = getpwnam_alloc(talloc_autofree_context(), user); 318 319 if (!pwd) { … … 329 330 } 330 331 TALLOC_FREE(pwd); 332 331 333 } 332 334 -
trunk/server/source3/web/startstop.c
r414 r454 19 19 20 20 #include "includes.h" 21 22 23 24 25 26 27 28 29 30 31 21 32 #include "web/swat_proto.h" 22 33 #include "dynconfig.h" … … 32 43 } 33 44 45 46 47 48 49 34 50 if (fork()) { 35 51 return; … … 41 57 } 42 58 exit(0); 59 43 60 } 44 61 … … 52 69 } 53 70 71 72 73 74 75 54 76 if (fork()) { 55 77 return; … … 61 83 } 62 84 exit(0); 85 63 86 } 64 87 … … 72 95 } 73 96 97 98 99 100 101 74 102 if (fork()) { 75 103 return; … … 81 109 } 82 110 exit(0); 111 83 112 } 84 113 … … 91 120 if (geteuid() != 0) return; 92 121 122 123 124 125 126 127 93 128 if (pid <= 0) return; 94 129 95 130 kill(pid, SIGTERM); 131 96 132 } 97 133 … … 103 139 if (geteuid() != 0) return; 104 140 141 142 143 144 145 146 105 147 if (pid <= 0) return; 106 148 107 149 kill(pid, SIGTERM); 150 108 151 } 109 152 #ifdef WITH_WINBIND … … 115 158 if (geteuid() != 0) return; 116 159 160 161 162 163 164 165 117 166 if (pid <= 0) return; 118 167 119 168 kill(pid, SIGTERM); 169 120 170 } 121 171 #endif -
trunk/server/source3/web/swat.c
r414 r454 1437 1437 load_printers(); 1438 1438 1439 1439 1440 cgi_setup(get_dyn_SWATDIR(), !demo_mode); 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1440 1452 1441 1453 print_header();
Note:
See TracChangeset
for help on using the changeset viewer.
