summaryrefslogtreecommitdiffstats
path: root/source/smbd
Commit message (Collapse)AuthorAgeFilesLines
...
* nttrans.c: More code towards NT protocol.Jeremy Allison1998-06-301-13/+91
| | | | | | smb.h: More code towards NT protocol. time.c: Fix for sco bug. Jeremy.
* Added SSL support from Christian Starkjohann <cs@obdev.at>Jeremy Allison1998-06-162-0/+291
| | | | | | | This patch may not yet compile with -DUSE_SSL enabled, further Makefile changes may be needed. But it was important to get this code in place before I go off to USENIX. Jeremy.
* client.c: Made -L do a null-session share unless -U user is specified.Jeremy Allison1998-06-151-0/+34
| | | | | | clientutil.c: Fixed NT session to add NT password. groupname.c: Added lookup function. Jeremy.
* Makefile:Jeremy Allison1998-06-151-8/+20
| | | | | | | smbumount.c: Added fixes to compile under Linux. includes.h: Added SunOS 4.x QSORT_CAST fix. reply.c: Fixed user name mapping function for security=server, security=domain. Jeremy.
* Makefile: Added ubi_sLinkList.o as the groupname.o file needs it. Added ↵Jeremy Allison1998-06-131-1/+1
| | | | | | | | | | | | | | | groupname.o includes.h: Added ubi_sLinkList.h include. loadparm.c: Added groupname map parameter. password.c: Fix HPUX big_crypt. username.c: New user_in_list() code. Moved groupname map code to groupname.c lib/rpc/server/srv_util.c: Added lookup_wellknown_sid_from_name(). New groupname map stuff. Note that nothing currently uses this but at compiles ok. Jeremy.
* Groupname mapping code now lives here.Jeremy Allison1998-06-131-0/+204
| | | | Jeremy.
* ipc.c: map_username is now a BOOL function.Jeremy Allison1998-06-123-33/+47
| | | | | | | | | | | reply.c: map_username is now a BOOL function. server.c: Added capability to do map_username on service names when looking for a home directory. That's what the original code would do. lib/rpc/server/srv_util.c: Changed domain_ to builtin_ for BUILTIN aliases. username.c: Work in progress on groupname map parameter. Jeremy
* Minor changes as I've now discovered gcc -pedantic-errors. ThisJeremy Allison1998-06-101-2/+1
| | | | | does the signed/unsigned warnings I've been missing. Jeremy
* De-coupled the mapping of a Windows to UNIX username from the Get_PwnamJeremy Allison1998-06-102-3/+64
| | | | | | | | | | | | username case conversion wrapper. It is now (very) explicit where we are mapping between an incoming Windows username, and when we are doing a UNIX password entry lookup, which may change the case of the given username. This makes things *much* clearer (IMHO:-) and will ease the adding of the 'groupname map' parameter, and the addition of the special 'jeremy' mode for Samba where unix users will not be needed. (We must think of a better name for it :-). Jeremy.
* client.c: Allowed client to proceed even if it gets error 234 (more dataJeremy Allison1998-06-041-6/+5
| | | | | | | available) when scanning server/workgroup/share lists. ipc.c: Removed redundent definition of ERROR_MORE_DATA (234) we already have ERRmoredata in smb.h Jeremy.
* ipc.c: Fix bug where we don't return the correct error code when clientJeremy Allison1998-06-032-91/+270
| | | | | | | | | | gives a too-small buffer for share info. Fix from Gil Kloepfer <gil@arlut.utexas.edu> smb.h: server.c: Fix for a nastly little security problem with multi-user Windows NT servers and Samba where the contents of the open-file cache can end up being served out to users who shouldn't have access. This is some *seriously* ugly code. Jeremy.
* loadparm.c: Added machine password timeout parameter - set to 7 days be default.Jeremy Allison1998-05-272-4/+52
| | | | | | | | | password.c: Added code to tell server.c when machine password needs changing. server.c: Change machine password in idle cycles if it needs it. smbpassfile.c: Fixed up length calculations for machine password file. smbpasswd.c: Moved domain joining code/machine password changing code. lib/rpc/client/cli_netlogon.c: And this is where it now lives. Jeremy.
* smb.h: More NT SMB stuff (just defines).Jeremy Allison1998-05-261-2/+10
| | | | | | | | | | | smbpass.c: Do *NOT* make this function static. It breaks the compile on gcc util.c: Getting closer to MS wildcard semantics. A trailing '*' matches any trailing dot-separated components. trans2.c: Removed hacks that change multiple '?' -> '*' as this breaks things now. trans2.h: Removed NT_FILE_ATTRIBUTE_NORMAL - now FILE_ATTRIBUTE_NORMAL is defined in smb.h. Jeremy.
* I've put the ubiqx headers back into includes.h, and removed them fromChristopher R. Hertel1998-05-222-2/+0
| | | | | | | | | dir.c & mangle.c. This was possible after I checked the tree code to make sure that the tree code did not reference functions by macro name. Also, note that the AVL module has been removed to prevent conflict with the SplayTree macro defines. Chris -)-----
* Removed all ubiqx includes from includes.h. So far, this was only a problemChristopher R. Hertel1998-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | for dir.h, which I've fixed. Andrew did not add includes.h to the ubiqx headers, which is good because it would cause internal conflicts within the ubiqx tree modules. It's also bad because the definitions and includes that are part of includes.h are now in the ubiqx C files, but not in the header files. So, if includes.h were to redefine int, for example, the new definition would be in the ubiqx C files, but not in the headers. So, until Andrew and I can work something out that we both agree upon, there are three basic rules: 1) Don't include includes.h in the ubiqx headers. Problems may arise. 2) The ubiqx headers must follow includes.h in any Samba module that uses them. This can and should all be worked out. We just have to talk about it. Chris -)-----
* Fixed 'revalidate' parameter so it's only considered in security=shareJeremy Allison1998-05-211-29/+29
| | | | | mode. Jeremy.
* printing.c: Fixed overflow by one problem in LPRng.Jeremy Allison1998-05-211-15/+17
| | | | | | | | reply.c: Fixed password length modifiers to always be done is none-encrypted mode used. This fixes Samba for people who are using non-encrypted passwords with security=server. Jeremy.
* Fixed incorrect last arg to safe_strcpy in new wildcard code.Jeremy Allison1998-05-201-1/+1
| | | | Jeremy.
* Minor tweak for wcard compatibility paranoia.Jeremy Allison1998-05-201-1/+1
| | | | Jeremy.
* Fixed Samba's wildcard algorithm to be *exactly* the sameJeremy Allison1998-05-201-1/+10
| | | | | | as NT. You do not want to know how this code works :-). Jeremy
* Abstracted all the crappy password interfaces through an indirectJeremy Allison1998-05-181-0/+3
| | | | | | | | function table, selectable at compile time. This should make the code that implements all the password functions much cleaner, as it's now very clear exactly what a particular password database needs to provide to Samba. Jeremy.
* chgpasswd.c: Changed back to getsmb... from getsam...Jeremy Allison1998-05-184-52/+179
| | | | | | | | | | | | | | | | | | | | ldap.c: Stoped dummy_function being prototyped. loadparm.c: Fixed slprintf sizes. nisppass.c: Fixed safe_strcpy sizes. nmbd_processlogon.c: Changed back to getsmb... from getsam... nttrans.c: Just a dump of new code. passdb.c: Moved stuff around a lot - stopped any lookups by rid. This needs to be indirected through a function table (soon). password.c: Changed back to getsmb... from getsam... reply.c: Changed back to getsmb... from getsam... slprintf.c: Fixed prototype problems. smb.h: Fixed prototype problems. smbpass.c: Changed to getsmbfile.... smbpasswd.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_netlog.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_samr.c: Fixed rid lookup - use uid or gid lookup. lib/rpc/server/srv_util.c: Changed back to getsmb... from getsam... Jeremy.
* resolving compilation errorsLuke Leighton1998-05-181-1/+1
|
* passdb.cJeremy Allison1998-05-141-181/+2
| | | | | | | | | | server.c: Moved generate_machine_sid() into passdb.c for Jean-Francois (who might want an LDAP version). Changed locking to free exclusive lock as soon as possible to prevent contention. lib/rpc/parse/parse_samr.c lib/rpc/server/srv_samr.c: Changed last SID-as-string manipulation function to use DOM_SID structure. Jeremy.
* namequery.c: Fixed SGI IRIX 5.x compiler problem.Jeremy Allison1998-05-141-2/+191
| | | | | | server.c: Added MACHINE.SID file generation - use lp_domain_sid() be default. smbpass.c: Exposed do_file_lock() as I now use it in server.c Jeremy.
* chgpasswd.c: Added comments to #ifdefsJeremy Allison1998-05-142-4/+5
| | | | | | | | | | | | | | | | | | | | | ipc.c: Caused samba password changing not to be done if UNIX password changing requested and not successful. util.c: Added string_to_sid() and sid_to_string() functions. lib/rpc/client/cli_samr.c: lib/rpc/include/rpc_misc.h: lib/rpc/parse/parse_lsa.c: lib/rpc/parse/parse_misc.c: lib/rpc/parse/parse_net.c: lib/rpc/parse/parse_samr.c: lib/rpc/server/srv_lsa.c: lib/rpc/server/srv_lsa_hnd.c: lib/rpc/server/srv_netlog.c: lib/rpc/server/srv_samr.c: lib/rpc/server/srv_util.c: Changes so that instead of passing SIDs around as char *, they are converted to DOM_SID at the earliest opportunity, and passed around as that. Also added dynamic memory allocation of group sids. Preparing to auto-generate machine sid. Jeremy.
* This is a security audit change of the main source.Jeremy Allison1998-05-1211-193/+193
| | | | | | | | | | | | | | | | | | It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy.
* reply.c: Added code to not overwrite sesssetup_user when in share level securityJeremy Allison1998-05-111-1/+8
| | | | | | | and null session setup done. smbpasswd.c: Fix from Gerald Carter <cartegw@Eng.Auburn.EDU> to fix incorrect use of pointer. Jeremy.
* ldap back-end database developmentLuke Leighton1998-05-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile: created PASSBD_OBJ group includes.h: added #ifdef USE_LDAP to #include <ldap> headers ldap.c: - renamed "_machine" to "_trust" everywhere. - added sam_passwd support routines - removed get_ldappwd_entry function: replaced with get_sampwd_entry - removed getldappwnam/uid: replaced with getsampwnam/uid - other messing about bits which are probably going to annoy the hell out of jean-francois (sorry!) mkproto.awk: - added stuff to wrap ldap.c protos with #ifdef USE_LDAP - added uid_t and gid_t return results to the prototype generation passdb.c: - created getsam21pwent, add_sam21pwd_entry, mod_sam21pwd_entry. - modified getsampwnam/uid and created getsam21pwnam/rid functions to replace the local get_smbpwd_entry() and get_ldappwd_entry() functions, which jeremy didn't like anyway because they were dual-purpose. - added utility routines which are or may be useful to all the password database routines. password.c: - renamed "machine_" to "trust_" everywhere. smbpass.c: - removed get_smbpwd_entry function: replaced it with get_sampwd_entry functions in passdb.c - moved code that decoded acct_ctrl into passdb.c - moved encode_acct_ctrl into passdb.c - removed getsmbpwnam/uid: replaced with getsampwnam/uid - renamed "machine_" to "trust_" everywhere. smbpasswd.c: - renamed "machine_" to "trust_" everywhere. util.c: - moved gethexpwd function into passdb.c lib/rpc/server/srv_util.c: - moved user_rid_to_uid, group_rid_to_rid etc etc into passdb.c
* changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1998-05-116-20/+20
| | | | | | | everywhere. I've implemented slprintf() as a bounds checked sprintf() using mprotect() and a non-writeable page. This should prevent any sprintf based security holes.
* Updated OSF1_ENH_SEC mode password handling.John Terpstra1998-05-101-1/+8
| | | | | | This now tries Enhanced passwords first and if this fails trys Basic mode (ie: Unix /etc/passwd) authentication. This only happens when OSF1_ENH_SEC is defined at compilation.
* clitar.c: #ifdef'ed out all the bits that were giving 'defined but not used'Jeremy Allison1998-05-081-4/+17
| | | | | | | | | messages. nttrans.c: More updates. smb.h: Removed stuff that didn't belong in the smb_passwd struct. Persuaded Luke to use a new structure. web/swat.c: Fixed gcc complaints about shadowing global 'string'. Jeremy.
* smb.h: Supporting defines for NT trans calls.Jeremy Allison1998-05-081-4/+8
| | | | | trans2.c: Paranoia bugfixes added when studying nttrans.c. Jeremy.
* Initial cut at the code that will do NT SMB calls. Not linked in, notJeremy Allison1998-05-081-0/+225
| | | | | compiled yet, just checked in for safe keeping :-). Jeremy.
* This should (hopefully :-) be the final fix for the %U %G substitutionJeremy Allison1998-05-074-34/+34
| | | | | | | problem.... smbpass.c: Removed Luke's dire warning - as some of the functions in here *need* to be called externally :-). Jeremy.
* created "passdb.c" which is an interface point to (at present) eitherLuke Leighton1998-05-074-58/+58
| | | | | | | | | smbpasswd or ldap passwd, at compile-time (-DUSE_LDAP). _none_ of the functions in ldap.c or smbpass.c should be called directly: only those in passdb.c should be used. -DUSE_LDAP is unlikely to compile at the moment.
* Andrew redefines the free() function to do some memory management testing.Christopher R. Hertel1998-05-061-1/+19
| | | | | | | He also suggested that some systems may implement free() as a macro (but I think he was looking for an excuse ;). Anyway, I've added a function to mangle.c that calls free(). Chris -)-----
* smbpass.c: Fixed machine_passwd_lock() problems.Jeremy Allison1998-05-061-5/+4
| | | | | | password.c: Fixed machine_passwd_lock() problems. lib/rpc/server/srv_ldap_helpers.c: Oops - broke proto.h with dummy function. Fixed now. Jeremy.
* loadparm.c: Added #ifdef USE_LDAP around ldap code.Jeremy Allison1998-05-061-7/+16
| | | | | | | | | | | | | server.c: Moved %U, %G and %N into standard_sub() from standard_sub_basic() as only smbd knows about usernames. Also fixes problem with calling standard_sub_basic() from loadparm.c. smbpass.c: Partial tidyup of machine_password_lock() code - not finished yet. util.c: Moved %U, %G and %N into standard_sub() from standard_sub_basic() as only smbd knows about usernames. Also fixes problem with calling standard_sub_basic() from loadparm.c. lib/rpc/server/srv_ldap_helpers.c: Added #ifdef USE_LDAP around ldap code. lib/rpc/server/srv_samr.c: Added #ifdef USE_LDAP around ldap code. Jeremy.
* Fixes for the %U and %G problems people have reported.Jeremy Allison1998-05-066-18/+30
| | | | | | | | | | | | | | | | | | Essentially, multiple session_setup_and_X's may be done to an smbd. As there is only one global variable containing the requested connection name (sessionsetup_user), then any subsequent sessionsetups overwrite this name (causing %U and %G to get the wrong name). This is particularly common when an NT client does a null session setup to get a browse list after the user has connected, but before a share has been mounted. These changes store the requested_name in the vuid structure (so this only really works for user level and above security) and copies this name back into the global variable before the standard_sub call. Jeremy.
* genrand.c: SGI compile warning fix.Jeremy Allison1998-05-054-17/+18
| | | | | | | | | | | | | | ipc.c: Fix for duplicate printer names being long. loadparm.c: Set bNetWkstaUserLogon to false by default - new code in password.c protects us. nmbd_logonnames.c: nmbd_namequery.c: nmbd_namerelease.c: Debug messages fix. password.c: SGI compile warning fix, fix for tcon() with bNetWkstaUserLogon call. reply.c: SGI compile warning fix. server.c Debug messages fix. smbpass.c: Fix for incorrect pointer. Jeremy.
* Added patch from Bruce Tenison <btenison@dibbs.net> to allow encryptedJeremy Allison1998-04-303-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.
* Makefile: Added files to smbpasswd.c.Jeremy Allison1998-04-291-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.
* clientgen.c: Fixed null session setup bug.Jeremy Allison1998-04-291-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.
* password.c:Luke Leighton1998-04-291-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 is the checkin that adds the security=domain functionality.Jeremy Allison1998-04-293-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 looks like a big change but really isn't.Jeremy Allison1998-04-255-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.
* Makefile: Added nterr.c into the mix.Jeremy Allison1998-04-231-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.
* clientgen.c: Added rap error codes to cli_error, moved from smbpasswd.cJeremy Allison1998-04-231-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.
* genrand.c: Changed SMB_PASSWD_FILE to lp_smb_passwd_file().Jeremy Allison1998-04-232-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.