summaryrefslogtreecommitdiffstats
path: root/source/lib/system.c
Commit message (Collapse)AuthorAgeFilesLines
* dlsym takes a const char *.Jeremy Allison2003-03-031-1/+1
| | | | Jeremy.
* Add PRINTF_ATTRIBUTE() to a few more printf() style functions. Aids inAndrew Bartlett2003-01-021-1/+1
| | | | compiler-based argument checking.
* 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
* fix a few segfaultsGerald Carter2002-08-221-6/+6
|
* 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)
* Add a wrapper for dup2() to our system.cAndrew Bartlett2002-07-201-0/+10
| | | | Andrew Bartlett
* 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
* 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
* patch from Alexander Bokovoy needed for dlopen on bsd systemsAndrew Tridgell2002-04-241-4/+4
|
* 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.
* Fix different args to sys_fcntl without going varargs....Jeremy Allison2002-04-191-1/+16
| | | | Jeremy.
* Added sys_fcntl (not to be used everywhere). Added sys_read/sys_writeJeremy Allison2002-04-191-0/+15
| | | | | for transfer_file. Jeremy.
* Fixed sendto in oplock code.Jeremy Allison2002-04-191-0/+15
| | | | Jeremy.
* Fix send and recvfrom.Jeremy Allison2002-04-191-1/+16
| | | | Jeremy.
* First cut at fix for the EINTR problem... More needs to be done I think.Jeremy Allison2002-04-191-0/+45
| | | | Jeremy.
* 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.
* 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
* Sync up vfs changes from 2.2.x.Jeremy Allison2002-03-191-0/+15
| | | | Jeremy.
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Getting ready to add UNIX extensions in HEAD also.Jeremy Allison2002-01-101-184/+392
| | | | Jeremy
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-10/+8
|
* Wrapped dlerror() in the same way as the other dlxxx() calls.Jeremy Allison2001-07-061-0/+9
| | | | Jeremy.
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-2/+2
| | | | can't redefine them. damn.
* 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.
* 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.
* Fixed password entry caching bug pointed out by Elrond.Jeremy Allison2001-04-301-14/+25
| | | | Jeremy.
* Sync up with 2.2 ACL code.Jeremy Allison2001-03-231-4/+0
| | | | Jeremy.
* Added sys_dlopen/sys_dlsym/sys_dlclose.Jeremy Allison2001-03-191-0/+31
| | | | Jeremy.
* removed useless debug msgAndrew Tridgell2001-03-171-3/+0
|
* 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.
* change pstrcpy() in setup_pwret() to fstrcpy() since we areGerald Carter2001-02-131-2/+2
| | | | | | | | | using fstrings. Spotted by Elrond. Thanks :-) jerry
* 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.
* Fix insure problems with passwd caching code.Jeremy Allison2001-01-241-6/+10
| | | | Jeremy.
* Added modification to Richard Bollinger getpw[nam|uid] cache patch. OnlyJeremy Allison2001-01-241-2/+14
| | | | | uses cache max 100 times. Jeremy.
* getpw[nam|uid] caching patch from "Richard Bollinger"Gerald Carter2001-01-241-7/+37
| | | | | | | | <rabollinger@home.com> jerry
* 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.
* 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
* 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!
* 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.
* 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.
* clean up oplock capability code ready for Linux codeAndrew Tridgell2000-06-091-7/+15
|
* 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.
* got rid of some more old configure tests and includesAndrew Tridgell2000-04-171-17/+0
|
* 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
* Fixes to add "paranoid" option to popen. Checks some basic things.Jeremy Allison2000-03-161-1/+56
| | | | Jeremy
* 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.
* Added replacement functions sys_popen and sys_pclose. These are basedJeremy Allison2000-02-151-7/+224
| | | | | | | | | on the glibc source code and are safer than the traditional popen as they don't use a shell to exec the requested command. Now we have these functions they can be tightened up (environment etc.) as required to make a safe popen. It should now be safe to add the environement variable loading code to loadparm.c Jeremy.
* include/includes.h: Trimmed down unicode directory entry to be POSIX complient.Jeremy Allison1999-12-221-3/+4
| | | | | | lib/system.c: Trimmed down unicode directory entry to be POSIX complient. lib/util_unistr.c: Added wstrdup(). Jeremy.
* First cut at unicode sys_xx functions. Now to start moving upwards.....Jeremy Allison1999-12-221-0/+169
| | | | Jeremy.