summaryrefslogtreecommitdiffstats
path: root/source/include
Commit message (Collapse)AuthorAgeFilesLines
...
* removed references to some of the smb_passwd routines from ldap and nis+Luke Leighton1998-05-181-6/+5
| | | | code, use pdb_sam_to_smb(...sam21...) calls instead. this is a lot simpler.
* creating and using some pdb_init_(sam/smb) routines. putting ldap headersLuke Leighton1998-05-181-0/+4
| | | | | back in (they had been taken out of includes.h because they are only local to ldap.c.
* resolving compilation errorsLuke Leighton1998-05-181-1/+0
|
* received update from jean francois for ldap.c: he is doing add / modLuke Leighton1998-05-181-4/+10
| | | | functions
* Makefile:Luke Leighton1998-05-183-23/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - added nisppass.c and NISPLUS_FLAGS includes.h: - renamed USE_LDAP to USE_LDAP_DB. renamed NISPLUS to USE_NISPLUS_DB. added default define of USE_SMBPASS_DB. - removed ldap headers: they are local only to ldap.c ldap.c : - made all ldap-specific functions static. - added dummy sam21 functions loadparm.c : - renamed NISPLUS to NISPLUS_HOME mkproto.awk - commented out ldap-specific #ifdef generation code: it's not needed now that ldap-specific functions in ldap.c are static nisppass.c : - first attempt at an add function from
* passdb.cJeremy Allison1998-05-141-1/+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.
* robert frank - some Next3 compilation errors detected.Luke Leighton1998-05-141-1/+1
|
* namequery.c: Fixed SGI IRIX 5.x compiler problem.Jeremy Allison1998-05-141-0/+1
| | | | | | 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-11/+13
| | | | | | | | | | | | | | | | | | | | | 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.
* Fixed up HPUX entry.Jeremy Allison1998-05-131-2/+4
| | | | Jeremy.
* we don't need a typedef for stringAndrew Tridgell1998-05-131-2/+0
|
* includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don'tJeremy Allison1998-05-122-6/+3
| | | | | | | | | | have vsnprintf. locking_slow.c: slight tidy. make_smbcodepage.c: Use safe_strcpy instead of pstrcpy. nmbd_winsserver.c: Use pstrcpy instead of fstrcpy. smbmount.c: Fixed reported bug. util.c: Removed old fstrcpy/fstrcat functions. Jeremy.
* removed lp_domain_workstation() parameterLuke Leighton1998-05-121-6/+0
|
* This is a security audit change of the main source.Jeremy Allison1998-05-123-7/+32
| | | | | | | | | | | | | | | | | | 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.
* add lp_domain_workstations() parameter. this is a list of workstation namesLuke Leighton1998-05-111-0/+3
| | | | | | from which an NT user can log in from. empty (default) indicates no restrictions. exactly how this is enforced is unknown. from past experience it's likely that the enforcement is left to the client to carry out...
* ldap back-end database developmentLuke Leighton1998-05-112-20/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-0/+6
| | | | | | | 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.
* added sam_passwd structure: don't want smb_passwd to be "polluted".Luke Leighton1998-05-081-6/+50
|
* clitar.c: #ifdef'ed out all the bits that were giving 'defined but not used'Jeremy Allison1998-05-081-39/+6
| | | | | | | | | 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.
* Ho hum, someone deleted proto.h from cvs... re-adding.Jeremy Allison1998-05-081-0/+2070
| | | | Jeremy.
* proto.h was being a pain. use "make proto" instead. check release andLuke Leighton1998-05-081-2070/+0
| | | | | release-alpha scripts operate correctly when it comes to generating a release or alpha release.
* added smb_grpid to smb_passwd structLuke Leighton1998-05-081-0/+1
|
* Se-submitting clitar.c/Richard Sharpe1998-05-081-5/+3
| | | | | | | | I now only have one warning in my code which is the result of some code I have started working on but am not yet using in the code, along with a warning that is caused by one of the include files (a nested comment). I used -Wall -Wshadow -Wstrict-prototypes
* added extra fields to struct smb_passwdLuke Leighton1998-05-081-7/+37
| | | | | | | | | the smbpw functions are expected to fill in the blanks by reading the appropriate smb.conf parameters. the ldappw functions are expected to fill in the fields from the ldap database. a separate utility can be written to fill in the ldap database fields from the smb.conf parameters, at a later date.
* smb.h: Supporting defines for NT trans calls.Jeremy Allison1998-05-081-0/+25
| | | | | trans2.c: Paranoia bugfixes added when studying nttrans.c. Jeremy.
* moving gethexpwd into util.c, because it's used in both smbpass.c and ldap.cLuke Leighton1998-05-071-0/+1
|
* This should (hopefully :-) be the final fix for the %U %G substitutionJeremy Allison1998-05-071-1/+1
| | | | | | | 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-071-4/+16
| | | | | | | | | 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.
* smbpass.c: Fixed machine_passwd_lock() problems.Jeremy Allison1998-05-061-5/+5
| | | | | | password.c: Fixed machine_passwd_lock() problems. lib/rpc/server/srv_ldap_helpers.c: Oops - broke proto.h with dummy function. Fixed now. Jeremy.
* jean-francois micouleau's well-alpha code for ldap password database stuff!Luke Leighton1998-05-062-3/+22
| | | | he's going to hate me for checking this in so early, but...
* Real fix for clitar.c problems. Have now made all the rightRichard Sharpe1998-05-061-3/+3
| | | | | | | | things static, and have done a 'make proto; make clean; make'. Still get 54 compiler warnings under Digital UNIX cc. Honest. :-)
* Fixes for the %U and %G problems people have reported.Jeremy Allison1998-05-062-3/+4
| | | | | | | | | | | | | | | | | | 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-051-2/+2
| | | | | | | | | | | | | | 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-301-2/+4
| | | | | | | | 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/+1
| | | | | | | | | | 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-292-1/+2
| | | | | | | | | | | 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 is the checkin that adds the security=domain functionality.Jeremy Allison1998-04-293-10/+47
| | | | | | | | | | | 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-252-52/+63
| | | | | | | | | | | 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.
* ABOUT time. dce/rpc long packet format now works, server-side.Luke Leighton1998-04-241-0/+2
| | | | | | turns out that [it can be deduced that] microsoft ignores the SMBreadX offset, and goes by the SMBreadX length only. this makes for a lot simpler code, in both client and server.
* Makefile: Added nterr.c into the mix.Jeremy Allison1998-04-232-1/+6
| | | | | | | | | 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-2/+3
| | | | | | | 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-231-2/+8
| | | | | | | | | | 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.
* genrand.c: Improved generation of random values, more secure.Jeremy Allison1998-04-221-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.
* put server-side long dce/rpc code in main branch.Luke Leighton1998-04-211-44/+46
|
* clientgen.c: Added cli_ulogoff() call.Jeremy Allison1998-04-211-0/+1
| | | | | password.c: Added call to cli_ulogoff on successfull sessionsetup. Jeremy.
* Added 'passwd chat debug' parameter to allow admins to debug theirJeremy Allison1998-04-201-0/+1
| | | | | Samba passwd chat scripts. Jeremy.
* Makefile: Added genrand.oJeremy Allison1998-04-202-1/+5
| | | | | | | | | | | | | | | 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.
* Fixed bug that John found in WINS server code. When nmbd as a WINSJeremy Allison1998-04-201-0/+12
| | | | | | | | | | | | | server is sending out a name_query after a WACK, it needs to send a packet with recursion_desired = 0 (yes Luke, you were right all along :-). If it doesn't then if it's talking to itself then the query packet ends up back in the WINS server instead of in the client side code. Makefile: Changed proto generation to stop including NMBDOBJ twice. nmbd_namequery.c nmbd_packets.c nmbd_winsserver.c: Added extra query_name_from_wins_server() code. Jeremy.
* includes.h: Added John's redhat fix for QSORT_CAST.Jeremy Allison1998-04-181-0/+3
| | | | | | | | | | | | | smbpass.c: Added lock depth code so calls to pw_file_lock() can be nested. Fixed codedump problems in add_smbpwd_entry(). smbpasswd.c: Removed all the code that manipulated the password file directly. Now *all* smbpasswd file changes are done through the interfaces defined in smbpass.c This should make the life of people adding alternate backend databases *much* easier. lib/rpc/server/srv_netlog.c: Removed debug messages used to debug machine password changing. Jeremy.
* clientgen.c: Changes 'cli_xxx_' calls to use the followingJeremy Allison1998-04-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | regularized parameter syntax: setup, setup_count, max_setup_count, params, params_count, max_params_count, data, data_count, max_data_count, (and if a reply is needed) *reply_params, *reply_data_len *reply_data, *reply_data_len This allows the pointers and the lengths that relate to these pointers to be next to each other in the parameter list. This makes seeing what you are passing to these functions much easier to see. Getting ready for adding the lib/rpc/client functions needed to do security=domain. torture.c: Fixed it so it uses / rather than \\ internally for the //machine/share syntax. Jeremy.