summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
AgeCommit message (Collapse)AuthorFilesLines
1998-04-29This is the checkin that adds the security=domain functionality.Jeremy Allison1-4/+0
WARNING - so far this has only been tested against a Samba PDC (still waiting for IS to add me the machine accounts :-). Still missing is the code in smbpasswd that will add a machine account password and change it on the domain controller, but this is not hard, and I will check it in soon. Jeremy. (This used to be commit 17b94a7084621b3f0106dd4d3386f05cdfc56d19)
1998-04-25This looks like a big change but really isn't.Jeremy Allison1-4/+4
It is changing the global variables "myname" and "myworkgroup" to "global_myname" and "global_myworkgroup" respectively. This is to make it very explicit when we are messing with a global (don't ask - it makes the domain client code much clearer :-). Jeremy. (This used to be commit 866406bfe399cf757c8275093dacd5ce4843afa0)
1998-04-22genrand.c: Improved generation of random values, more secure.Jeremy Allison1-0/+4
loadparm.c: Started add of 'security=domain' code. password.c: Fix for security=server NT bugs. reply.c: Started add of 'security=domain' code. server.c: Started add of 'security=domain' code. smb.h: Started add of 'security=domain' code. Jeremy. (This used to be commit e6bda112ebe0d41f54c4249b5c2e1f24011347e1)
1998-04-20Makefile: Added genrand.oJeremy Allison1-0/+2
clientgen.c: Changed to fill change password buffer with random stuff. password.c: Changed to get challenge from genrand.c server.c: Added #ifdef around O_SYNC. version.h: Changed to 1.9.19prealpha. genrand.c: New code to generate (hopefully) good random numbers for use in crypto challenges/session keys etc. PLEASE REVIEW THIS CODE AND SUGGEST IMPROVEMENTS !!!!!! Jeremy. (This used to be commit 608e98546392fd0aac9b33f4feac43615dbb4405)
1998-04-13Changes include:Christopher R. Hertel1-3/+3
proto.h: The unusual. ;) reply.c: I changes some function names, and updated reply.c to match. See mangle.c below for more. server.c: Changed function names and parameters in file mangle.c, so changed server.c calls to match. See mangle.c below for more. mangle.c: I replaced the caching mechanism used for caching reverse mangled name maps. The old method was a large array of 256-byte strings. Movement in the stack (including push and pop) was done by memcpy()ing whole chunks of memory around. The new system uses the ubi_Cache module which, in turn, uses a splay tree. Entries are dynamically allocated using a minimum amount of memory. Searches are non-linear, which should speed things up a bit, too. Overall, this should save memory and be faster. Other changes: I streamlined the is_mangled() test and made other speed enhancements including replacing some static functions with macros. Added comments, etc. Note: Per an E'mail conversation with Andrew, the 'mangled stack' parameter in smb.conf doesn't do anything anymore. The cache is now set for 16K bytes maximum memory usage. The mangle stack parameter is silently ignored. This can easily be changed, but I'd rather introduce a 'mangled cache memory' parameter and remove 'mangled stack'. Remaining problems: While testing the module, I noticed that something is calling name_map_mangle() twice. The result is that names which contain illegal characters are getting mangled twice. Also, the entire module works by overwriting the input string. This has a variety of nasty side effects. Summary: There's a lot still to be done, but the changes I have in place *should* work in exactly the same way (except for the mangle stack parameter). The rest of the bugs and other issues are separate. Chris -)----- (This used to be commit 8759bec11ba483b2292b0e513b85c98ed5e3e2d4)
1998-04-13Changes to allow Samba to be compiled with -Wstrict-prototypesJeremy Allison1-8/+8
with gcc. (Not a big change although it looks like it :-). Jeremy. (This used to be commit cd2613c57261456485fe4eeecfda209ada70de8e)
1998-04-13fixed a memory leak in close_file(). Each time a file was openedAndrew Tridgell1-1/+7
we leaked memory equal to the length of the filename. (This used to be commit 30a347de74f7f8e2646b1853a9e5914320cee58d)
1998-04-12support O_SYNC at open time in files (previously we only supported itAndrew Tridgell1-0/+4
on individual writes) (This used to be commit ce017a233ba5c68e340e0d31634f9bd93118b20a)
1998-04-10Fix for [homes] problem with security=share. We were still relyingJeremy Allison1-5/+19
on a valid vuid to get the connecting username - this is *never* true (anymore) with security=share. Jeremy. (This used to be commit 5d6f63a7e665ee19bd4508b2b40d497e9851b248)
1998-04-09Makefile, loadparm.c, server.c, smb.h, util.c: Patch fromJeremy Allison1-7/+7
stn@techfak.uni-kiel.de (Stefan Nehlsen) to get homes from the NIS+ map. smbpasswd.c: Tidy up of cli_state structure. Jeremy. (This used to be commit fc2295e0f5729585fdb3ee47edb290851d4071c5)
1998-04-06loadparm.c: Cause IPC$ comment to be evaluated at runtime, rather thanJeremy Allison1-2/+10
load time (patch from "Marty Leisner" <leisner@sdsp.mc.xerox.com>. server.c: Patch from Josef Hinteregger <joehtg@joehtg.co.at> - string could be overwritten when find_service() called recursively. Jeremy. (This used to be commit cf15b3bd74a262e7af3d739a83ef7b43df4935e5)
1998-03-31includes.h: Added semaphore fix for HPUX10.xJeremy Allison1-1/+1
server.c trans2.c: Added oplock deadlock bug fix. lib/rpc/server/srv_netlog.c: Made code that changes machine account password the default. Jeremy. (This used to be commit 3b56fbc11e9d1cb7d4930d9782238c2610cac30d)
1998-03-30Fixed compile-time error introduced by log message change.Jeremy Allison1-8/+19
Added support for 32bit error messages needed for NTDOM code (was in NTDOM branch, somehow missed during the merge). Jeremy. (This used to be commit 188fb28d7be5d466c86a7464f951d08941d0021f)
1998-03-29Added remote machine and address to debug message in make_connection() function.John Terpstra1-1/+1
contributor: <ado@flower.nci.nih.gov> (This used to be commit 7775b0f2aa43ee58f1a4f13004451235cfa157ef)
1998-03-27Fix for client generated core-dump bug where offset to readrawJeremy Allison1-1/+2
was so large that when used with -DUSE_MMAP it caused the unsigned subtraction to wrap aound and become positive - thus causing a silly memcpy offset. Thanks to "Michael St. Laurent" <rowl@earthlink.net> for giving me the core dump that allowed me to track this one down. Jeremy. (This used to be commit c9e066037ab222472085c4a0ecc8a39b337ad2aa)
1998-03-19Finally made OS/2 WP fix the default.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 7cc7a65dec917071d5df04b711acaf8824f13dd6)
1998-03-17this isn't a big commit, it just looks like it :-)Andrew Tridgell1-3/+5
I needed the client_name() and client_addr() functions in swat so I could tell who was connecting from where. The problem was that these functions didn't take a file descriptor parameter they just used the global "Client". So I needed to change all calls to pass a parameter ... lots of files. (This used to be commit a776058900a727591bd7b69debdaa25c0e31d693)
1998-03-15- claim the null connection after the session request to mak sure weAndrew Tridgell1-4/+0
have the netbios name - fix another kill connection bug (This used to be commit c634b799874795d42dae28fb4440ea452dc89b1b)
1998-03-15- added the ability to kill off individual connections from SWAT (fromAndrew Tridgell1-181/+5
the status page) - split the claim_connection() code into its own file - fixed the claim_connection() code to lock the file when manipulating it - always claim a null connection at startup - fixed a bug in the pidfile code (This used to be commit abd4a17e21d12be3d1747e94ceb1915abaf135e3)
1998-03-14added the ability to start/stop the server from SWAT.Andrew Tridgell1-33/+3
I needed to modify the way the pidfile is handled in nmbd and smbd to do this. Jeremy, you may wish to look at what I've done as it probably breaks the Whistle use of pidfiles. In particular I've removed the -f option and instead smbd and nmbd always create a pidfile in the lock directory. (This used to be commit 20bb22d61b986d2036c681fc33db60f2b2b3c1c7)
1998-03-14another makeover of loadparm to support new stuff in swat andAndrew Tridgell1-1/+1
testparm. In particular I added: - ability to optionally save default values of all parameters when calling lp_load(). This can then be used to save only non-default parameters in lp_dump(). This makes the saved smb.conf (and viewed parameters in testparm) much shorter - ability to not load ipc share in lp_load() - separators in parm_table[] so parameters can be grouped logically. - flag to mark parameters that are local but which should be also viewed as global as far as parameters editing is concerned (This used to be commit f9af35da26e58fb0b644b5f0169f1c212230047a)
1998-03-12move setup_groups() into password.c so that swat can link withoutAndrew Tridgell1-83/+0
including server.o (This used to be commit 67bb8835c76e3efc43de55493971fe2402c0d709)
1998-03-12report the max size of raw reads as 65536 not 65535 (this now matchesAndrew Tridgell1-1/+1
what Win95 reports) (This used to be commit a4c6884f43233d57a5f6465f67c4657dd061ae43)
1998-03-11Missed fixes in NTDOM branch for doing readX via pipe IPC$.Jeremy Allison1-1/+1
Allows long share lists to be browsed. Browsing *into* a long share name still fails, though. (Luke - you may need to look into this). Jeremy. (This used to be commit 5299d1b49f2bfd6cf84a687548904206f4a18a41)
1998-03-11"For I have laboured mightily on Luke's code, and hath brokenJeremy Allison1-3/+1
all I saw" - the book of Jeremy, chapter 1 :-). So here is the mega-merge of the NTDOM branch server code. It doesn't include the new client side pieces, we'll look at that later. This should give the same functionality, server wise, as the NTDOM branch does, only merged into the main branch. Any fixes to domain controler functionality should be added to the main branch, not the NTDOM branch. This code compiles without warnings on gcc2.8, but will need further testing before we are sure all the working functionality of the NTDOM server branch has been correctly carried over. I hereby declare the server side of the NTDOM branch dead (and all who sail in her :-). Jeremy. (This used to be commit 118ba4d77a33248e762a2cf843fb7cbc906ee6e7)
1998-03-04Removed broken change I made to mangle.c (ooops. Andrew's originalJeremy Allison1-8/+3
algorithm was correct). Finally (I think) fixed the mangled directory stack issue in scan_directory() correctly. Mangled & non-mangled names are now being checked correctly. Hurrah to Ulrik Dickow <ukd@kampsax.dk> who helped isolate this one. Jeremy. (This used to be commit 37f5f7b557aa59c7eba4a9f2f2f323d7cec62fc7)
1998-03-04Adding Korean and Traditional Chinese codepage support.Jeremy Allison1-0/+4
Jeremy. (This used to be commit 2df47cf1bb3428fbaa8dcf45ec114ec3aaafae57)
1998-02-20nmbd_packets.c: nmbd_subnetdb.c: Patch from Andrey Alekseyev ↵Jeremy Allison1-0/+9
<fetch@muffin.arcadia.spb.ru> to fix the fact that retransmit_or_expire_response_records() wasn't looking at the WINS subnet. server.c: Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution. smbpass.c: Fix to stop parsing failing on non-valid lines. trans2.c: Fix for volume serial number code. util.c: Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution. Fix for warnings under RH5. gcc 2.8. Jeremy. (This used to be commit e58ab3bbe6e939ba678ad5482e58e0191c8dcbcb)
1998-02-12make the initial logfile names consistent. This should mean that smbdAndrew Tridgell1-0/+2
starts with log.smb and nmbd starts with log.nmb. It also gets rid of the "log." when using the log.%m construct as %m expands to smb before a client connects. (This used to be commit b7712a0a6d0afeef6239d5af61cba677eebb247b)
1998-02-11Makefile: Added AIX 3.2.5.Jeremy Allison1-1/+1
loadparm.c: Added "win95 bug compatibility" parameter. local.h: Replaced MAX_OPEN_FILES back to 100 from 10 (oops). reply.c: Fixed ulogoff check against uid - changed to vuid. server.c: Changed file struct save of uid - changed to vuid. smb.h: Changed id in struct current_user to vuid. Changed file struct uid to vuid. time.c: Added "win95 bug compatibility" atime -> mtime return. trans2.c: Added "win95 bug compatibility" fixes. uid.c: Changed id in struct current_user to vuid - added checks to set/reset it. util.c: Added code to expand environment variables. version.h : still at 1.9.18 (head branch doesn't matter too much at present). Jeremy. (This used to be commit adc903bcf59ad1664babd7f1d43675d3a75bfbc9)
1998-02-07A small raft of changes, I will sync up with 1.9.18 also.Jeremy Allison1-3/+5
chgpasswd.c: Fixed typo in debug message. includes.h: Fix include for aix. kanji.c: Added cap_to_sj as inverse of sj_to_cap. loadparm.c: local.h: password.c: Added code for "networkstation user login" parameter. - patch from Rob Nielsen <ran@adc.com>. printing.c: Added further aix printing fixes. reply.c: Changed access time fetch to a function. trans2.c: Changed access time fetch to a function. time.c: Changed access time fetch to a function. server.c: Made NT redirector workaround final. util.c: Added debug for write_socket failing. Jeremy. (This used to be commit a031404623c22d62f8de035be2239f609af08112)
1998-01-31server.c: Added fix where, if all the file entries are beingJeremy Allison1-1/+57
used, smbd tries to break an oplock to make room for another file entry. This works well with Windows 95 that seems to keep batch oplocks around for an arbitrarily long time. Also changed rlimit code to ask for MAX_OPEN_FILES + 10 (if allowed) as many systems use file descriptors for directory handles also. Jeremy. (This used to be commit 1544d5a0f889d42696656fb18d2da1c1f8626b2b)
1998-01-23nmbd.c, server.c: Added #ifndef MEM_MAN around code that sets the SIGUSR1Jeremy Allison1-0/+5
and SIGUSR2 signals. This allows the MEM_MAN code to be compiled in and the memory debug feature to be used with SIGUSR1. Jeremy. (This used to be commit 43ef7e3cb5bb971ff6ddf8230b08995e55b7c6e1)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-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. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1998-01-22printing.c: Bug fix for lpng reporting.Jeremy Allison1-39/+67
server.c: Large fix for oplock deadlock bug. util.c: Fix for oplock deadlock bug. Jeremy. (This used to be commit 4cae830ab3a942b2f2868173a492d02f6332651d)
1998-01-17charcnv.c: Added codepage 866 support onto the file system. PatchJeremy Allison1-0/+7
from Max Khon <max@iclub.nsu.ru>. chgpasswd.c: Allow old RAP change password to work with encrypted passwords. Samba can now allow Windows 95/NT clients to securely change the Lanman password ! (But not the NT hash - that gets lost). ipc.c: smbdes.c: smbpass.c: Support for the above. server.c: #ifdef'ed out fix for NT redirector bug. util.c: Fix NIS bug with server name. Jeremy. (This used to be commit cd9fad92d0316e5a0007ba3c5668906dc2f011f1)
1998-01-16reply.c:Jeremy Allison1-12/+32
server.c: Test fix for NT worstation SMBmv oplock bug. smbdes.c: Addition of 'forward' parameter in preparation of allowing password change. Jeremy. (This used to be commit 0b0b1fb122a52e67a8fdc77d013ad0b3bbb90d19)
1998-01-15reply.c: Added timestamp to attack warning.Jeremy Allison1-0/+2
server.c: Fixed security=share problem where the vuid was still being looked at. Jeremy. (This used to be commit ab8d615fe2004c3ca93dd2978ba988ea89d7fd74)
1998-01-12*** empty log message ***Andrew Tridgell1-6/+10
(This used to be commit 7b031586ca33a381eb0e27f3557f43c2550df5f8)
1998-01-11*** empty log message ***Andrew Tridgell1-0/+5
(This used to be commit 440535a0c755cfb55ced8fe537e2251d6a30714f)
1998-01-11*** empty log message ***Andrew Tridgell1-3/+3
(This used to be commit a307b5155594a12ca978190cc9dec52e203e0fd3)
1998-01-08Fixed an apparent typo:Christopher R. Hertel1-1/+1
2551c2551 < #endif /NO_FORK_DEBUG */ --- > #endif /* NO_FORK_DEBUG */ Chris -)----- (This used to be commit 954fc7e0d01443f4bfc7157f2dcba2187f6700ec)
1998-01-07Ensure that if we are in share mode security that the smb_uidJeremy Allison1-1/+2
field is invalid. Jeremy. (This used to be commit a689ca1ce5c3ffdc753dce329f51a8ede0592f29)
1997-12-24Added SIGUSR1/SIGUSR2 handling.Jeremy Allison1-1/+12
Sending nmbd/smbd a SIGUSR1 will raise the debug level by one (capped at 10) sending a SIGUSR2 will lower it (lower limit at zero). Jeremy. (This used to be commit 6a3cb6f4b46129e4d799a24d34cdb9460ed8910f)
1997-12-23Fixed nastly little bug where client was sending open_and_X callJeremy Allison1-4/+23
with smb_mode (smb_vwv[3]) of 0x20 == DENY_WRITE + read-only-open. and smb_ofun (smb_vwv[8]) of 0x11 == Create if not exist plus append on a read-only share. This was mapped into the strange unix flags of (O_RDONLY|O_CREAT) - essentially O_CREAT as O_RDONLY == 0. We were checking the unix flags directly against O_RDONLY instead of masking off the open mode flag bits before doing the comparison, so this open was being refused even though it was valid on a read-only share. Also ensured that the O_CREAT bit was masked out of the flags bit if the open was done on a read-only share (as doing a unix open( filename, O_RDONLY|O_CREAT, xxx) will create a zero length file if the user had permission to write into the directory - which should be denied on a read-only share. Thanks to Mark Peek @ Whistle for giving me this test case. Jeremy. (This used to be commit eae921ac632c8297836b85e909903da0602eac0e)
1997-12-20loadparm.c: Added fix for veto oplock files bug from Charles Hoch ↵Jeremy Allison1-0/+9
<hoch@hplcgh.hpl.hp.com> server.c, util.c: Added fix for oplock break requests blocking due to server being blocked in read call. Bug found by Charles Hoch <hoch@hplcgh.hpl.hp.com>. Jeremy. (This used to be commit 209f894fdbcfbf7a7952b6228342b86e088a9582)
1997-12-14give out file handles differently on each new connection because of aAndrew Tridgell1-10/+29
common bug in MS clients where they try to reuse a file descriptor from an earlier smb connection. This code increases the chance that the errant client will get an error rather than causing corruption (This used to be commit 677d7a5a13728d8207dd2e7092c98d026d2d4f3c)
1997-12-12Fixed bug reported by Gert-Jan Vons <Gert-Jan.Vons@ocegr.fr>Jeremy Allison1-0/+12
with doing a dir /s into a unix directory ending in a ':'. Jeremy. (This used to be commit 273978b7d72955efcc0e0d9e87438b45f51c163d)
1997-12-02changing the comment in find_new_file() to say why a base of 1 is usedAndrew Tridgell1-2/+1
(This used to be commit 2b0f3fd14908411472be032ad09144cb71c55479)
1997-12-02asyncdns.c: Removed warning when compiling with -DSYNC_DNS.Jeremy Allison1-1/+3
nameelect.c: Tidied up settings of work->ServerType when unbecoming things. nmbd.c: Fixed pidFile warning. server.c: Fixed pidFile warning. Jeremy. (This used to be commit 94d53dcac5d06e48be5cea9d54625da795f62d20)