summaryrefslogtreecommitdiffstats
path: root/source/lib/replace.c
Commit message (Collapse)AuthorAgeFilesLines
* r18644: bring in libreplace in lib/replaceStefan Metzmacher2007-10-101-452/+0
| | | | metze
* r18457: Argl :-)Volker Lendecke2007-10-101-1/+1
|
* r18449: Attempt to fix the build on non-linux platforms: Many of those don't ↵Volker Lendecke2007-10-101-0/+15
| | | | | | | | | | have strtoull. This is a copy of the stuff in samba4 libreplace, which is GPL. I hope it is ok to copy&paste it into a GPL file. Tridge, we could also create a replace_lpgl.c if needed. Volker
* r16230: Fix Klocwork #861 and others. localtime and asctimeJeremy Allison2007-10-101-50/+51
| | | | | can return NULL. Ensure we check all returns correctly. Jeremy.
* r16017: Add Samba4 replacement for timegm to workJeremy Allison2007-10-101-24/+0
| | | | | on Solaris. Jeremy.
* r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")Jeremy Allison2007-10-101-1/+1
| | | | | | and replace calls to isupper/islower/toupper/tolower with ASCII equivalents (mapping into _w variants). Jeremy.
* r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison2007-10-101-1/+1
| | | | | | | | | | | | | | | | of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy.
* r6822: Use chsize if we don't have ftruncate. From Steven Edwards ↵Jeremy Allison2007-10-101-8/+11
| | | | | | <steven_ed4153@yahoo.com>. Jeremy.
* r4270: Add some const as a fix for bugzilla #2135.Tim Potter2007-10-101-1/+1
|
* r4241: More *alloc fixes.Jeremy Allison2007-10-101-2/+7
| | | | Jeremy.
* backport from headSimo Sorce2004-03-191-0/+3
|
* split replace into replace and replace1 to allow setenv to be used byHerb Lewis2003-07-291-18/+0
| | | | | nsswitch modules. Add required libraries to get rid of undefined functions for libns_winbind.so and libns_wins.so
* Merge minor library fixes from HEAD to 3.0.Andrew Bartlett2003-02-191-0/+18
| | | | | | | | | | | | | | - setenv() replacement - mimir's ASN1/SPNEGO typo fixes - (size_t)-1 fixes for push_* returns - function argument signed/unsigned correction - ASN1 error handling (ensure we don't use initiailsed data) - extra net ads join error checking - allow 'set security discriptor' to fail - escape ldap strings in libads. - getgrouplist() correctness fixes (include primary gid) Andrew Bartlett
* Merge from HEAD - tridge's new timegm() that actually works on solaris.Andrew Bartlett2003-01-031-18/+15
| | | | Andrew Bartlett
* Merge from HEAD, struct in_addr is always in network byte order, so we don'tAndrew Bartlett2002-12-011-5/+0
| | | | need a little-endian case here.
* Sync with HEADJelmer Vernooij2002-11-091-0/+25
|
* sync 3.0 branch with headJelmer Vernooij2002-08-171-0/+2
|
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-0/+14
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* added strlcpy() and strlcat()Andrew Tridgell2001-11-201-0/+36
|
* This commit is number 4 of 4.Andrew Bartlett2001-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular this commit focuses on: Actually adding the 'const' to the passdb interface, and the flow-on changes. Also kill off the 'disp_info' stuff, as its no longer used. While these changes have been mildly tested, and are pretty small, any assistance in this is appreciated. ---- These changes introduces a large dose of 'const' to the Samba tree. There are a number of good reasons to do this: - I want to allow the SAM_ACCOUNT structure to move from wasteful pstrings and fstrings to allocated strings. We can't do that if people are modifying these outputs, as they may well make assumptions about getting pstrings and fstrings - I want --with-pam_smbpass to compile with a slightly sane volume of warnings, currently its pretty bad, even in 2.2 where is compiles at all. - Tridge assures me that he no longer opposes 'const religion' based on the ability to #define const the problem away. - Changed Get_Pwnam(x,y) into two variants (so that the const parameter can work correctly): - Get_Pwnam(const x) and Get_Pwnam_Modify(x). - Reworked smbd/chgpasswd.c to work with these mods, passing around a 'struct passwd' rather than the modified username --- This finishes this line of commits off, your tree should now compile again :-) Andrew Bartlett
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-3/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-1/+1
|
* include/ntdomain.h:Jeremy Allison2001-04-021-2/+2
| | | | | | | | | rpc_server/srv_lsa_hnd.c: Remove back pointer from policy handle list as the pipe that opened the handle may have been closed. We were dereferencing into something that had been closed. rpc_parse/parse_spoolss.c: Sync up with Gerald's changes in 2.2. lib/replace.c: Don't do proto on setlinebuf as it differs between systems. Jeremy.
* configure configure.in include/config.h.in lib/replace.c: Added test and ↵Jeremy Allison2001-03-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | replacement for setlinebuf which apparantly doesn't exist on HPUX 11. include/byteorder.h: rpc_parse/parse_prs.c: Ding Dong the witch is dead ! :-). Ok, I'm happy 'cos I've finally deleted all the *HORRIBLE* DBG_RW_XXX and RW_XXX macros from include/byteorder.h. They were macros that included macros that had conditional macros included. No one understood them (they were the cause of most of the bigendian issue bugs). Finally, I went into parse_prs.c and inlined all of that stuff with regular function calls. They're understandable, they're easy to edit and they don't include macros ! JF - please look at the one comment I added (JF PLEASE CHECK). I have tested this partly with IRIX (a bigendian system) running with AS/U on a Solaris box in SGI's lab, and I've also confirmed these new changes work with W2K (vmware) but there may be the odd bug lurking. Herb, if you could re-checkout and test again with this code that would help. Extra. Fixed bug spotted by the sharp eyes of JF - big endian unicode packet would cause a early truncate of string parsing as we were checking for a char * 0, not a uint16 * 0. Jeremy.
* Fixed missing bracket on debug statement.Tim Potter2000-10-191-1/+1
|
* Added replacement functions sys_popen and sys_pclose. These are basedJeremy Allison2000-02-151-4/+12
| | | | | | | | | 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.
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-3/+2
|
* cache unix groups so that two-level getgrent calls don't occur.Luke Leighton1999-02-031-0/+1
|
* Makefile.in: Added maintainer mode fixes.Jeremy Allison1998-11-251-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | aclocal.m4: Added AC_LIBTESTFUNC. configure.in: Fixed -lsecurity -lsec problems. client.c: dos_ fixes. groupdb/aliasunix.c: Dead code removal. include/includes.h: Added default PRINTCAP_NAME. lib/genrand.c: dos_ fixes. lib/replace.c: Added strtoul. lib/system.c: dos_ fixes. lib/util.c: dos_ fixes. lib/util_sid.c: Signed/unsigned fixes. lib/util_str.c: removed bad const. locking/locking_slow.c: dos_ fixes. printing/printing.c: dos_ fixes. rpc_server/srv_samr.c: Dead code removal. rpc_server/srv_sid.c: global_myworkgroup defined with wrong size AGAIN ! smbd/dir.c: dos_ fixes. smbd/open.c: dos_ fixes. smbd/oplock.c: dos_ fixes. smbd/reply.c smbd/server.c smbd/service.c smbd/uid.c: dos_ fixes. Jeremy.
* Fixed problem with HAVE_NETGROUP being used on platformsJeremy Allison1998-11-181-12/+14
| | | | | that cannot support it. Jeremy.
* Fix from richard.kettlewell@kewill.com for leapyear bugs.Jeremy Allison1998-11-111-1/+5
| | | | Jeremy.
* removed setenv(), replaced with smbw_setenv()Andrew Tridgell1998-10-201-17/+0
|
* Small tidyups for gcc in 'preen' mode....Jeremy Allison1998-10-171-3/+2
| | | | Jeremy.
* more solaris 2.5 fixups. It now seems to be working pretty well.Andrew Tridgell1998-10-041-0/+18
|
* Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1998-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fixed a bug in the replacement inet_ntoaAndrew Tridgell1998-07-291-1/+1
|
* test for a broken inet_ntoa and replace it if necessary (forAndrew Tridgell1998-07-291-0/+15
| | | | IRIX+gcc-2.8.1)
* merge from the autoconf2 branch to the main branchAndrew Tridgell1998-07-291-107/+129
|
* This is *not* a big change (although it looks like one).Jeremy Allison1998-01-221-1/+1
| | | | | | | This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy.
* got rid of the WRAP_MALLOC code - mem_man does it betterAndrew Tridgell1997-12-041-67/+0
|
* 'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)Samba Release Account1997-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed May 7 1997: Update for 1.9.17alpha1 release - 'browsefix release' designed to make browsing across subnets work. byteorder.h: Updated copyright to 1997. charcnv.c: Updated copyright to 1997. charset.c Updated copyright to 1997. charset.h Updated copyright to 1997. client.c Updated copyright to 1997. clientutil.c Updated copyright to 1997. dir.c Updated copyright to 1997. fault.c Updated copyright to 1997. includes.h Updated copyright to 1997. interface.c Updated copyright to 1997. ipc.c Updated copyright to 1997. kanji.c Updated copyright to 1997. kanji.h Updated copyright to 1997. loadparm.c Updated copyright to 1997. locking.c Updated copyright to 1997. mangle.c Updated copyright to 1997. message.c Updated copyright to 1997. nameannounce.c Made use of WINS subnet explicit. Added reset_announce_timer() so announcement can be made immediately when we become a master. Expanded code to do sync with dmb. namebrowse.c Removed redundent checks for AM_MASTER in sync code. Made use of WINS subnet explicit. namedbname.c Made use of WINS subnet explicit. namedbresp.c Made use of WINS subnet explicit. namedbserver.c Made use of WINS subnet explicit. namedbsubnet.c Explicitly add workgroup to WINS subnet when we become a dmb. Made use of WINS subnet explicit. namedbwork.c Made use of WINS subnet explicit. Removed redundent check_work_servertype() function. nameelect.c Explicitly add workgroup to WINS subnet when we become a master browser. Made use of WINS subnet explicit. namelogon.c Updated copyright to 1997. namepacket.c Updated copyright to 1997. namequery.c Updated copyright to 1997. nameresp.c Made use of WINS subnet explicit. Made nmbd fail if configured as master browser and one exists already. nameserv.c Made use of WINS subnet explicit. Remove redundent logon server and domain master code. nameserv.h Add emumerate subnet macros. nameservreply.c Made use of WINS subnet explicit. nameservresp.c Updated copyright to 1997. namework.c Made use of WINS subnet explicit. Updated code to add sync browser entries to add subnet parameter. nmbd.c Added sanity check for misconfigured nmbd. nmblib.c Updated copyright to 1997. nmblookup.c Updated copyright to 1997. nmbsync.c Removed redundent AM_ANY_MASTER check. params.c Updated copyright to 1997. password.c Updated copyright to 1997. pipes.c Updated copyright to 1997. predict.c Updated copyright to 1997. printing.c Updated copyright to 1997. proto.h Changed protos for new nmbd code. quotas.c Updated copyright to 1997. replace.c Updated copyright to 1997. reply.c Updated copyright to 1997. server.c Updated copyright to 1997. shmem.c Updated copyright to 1997. smb.h Updated copyright to 1997. smbencrypt.c Updated copyright to 1997. smbpasswd.c Updated copyright to 1997. smbrun.c Updated copyright to 1997. status.c Updated copyright to 1997. system.c Updated copyright to 1997. testparm.c Updated copyright to 1997. testprns.c Updated copyright to 1997. time.c Updated copyright to 1997. trans2.c Updated copyright to 1997. trans2.h Updated copyright to 1997. uid.c Updated copyright to 1997. username.c Updated copyright to 1997. util.c Updated copyright to 1997. version.h Changed to 1.9.17alpha1.
* add DEBUGLEVEL to replace.cAndrew Tridgell1996-10-051-0/+3
|
* moved some more locking routines to locking.c, and moved replacementAndrew Tridgell1996-06-101-0/+322
routines for broken OSes from util.c to replace.c.