summaryrefslogtreecommitdiffstats
path: root/source3/lib/system.c
Commit message (Collapse)AuthorAgeFilesLines
* merge of parameter changes from 3.0 and fix for bug 550Gerald Carter2003-10-011-3/+5
| | | | (This used to be commit b6433f5db77a1d62309946c6f23c18c6c299d0c5)
* sync 3.0 into HEAD for the last timeGerald Carter2003-09-091-1/+158
| | | | (This used to be commit c17a7dc9a190156a069da3e861c18fd3f81224ad)
* trying to get HEAD building again. If you want the codeGerald Carter2003-07-161-0/+125
| | | | | prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE (This used to be commit adb98e7b7cd0f025b52c570e4034eebf4047b1ad)
* dlsym takes a const char *.Jeremy Allison2003-03-031-1/+1
| | | | | Jeremy. (This used to be commit ff3827a62b37342b13fd8b4eafd256d91428c02b)
* Add PRINTF_ATTRIBUTE() to a few more printf() style functions. Aids inAndrew Bartlett2003-01-021-1/+1
| | | | | compiler-based argument checking. (This used to be commit 16fe928e68623a878b125910ff83df500a29d0ce)
* BIG patch...Andrew Bartlett2003-01-021-1/+1
| | | | | | | | | | | | | | | | | This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett (This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
* fix a few segfaultsGerald Carter2002-08-221-6/+6
| | | | (This used to be commit ccb02f7cfcec4a555cf7304816c739f4bf7b46f0)
* remove 'admin log' parameter (discussed with Jeremy)Jelmer Vernooij2002-08-191-3/+0
| | | | | remove 'alternate permissions' parameter (deprecated and not used since 2.0) (discussed with tridge) (This used to be commit 6e34651591d1de3293b239195078778ba1d0e565)
* Add a wrapper for dup2() to our system.cAndrew Bartlett2002-07-201-0/+10
| | | | | Andrew Bartlett (This used to be commit b24b6307f6b40e559aec441e0ebab8f666b87d9f)
* Add back sys_getpwnam() and freinds to the system.c interface, but don'tAndrew Bartlett2002-06-151-0/+24
| | | | | | | use the silly cache any more. Also add group functions and fix a few callers. Andrew Bartlett (This used to be commit 41d4b94077c118ecde2bf8792b9bb7ab71c6403e)
* Add a bit more const, and kill of (finally!) sys_getpwnam and sys_getpwuid.Andrew Bartlett2002-05-221-109/+1
| | | | | | | | | | | | | | | These might be reimplmented as simple pass-through functions, but all users really should be doing 'getpwnam_alloc' or 'getpwuid_alloc' to ensure that there are not shared static buffers. I don't beleive we actually need a getpw*() cache inside samba - if we do then I think we should look at our code design first. (some of these changes are for platforms I don't have access to, but they look sane) Andrew Bartlett (This used to be commit 9d8431b04f41dceffe4c45cc969472ee59f7282f)
* patch from Alexander Bokovoy needed for dlopen on bsd systemsAndrew Tridgell2002-04-241-4/+4
| | | | (This used to be commit 38fd99e84176106ed700f637e9292d2a4c1385b4)
* We cannot set errno=0 in any of the wrapper calls as this breaks UNIX errorJeremy Allison2002-04-191-7/+0
| | | | | | returns to the client. Jeremy. (This used to be commit 1d66e53a64ec2878293e6d74a852b736ddab8f21)
* Fix different args to sys_fcntl without going varargs....Jeremy Allison2002-04-191-1/+16
| | | | | Jeremy. (This used to be commit 65742067e07195048edcee46dae95a58a4a50950)
* Added sys_fcntl (not to be used everywhere). Added sys_read/sys_writeJeremy Allison2002-04-191-0/+15
| | | | | | for transfer_file. Jeremy. (This used to be commit c7ff521bab838c070931f2b0ece4be3371fbcdbf)
* Fixed sendto in oplock code.Jeremy Allison2002-04-191-0/+15
| | | | | Jeremy. (This used to be commit 64974fa334fd757ff5cfd1bd32d7300bf8a6208c)
* Fix send and recvfrom.Jeremy Allison2002-04-191-1/+16
| | | | | Jeremy. (This used to be commit 8cbc24c3bd0e2d2349625c3b5d2e12ac092ec5a8)
* First cut at fix for the EINTR problem... More needs to be done I think.Jeremy Allison2002-04-191-0/+45
| | | | | Jeremy. (This used to be commit 48475a7a697242b9fd7b1aec24389afb112569c4)
* Added sys_adminlog() system for info the appliance admins reallyJeremy Allison2002-03-271-0/+28
| | | | | | need to know about. Different from the DEBUG system. Jeremy. (This used to be commit 74eac41c681f92a6da0ae2167f031e021862e0d8)
* Removed HAVE_LIBDL from most places (except system.c). Added checks forJeremy Allison2002-03-271-4/+4
| | | | | | | dlopen & friends into configure.in. This should help building on *BSD where dl*** calls are in libc. Jeremy (This used to be commit ac1baba35d7a399bf800ced49a4384e39955e3eb)
* Sync up vfs changes from 2.2.x.Jeremy Allison2002-03-191-0/+15
| | | | | Jeremy. (This used to be commit ad1e858d8e72adf924ff435eab8da3e60842e2e6)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* Getting ready to add UNIX extensions in HEAD also.Jeremy Allison2002-01-101-184/+392
| | | | | Jeremy (This used to be commit 6210d4aa196c944e47076e316980f76ac9c6b02d)
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* move to SAFE_FREE()Simo Sorce2001-09-171-10/+8
| | | | (This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
* Wrapped dlerror() in the same way as the other dlxxx() calls.Jeremy Allison2001-07-061-0/+9
| | | | | Jeremy. (This used to be commit ed5a1f70c6d155788b62e9e6e8c5d97a5ca0858d)
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-2/+2
| | | | | | can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
* The big character set handling changeover!Andrew Tridgell2001-07-041-170/+0
| | | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
* Ensured all the system calls in msdfs.c go through the vfs layer.Jeremy Allison2001-06-291-0/+28
| | | | | | | Added vfs calls to symlink() and readlink() with appropriate configure checks. Jeremy. (This used to be commit c24e6b41ea60ab4bac2fcd19da947851d6df3c7c)
* Fixed password entry caching bug pointed out by Elrond.Jeremy Allison2001-04-301-14/+25
| | | | | Jeremy. (This used to be commit dc31b47deda188cb88288a8f33dc09faed9b2c41)
* Sync up with 2.2 ACL code.Jeremy Allison2001-03-231-4/+0
| | | | | Jeremy. (This used to be commit 5b9a88c2d0da3479f91131f66ff741e88f9760ee)
* Added sys_dlopen/sys_dlsym/sys_dlclose.Jeremy Allison2001-03-191-0/+31
| | | | | Jeremy. (This used to be commit 49f0e7e7143f82bce9dfd8b06e9e515bc0869ab7)
* removed useless debug msgAndrew Tridgell2001-03-171-3/+0
| | | | (This used to be commit 348ebe30d047d69968df0f33b227e52b5bbabafe)
* lib/system.c (Finally) fixed all insure errors in password caching code. We ↵Jeremy Allison2001-03-171-56/+53
| | | | | | | | | | | | | | can't stop libc routines from calling getpwXXX functions, so caching a pointer to them is impossible. This new code now makes two copies of the returned struct passwd struct - one used as a cache, one returned to allow the caller to modify. When doing a lookup we compare against the cached copy. Code is now easier to understand also. smbd/posix_acls.c: If we move the head of the linked list, remember to pass a reference to that pointer..... Jeremy. (This used to be commit af364b93d92f70aa52195c46d3cc516830752609)
* change pstrcpy() in setup_pwret() to fstrcpy() since we areGerald Carter2001-02-131-2/+2
| | | | | | | | | | using fstrings. Spotted by Elrond. Thanks :-) jerry (This used to be commit a55a4fea9728550c4d28b05910c0b7d5080714b3)
* lib/system.c: Fix for pw caching.Jeremy Allison2001-01-311-12/+37
| | | | | | | srv_samr.c: Fix for pw caching. smbd/nttrans.c: Fix to allow trans create to set ACL on open. Jeremy. (This used to be commit c4f810a7588a2faf41f4222dc77678c53ab1dec0)
* Fix insure problems with passwd caching code.Jeremy Allison2001-01-241-6/+10
| | | | | Jeremy. (This used to be commit 2bd4f163890be58456a7e49b1adbed3f5834ff9e)
* Added modification to Richard Bollinger getpw[nam|uid] cache patch. OnlyJeremy Allison2001-01-241-2/+14
| | | | | | uses cache max 100 times. Jeremy. (This used to be commit 3712e35c5460d341ba750fe5e7bce8ef63c9f8ef)
* getpw[nam|uid] caching patch from "Richard Bollinger"Gerald Carter2001-01-241-7/+37
| | | | | | | | | <rabollinger@home.com> jerry (This used to be commit 158430ba6a030061bc7d7b84126c6f7ea0041c91)
* sys_popen got damaged when converted from FILE * to int fd I think.Jeremy Allison2000-10-081-14/+3
| | | | | | Patrick Powell kindly pointed out the bug. Jeremy. (This used to be commit 1f156b2420b7ecf1266e650efc3cee55362e29dd)
* added a hack to get 64 bit locking working with the broken fcntl()Andrew Tridgell2000-09-291-0/+14
| | | | | | call in glibc 2.1.95. This hack only gets enabled if you define GLIBC_HACK_FCNTL64 (This used to be commit d8b9ec741cc57b5f3dd1b3ef782a7baed402beaa)
* totally rewrote the async signal, notification and oplock notificationAndrew Tridgell2000-06-121-109/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling in Samba. This was needed due to several limitations and races in the previous code - as a side effect the new code is much cleaner :) in summary: - changed sys_select() to avoid a signal/select race condition. It is a rare race but once we have signals doing notification and oplocks it is important. - changed our main processing loop to take advantage of the new sys_select semantics - split the notify code into implementaion dependent and general parts. Added the following structure that defines an implementation: struct cnotify_fns { void * (*register_notify)(connection_struct *conn, char *path, uint32 flags); BOOL (*check_notify)(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *data, time_t t); void (*remove_notify)(void *data); }; then I wrote two implementations, one using hash/poll (like our old code) and the other using the new Linux kernel change notify. It should be easy to add other change notify implementations by creating a sructure of the above type. - fixed a bug in change notify where we were returning the wrong error code. - rewrote the core change notify code to be much simpler - moved to real-time signals for leases and change notify Amazingly, it all seems to work. I was very surprised! (This used to be commit 44766c39e0027c762bee8b33b12c621c109a3267)
* Linux kernel oplocks now seem to work, but need a _lot_ of testingAndrew Tridgell2000-06-111-8/+18
| | | | | | I had to modify sys_select() to not loop on EINTR. I added a wrapper called sys_select_intr() which gives the old behaviour. (This used to be commit b28cc4163bc2faaa80c5782fc02c8f03c410cdeb)
* continued the split of the kernel level oplocks code into a moreAndrew Tridgell2000-06-101-0/+2
| | | | | | modular form. In this pass I added oplock_irix.c and added a "struct kernel_oplocks" that describes a kernel oplock implementation. (This used to be commit b5ceab810292602ea9a81696c20a781c16b706c2)
* clean up oplock capability code ready for Linux codeAndrew Tridgell2000-06-091-7/+15
| | | | (This used to be commit 70dcc791b45ac64fc536ef449e4e6b53b2b68fd4)
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-1/+31
| | | | | | of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
* got rid of some more old configure tests and includesAndrew Tridgell2000-04-171-17/+0
| | | | (This used to be commit f137648504362479143d50477fa38ebf7147968b)
* converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell2000-04-161-88/+14
| | | | | | | | to support some of this I added the following functions in util_file.c file_lines_pload : load lines from a pipe file_pload : load a pipe into memory (This used to be commit a09470817c5b21dba42f9ef4ce5e8b768a254c0b)
* Fixes to add "paranoid" option to popen. Checks some basic things.Jeremy Allison2000-03-161-1/+56
| | | | | Jeremy (This used to be commit 3b8cbb10de322fd7a1063fb5b681790b10d24ab0)
* lib/system.c: Fixed gcc warnings.Jeremy Allison2000-02-231-1/+0
| | | | | | | nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0. Others - preparing for multiple pdu write code. Jeremy. (This used to be commit 9f879ec396230deba34fbe5e82d8a65f92137c54)