summaryrefslogtreecommitdiffstats
path: root/source/lib/util.c
Commit message (Collapse)AuthorAgeFilesLines
* Added sys_fcntl (not to be used everywhere). Added sys_read/sys_writeJeremy Allison2002-04-191-7/+4
| | | | | for transfer_file. Jeremy.
* First cut at fix for the EINTR problem... More needs to be done I think.Jeremy Allison2002-04-191-4/+5
| | | | Jeremy.
* Also look for libinsure.so where the full version installs it.Tim Potter2002-04-041-0/+5
|
* In msleep - never sleep for more than 1 second. Cope with time changes.Jeremy Allison2002-03-271-16/+27
| | | | Jeremy.
* Add assertions that kill() is never accidentally passed a non-positiveMartin Pool2002-03-201-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
* Fix from Michael Steffens <michael_steffens@hp.com> to make signalJeremy Allison2002-01-311-1/+1
| | | | | | processing work correctly in winbindd. This is a really good patch that gives full select semantics to the Samba modified select. Jeremy.
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* minor fix and checksSimo Sorce2002-01-271-2/+4
|
* Remove the 'direct to winbind' hacks, as they should (if I understandAndrew Bartlett2002-01-261-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
* minor fixesSimo Sorce2002-01-251-2/+3
|
* getpwnam -> getpwnam_alloc.Andrew Bartlett2002-01-231-2/+4
| | | | idra has promised not to revert these this time :-)
* Spelling fix.Tim Potter2002-01-211-1/+1
|
* Add constness to filenames passed to functions.Martin Pool2002-01-151-2/+2
|
* Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison2002-01-111-6/+6
| | | | Jeremy.
* Add harmless parentheses so that dmalloc doesn't get confused by aMartin Pool2002-01-091-1/+1
| | | | variable called 'free'.
* simple fix for creating blank data blobsAndrew Tridgell2002-01-051-2/+7
|
* Add a talloc varient of the data_blob functions.Andrew Bartlett2002-01-051-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
* Don't use static memory, malloc it...Jeremy Allison2002-01-031-2/+12
| | | | Jeremy.
* Fix the fix.... (sigh).Jeremy Allison2002-01-031-1/+1
| | | | Jeremy.
* Fixed embarressing 16k strack trashing bug :-(.Jeremy Allison2002-01-031-8/+9
| | | | Jeremy.
* add smb_xvasprintf() panic wrapper around vasprintfAndrew Tridgell2001-12-091-3/+13
|
* re-enabled insure backtrace, calling /usr/bin/backtraceAndrew Tridgell2001-12-031-2/+4
|
* merge from APPLIANCE_HEADGerald Carter2001-11-281-0/+41
|
* turn off the insure xterm hack for nowAndrew Tridgell2001-11-281-1/+1
|
* Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter2001-11-261-1/+15
| | | | | | | and replaced with two functions: void zero_ip(struct in_adder *ip); BOOL is_zero_ip(struct in_addr ip);
* Rename xmalloc, xmemdup, xstrdup to smb_$1 to avoid conflicts with theMartin Pool2001-11-201-14/+15
| | | | versions defined by libreadline on SCO (!).
* LIBDIR and LOCKDIR are dynamically configured too.Martin Pool2001-11-191-4/+9
|
* Tidyups in the merge process.Jeremy Allison2001-11-151-32/+36
| | | | Jeremy.
* some bugfix and new functions,Simo Sorce2001-11-121-2/+3
| | | | | modified mangle.c to use mosltly acnv_????() functions. this should make also build farm happy
* a big one:Simo Sorce2001-11-041-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.
* zero the data, not a pointer to the data ...Andrew Tridgell2001-11-011-1/+1
|
* Add a bit of 'const' for the data_blob code.Andrew Bartlett2001-10-291-3/+13
| | | | | Add a new data_blob_clear_free() function - that zero's out the buffer when its done.
* This commit is number 4 of 4.Andrew Bartlett2001-10-291-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
* a quick fix to get rpcclient working again. This just disablesAndrew Tridgell2001-10-221-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.
* Added xstrdup, removed static version from smbpasswd.cJeremy Allison2001-10-221-2/+14
| | | | Jeremy.
* Added xmalloc - calls smb_panic on zero size or malloc fail.Jeremy Allison2001-10-221-1/+27
| | | | | | | Added xmemdup - calls xmalloc. Made data_blob() call xmemdup. Defensive programming (I still hate the no error checking... :-). Jeremy.
* added basic NTLMSSP support in smbd. This is still quite rough, andAndrew Tridgell2001-10-171-2/+2
| | | | | | loses things like username mapping. I wanted to get this in then discuss it a bit to see how we want to split up the existing session setup code
* initial kerberos/ADS/SPNEGO support in libsmb and smbclient. ToAndrew Tridgell2001-10-111-0/+26
| | | | | | | | | | activate you need to: - install krb5 libraries - run configure - build smbclient - run kinit to get a TGT - run smbclient with the -k option to choose kerberos auth
* switched over to a new method of handling uppercase/lowercase mappingsAndrew Tridgell2001-10-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | for unicode strings. The new method relies on 3 files that are mmap'd at startup to provide the mapping tables. The upcase.dat and lowcase.dat tables should be the same on all systems. The valid.dat table says what characters are valid in 8.3 names, and differs between systems. I'm committing the japanese valid.dat here, in future we need some way of automatically installing and choosing a appropriate table. This commit also adds my mini tdb based gettext replacement in intl/lang_tdb.c. I have not enabled this yet and have not removed the old gettext code as the new code is still being looked at by Monyo. Right now the code assumes that the upcase.dat, lowcase.dat and valid.dat files are installed in the Samba lib directory. That is not a good choice, but I'll leave them there until we work out the new install directory structure for Samba 3.0. simo - please look at the isvalid_w() function and think about using it in your new mangling code. That should be the final step to correctly passing the chargen test code from monyo.
* Fixed up the change password bug when not using PAM.Jeremy Allison2001-10-021-4/+116
| | | | | | | | | | | | The problem is we were trying to use mask_match as a generic wildcard matcher for UNIX strings (like the password prompts). We can't do that - we need a unix_wild_match (re-added into lib/util.c) as the ms_fnmatch semantics for empty strings are completely wrong. This caused partial reads to be accepted as correct passwd change responses when they were not.... Also added paranioa test to stop passwd change being done as root with no %u in the passwd program string. Jeremy.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* OpenSSL merge from 2.2Gerald Carter2001-09-261-1/+1
|
* fixed ctemp in server and client. It turns out that ctemp on NT is ↵Andrew Tridgell2001-09-171-3/+4
| | | | completely broken, and it's pointless to emulate their brokenness completely in this case, but at least this makes us use approximately the same packet format. The spec is complelet wrong in this case
* move to SAFE_FREE()Simo Sorce2001-09-171-14/+10
|
* replaced stdio in many parts of samba with a XFILE. XFILE is a cut-downAndrew Tridgell2001-09-101-10/+0
| | | | | | | | | replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor limit that we hit with nasty consequences on some systems I would eventually prefer us to have a configure test to see if we need to replace stdio, but for now this code needs to be tested widely so I'm enabling it by default.
* Merge of transfer file code from 2.2, fix for readbraw.Jeremy Allison2001-09-041-66/+39
| | | | Jeremy.
* Fixed some compiler warnings.Tim Potter2001-09-041-2/+0
|
* a bunch of fixes from the sflight to seattleAndrew Tridgell2001-08-201-3/+6
| | | | | | in particular: - fixed NT status code for a bunch of ops - fixed handling of protocol levels in ms_fnmatch
* this is a big global fix for the ptr = Realloc(ptr, size) bug.Simo Sorce2001-08-121-2/+6
| | | | | | many possible mem leaks, and segfaults fixed. someone should port this fix to 2.2 also.
* me stupid.Simo Sorce2001-08-051-1/+1
| | | | | never commit without building. sorry.