summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
AgeCommit message (Collapse)AuthorFilesLines
2002-07-21Another smattering of static and constAndrew Bartlett1-1/+1
(This used to be commit 897cc4a610932e596f8a9807213166e380ef0203)
2002-07-20Add support for duplicating stderr into our logfiles.Andrew Bartlett1-17/+21
This is for two things: To allow panic actions etc to pump out backtraces to stderr and to allow vangrind to put its stuff in a logfile - making it possible to debug smbd when launched from inetd. I've also cleaned up some of the duplicate names in procedures between smbd and nmbd. Andrew Bartlett (This used to be commit 4bcb32731984b4aef1d4911a168a4e7a10d32fd4)
2002-07-18Add useful VALGRIND #ifdef.Jeremy Allison1-0/+2
Jeremy. (This used to be commit 07716f3a2316fedfe9a3210fd1dad8f7d1e4d9c8)
2002-07-11*Experimental* new large-scaling printer code. Splits printing.tdb intoJeremy Allison1-3/+3
a separate tdb per printer, but only keeps (currently one) tdb open at a time (although this is easily changed by changing a #define). Needs scalability testing with large numbers of printers now.... Jeremy. (This used to be commit b0909cfa14fc7ef29d2b98b56d52723570da782a)
2002-06-15Add back sys_getpwnam() and freinds to the system.c interface, but don'tAndrew Bartlett1-1/+1
use the silly cache any more. Also add group functions and fix a few callers. Andrew Bartlett (This used to be commit 41d4b94077c118ecde2bf8792b9bb7ab71c6403e)
2002-06-03put the ifdef for HAVE_VA_COPY in one place rather than in lots ofAndrew Tridgell1-5/+3
functions (This used to be commit 1cf3228fdc20f0314d1f8e71ad710a5e548b3f72)
2002-05-22Add a bit more const, and kill of (finally!) sys_getpwnam and sys_getpwuid.Andrew Bartlett1-6/+9
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)
2002-05-22Cleanups!Andrew Bartlett1-1/+1
Make some code static, add some const to the PAM code, and make the plaintext password code actually function - particulary without the requirement to modify the 'struct passwd' (which it assumed was made up of fstrings) This kills some particularly ugly code in lib/util_pw.c Andrew Bartlett (This used to be commit 302dad4990ba5194f072e435465d9adaa089ae06)
2002-05-22Fix a silly memory (getpnam_alloc()) leak spotted by Elrond, and moveAndrew Bartlett1-94/+9
the DATA_BLOB code into its own file. It would be nice to go over some of the other util.c functions, and check that we still use them all, and that we use them in more than one place. Andrew Bartlett (This used to be commit d0ea70fce55df9a5b5878f50fce7bc115ffb37c2)
2002-05-17Fix usage of va_list passed as an arg. Use __va_copy before using itJim McDonough1-1/+7
when it exists. (This used to be commit 85ab07bdc1b2ce7b2c1b8197fad45124b1460dca)
2002-05-17This removes --with-ssl from Samba.Andrew Bartlett1-7/+0
This option was badly maintained, useless and confused our users and distirbutors. (its SSL, therfore it must be good...) No windows client uses this protocol without help from an SSL tunnel. I can't see any reason why setting up a unix-side SSL wrapper would be any more difficult than the > 10 config options this mess added to samba in any case. On the Samba client end, I think the LIBSMB_PROG hack should be sufficient to start stunnel on the unix side. We might extend this to take %i and %p (IP and port) if there is demand. Andrew Bartlett (This used to be commit b04561d3fd3ee732877790fb4193b20ad72a75f8)
2002-05-09pidfile merge from SAMBA_2_2 (including --with-fhs) and a few other minor ↵Gerald Carter1-14/+39
things; compiles and shouldnt break, but needs testing (This used to be commit 19b9b50d9039afe614284aaf379f9f1078e2e307)
2002-05-08Merge in Jerry's called name fix.Jeremy Allison1-58/+66
Jeremy. (This used to be commit 6d957924579d64407bdd94d7e78088fb1ea5c9ce)
2002-04-19Fix different args to sys_fcntl without going varargs....Jeremy Allison1-3/+3
Jeremy. (This used to be commit 65742067e07195048edcee46dae95a58a4a50950)
2002-04-19Added sys_fcntl (not to be used everywhere). Added sys_read/sys_writeJeremy Allison1-7/+4
for transfer_file. Jeremy. (This used to be commit c7ff521bab838c070931f2b0ece4be3371fbcdbf)
2002-04-19First cut at fix for the EINTR problem... More needs to be done I think.Jeremy Allison1-4/+5
Jeremy. (This used to be commit 48475a7a697242b9fd7b1aec24389afb112569c4)
2002-04-04Also look for libinsure.so where the full version installs it.Tim Potter1-0/+5
(This used to be commit 2bf6595a2a5527ff64f9083f2434aa344c9637d9)
2002-03-27In msleep - never sleep for more than 1 second. Cope with time changes.Jeremy Allison1-16/+27
Jeremy. (This used to be commit 9fb6a475264f465e30a23c34b5c9266921d135d1)
2002-03-20Add assertions that kill() is never accidentally passed a non-positiveMartin Pool1-0/+3
pid. This follows a bug in rsync where it would accidentally kill(-1), removing all the user's processes. I can't see any way this would directly happen in Samba, but having the assertions seems beneficial. http://cvs.samba.org/cgi-bin/cvsweb/rsync/util.c.diff?r1=1.108&r2=1.109&f=h (This used to be commit 098905bea29c7d5b886809d431294ddf2fc1e152)
2002-01-31Fix from Michael Steffens <michael_steffens@hp.com> to make signalJeremy Allison1-1/+1
processing work correctly in winbindd. This is a really good patch that gives full select semantics to the Samba modified select. Jeremy. (This used to be commit 3af16ade173cac24c1ac5eff4a36b439f16ac036)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-27minor fix and checksSimo Sorce1-2/+4
(This used to be commit a034bfb9ef7a4c8a127ac91f4163cc6af98f29b3)
2002-01-26Remove the 'direct to winbind' hacks, as they should (if I understandAndrew Bartlett1-12/+0
correctly) be no longer needed. This is in aid of the 'winbind default domain' code - which works much better when smbd always goes via the standard unix interfaces. Andrew Bartlett (This used to be commit a41fe2f6c845789c719de1d9a26a1374fb0e7fdb)
2002-01-25minor fixesSimo Sorce1-2/+3
(This used to be commit 04f492980b73800b60dde764fdeb43f2eab79624)
2002-01-23getpwnam -> getpwnam_alloc.Andrew Bartlett1-2/+4
idra has promised not to revert these this time :-) (This used to be commit f556ad67e82518f5a024ffe9184ff9430ab5c541)
2002-01-21Spelling fix.Tim Potter1-1/+1
(This used to be commit 6380f9ff7a57975b9827fb7252439ee28a25970d)
2002-01-15Add constness to filenames passed to functions.Martin Pool1-2/+2
(This used to be commit 8d106dc1f4a51112516d72ae68747ca6b5b904b7)
2002-01-11Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison1-6/+6
Jeremy. (This used to be commit 01ff6ce4963e1daff019f2b936cef218e1c93f67)
2002-01-09Add harmless parentheses so that dmalloc doesn't get confused by aMartin Pool1-1/+1
variable called 'free'. (This used to be commit a823e3f8b2961c3e24205911354a55ffa588233b)
2002-01-05simple fix for creating blank data blobsAndrew Tridgell1-2/+7
(This used to be commit 08bb2dfec2ca0282e9268d09da2b966d3bdf493a)
2002-01-05Add a talloc varient of the data_blob functions.Andrew Bartlett1-3/+48
Also change the structure so it has its own (optional) 'free' pointer - so we don't free() a talloc'ed version. also split out the data_blob_clear() functionaility. Andrew Bartlett (This used to be commit 207ee8aac42cf4b35f07e496b15fdeabe50950bc)
2002-01-03Don't use static memory, malloc it...Jeremy Allison1-2/+12
Jeremy. (This used to be commit 8aee8211cddb6705c9aa545fc57ece2c721ef448)
2002-01-03Fix the fix.... (sigh).Jeremy Allison1-1/+1
Jeremy. (This used to be commit 73cf9d04f6a35aa3b6bdb4e921de34e0021b5a2c)
2002-01-03Fixed embarressing 16k strack trashing bug :-(.Jeremy Allison1-8/+9
Jeremy. (This used to be commit b52c3219d6f46df6e98742447d65ecda2ecbac65)
2001-12-09add smb_xvasprintf() panic wrapper around vasprintfAndrew Tridgell1-3/+13
(This used to be commit fa1e7a62acdbcc550e6b29dc69454dcf7472210d)
2001-12-03re-enabled insure backtrace, calling /usr/bin/backtraceAndrew Tridgell1-2/+4
(This used to be commit 21a366afbe9dc5f4878f97bb03525452bbbc4e41)
2001-11-28merge from APPLIANCE_HEADGerald Carter1-0/+41
(This used to be commit c60aa6c06f376684b6d6d9a2c14305ca9f4657ef)
2001-11-28turn off the insure xterm hack for nowAndrew Tridgell1-1/+1
(This used to be commit 8698f7ef3ee9b83370e895607297245b6df74934)
2001-11-26Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter1-1/+15
and replaced with two functions: void zero_ip(struct in_adder *ip); BOOL is_zero_ip(struct in_addr ip); (This used to be commit 778f5f77a66cda76348a7c6f64cd63afe2bfe077)
2001-11-20Rename xmalloc, xmemdup, xstrdup to smb_$1 to avoid conflicts with theMartin Pool1-14/+15
versions defined by libreadline on SCO (!). (This used to be commit 32480d7aff21ce1c14991e242aaf8a4e14ec6f2a)
2001-11-19LIBDIR and LOCKDIR are dynamically configured too.Martin Pool1-4/+9
(This used to be commit 868999ad3c82ad72f11d5b3208b0e42b1ed95096)
2001-11-15Tidyups in the merge process.Jeremy Allison1-32/+36
Jeremy. (This used to be commit a7b45bfb713adaaad0dca3dc13139ee5a909a383)
2001-11-12some bugfix and new functions,Simo Sorce1-2/+3
modified mangle.c to use mosltly acnv_????() functions. this should make also build farm happy (This used to be commit 8bb5cb27c2012b8967482255d48a1b48d3acd9db)
2001-11-04a big one:Simo Sorce1-0/+68
- old mangle code has gone, the new one based on tdb seem resonably ok probably the valid.dat table need to be updated to treat wild chars as invalid ones (work ok without it) - a LOT of new string manipulation function for unicode, they are somewhat tested but a review would not be bad - some new function I will need for the new unix_convert function I'm writing, this will be renamed filename_convert and use only unicode strings. - charconv, I attached a comment, if someone wnat to look if I'm right or just was hacking to late in the night to make a sane one :) of course any bug is my responsibility an will be pleased to see patches if you find any. :-) Simo. (This used to be commit ee19f7efb6ea9216fc91cf112ac1afa691983e9d)
2001-11-01zero the data, not a pointer to the data ...Andrew Tridgell1-1/+1
(This used to be commit eeaa80aa09736dc1c5f5f72a1437eb9d9c0d4ae7)
2001-10-29Add a bit of 'const' for the data_blob code.Andrew Bartlett1-3/+13
Add a new data_blob_clear_free() function - that zero's out the buffer when its done. (This used to be commit b02ed7ee195ebd9060f91e117c002d661b6cc9d6)
2001-10-29This commit is number 4 of 4.Andrew Bartlett1-3/+3
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 (This used to be commit c95f5aeb9327347674589ae313b75bee3bf8e317)
2001-10-22a quick fix to get rpcclient working again. This just disablesAndrew Tridgell1-1/+1
NTLMSSP in cli_establish_connection() What we really need to do is kill off the pwd_cache code. It is horrible, and assumes the challenge comes in the negprot reply. (This used to be commit 3f919b4360b3bfcc133f7d88bc5177e9d93f2db2)
2001-10-22Added xstrdup, removed static version from smbpasswd.cJeremy Allison1-2/+14
Jeremy. (This used to be commit d01a9e5974d80ee8be2f7a20aeaae5826325d035)
2001-10-22Added xmalloc - calls smb_panic on zero size or malloc fail.Jeremy Allison1-1/+27
Added xmemdup - calls xmalloc. Made data_blob() call xmemdup. Defensive programming (I still hate the no error checking... :-). Jeremy. (This used to be commit 2cc262278f9d4892cf2485d7a73d88bc0e7559a8)