summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
1998-09-21major autoconf clean-upAlexandre Oliva2-0/+2
fix problems in builds with srcdir!=builddir (This used to be commit 1ffc3b807a3f80644c974b454ff5e6f68e89b546)
1998-09-19Remove some byte-copying code in unix_format() that did nothing exceptJeremy Allison1-8/+0
slow down my benchmark :-). Jeremy. (This used to be commit b55f93b213ee61c35e7a87a2be63191d55186bd6)
1998-09-18got rid of SMB_STRUCT_STATVFS. I don't think we should be definingAndrew Tridgell1-15/+0
structures that only apply on some platforms. (This used to be commit 926591067cd8646426ca06df0b00a1d6f6dd5752)
1998-09-18got rid of some #ifdef LARGE_XXXX stuff and got rid of non-portable LLAndrew Tridgell1-15/+4
suffix from some constants. (This used to be commit 84956eddf32aa66c787ec76bdb60d2843fa7a025)
1998-09-18include/includes.h:Jeremy Allison1-1/+3
lib/system.c: Can't assume every system has a statvfs varient. Return -1 for those that don't. smbd/reply.c: Fixed printf warning. Jeremy. (This used to be commit 14c134e8316687aa5a4ee089c2acfa6428faceae)
1998-09-17configure configure.in: Added checks for statvfs64. Last bit of 64 bit ↵Jeremy Allison3-5/+18
widening (I hope :-). include/config.h.in: Added #undef STAT_STATVFS64. include/includes.h: Added SMB_STRUCT_STATVFS type, Changed SMB_BIG_INTEGER to SMB_BIG_UINT and SMB_BIG_INT types. include/smb.h: Added flag defines from CIFS spec. lib/debug.c: Fixed one more mode_t issue. lib/system.c: Added sys_statvfs wrapper. lib/util.c: Changed trim_string to use size_t. param/loadparm.c: Moved "blocking locks" into locking section. Alphabetised locking options. Question - shuld we do this for all options ? passdb/ldap.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT. passdb/nispass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT. passdb/smbpass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT. smbd/dfree.c: Changed to use 64 bit types if available. Moved to use unsigned types. smbd/dosmode.c: Fixed one more mode_t issue. smbd/negprot.c: Changed literals to be FLAG_ #defines. smbd/nttrans.c: Removed dead code. smbd/open.c: Changed disk_free call. smbd/process.c: Changed literals to be FLAG_ #defines. smbd/reply.c: Changed disk_free call. smbd/trans2.c: Fixed but in SMB_QUERY_FS_VOLUME_INFO call. Was using UNICODE - should use ascii. tests/summary.c: Added STAT_STATVFS64 check. Jeremy. (This used to be commit c512b1b91fb7f2a7a93b9033a33e06d966daadb4)
1998-09-17configure configure.in: Added tests for fseek64 and ftell64.Jeremy Allison2-4/+30
config.h.in: Added fseek64 and ftell64. includes.h: Added definition of SMB_BIG_INTEGER. smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. access.c: Tidyup of dbug statement. system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t. asyncdns.c: Tidyup of comment. loadparm.c: Tidyup of set_default_server_announce_type() function definition. ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpassfile.c: Use sys_fseek(). chgpasswd.c: Tidyup of debug statement. dosmode.c: Changed mode calls to use mode_t. ipc.c: Removal of dead code. nttrans.c: Changed mode calls to use mode_t. open.c: Changed mode calls to use mode_t. pipes.c: Removal of dead code. reply.c: Removal of dead code. trans2.c: Removal of dead code. Changed mode calls to use mode_t. Jeremy. (This used to be commit c381d32e3dc23fe887408016cae821aceb30da2c)
1998-09-15Removed hideous inefficiencies in old trim_string code. This was makingJeremy Allison1-15/+22
calls to strlen() a profiling hotspot. Jeremy. (This used to be commit ffa450acddb7aec6a440ae3fe6032c109805d176)
1998-09-11Ok so with this bugfix 64 bit file access actually seems to work :-).Jeremy Allison1-1/+1
Problems were just dumb bugs like (defining sys_lseek to return 'int' DOH !). Jeremy. (This used to be commit 54dd51176fbab18af0b21bdee71b53f8f86573a8)
1998-09-11Added ssize_t to configure code.Jeremy Allison1-102/+105
Got 'religion' about using size_t and ssize_t for read/write stuff as part of the code to expose 64 bits to the client. This checkin does all the 'easy' stuff - such as all the read/write/lock calls - but now comes the harder parts (open & friends) and all the file enquiry functions..... Jeremy. (This used to be commit 36544fe5476f7770bd5748574fc54be7b3ee4d4a)
1998-09-05some cleanups to use ZERO_STRUCT() and friendsAndrew Tridgell2-3/+3
(This used to be commit 7b154dc4313324dfad6cf0117b8ce246bf12bf16)
1998-09-05ahh, the joy of deleting large chunks of code that someone else hasAndrew Tridgell1-13/+0
painstakingly put in :) This gets rid of most of the #ifdef LARGE_SMB_INO_T ifdefs around DEBUG() statements. We just use %.0f in all cases. Makes the code a bit easier to read :) (This used to be commit 41f0069afc02169932e04ff0039bb6328eaaf04d)
1998-09-05tridge the destroyer returns!Andrew Tridgell5-230/+33
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
1998-09-05got rid of interpret_security(). Thanks to Jean-Francois for pointingAndrew Tridgell1-17/+0
out it is no longer used (replaced by enumerated types in loadparm.c) (This used to be commit 88df8a8b25921389ee9d017b770bbae143cc51b8)
1998-09-04More 64 bit stuff - now the fcntl locks are 64 bit clean.Jeremy Allison2-52/+62
Nearly at the stage where I can expose the 64-bit-ness to the NT clients.... Jeremy. (This used to be commit 422f1dd45074c0e28203aca5952e57bbe56676b6)
1998-09-03Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison7-126/+176
to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824)
1998-09-02we are never interested in SIGPIPE so just ignore (block) itAndrew Tridgell1-9/+0
always. Don't even install a handler. (This used to be commit 72c383f4b7bcce5374632dc972df16ab0e2542b9)
1998-09-01Missed one struct stat.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 03ae657a36c986ba4248b297e64ec7898a1914e6)
1998-09-01More abstraction of file system data types, to move to a 64Jeremy Allison8-43/+43
bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy. (This used to be commit 28aa182dbffaa4ffd86047e608400de4b26e80eb)
1998-08-31configure.in, configure: include/config.h.in: Added stropts and poll.Jeremy Allison1-46/+47
include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where all the other defines live (changed them from typedefs to defines). Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T in preparation for moving to size independed (ie. 64 bit clean) device and inode access. Stat call wrapper comes next :-). Jeremy. (This used to be commit 3d9ec96de5e04e83abafe9c5d980bd39eee856ea)
1998-08-31bounds check next_token() to prevent possible buffer overflowsAndrew Tridgell3-13/+17
(This used to be commit 3eade55dc7c842bdc50205c330802d211fae54d3)
1998-08-30This should fix the zombie problem that luke noticed.Andrew Tridgell1-1/+1
(This used to be commit 425ccf9271ea44879d0940b9d95ae9b8f95aa092)
1998-08-30don't put two spaces at the start of lines if logging to stdoutAndrew Tridgell1-1/+3
or not timestamping. (This used to be commit 70ed0ec202c50655e3ba99535b06ad918409051e)
1998-08-30changed the format of the wins.dat file slightly.Andrew Tridgell1-0/+22
It now has a line like this: VERSION 1 251152 the first number is a version #define in nmbd_winsserver.c and will be used if we ever have to change the format again. The second number is a hash of the current interfaces setting. It is used to detect the case where nmbd is restarted on a machine after the IP of the machine has changed (or the interfaces list has changed in any way). When that happens we need to discard the old wins.dat cache or you end up with chaos. This has bitten quite a few people, they find that when they move a machine it continues using the old IP for some things for the next week until the wins entries time out! I've checked, and the old nmbd can handle the new format, although it does spit out a spurious error message about the VERSION line. So users can safely run 2.0alpha then switch back to 1.9.18 without problems. (This used to be commit c4a8cdc60a5b01894ab2456e77b6d89d4c16a088)
1998-08-30added a function zero_free(void *, int size) that zeros an area ofAndrew Tridgell1-0/+11
memory then frees it. Useful for catching bugs. (This used to be commit 99782754f79f3795f81cbf57caeb0925f6a66c10)
1998-08-28This checking fixes the statcache bug that stopped NetBench from runningJeremy Allison2-23/+57
correctly. Added new parameter "stat cache size" - set to 50 by default. I now declare the statcache code officially "open" for business :-). It gets a hit rate of 97% with a NetBench run and seems to make using a case insensitive run as efficient as a case sensitive run. Also tidied up our sys_select usage - added a maxfd parameter and also added an implementation of select in terms of poll(), for systems where poll() is much faster. This is disabled by default. Jeremy. (This used to be commit 779b924ec1f6c81ff578d22295b20fece698d1fc)
1998-08-24Changed ASSERT macros to SMB_ASSERT macros as some systems alreadyJeremy Allison1-1/+1
have an ASSERT macro defined. Jeremy. (This used to be commit dbe6ad014a8b5dcbf17d7cd9865650c2e040d666)
1998-08-22added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberallyAndrew Tridgell1-5/+3
in the rpc code. (This used to be commit e6ce1c5b5a9f29d8fcbbd23019186ff5c600e795)
1998-08-21Just tweaking.Christopher R. Hertel1-2/+20
If the output line is longer than the format buffer could manage, I was simply ignoring the additional output (that is, *not* copying it to the format buffer--thus avoiding a buffer overrun). Instead, I now output the current content followed by " +>\n", and then reset the format buffer. I have never seen a debug line that exceeds the size of a pstring, but I might as well handle the situation...just in case. Chris -)----- (This used to be commit 8a11d04b7796b256953bf92b2f2ccab763215bc4)
1998-08-21added new smb.conf option "panic action". see my samba-technicalAndrew Tridgell2-12/+10
explanation. (This used to be commit c6899df44c34088a4d2bf1edc840320b0ba7e32e)
1998-08-17added some optimisation for the case where the number of open files isAndrew Tridgell1-15/+2
very large. files.c now promotes a files_struct to the top of the list if it is used when it is more than 10 elements from the top. also moved common linked list code for the 5 sets of linked lists that I've created over the past few days into dlinklist.h (I've explained to Chris why I didn't use the ubiqx code) (This used to be commit 1eb9ae2996b5a243a147f485e7e353d54f820852)
1998-08-17converted the policy code to use a linked list and bitmap. This savesAndrew Tridgell1-139/+144
us a bit of memory. (This used to be commit 27da84b90df1f32e0d07acad04c72065b2005470)
1998-08-17some cleanups from the conversion of Pipes[] to a linked list. I alsoAndrew Tridgell1-3/+13
removed most cases where a pnum is used and substituted a pipes_struct*. in files.c I added a offset of 0x1000 to all file handles on the wire. This makes it much less likely that bad parsing will give us the wrong field. (This used to be commit 8bc2627ff28d340db65bfa017daca2dc291d5ef7)
1998-08-16got rid of the Files[] array completely (previously I'd just made itAndrew Tridgell1-1/+11
private to files.c) It now is a doubly linked list with a bitmap for allocated file numbers. Similarly for the fd_ptr code. I also changed the default maximum number of open files to 4096. The static cost is 1 bit per file. It all seems to work, and it passes the "does Sue scream" test, but if you see weird behaviour then please investigate. With the volume of new code that has gone in there are bound to be one or two bugs lurking. note that you must do a "make clean" before building this as many data structures have changed in size. (This used to be commit 79755ce97004b787d7e83a8d18fc4c7c003b7231)
1998-08-16server.c: fixed a bug in close_file() with the new files.c handling codeAndrew Tridgell1-0/+121
bitmap.c: added bitmap hanlding code in preparation for increasing the default max open files to several thousand (This used to be commit f573a65b67e7a57586fec57845598e49b157ee0a)
1998-08-15configure: Changes for extra headers.Jeremy Allison6-13/+10
configure.in: Source for header changes. client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile. include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers. include/includes.h: Headers for the above. include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int). lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/debug.c: Fixed signal functs. lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile. libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem_sysv.c: Fixed error messages in sysV stuff. nmbd/asyncdns.c: Fixed signal functs. nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/nttrans.c: Fixed fsp code path. smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem. smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/trans2.c: Fixed core dump bug. smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile. Jeremy. (This used to be commit 1b9cbcd02e575dc0a95fa589f720df30a4acc46b)
1998-08-14this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell3-10/+269
Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep. (This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6)
1998-08-14Makefile.in: Changed so that make proto will work with ldap & nisplus.Jeremy Allison1-3/+134
locking/locking.c: Made #ifdef'ed out functions static for Make proto. lib/util.c: Re-instated old mask_match code for UNIX filesystem checks only. Client calls use the new mask_match code. Changed the name of the old function to unix_mask_match. Jeremy. (This used to be commit b68e756ff57622c6c74f28031d4be964d7b1c9bc)
1998-08-13Uh... I'm checking stuff in. Jeremy will by *so* pleased :)John Blair1-0/+159
netatalk.c contains the meat of the code required to move Macintosh resource forks around when Windows users manipulate files created by a mac. This allows for greater integration between netatalk and Samba, but is, of course, potentially a recipe for disaster. All the netatalk related code is insulated by #ifdefs from the standard build. (This used to be commit 05a5243d841cecd128e29379eab2a2784262ccc7)
1998-08-12I've added a dbgflush() function to debug.c. Calling this will cause theChristopher R. Hertel1-5/+31
debug format buffer to be written out (and reset). fflush() is also called to force the issue. I replaced the call to fflush() in client.c with a call to dbgflush(), which seems to have fixed the problem that Andrew was working on (i.e., that the prompt was not displayed when using smbclient). Chris -)----- (This used to be commit a97460869fe1448be5132fdab586d30872d21a69)
1998-08-11Cleaned up some lint warnings (functions with return values that wereChristopher R. Hertel1-12/+13
ignored). (This used to be commit 8fedcfc48da2741722b867bbb056a078901e7431)
1998-08-11I've added a test for lp_loaded() so that timestamps *will* be outputChristopher R. Hertel1-4/+9
before the config file has been loaded. Otherwise the default is no timestamp. Chris -)----- (This used to be commit fd7eaed59efbe2ce6998d5902e70d79f533b3372)
1998-08-11fixed a nasty bug in debug.cAndrew Tridgell1-1/+1
Debug1() was being called like this: Debug1( format_bufr ); but if format_bufr contains any %s or other % arguments (such as when processing a smb.conf file containing % macros) then smbd dies a horrible death. The quick fix is to use: Debug1( "%s", format_bufr); (This used to be commit 5ae04012819ae3e63102d6875088ef00c27492b4)
1998-08-11make sure that a fault cannot occur twice. The new Debug1() code isAndrew Tridgell1-18/+22
causing seg faults on my machine and because the fault code calls DEBUG() it is looping! now to find the bug in the Debug1() code ... (This used to be commit 83122bae2253221f085118c6e7e914982656bd64)
1998-08-10moved access.c into lib/ from smbd/ as it is needed by testparm. IAndrew Tridgell1-216/+169
modified it not to need any smbd specific structures and instead pass things from smbd. (This used to be commit 162141d3b3fcf53fbc6a1f18702df85c2b7f1781)
1998-08-09this gets smbd compiling and linking correctly with the new layout.Andrew Tridgell1-0/+1
(This used to be commit d08fa39cec5c71a9034dbf4241fc7e195f1bbaa5)
1998-08-09added ignore rules for the dummy filesAndrew Tridgell1-0/+1
(This used to be commit 687f76a17d6d3ebd33b4d9a848deef56f3c1f56a)
1998-08-09these dummy files are needed for autoconf processingAndrew Tridgell1-0/+0
(This used to be commit be762dc3de6c1ef768790522dfe93007a61ce5d7)
1998-08-08added --with-nisplus-home optionAndrew Tridgell1-4/+4
(This used to be commit 70000c21909a154344b489e8aa18a5868ff52865)
1998-08-03More formatting changes. Mostly converted some DEBUG() calls to DEBUGADD()Christopher R. Hertel1-3/+4
so that we wouldn't get too many timestamps. Chris -)----- (This used to be commit 3e7e5fad378cf144927d9f2ffc82f80e150d44ab)