source:
freewrt/package/samba/patches/100-samba.patch@
475ad56
| Last change on this file since 475ad56 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 15.8 KB | |
-
source/include/smb.h
diff -ruN samba-2.0.10.orig/source/include/smb.h samba-2.0.10/source/include/smb.h
old new 115 115 * Usage: 116 116 * DEBUGADD( 2, ("Some additional text.\n") ); 117 117 */ 118 119 #ifdef NDEBUG 120 121 #define DEBUGLVL( level ) \ 122 ( (0 == (level)) \ 123 && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) 124 125 #define DEBUG( level, body ) \ 126 (void)( (0 == (level)) \ 127 && (dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) )) \ 128 && (dbgtext body) ) 129 130 #define DEBUGADD( level, body ) \ 131 (void)( (0 == (level)) && (dbgtext body) ) 132 133 #else 118 134 #define DEBUGLVL( level ) \ 119 135 ( (DEBUGLEVEL >= (level)) \ 120 136 && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) … … 140 156 (void)( (DEBUGLEVEL >= (level)) && (dbgtext body) ) 141 157 142 158 #endif 143 159 #endif 144 160 /* End Debugging code section. 145 161 * -------------------------------------------------------------------------- ** 146 162 */ … … 1612 1628 #define CAP_LOCK_AND_READ 0x0100 1613 1629 #define CAP_NT_FIND 0x0200 1614 1630 #define CAP_DFS 0x1000 1631 #define CAP_W2K_SMBS 0x2000 1615 1632 #define CAP_LARGE_READX 0x4000 1633 #define CAP_LARGE_WRITEX 0x8000 1616 1634 #define CAP_EXTENDED_SECURITY 0x80000000 1617 1635 1618 1636 /* protocol types. It assumes that higher protocols include lower protocols -
source/Makefile.in
diff -ruN samba-2.0.10.orig/source/Makefile.in samba-2.0.10/source/Makefile.in
old new 37 37 # set these to where to find various files 38 38 # These can be overridden by command line switches (see smbd(8)) 39 39 # or in smb.conf (see smb.conf(5)) 40 SMBLOGFILE = $(VARDIR)/ log.smb41 NMBLOGFILE = $(VARDIR)/ log.nmb40 SMBLOGFILE = $(VARDIR)/smb 41 NMBLOGFILE = $(VARDIR)/nmb 42 42 CONFIGFILE = $(LIBDIR)/smb.conf 43 43 LMHOSTSFILE = $(LIBDIR)/lmhosts 44 44 DRIVERFILE = $(LIBDIR)/printers.def … … 55 55 LOCKDIR = @lockdir@ 56 56 57 57 # The directory where code page definition files go 58 CODEPAGEDIR = $( LIBDIR)/codepages58 CODEPAGEDIR = $(BASEDIR)/codepages 59 59 60 60 # The current codepage definition list. 61 61 CODEPAGELIST= 437 737 775 850 852 861 932 866 949 950 936 1251 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R … … 82 82 PROGS2 = bin/rpcclient bin/smbpasswd bin/make_smbcodepage bin/make_unicodemap @WRAP@ @WRAP32@ 83 83 MPROGS = @MPROGS@ 84 84 PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup bin/make_printerdef 85 SHAREDPROGS = bin/smbd.shared bin/nmbd.shared bin/smbpasswd.shared 85 86 86 87 SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd 87 88 … … 159 160 $(RPC_SERVER_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \ 160 161 $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) 161 162 163 SMBDSHARED_OBJ = $(SMBD_OBJ1) $(RPC_SERVER_OBJ) \ 164 $(LOCKING_OBJ) $(PROFILE_OBJ) #$(PRINTING_OBJ) 162 165 163 166 NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ 164 167 nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \ … … 176 179 NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ 177 180 $(LIB_OBJ) 178 181 182 NMBDSHARED_OBJ = $(NMBD_OBJ1) 183 179 184 SWAT_OBJ = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \ 180 185 web/swat.o $(LIBSMB_OBJ) $(LOCKING_OBJ) \ 181 186 $(PARAM_OBJ) $(PASSDB_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \ … … 207 212 SMBPASSWD_OBJ = utils/smbpasswd.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \ 208 213 $(UBIQX_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(LIB_OBJ) 209 214 215 SMBPASSWDSHARED_OBJ = utils/smbpasswd.o 216 210 217 RPCCLIENT_OBJ = rpcclient/rpcclient.o \ 211 218 rpcclient/display.o \ 212 219 rpcclient/cmd_lsarpc.o \ … … 265 272 PROTO_OBJ = $(SMBD_OBJ) $(NMBD_OBJ) $(SWAT_OBJ) $(CLIENT_OBJ) \ 266 273 $(RPCCLIENT_OBJ) $(SMBWRAPPER_OBJ) $(SMBTORTURE_OBJ) 267 274 275 LIBSMBSHARED_OBJ = $(LIB_OBJ) $(LIBSMB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ) \ 276 $(PASSDB_OBJ) $(RPC_PARSE_OBJ) #$(RPC_CLIENT_OBJ) 277 278 LIBSMB_PICOBJS = $(LIBSMBSHARED_OBJ:.o=.po) 279 268 280 PICOBJS = $(SMBWRAPPER_OBJ:.o=.po) 269 281 PICOBJS32 = $(SMBWRAPPER_OBJ:.o=.po32) 270 282 … … 274 286 275 287 all : CHECK $(SPROGS) $(PROGS) 276 288 289 shared : CHECK $(SHAREDPROGS) 290 277 291 smbwrapper : CHECK bin/smbsh bin/smbwrapper.@SHLIBEXT@ @WRAP32@ 278 292 279 293 smbtorture : CHECK bin/smbtorture … … 359 373 @echo Linking $@ 360 374 @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) 361 375 376 bin/smbd.shared: $(SMBDSHARED_OBJ) bin/libsmb.@SHLIBEXT@ bin/.dummy 377 @echo Linking $@ 378 @$(CC) $(FLAGS) -o $@ $(SMBDSHARED_OBJ) $(LDFLAGS) $(LIBS) -Lbin -lsmb 379 362 380 bin/nmbd: $(NMBD_OBJ) bin/.dummy 363 381 @echo Linking $@ 364 382 @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(LIBS) 365 383 384 bin/nmbd.shared: $(NMBDSHARED_OBJ) bin/libsmb.@SHLIBEXT@ bin/.dummy 385 @echo Linking $@ 386 @$(CC) $(FLAGS) -o $@ $(NMBDSHARED_OBJ) $(LDFLAGS) $(LIBS) -Lbin -lsmb 387 366 388 bin/swat: $(SWAT_OBJ) bin/.dummy 367 389 @echo Linking $@ 368 390 @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LIBS) … … 411 433 @echo Linking $@ 412 434 @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(LIBS) 413 435 436 bin/smbpasswd.shared: $(SMBPASSWDSHARED_OBJ) bin/libsmb.@SHLIBEXT@ bin/.dummy 437 @echo Linking $@ 438 @$(CC) $(FLAGS) -o $@ $(SMBPASSWDSHARED_OBJ) $(LDFLAGS) $(LIBS) -Lbin -lsmb 439 414 440 bin/make_smbcodepage: $(MAKE_SMBCODEPAGE_OBJ) bin/.dummy 415 441 @echo Linking $@ 416 442 @$(CC) $(FLAGS) -o $@ $(MAKE_SMBCODEPAGE_OBJ) $(LDFLAGS) $(LIBS) … … 459 485 @echo Linking $@ 460 486 @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS) 461 487 488 bin/libsmb.@SHLIBEXT@: $(LIBSMB_PICOBJS) bin/.dummy 489 @echo Linking shared library $@ 490 @$(LD) @LDSHFLAGS@ -o $@ $(LIBSMB_PICOBJS) $(LIBS) 491 462 492 install: installbin installman installscripts installcp installswat 463 493 464 494 installdirs: … … 518 548 ctags `find . -name "*.[ch]" | grep -v /CVS/` 519 549 520 550 realclean: clean 521 -rm -f config.log $(PROGS) $(SPROGS) bin/.dummy551 -rm -f config.log $(PROGS) $(SPROGS) $(SHAREDPROGS) bin/.dummy 522 552 -rmdir bin 523 553 524 554 distclean: realclean -
source/nmbd/nmbd_mynames.c
diff -ruN samba-2.0.10.orig/source/nmbd/nmbd_mynames.c samba-2.0.10/source/nmbd/nmbd_mynames.c
old new 215 215 */ 216 216 if( !is_refresh_already_queued( subrec, namerec) ) 217 217 refresh_name( subrec, namerec, NULL, NULL, NULL ); 218 namerec->data.death_time +=lp_max_ttl();219 namerec->data.refresh_time +=MIN(lp_max_ttl(), MAX_REFRESH_TIME);218 namerec->data.death_time = t + lp_max_ttl(); 219 namerec->data.refresh_time = t + MIN(lp_max_ttl(), MAX_REFRESH_TIME); 220 220 } 221 221 } 222 222 } -
source/smbd/close.c
diff -ruN samba-2.0.10.orig/source/smbd/close.c samba-2.0.10/source/smbd/close.c
old new 122 122 last_reference = True; 123 123 124 124 fsp->fd_ptr = NULL; 125 125 #ifdef PRINTING 126 126 /* NT uses smbclose to start a print - weird */ 127 127 if (normal_close && fsp->print_file) 128 128 print_file(conn, fsp); 129 129 #endif 130 130 /* check for magic scripts */ 131 131 if (normal_close) { 132 132 check_magic(fsp,conn); -
source/smbd/ipc.c
diff -ruN samba-2.0.10.orig/source/smbd/ipc.c samba-2.0.10/source/smbd/ipc.c
old new 472 472 PACK(desc,t,v); 473 473 } 474 474 475 475 #ifdef PRINTING 476 476 /**************************************************************************** 477 477 get a print queue 478 478 ****************************************************************************/ … … 1004 1004 1005 1005 return True; 1006 1006 } 1007 1007 #endif 1008 1008 /**************************************************************************** 1009 1009 get info level for a server list query 1010 1010 ****************************************************************************/ … … 1834 1834 1835 1835 return(True); 1836 1836 } 1837 1837 #ifdef PRINTING 1838 1838 /**************************************************************************** 1839 1839 delete a print job 1840 1840 Form: <W> <> … … 2091 2091 2092 2092 return(True); 2093 2093 } 2094 2094 #endif 2095 2095 2096 2096 /**************************************************************************** 2097 2097 get info about the server … … 2756 2756 2757 2757 return(True); 2758 2758 } 2759 2759 #ifdef PRINTING 2760 2760 /**************************************************************************** 2761 2761 api_WPrintJobEnumerate 2762 2762 ****************************************************************************/ … … 3189 3189 DEBUG(4,("WPrintPortEnum: errorcode %d\n",desc.errcode)); 3190 3190 return(True); 3191 3191 } 3192 3192 #endif 3193 3193 /**************************************************************************** 3194 3194 Start the first part of an RPC reply which began with an SMBtrans request. 3195 3195 ****************************************************************************/ … … 3407 3407 {"RNetUserGetInfo", 56, api_RNetUserGetInfo,0}, 3408 3408 {"NetUserGetGroups", 59, api_NetUserGetGroups,0}, 3409 3409 {"NetWkstaGetInfo", 63, api_NetWkstaGetInfo,0}, 3410 #ifdef PRINTING 3410 3411 {"DosPrintQEnum", 69, api_DosPrintQEnum,0}, 3411 3412 {"DosPrintQGetInfo", 70, api_DosPrintQGetInfo,0}, 3412 3413 {"WPrintQueuePause", 74, api_WPrintQueuePurge,0}, … … 3418 3419 {"RDosPrintJobResume",83, api_RDosPrintJobDel,0}, 3419 3420 {"WPrintDestEnum", 84, api_WPrintDestEnum,0}, 3420 3421 {"WPrintDestGetInfo", 85, api_WPrintDestGetInfo,0}, 3422 #endif 3421 3423 {"NetRemoteTOD", 91, api_NetRemoteTOD,0}, 3424 #ifdef PRINTING 3422 3425 {"WPrintQueuePurge", 103, api_WPrintQueuePurge,0}, 3426 #endif 3423 3427 {"NetServerEnum", 104, api_RNetServerEnum,0}, 3424 3428 {"WAccessGetUserPerms",105, api_WAccessGetUserPerms,0}, 3425 3429 {"SetUserPassword", 115, api_SetUserPassword,0}, 3426 3430 {"WWkstaUserLogon", 132, api_WWkstaUserLogon,0}, 3431 #ifdef PRINTING 3427 3432 {"PrintJobInfo", 147, api_PrintJobInfo,0}, 3428 3433 {"WPrintDriverEnum", 205, api_WPrintDriverEnum,0}, 3429 3434 {"WPrintQProcEnum", 206, api_WPrintQProcEnum,0}, 3430 3435 {"WPrintPortEnum", 207, api_WPrintPortEnum,0}, 3436 #endif 3431 3437 {"SamOEMChangePassword", 214, api_SamOEMChangePassword,0}, 3432 3438 {NULL, -1, api_Unsupported,0}}; 3433 3439 -
source/smbd/negprot.c
diff -ruN samba-2.0.10.orig/source/smbd/negprot.c samba-2.0.10/source/smbd/negprot.c
old new 160 160 /* dual names + lock_and_read + nt SMBs + remote API calls */ 161 161 int capabilities = CAP_NT_FIND|CAP_LOCK_AND_READ| 162 162 (lp_nt_smb_support() ? CAP_NT_SMBS | CAP_RPC_REMOTE_APIS : 0) | 163 (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES : 0);163 (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES | CAP_LARGE_READX | CAP_LARGE_WRITEX /*| CAP_W2K_SMBS*/ : 0); 164 164 165 165 166 166 /* -
source/smbd/password.c
diff -ruN samba-2.0.10.orig/source/smbd/password.c samba-2.0.10/source/smbd/password.c
old new 1149 1149 1150 1150 return(True); 1151 1151 } 1152 1152 #ifdef RPCCLIENT 1153 1153 /*********************************************************************** 1154 1154 Connect to a remote machine for domain security authentication 1155 1155 given a name or IP address. … … 1504 1504 cli_shutdown(&cli); 1505 1505 return True; 1506 1506 } 1507 #endif -
source/smbd/process.c
diff -ruN samba-2.0.10.orig/source/smbd/process.c samba-2.0.10/source/smbd/process.c
old new 343 343 {SMBlseek,"SMBlseek",reply_lseek,AS_USER}, 344 344 {SMBflush,"SMBflush",reply_flush,AS_USER}, 345 345 {SMBctemp,"SMBctemp",reply_ctemp,AS_USER | QUEUE_IN_OPLOCK }, 346 #ifdef PRINTING 346 347 {SMBsplopen,"SMBsplopen",reply_printopen,AS_USER | QUEUE_IN_OPLOCK }, 347 348 {SMBsplclose,"SMBsplclose",reply_printclose,AS_USER}, 348 349 {SMBsplretq,"SMBsplretq",reply_printqueue,AS_USER}, 349 350 {SMBsplwr,"SMBsplwr",reply_printwrite,AS_USER}, 351 #endif 350 352 {SMBlock,"SMBlock",reply_lock,AS_USER}, 351 353 {SMBunlock,"SMBunlock",reply_unlock,AS_USER}, 352 354 … … 908 910 DEBUG(2,("Closing idle connection 2.\n")); 909 911 return False; 910 912 } 911 913 #ifdef RPCLIENT 912 914 if(global_machine_password_needs_changing) 913 915 { 914 916 unsigned char trust_passwd_hash[16]; … … 954 956 trust_password_unlock(); 955 957 global_machine_password_needs_changing = False; 956 958 } 957 959 #endif 958 960 /* 959 961 * Check to see if we have any blocking locks 960 962 * outstanding on the queue. -
source/smbd/reply.c
diff -ruN samba-2.0.10.orig/source/smbd/reply.c samba-2.0.10/source/smbd/reply.c
old new 597 597 598 598 if (!check_domain_match(orig_user, domain)) 599 599 return False; 600 600 #ifdef RPCCLIENT 601 601 ret = domain_client_validate(orig_user, domain, 602 602 smb_apasswd, smb_apasslen, 603 603 smb_ntpasswd, smb_ntpasslen, 604 604 &user_exists); 605 605 #endif 606 606 if(ret) { 607 607 /* 608 608 * User validated ok against Domain controller. … … 2991 2991 return -1; 2992 2992 } 2993 2993 2994 2994 #ifdef PRINTING 2995 2995 /**************************************************************************** 2996 2996 reply to a printopen 2997 2997 ****************************************************************************/ … … 3176 3176 3177 3177 return(outsize); 3178 3178 } 3179 3179 #endif 3180 3180 3181 3181 /**************************************************************************** 3182 3182 reply to a mkdir -
source/smbd/server.c
diff -ruN samba-2.0.10.orig/source/smbd/server.c samba-2.0.10/source/smbd/server.c
old new 300 300 lp_killunused(conn_snum_used); 301 301 302 302 ret = lp_load(servicesf,False,False,True); 303 303 #ifdef PRINTING 304 304 load_printers(); 305 305 #endif 306 306 /* perhaps the config filename is now set */ 307 307 if (!test) 308 308 reload_services(True); -
source/smbd/service.c
diff -ruN samba-2.0.10.orig/source/smbd/service.c samba-2.0.10/source/smbd/service.c
old new 121 121 } 122 122 } 123 123 } 124 124 #ifdef PRINTING 125 125 /* If we still don't have a service, attempt to add it as a printer. */ 126 126 if (iService < 0) 127 127 { … … 146 146 DEBUG(3,("%s is not a valid printer name\n", service)); 147 147 } 148 148 } 149 149 #endif 150 150 /* just possibly it's a default service? */ 151 151 if (iService < 0) 152 152 { -
source/utils/smbpasswd.c
diff -ruN samba-2.0.10.orig/source/utils/smbpasswd.c samba-2.0.10/source/utils/smbpasswd.c
old new 71 71 } 72 72 exit(1); 73 73 } 74 74 #ifdef RPCCLIENT 75 75 /********************************************************* 76 76 Join a domain. 77 77 **********************************************************/ … … 143 143 144 144 return (int)ret; 145 145 } 146 146 #endif 147 147 148 148 static void set_line_buffering(FILE *f) 149 149 { … … 335 335 if((local_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER)) && ((remote_machine != NULL) || joining_domain)) { 336 336 usage(); 337 337 } 338 338 #ifdef RPCCLIENT 339 339 if(joining_domain) { 340 340 if (argc != 0) 341 341 usage(); 342 342 return join_domain(new_domain, remote_machine); 343 343 } 344 344 #endif 345 345 /* 346 346 * Deal with root - can add a user, but only locally. 347 347 */ -
source/web/swat.c
diff -ruN samba-2.0.10.orig/source/web/swat.c samba-2.0.10/source/web/swat.c
old new 357 357 return 0; 358 358 } 359 359 iNumNonAutoPrintServices = lp_numservices(); 360 #ifdef PRINTING 360 361 load_printers(); 361 362 #endif 362 363 return 1; 363 364 } 364 365 … … 997 998 charset_initialise(); 998 999 load_config(True); 999 1000 iNumNonAutoPrintServices = lp_numservices(); 1001 #ifdef PRINTING 1000 1002 load_printers(); 1001 1003 #endif 1002 1004 cgi_setup(SWATDIR, !demo_mode); 1003 1005 1004 1006 print_header();
Note:
See TracBrowser
for help on using the repository browser.
