summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
1998-10-04use *SMBSERVER convention in smbwrapper to allow us to connect toAndrew Tridgell1-1/+1
servers that we don't know the netbios name of. (This used to be commit 147d49dade3901835b5d60b02c495bea544ff5e9)
1998-10-04added support for printing via smbwrapperAndrew Tridgell1-1/+11
You can print using "cp filename /smb/SERVER/PRINTER/jobname" You can list the current printqueue using ls (This used to be commit 080fb61b69620e26e8122705383dc2bd0468a519)
1998-10-04use dummy file descriptors opened on /dev/null to ensure that the smbwAndrew Tridgell1-1/+1
file descriptor allocation order is identical to the kernels. (This used to be commit 60a683465647932f7241ba9f92443d5e5294e20b)
1998-10-03added simple device/inode number support based on a checksum of theAndrew Tridgell1-1/+1
filename (This used to be commit 5674fb4e9dc4d92213d763c8cecd26efc23a9720)
1998-10-03fixed a bug in name_len() (thanks to kooros@kooros.netrack.net)Andrew Tridgell1-7/+7
(This used to be commit f05f0a01cefbf19943a53c3307eb992d77238b51)
1998-10-03added unlink() and rename() support to smbwrapperAndrew Tridgell1-1/+1
(This used to be commit b85d96144728e8a29c7c1114462e28bf3b144b80)
1998-10-03- ignore *.p filesAndrew Tridgell2-1/+2
- make msleep() non-static (This used to be commit 688a749484aa807075d2ce16d750c4f3494f3e55)
1998-10-02added sys_getwd()Andrew Tridgell1-3/+13
(This used to be commit 688d19de50c01222c42f61f825fab93a7005f5b6)
1998-10-02use sys_stat() not file_exist() for codepages. (we don't want dosAndrew Tridgell1-2/+2
translation!) (This used to be commit 1dcefb3f8e1e8b407d7f45332262e1b04bc1d6ee)
1998-09-29Got very strict about the differences and uses ofJeremy Allison2-6/+58
uid_t, gid_t and vuid. Added sys_getgroups() to get around the int * return problem. Set correct datatypes for all uid, gid and vuid variables. Jeremy. (This used to be commit e570db46fc3a78e499523fd342e9a34cebb18998)
1998-09-29get away with dummy and .dummy filesAlexandre Oliva1-1/+0
(This used to be commit 90a8a02484a0897b053fd6531b7fec5d23098b6f)
1998-09-29got rid of the memcpy() prototype and used includes.h instead.Andrew Tridgell1-3/+1
gcc has a built-in memcpy which conflicts with the prototype. (This used to be commit 16b6c3e852dbc7b4460abc461b4e0a8dc315fd60)
1998-09-28Fixed problems found in lint pass over the old code by <cpeterso@microsoft.com>.Jeremy Allison2-4/+9
These were the problems that still existed in the 2.0 branch. Jeremy. (This used to be commit 3fd28812f75f2311a114ff905143634e3bbb1fac)
1998-09-28Changes to test in configure if capabilities are enabled on a system.Jeremy Allison5-5/+10
Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
1998-09-28automated generation of .dummy files for each subdirectory;Alexandre Oliva1-1/+0
dummy.in files are no longer needed, and new directories will be taken care of automatically, at configure (or config.status --recheck) time (This used to be commit 237a8e5fe62d757c04b8207cbbee4df1470cfe4e)
1998-09-25Makefile.in: Fixed bug with continuation line causing proto to fail.Jeremy Allison4-2/+122
Added $(PROGS) $(SPROGS) as targets for make clean. acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES. configure.in: Added sys/capability.h header check. Added function checks for srandom random srand rand. Added HAVE_IRIX_SPECIFIC_CAPABILITIES test. includes.h: Added #include <sys/capability.h>. ntdomain.h: Moved struct acct_info into here from smb.h smb.h: Added KERNEL_OPLOCK_CAPABILITY define. Moved enum action_type into rpcclient.h Moved struct cli_state into client.h Moved struct nt_client_info, struct tar_client_info, struct client_info into rpcclient.h lib/genrand.c: Changed to use sys_random() & friends. lib/smbrun.c: Lose capabilities after fork. lib/system.c: Added set_process_capability(), set_inherited_process_capability() sys_random(), sys_srandom(). lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an 32 bit mounted NFS filesystem. nmbd/nmbd.c: Changed to use sys_random() & friends. nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends. passdb/ldap.c: Missed one pdb_encode_acct_ctrl call. passdb/passdb.c: Changed to Ander's code for ' ' characters. passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ. script/mkproto.awk: Added 'long' to prototypes. smbd/chgpasswd.c: Lose capabilities after fork. smbd/open.c: Do the mmap *after* the kernel oplock. smbd/oplock.c: Removed stub code from kernel oplock path. Added set_process_capability(), set_inherited_process_capability() calls. smbd/reply.c: Initialize count = 0, offset = 0. smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls. tests/summary.c: Ensure we have RANDOM or RAND. utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ. utils/torture.c: Changed to use sys_random() & friends. Jeremy. (This used to be commit e8be306f23963ac00b1a383ebe0cc1421529fb02)
1998-09-25added in samr commands. assistance in returning the missing functions,Luke Leighton1-0/+12
automatically removed because they were "unused", would be appreciated. (This used to be commit d0f7b0d915973ccb85409af3d6d951a716cd66d2)
1998-09-25added rpcclient programLuke Leighton1-0/+40
(This used to be commit aa38f39d67fade4dfd7badb7a9b39c833a1dd1ca)
1998-09-23First cut at kernel oplocks. This should have no effect unless runninJeremy Allison1-218/+0
on a machine that supports them in autoconf. Move various functions out of lib/util.c into smbd/process.c and smbd/oplock.c where they belong. Jeremy. (This used to be commit c3c5e13f85c97939746070132dad941e79c546fb)
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)