summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2000-06-09clean up oplock capability code ready for Linux codeAndrew Tridgell2-13/+20
(This used to be commit 70dcc791b45ac64fc536ef449e4e6b53b2b68fd4)
2000-06-08added se_access_check.Luke Leighton2-0/+281
(This used to be commit 6de329f6bf9c26e132869cf43d4976d4881e285c)
2000-06-01Getting back to a compilable state (not there yet but close).Jeremy Allison1-1/+1
Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy. (This used to be commit c2099cfb033c2cdb6035f4f7f50ce21b98e1584d)
2000-05-31The functionality in this file has been moved into smbd/unix_acls.c in orderJeremy Allison1-679/+0
to make the acl functionality regular (we can have smbd/posix_acls etc). Jeremy. (This used to be commit 9adb9399df27c5c1d7fec04f80d49e5476200738)
2000-05-29Fixed LsaQueryInformationPolicy level 3 to return primary domain info.Matthew Chapman1-9/+12
Domain SID is saved in secrets.tdb upon joining domain. Added "Authenticated Users" and "SYSTEM" well-known SIDs (under NT Authority). (This used to be commit 7710b4f48d3e8532df5e37f99a779758f750efdb)
2000-05-29don't return a passwd struct for usernames that don'tAndrew Tridgell1-2/+12
belong to us (This used to be commit 2740a80e30cbf512d51ba76684905a904c2fddf7)
2000-05-27getting and setting security descriptors on printers now worksAndrew Tridgell1-0/+2
this needed some fixes in tdb_unpack(). Tim, you'll need to update (This used to be commit 9422719ab4c35e4ce3199b62dd632433bf391283)
2000-05-27prs_give_memory in wrong place, also poss. was losing mem.Luke Leighton1-2/+2
(This used to be commit 9805e17cd0ce427c329a8b5a8318d5f75227e283)
2000-05-27unistr_to_dos not unistr_to_asciiLuke Leighton1-0/+22
(This used to be commit f46c4fe876a0cabe7044ca30c17e6c217d618635)
2000-05-27fixed nttrans.cLuke Leighton2-1/+680
(This used to be commit 06cd46b0ec10b32af54edd8256d2fdbec45e1371)
2000-05-17Changed name of case_sensitive in mask_match to avaid gcc "shadow global"Jeremy Allison1-4/+2
warning. Jeremy. (This used to be commit 36629d2a934fe61e68f87c5d2faf67158b365ae6)
2000-05-12Added unicode_to_dos_char() function to address converting single UNICODEJeremy Allison1-0/+22
characters to one or more DOS codepage characters. Jeremy. (This used to be commit eefbfb5e16fcf40f335edc840a49f837f6b64111)
2000-05-12use "winbind separator" option for domain/user separator characterAndrew Tridgell1-14/+0
(This used to be commit 6cbb826b154e61085fd651116caf472d4d438c1d)
2000-05-10lib/util_unistr.c:Jeremy Allison1-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. (This used to be commit 1ed146467e764e6a81d8f78cd58fb5765ebf5d21)
2000-05-10- changed smb_getpwnam() to use winbind style usernamesAndrew Tridgell1-7/+6
- finished ntdom -> winbind rename in head (This used to be commit ada483cb56453afc6df4ec4be18bfe5e943c7150)
2000-05-10more merging voodooAndrew Tridgell1-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 (This used to be commit 92109d7b3c06f240452d39f669ecb8c9c86ab610)
2000-05-08Fix for VMS platforms from "John E. Malmberg" <wb8tyw@qsl.net>Jeremy Allison1-0/+2
Jeremy. (This used to be commit eb281324fa409296bb3f29c9b7c59b2337fadc0d)
2000-05-04a minimal change to get appliance mode to work with winbinddAndrew Tridgell1-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. (This used to be commit 8b7a10febead8be182e7d5b1d68259e31530b69c)
2000-05-02split the username in the vuser structure into a separateAndrew Tridgell1-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. (This used to be commit ee8546342d5be90e730372b985710d764564b124)
2000-05-02Moved uglyness needed in fcntl locking (64->32 bit mapping, NFSJeremy Allison1-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. (This used to be commit 46092ee1410faa4e3c143d80a960a8adaa19d7fc)
2000-05-02Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison9-10/+42
of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
2000-04-30 - added some error checkingAndrew Tridgell1-1/+1
- removed the VTP hook in smbd (This used to be commit 09355fcd50e6c9c0c81e5f70ab9b7ff88aa897bf)
2000-04-30some cleanupsAndrew Tridgell1-10/+13
(This used to be commit 95f6c0f84ab9f3649ddf53ac2ca5261448af2383)
2000-04-30we don't need fnmatch.c any moreAndrew Tridgell2-201/+1
(This used to be commit e23f43e7d3d2a068f527baa63a31f7fe4e60e79d)
2000-04-30- removed all our old wildcard matching code and replaced it with aAndrew Tridgell2-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 (This used to be commit 03e9cea004bbba72161a5323cf3b4556c94aed8e)
2000-04-30YIPEE!!!!!Andrew Tridgell2-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 :) (This used to be commit cc9e007cdfdd300189f89e2a55e4234e47fa842d)
2000-04-25moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell1-1/+0
(This used to be commit d7cd7c88fdabb01d9e40ae8a657737907a21ac37)
2000-04-24Now that fsp's are created on successful file open, the structure memberJeremy Allison1-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. (This used to be commit 389b700a26e8a308a0dff6fc038c38068aa0119a)
2000-04-24moved the INSURE hook into util.cAndrew Tridgell1-0/+26
(This used to be commit 8c726b9764bac0bc95cf9877e172c9e1262e576d)
2000-04-23don't close high fd's in smbrun when using insure (prevents closingAndrew Tridgell1-1/+3
error fd) (This used to be commit defbedd198f02f7bb9af70436f5a25ab754b5fb6)
2000-04-23split out standard_sub_basic() again to fix a bug where %p was beingAndrew Tridgell1-14/+29
substituted in the loadparm code and thus leaving lpq with no printer (This used to be commit b7c7a4d564d36885aa7c3efb2a87caec470df7fe)
2000-04-23if using insure then don't close fd 2Andrew Tridgell1-1/+4
(This used to be commit 1c6322473afcf9065fa25777d1b0627f133af3f6)
2000-04-22return NULL for a zero size memdupAndrew Tridgell1-0/+1
(This used to be commit 9416b58b9c2ff898cdae2cb81ab1e150ef9f0e89)
2000-04-22This is a *big* checkin that may break some things, but implements theJeremy Allison1-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. (This used to be commit ab0ecc39d688f16b9692fe90b991f0b89287070a)
2000-04-19split fsusage() into a separate module (to fix linking problems withAndrew Tridgell1-0/+149
spoolssd in tng) (This used to be commit e2eacdd74c369fbbcd118148149321e36f3d0010)
2000-04-19- got rid of the "passive" optionAndrew Tridgell2-77/+54
- cleaned up the standard_sub_*() calls a lot (This used to be commit 2c2d95d77d3667eaa9252506a82b9054b0d0e01c)
2000-04-18fixed some crash bugs in the nt forms parsingAndrew Tridgell1-0/+2
(This used to be commit e505a6ddf3df37ca485cae117c53fa96d736f897)
2000-04-17got rid of some more old configure tests and includesAndrew Tridgell1-17/+0
(This used to be commit f137648504362479143d50477fa38ebf7147968b)
2000-04-17moved standard_sub() and friends into a separate moduleAndrew Tridgell2-269/+296
(This used to be commit 030ec8e71f9ef533b5d6aece01e67d357e23b7d2)
2000-04-16converted a couple more functions to use a fd instead of a FILE*Andrew Tridgell1-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 (This used to be commit 384ecd9d66ccd31ee85000c0ca55d413d8f2cc53)
2000-04-16converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell2-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 (This used to be commit a09470817c5b21dba42f9ef4ce5e8b768a254c0b)
2000-04-16added fdprintf()Andrew Tridgell2-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. (This used to be commit bd5cd502bf52164b95d7bfc026189e04988171db)
2000-04-16the new file_lines_load() and file_lines_free() routines. Very useful!Andrew Tridgell1-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. (This used to be commit be1e98b3f7a6007d2c9ac8e079724cb264e0dd3a)
2000-04-15added standard_sub_snum() function for modules that don't haveAndrew Tridgell1-1/+8
a connection structure (This used to be commit f35fe3b4a175161128341fe30a61437c560180d1)
2000-04-15use macros for table boundariesAndrew Tridgell1-6/+9
(This used to be commit a82a5acff2ad2120f5480f0cb08550e95d80c59e)
2000-04-15a quick hack to reduce the size of the unicode map table headers fromAndrew Tridgell1-9/+39
3MB to 250k. I split the table into 3 sections, after noticing that 5/6 of the table was empty. (This used to be commit c1496736bbdb7f6bf1eb43a54f883e5f41a4d39e)
2000-04-15use open() not fopen() on codepage files.Andrew Tridgell1-7/+7
in general we need to get rid of all uses of fopen(). The hard one will be the debug code and dbf. (This used to be commit 3992a5169c0b3805c38729c3856c41b1b2527765)
2000-04-15Log file check patch from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>.Jeremy Allison1-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. (This used to be commit c3794fd29fdc4e5a0dbd725cdc24fe210934caf2)
2000-04-14use interpret_addr2() instead of inet_aton()Andrew Tridgell1-1/+1
(This used to be commit f65c6ec6db8e05685c719e23d7b06b3452fbbb4e)
2000-04-12Removed "ole locking compat" parameter (no longer used).Jeremy Allison1-34/+1
We now get/set/check POSIX locks, but I still need to code up the close fd braindamage... Jeremy. (This used to be commit 3de058bd43976853b0ed2b6b5529e2a3a08909eb)