summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* don't return a passwd struct for usernames that don'tAndrew Tridgell2000-05-291-2/+12
| | | | belong to us
* getting and setting security descriptors on printers now worksAndrew Tridgell2000-05-271-0/+2
| | | | this needed some fixes in tdb_unpack(). Tim, you'll need to update
* prs_give_memory in wrong place, also poss. was losing mem.Luke Leighton2000-05-271-2/+2
|
* unistr_to_dos not unistr_to_asciiLuke Leighton2000-05-271-0/+22
|
* fixed nttrans.cLuke Leighton2000-05-272-1/+680
|
* Changed name of case_sensitive in mask_match to avaid gcc "shadow global"Jeremy Allison2000-05-171-4/+2
| | | | | warning. Jeremy.
* Added unicode_to_dos_char() function to address converting single UNICODEJeremy Allison2000-05-121-0/+22
| | | | | characters to one or more DOS codepage characters. Jeremy.
* use "winbind separator" option for domain/user separator characterAndrew Tridgell2000-05-121-14/+0
|
* lib/util_unistr.c:Jeremy Allison2000-05-101-11/+15
| | | | | | | | | | libsmb/clilist.c: rpc_server/srv_spoolss_nt.c: smbd/trans2.c: Changed unistr_to_ascii to unistr_to_dos - do codepage conversion. msdfs/msdfs.c: Removed stub unistr_to_dos. libsmb/pwd_cache.c: Removed obfuscation functions as they don't do anything and don't add any security. Jeremy.
* - changed smb_getpwnam() to use winbind style usernamesAndrew Tridgell2000-05-101-7/+6
| | | | - finished ntdom -> winbind rename in head
* more merging voodooAndrew Tridgell2000-05-101-0/+4
| | | | | | this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic - this isn't permanent, it should go after another few merge steps have been done
* Fix for VMS platforms from "John E. Malmberg" <wb8tyw@qsl.net>Jeremy Allison2000-05-081-0/+2
| | | | Jeremy.
* a minimal change to get appliance mode to work with winbinddAndrew Tridgell2000-05-041-0/+35
| | | | | | | | | we needed to accept usernames of the form DOMAIN/user, which means we needed to pass the domain to a getpwnam() like routine in certain critical spots. What I'd rather do is get rid of "char *user" everywhere and use the new userdom_struct, but that will have to wait a few days.
* split the username in the vuser structure into a separateAndrew Tridgell2000-05-021-2/+2
| | | | | | | | userdom_struct. As the name implies this also contains a domain (unused at the moment). This will be important shortly, as operation in appliance mode needs the domain to be always carried with the username.
* Moved uglyness needed in fcntl locking (64->32 bit mapping, NFSJeremy Allison2000-05-021-102/+6
| | | | | | | errors etc.) into locking/posix.c, where it is needed. fcntl_lock in lib/util.c is now very small and clean. Added (*lock) op to vfs layer. Jeremy.
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-029-10/+42
| | | | | of doing a system call every time we want to just get our pid. Jeremy.
* - added some error checkingAndrew Tridgell2000-04-301-1/+1
| | | | - removed the VTP hook in smbd
* some cleanupsAndrew Tridgell2000-04-301-10/+13
|
* we don't need fnmatch.c any moreAndrew Tridgell2000-04-302-201/+1
|
* - removed all our old wildcard matching code and replaced it with aAndrew Tridgell2000-04-302-627/+69
| | | | | | | | | | | | | | | | call to ms_fnmatch(). This also removes all the Win9X semantics stuff and a bunch of other associated cruft. - moved the stat cache code into statcache.c - fixed the uint16 alignment requirements of ascii_to_unistr() and unistr_to_ascii() - trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as unicode always (at least thats what NT4 does) - fixed some errors in the in-memory tdb code. Still ugly, but doesn't crash as much
* YIPEE!!!!!Andrew Tridgell2000-04-302-1/+147
| | | | | | | | | | | We finally have a perfect emulation of Microsoft wildcard matching. The routine ms_fnmatch() does wildcard matching with all MS wildcards (including the unicode wildcards), and masktest against a NT4 workstation with hundreds of thousands of random exmaples has not found a single error. amazingly it is only about 60 lines of code, but it has taken us years to get it right. I didn't sleep much last night :)
* moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell2000-04-251-1/+0
|
* Now that fsp's are created on successful file open, the structure memberJeremy Allison2000-04-241-1/+0
| | | | | | | | | | | | fsp->open is no longer needed (if an fsp pointer is valid, then it's open :-). NB for Luke, this patch also did not apply to TNG. TNG is not yet identical w.r.t file serving with HEAD. This makes it impossible for me to help maintain TNG. Please fix asap. lib/substitute.c: Removed unused variable (pidstr). Jeremy.
* moved the INSURE hook into util.cAndrew Tridgell2000-04-241-0/+26
|
* don't close high fd's in smbrun when using insure (prevents closingAndrew Tridgell2000-04-231-1/+3
| | | | error fd)
* split out standard_sub_basic() again to fix a bug where %p was beingAndrew Tridgell2000-04-231-14/+29
| | | | substituted in the loadparm code and thus leaving lpq with no printer
* if using insure then don't close fd 2Andrew Tridgell2000-04-231-1/+4
|
* return NULL for a zero size memdupAndrew Tridgell2000-04-221-0/+1
|
* This is a *big* checkin that may break some things, but implements theJeremy Allison2000-04-221-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new open mechanism Andrew & I discussed. config.sub: configure: Included the QNX patch. include/vfs.h: smbd/vfs-wrap.c: smbd/vfs.c: Added ftruncate vfs call (needed). Note that we will also need locking calls in the vfs (to be added). lib/util_unistr.c: nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump. Also fix for sidsize DOS bug. locking/locking.c: Check value of ret before using it for memdup. printing/printing.c: Convert print_fsp_open to return an allocated fsp. rpc_server/srv_lsa.c: Fix for NT domain logons. I have removed all use of lp_share_modes() from the code (although I left the parameter in the table for backwards compatibility). It no longer makes sense for this to exist. smbd/close.c: Removed lp_share_modes(). smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code. smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail. smbd/nttrans.c: smbd/reply.c: smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. smbd/open.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. In addition I have fixed a long standing race condition in the deny mode processing w.r.t. two smbd's creating a file. Andrew, please note that your original idea of using open with O_EXCL in this case would not work (I went over the races very carefully) and so we must re-check deny modes *after* the open() call returns. This is because there is a race between the open with O_EXCL and the lock of the share mode entry. Imagine the case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL, but is pre-empted before it locks the share modes and creates the deny mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY and a deny mode of DENY_NONE and the two opens would be allowed. The *only* way to fix this race is to lock the share modes after the open and then do the deny mode checks *after* this lock in the case where the file did not originally exist. This code will need extensive testing but seems to initially work. Jeremy.
* split fsusage() into a separate module (to fix linking problems withAndrew Tridgell2000-04-191-0/+149
| | | | spoolssd in tng)
* - got rid of the "passive" optionAndrew Tridgell2000-04-192-77/+54
| | | | - cleaned up the standard_sub_*() calls a lot
* fixed some crash bugs in the nt forms parsingAndrew Tridgell2000-04-181-0/+2
|
* got rid of some more old configure tests and includesAndrew Tridgell2000-04-171-17/+0
|
* moved standard_sub() and friends into a separate moduleAndrew Tridgell2000-04-172-269/+296
|
* converted a couple more functions to use a fd instead of a FILE*Andrew Tridgell2000-04-161-0/+23
| | | | | added a new utility fn file_lines_slashcont() which is used to handle files that treat a \ followed by a newline as a blank
* converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell2000-04-162-99/+105
| | | | | | | 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
* added fdprintf()Andrew Tridgell2000-04-162-2/+34
| | | | | | | this is like fprintf() but operates on a file descriptor combined with file_load_lines() this makes it really easy to get rid of the use of fopen() in Samba.
* the new file_lines_load() and file_lines_free() routines. Very useful!Andrew Tridgell2000-04-161-0/+64
| | | | | | | | | | | | | | | | | | | | | ------------ The following series of commits are for the new tdb based printing backend. This completely replaces our old printing backend. Major changes include: - all print ops are now done in printing/*.c rather than scattered all over the place - system job ids are decoupled from SMB job ids - the lpq parsers don't need to be nearly so smart, they only need to parse the filename, the status and system job id - we can store lots more info about a job, including the full job name - the queue cache control is much better I also added a new utility routine file_lines_load() that loads a text file and parses it into lines. This is used in out lpq parsing and I also want to use it to replace all of our fgets() based code in other places.
* added standard_sub_snum() function for modules that don't haveAndrew Tridgell2000-04-151-1/+8
| | | | a connection structure
* use macros for table boundariesAndrew Tridgell2000-04-151-6/+9
|
* a quick hack to reduce the size of the unicode map table headers fromAndrew Tridgell2000-04-151-9/+39
| | | | | | | 3MB to 250k. I split the table into 3 sections, after noticing that 5/6 of the table was empty.
* use open() not fopen() on codepage files.Andrew Tridgell2000-04-151-7/+7
| | | | | in general we need to get rid of all uses of fopen(). The hard one will be the debug code and dbf.
* Log file check patch from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>.Jeremy Allison2000-04-151-6/+32
| | | | | | | Modified to do checks in timeout processing not in main loop. This (IMHO) is the correct place as (a) we are already root, and (b) it is guarenteed to be called every 200 smb requests. Jeremy.
* use interpret_addr2() instead of inet_aton()Andrew Tridgell2000-04-141-1/+1
|
* Removed "ole locking compat" parameter (no longer used).Jeremy Allison2000-04-121-34/+1
| | | | | | We now get/set/check POSIX locks, but I still need to code up the close fd braindamage... Jeremy.
* Roll back to using static MACHINE.SID after consultation with Andrew. ThisJeremy Allison2000-04-121-288/+0
| | | | | | code will be removed soon and a SID auto-generated from (probably) primary hostname and never stored in a file will replace it. Jeremy.
* include/byteorder.h: ALIGN4/ALIGN2 macros.Jeremy Allison2000-04-111-25/+0
| | | | | | | | | | | | include/includes.h: Added SMB_BIG_UINT_BITS. lib/util.c: Removed align2/align4 - use macros. libsmb/namequery.c: Use ALIGN2. locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Needed to move to hiding POSIX locks at a lower layer. nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros. smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Jeremy.
* add an align4() functionAndrew Tridgell2000-04-111-1/+14
|
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-113-119/+94
| | | | | | | | | | | | | | | | assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed.
* added a cheap and nasty skip_unibuf() fn to allow easier merging fromAndrew Tridgell2000-04-111-0/+10
| | | | | | TNG out unicode string handling functions need a lot of work