summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Added Paul Eggerts LocalTime patch.Jeremy Allison1998-05-291-8/+28
| | | | Jeremy.
* Ooops - fixed Win95 crash bugs with earlier code.Jeremy Allison1998-05-271-3/+7
| | | | Jeremy
* Newly re-written do_match and mask_match functions, with theJeremy Allison1998-05-271-103/+235
| | | | | | | | | | | | | | | | | | | | | | | help of Ums Harald <Harald.Ums@pro-sieben.de>, who has been testing our 8.3 wildcards with a test suite. With his new code for 8.3 matching, this is the test done (I'm quoting from his email) "I tested it by generating a directory with about 7600 Files and run automatc tests with about 4000 patterns. The result from Win95 -> WinNT and Win95 -> Samba where identical according to diff." I have also re-written the long filename wildcard code, so that doing DIR a*z now matches files : AAA.BBB.CCCC....ZZZZ correctly, and other fixes besides. I sincerely hope I can lay this (horrid) issue to rest now :-). Jeremy.
* smb.h: More NT SMB stuff (just defines).Jeremy Allison1998-05-261-1/+7
| | | | | | | | | | | 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.
* fix slprintf for sunos4 in head branchAndrew Tridgell1998-05-201-1/+2
|
* Fix to do NT wildcard matching.Jeremy Allison1998-05-191-2/+24
| | | | Jeremy.
* passdb.c: Fixed typo in coment.Jeremy Allison1998-05-191-31/+22
| | | | | | | | smb.h: Removed comments no longer valid. smbpass.c: Stopped dummy function from being prototyped. util.c: Fix for multibyte char problems with strlower, strupper and string_replace. Jeremy.
* Fixed signed/unsigned warning.Jeremy Allison1998-05-191-1/+1
| | | | Jeremy.
* chgpasswd.c: Changed back to getsmb... from getsam...Jeremy Allison1998-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* Makefile:Luke Leighton1998-05-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* util.c: Re-seed the crypto random number generator after a fork, so allJeremy Allison1998-05-151-0/+10
| | | | | smbds started from the same parent won't use the same sequence. Jeremy.
* some pretty horrible formatting in standard_sub_basic(): makes the functionLuke Leighton1998-05-141-48/+56
| | | | unreadable and unmaintainable
* chgpasswd.c: Added comments to #ifdefsJeremy Allison1998-05-142-22/+79
| | | | | | | | | | | | | | | | | | | | | 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.
* includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don'tJeremy Allison1998-05-121-64/+7
| | | | | | | | | | 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.
* a new slprintf() function. This one is totally portable but a bit of aAndrew Tridgell1998-05-121-27/+41
| | | | | | | | | | | | | | | | | | kludge. It is a safe kludge with our current code but I would like to revisit it at some point in the future. The problem with the one I committed yesterday is it used non-portable functions. (it also had a bug in it, but that's another matter) This one works by just using vsprintf() into a 8k buffer and a memcpy from there. No memory protection tricks or other non-portable stuff. This is safe because all calls to slprintf() in samba use strings which have been through a pstrcpy and thus are less than 1024 bytes. No call uses more than 2 of these strings. See what I mean by kludge? Note that the 8k is way overkill but I like overkill :) Someday (after autoconf) we will replace this with something better, but meanwhile this is simple, secure and portable.
* This is a security audit change of the main source.Jeremy Allison1998-05-127-84/+152
| | | | | | | | | | | | | | | | | | 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.
* ldap back-end database developmentLuke Leighton1998-05-111-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-10/+100
| | | | | | | 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.
* moving gethexpwd into util.c, because it's used in both smbpass.c and ldap.cLuke Leighton1998-05-071-0/+27
|
* This should (hopefully :-) be the final fix for the %U %G substitutionJeremy Allison1998-05-071-0/+16
| | | | | | | problem.... smbpass.c: Removed Luke's dire warning - as some of the functions in here *need* to be called externally :-). Jeremy.
* loadparm.c: Added #ifdef USE_LDAP around ldap code.Jeremy Allison1998-05-061-16/+0
| | | | | | | | | | | | | 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.
* much faster pstrcpy() and fstrcpy()Andrew Tridgell1998-05-061-16/+24
| | | | | also print out the first 50 chars of an overflowing string so we have some chance of working out what is causng them.
* genrand.c: SGI compile warning fix.Jeremy Allison1998-05-051-1/+1
| | | | | | | | | | | | | | 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.
* This looks like a big change but really isn't.Jeremy Allison1998-04-251-2/+2
| | | | | | | | | | | 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.
* genrand.c: Changed SMB_PASSWD_FILE to lp_smb_passwd_file().Jeremy Allison1998-04-231-1/+1
| | | | | | | | | | 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-9/+32
| | | | | | | | | 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.
* many systems don't have /etc/shadow but do have another system forAndrew Tridgell1998-04-211-0/+12
| | | | | | | | | | making encrypted passwords secret. For example, with secure NIS+ only root can get the encrypted password. hash in the encrypted password of "root" to provide a nice source of secret on such systems. On systems that don't have this (ie. any user can get roots encrypted password) then the security is so slack that it probably doesn't matter what we do to generate the secret.
* improved the secret buffer generation a bit. It now uses /etc/shadowAndrew Tridgell1998-04-211-22/+39
| | | | | and smbpasswd if possible, and doesn't put it all through a 32 bit bottleneck.
* genrand.c: Improved filename based random seed generation.Jeremy Allison1998-04-201-18/+55
| | | | | lib/rpc/server/srv_netlog.c: Changed to use generate_random_buffer(). Jeremy.
* Makefile: Added genrand.oJeremy Allison1998-04-201-0/+137
| | | | | | | | | | | | | | | 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.
* reply.c: Fix bugs where debug statements were accessing the fd_ptr structJeremy Allison1998-04-161-14/+14
| | | | | | | 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.
* ipc.c: Fix for printer queue spinning with Win95.Jeremy Allison1998-04-151-1/+4
| | | | | | | | | 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.
* Changes to allow Samba to be compiled with -Wstrict-prototypesJeremy Allison1998-04-138-19/+17
| | | | | | with gcc. (Not a big change although it looks like it :-). Jeremy.
* minor reformatting of debug messages (so people don't think there is aAndrew Tridgell1998-04-121-3/+3
| | | | . on the end of their host names)
* includes.h: Moved HPUX undefine of SEMMSL to where it actually does something.Jeremy Allison1998-04-101-2/+2
| | | | | | | | | | | | | | | 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.
* Makefile, loadparm.c, server.c, smb.h, util.c: Patch fromJeremy Allison1998-04-091-0/+57
| | | | | | | stn@techfak.uni-kiel.de (Stefan Nehlsen) to get homes from the NIS+ map. smbpasswd.c: Tidy up of cli_state structure. Jeremy.
* Missed compile error when compiling with KANJI=true.Jeremy Allison1998-04-091-1/+1
| | | | Jeremy.
* Added codepage 936 (simplified Chineses).Jeremy Allison1998-04-091-131/+93
| | | | | | | | | | | In doing so I realized that much code was being duplicated between Hangul, Big5 and Simplified Chinese - so I re-arranged kanji.[ch] to go through generic functions for all multibyte characters that can be identified by a single code range (not Kanji - but all the others). Jeremy.
* want all of data in show_msg at log levels > 50.Luke Leighton1998-04-071-27/+33
|
* Fix from Josef Hinteregger <joehtg@joehtg.co.at> for usingJeremy Allison1998-04-031-1/+1
| | | | | | character set = iso8859-1 with the new multibyte char code. Was always using sj_to_sj conversion in error. Jeremy.
* Patch from Chris Maltby <chris@softway.com.au>. His comments follow:Jeremy Allison1998-04-021-4/+4
| | | | | | | | | | | | | | + improvement to smbtar to allow exclusion/inclusion of system and hidden files, and to generate a listing of what has been archived in a format useful for automated backup systems. + add the "Softq" spooling system to samba's printing capabilities. + I have "fixed" the intrusion of US style dates into samba reporting as well. The format yyyy/mm/dd is not only uunambiguous, but also has the benefit of making lexicographic sorts work correctly. Jeremy.
* Updated Eastern European translation table from dan@feld.cvut.cz.Jeremy Allison1998-04-021-4/+20
| | | | Jeremy.
* Fix for is_in_path from "Steven Hartland" <steven_hartland@pa.press.net> -Jeremy Allison1998-03-251-1/+1
| | | | | hide files was not working. Jeremy.
* Fixed 'unused variable' warnings found with gcc -Wall -Werror.Jeremy Allison1998-03-241-2/+2
| | | | Jeremy.
* ypserver not available: AUTOMOUNT server and path don't work.Samba Release Account1998-03-241-14/+10
| | | | | fix: set default values to local server / path _before_ attempting to find the ypserver's auto.home entry.
* clientgen.c ipc.c smbpasswd.c: Fixes for warnings (from Herb).Jeremy Allison1998-03-241-0/+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.
* a pointless commit to check on a problem Luke reported with CVSAndrew Tridgell1998-03-231-2/+2
|
* this isn't a big commit, it just looks like it :-)Andrew Tridgell1998-03-172-62/+71
| | | | | | | | | 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.
* Adding the same change as was added to 1.9.18 branch to add theJeremy Allison1998-03-162-3/+17
| | | | | | | | | | | | | | | | | | | | | | | "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.
* - added the ability to kill off individual connections from SWAT (fromAndrew Tridgell1998-03-151-2/+10
| | | | | | | | | 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