summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
1998-04-30Added patch from Bruce Tenison <btenison@dibbs.net> to allow encryptedJeremy Allison3-4/+38
passwords to be stored over time, allowing a smbpasswd file migration. Adds new parameter "update encrypted". Will also add to 1.9.18 branch. Docs update to follow. Jeremy. (This used to be commit 5d3e874d780d595415cc27a7f5945fc2e694c3ac)
1998-04-29Makefile: Added files to smbpasswd.c.Jeremy Allison1-0/+16
loadparm.c: Patch from tim@quiknet.com for static string problems. server.c: Setup global_myname. smbpass.c: Fix up locking. Add machine_password_delete() call. smbpasswd.c: Added provisional code to add to a domain. lib/rpc/client/cli_login.c: Fixed incorrect cred_hash3 call when setting machine password. lib/rpc/server/srv_netlog.c: Fixed incorrect cred_hash3 call when setting machine password. Jeremy. (This used to be commit 6a7164233e3bf9d6bb57c44a53204068e454ae5c)
1998-04-29clientgen.c: Fixed null session setup bug.Jeremy Allison1-5/+13
password.c: Stopped cli_nt_logout call (we don't have it correct yet). Added Luke object-orientation fix :-). smb.h: Added clnt_name_slash to cli_state. lib/rpc/client/cli_login.c: Changed global_myname to clnt_name_slash where needed. lib/rpc/client/cli_netlogon.c: Fixed debug messages, don't check creds on error. lib/rpc/client/cli_pipe.c: Fixed debug messages, Added Luke object-orientation fix. lib/rpc/parse/parse_misc.c: Fixed STRING2 linearization bug that was adding 1. Jeremy. (This used to be commit c6c22df20196cb7f0ae84b1a1dd202a87adb8d4e)
1998-04-29password.c:Luke Leighton1-0/+4
added become_root / unbecome_root around the get machine account password. smbpass.c: cleaning up code. - turning if (BOOL_expr == False) into if (BOOL_expr) what if you test if (BOOL_expr == True) and someone defines True to be -1 on one system and 1 on another? or if you get inconsistent return results between developers - removed if ((FILE*) == 0) and made this if ((FILE*) == NULL) - cannot assume that NULL is zero integer. plus there are typecast issues to deal with - removed return (ret == 0) ? True : False and made this return ret == 0 rely on the compiler to return correct BOOL value: not all developers will return True or False #defines: stick with BOOL test (non-zero). - removed if (ret == False) replaced with if (!ret) - bug where instead of if (sizeof(pstring)-len-len-6 < 0) it had a boolean test if (pstring-len-len-6). - removed "." after debugging of filenames: the "." - a fullstop - looked like it was part of the filename, making things difficult to sort out. still to be resolved: the global_myname isn't set up, such that the machine account password file is named "TEST3..mac". (This used to be commit 315e26c23abf7137684bf084c825ad241076132e)
1998-04-29This is the checkin that adds the security=domain functionality.Jeremy Allison3-29/+78
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 Allison5-28/+26
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-23Makefile: Added nterr.c into the mix.Jeremy Allison1-0/+13
clientgen.c: Added nt_error as an entry in the struct client_state. password.c: Open the netlogon pipe. smb.h: Added nt_error as an entry in the struct client_state. lib/rpc/parse/parse_net.c: Added comments on net logon. lib/rpc/server/srv_netlog.c: Added comments on net logon. Jeremy. (This used to be commit 899a9f0dce50c73e03c8da2ebe920957491c8ad7)
1998-04-23clientgen.c: Added rap error codes to cli_error, moved from smbpasswd.cJeremy Allison1-54/+161
password.c: Changed global cli -> pw_cli, removed strtok (bad strtok, bad :-) use in security=server, started to extend security=domain code. smbpasswd.c: Removed rap error code functions. Jeremy. (This used to be commit 0f00b8fce1a5cad7f8c212568fa33f09986e5bd6)
1998-04-23genrand.c: Changed SMB_PASSWD_FILE to lp_smb_passwd_file().Jeremy Allison2-54/+128
password.c: Started the initial code for domain_client_validate(). All bracketed with #ifdef DOMAIN_CLIENT for now. reply.c: Call to domain_client_validate(). All bracketed with #ifdef DOMAIN_CLIENT for now. smbpass.c: New code to get/set machine passwords. Tidied up nesting of lock calls. Jeremy. (This used to be commit 89fe059a6816f32d2cc5c4c04c4089b60590e7e6)
1998-04-22genrand.c: Improved generation of random values, more secure.Jeremy Allison3-4/+51
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-21put server-side long dce/rpc code in main branch.Luke Leighton1-6/+6
(This used to be commit 2e1a08b28c1c0c9ea988a09067cd149926f25c69)
1998-04-21Added cli_ulogoff() calls to all the exit code paths in security=server.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 78d87a5bfdfc6d3f4428591d30294fe7d05d0f91)
1998-04-21clientgen.c: Added cli_ulogoff() call.Jeremy Allison1-0/+1
password.c: Added call to cli_ulogoff on successfull sessionsetup. Jeremy. (This used to be commit 77882f002b2a8203aad419e485fc885303d999a0)
1998-04-20Added 'passwd chat debug' parameter to allow admins to debug theirJeremy Allison1-6/+4
Samba passwd chat scripts. Jeremy. (This used to be commit 5a995f4f75ffb0d55d6ceaa63a1209d230001991)
1998-04-20Makefile: Added genrand.oJeremy Allison2-0/+12
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-16reply.c: Fix bugs where debug statements were accessing the fd_ptr structJeremy Allison1-6/+6
internals after Andrews' code had memset it to zero (this was causing core dumps). charcnv.c: Fixes for ISO8859-2 from Petr Hubeny <psh@capitol.cz>. Jeremy. (This used to be commit df8783ca76d543d200c743f515a185cfea2880df)
1998-04-15ipc.c: Fix for printer queue spinning with Win95.Jeremy Allison1-1/+2
nmbd.c: Fix for always overwriting log despite append setting. smb.h: Addition of last time password changed entry to account info. smbpass.c: Changes to support last time changed field in smbpasswd file. smbpasswd.c: Changes to support last time changed field in smbpasswd file. util.c: Fix for always overwriting log despite append setting. Jeremy. (This used to be commit eb4fe9ecdf539209efab07dc992447ea7370cf93)
1998-04-14Modified interfaces to getting smb password entries fromJeremy Allison3-8/+8
get_smbpwd_entry (now an internal function to smbpass.c) to a more UNIX-like : getsmbpwnam() - get entry by name. getsmbpwuid() - get entry by uid. Changed the type returned by the smbpasswd enumeration functions to be a void * so that people don't come to depend on it being a FILE *. These abstractions should make it much easier to replace the smbpasswd file with a better backend in future. Other files changed are to match the above changes. Jeremy. (This used to be commit 1161cfb7f2b0d5a6d3e2b524a14a6f325ce70efb)
1998-04-13Fixed aggregate initializer problem for gcc.Jeremy Allison1-1/+1
Jeremy. (This used to be commit e74428e4287cbc1557cc79d4930371cfaf3256d4)
1998-04-13Changes include:Christopher R. Hertel3-415/+700
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 Allison6-87/+84
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-10includes.h: Moved HPUX undefine of SEMMSL to where it actually does something.Jeremy Allison1-0/+3
ipc.c: Added Luke's debug statement. locking_slow.c: Added FTRUNCATE_NEEDS_ROOT code for broken systems that need it (not sure what these are yet). membuffer.c ntdomain.h proto.h lib/rpc/include/rpc_dce.h lib/rpc/include/rpc_srvsvc.h lib/rpc/parse/parse_prs.c lib/rpc/parse/parse_rpc.c lib/rpc/server/srv_pipe_hnd.c lib/rpc/server/srv_util.c: Re-merge of Luke's NTDOM changes 'cos he's a lazy git with carpel tunnel syndrome :-). Jeremy. (This used to be commit 52e3966fbcf7b5fbdbc7cbe9ac0b453ab5bf3217)
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-09Added const cast to struct args to get rid of compile time warning.John Terpstra1-1/+1
(This used to be commit 5d956abb4f4ed22671dfb1c7cb51489ab280463f)
1998-04-08Fix to stop Windows 95 spinning on print queue requests when itJeremy Allison1-1/+1
gets an error message it doesn't understand. Jeremy. (This used to be commit 838e2fe2f76b20f34309c2322e3bd60817fef1fd)
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 Allison2-1/+15
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-27chgpasswd.c, ipc.c, loadparm.c: Added boolean "unix password sync"Jeremy Allison2-19/+60
parameter which allows the new change password code to change the unix password also. Defaults to OFF. includes.h: Added termios.h to FreeBSD to allow password changing. namequery.c: Fixed missing name parameters to debug statements. Jeremy. (This used to be commit 4ac50c0f0aa5af084ddad89b1f9baf6c2c1ddcb8)
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-24clientgen.c ipc.c smbpasswd.c: Fixes for warnings (from Herb).Jeremy Allison2-1/+4
quotas.c: Linux quota fix. util.c: Ensure smb_read_error is zero in all calls that can set it. lib/rpc/include/rpc_misc.h lib/rpc/include/rpc_netlogon.h lib/rpc/parse/parse_misc.c lib/rpc/parse/parse_net.c lib/rpc/server/srv_netlog.c : Modify Luke's code to call SamOEMhash(). Jeremy. (This used to be commit 7f749708383b8b36c3f23a5fbc5cbdf39bc8e555)
1998-03-19Finally made OS/2 WP fix the default.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 7cc7a65dec917071d5df04b711acaf8824f13dd6)
1998-03-19Adding the same changes to HEAD as were added to BRANCH_1_9_18.Jeremy Allison1-5/+24
Changed smbpasswd to be client-server for a normal user, rather than accessing the private/smbpasswd file directly (it still accesses this file directly when run as root, so root can add users/change a users password without knowing the old password). A shakeout of this change is that smbpasswd can now be used to change a users password on a remote NT machine (yep - you heard that one right - we can now change a NT password from UNIX !!!!!). Jeremy. (This used to be commit 20770b6f1c25288e90d3e0d215afa7f0809ce124)
1998-03-18Added SamOEMChangePassword functionality.Jeremy Allison2-0/+174
Jeremy. (This used to be commit e02e3bcbbd4333113dde7bef47763fb229148007)
1998-03-17this isn't a big commit, it just looks like it :-)Andrew Tridgell4-16/+19
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-16Adding the same change as was added to 1.9.18 branch to add theJeremy Allison3-12/+11
"name resolve order" parameter. source/Makefile: Re-ordered link for name resolve order code. source/clientgen.c: source/clientutil.c: Added calls to resolve_name(). source/includes.h: Added HPUX zombie fix. source/loadparm.c: Added new name resolve order parameter. source/namequery.c: Re-wrote to include parsing of lmhosts file, new resolve_name() function requested by John. source/nmbd.c: Tell resolve_name not to do WINS lookups if we are the WINS server. source/nmbd_lmhosts.c: Call lmhosts parsing functions in namequery.c source/password.c: Call resolve_name() to lookup security=server name. source/reply.c: source/time.c: source/trans2.c: "fake directory create times" fix from Jim Hague - hague@research.canon.com.au. source/util.c: Removed isalnum() test in Get_Hostname() that seems to cause problems on many systems. Jeremy. (This used to be commit 7f118970da7c43eaddcf92dc056d3e849f1e7d5c)
1998-03-16includes.h: Addition of NetBSD 1.3 fix, fix for HPUX 9.x, 10.x zombieJeremy Allison1-0/+4
problem. password.c: Fix for Thursby to stop Dave clients failing in share mode security (this was their bug - they were interpreting the uid field in share mode which is explicitly denied by the spec but it's easier for us to fix it than them :-). Jeremy. (This used to be commit 39372d9e20803d32c0c5b87226a72b007978baad)
1998-03-15- claim the null connection after the session request to mak sure weAndrew Tridgell2-4/+4
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 Tridgell2-181/+226
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 Tridgell2-83/+86
including server.o (This used to be commit 67bb8835c76e3efc43de55493971fe2402c0d709)
1998-03-12use FSTYPE_STRING not "SAMBA" for filesystem typeAndrew Tridgell1-1/+1
(This used to be commit df62c80e1d04059905b8a3c5bf9073ba91331e99)
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 Allison2-1/+5
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 Allison6-470/+676
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)