summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* More formatting changes. Mostly converted some DEBUG() calls to DEBUGADD()Christopher R. Hertel1998-08-031-3/+4
| | | | | | so that we wouldn't get too many timestamps. Chris -)-----
* First implementation of ChangeNotify - this version only checksJeremy Allison1998-08-032-3/+4
| | | | | | | | | | | | | | | | | | | for changes in the directory modify timestamps. A better version will look at the requested client flags, and create a hash that represents the current state of the directory, and check against this instead. debug.c: Added lp_timestamp_logs() function. loadparm.c: Added "change notify timeout" in seconds (default 60) - this is the scan rate for a directory. Added ""timestamp logs" boolean - default True. Turns off log timestamps (so I can read them :-). nttrans.c: ChangeNotify implementation. server.c: ChangeNotify implementation. shmem_sysv.c: Added exits on shmem errors (without them smbd can core dump if some calls fail). smb.h: Added ChangeNotify flags for future use. util.c: Tidied up typedef. Jeremy.
* This is the remaining set of changes needed to replace the changes lostChristopher R. Hertel1998-08-031-11/+7
| | | | | | | | when Andrew and I were both working with util.c. I really don't know how I lost the autoconfigure changes (honest, I *did* run frequent updates). Chris -)-----
* I have fixed some of the autoconfigure problems. I'm studying the diffsChristopher R. Hertel1998-08-031-9/+13
| | | | | | | for the rest. I've found that only debug.h seems to be out of sync (i.e., util.c itself appears to be okay). Chris -)-----
* As per a Andrew's message, I went through and removed the timestring()Christopher R. Hertel1998-07-311-3/+3
| | | | | | | | | timestamps from several DEBUG messages. The timestamps are redundant now that DEBUG() provides them automatically. There are still a few more files to do, but I've got to get home for dinner. Chris -)-----
* Debugging functions are now in their own module.Christopher R. Hertel1998-07-311-0/+533
| | | | Chris -)-----
* This is the checkin of the debug changes.Christopher R. Hertel1998-07-311-278/+1
| | | | | | | | | | | Makefile.in: I've added debug.o. proto.h : Rebuilt, as is standard for these sorts of things. smb.h : New macros, etc. util.c : Debug code removed. I'll check in debug.c in the next step. Chris -)-----
* added test for getpwanam().Andrew Tridgell1998-07-311-1/+1
|
* Makefile.in: Moved UBIQX stuff into UTILOBJ.Jeremy Allison1998-07-301-35/+45
| | | | | | | | | | | | | | | | loadparm.c: Added "ole locking compatibility" option (default "true"). locking.c: Changes to implement union in files_struct. locking_shm.c: Changes to implement union in files_struct. nttrans.c: Made opening a directory explicit (we have to). Added create directory code for nttrans. reply.c: Changes to implement union in files_struct. server.c: Changes to implement union in files_struct. Added create directory code. trans2.c: Changes to implement union in files_struct. smb.h: Changes to implement union in files_struct. util.c: Changed linked list code to UNIQX linked list. This will make the other lists I need to implement for ChangeNotify and blocking locks easier. Jeremy.
* fixed a bug in the replacement inet_ntoaAndrew Tridgell1998-07-291-1/+1
|
* test for a broken inet_ntoa and replace it if necessary (forAndrew Tridgell1998-07-291-0/+15
| | | | IRIX+gcc-2.8.1)
* get rid of the runtime test for broken getgroups() and add a compileAndrew Tridgell1998-07-291-7/+7
| | | | | time test instead. This also allows us to get rid of the igroups element of a couple of structures.
* merge from the autoconf2 branch to the main branchAndrew Tridgell1998-07-2913-564/+757
|
* locking.c: Added lock type to is_locked() and do_lock()Jeremy Allison1998-07-231-27/+54
| | | | | | | | | | | | as the code in reply_lockingX wasn't taking account of the difference between read and write locks ! How did this ever work :-) ! reply.c: server.c: Add lock type to is_locked() and do_lock(). util.c: Also added code from klausr@ITAP.Physik.Uni-Stuttgart.De to fix problem with log files growing too large if an smbd writes less than 100 debug messages. Jeremy.
* Makefile: Added CC=gcc to DGUX on Intel. Comment from ross@filmworks.com.Jeremy Allison1998-07-161-1/+29
| | | | | | | | | | | | ipc.c: loadparm.c: printing.c: Added code from <Dirk.DeWachter@rug.ac.be> to implement print queue pausing. New parameters are "queuepause command" and "queueresume command". util.c: Added fix for mount options in autmount map. lib/rpc/include/rpc_misc.h: Removed duplicate pipe names for Jean-Francois. Jeremy.
* util.c: I've added a function called mem_dup(). Similar to strdup(),Christopher R. Hertel1998-07-151-0/+13
| | | | | | | mem_dup() allocates the required memory before copying the source data. It returns NULL if memory could not be allcoated, else a pointer to the newly allocated memory. proto.h: Rebuilt to add the prototype for mem_dup().
* Fix for bug PR#8294 reported by <detlef.lammermann@er.materna.de>Jeremy Allison1998-07-101-1/+1
| | | | | | | - the Files array was storing the 'dos_to_unix' translated name, rather than the untranslated name. This could case problems when the name was run through dos_to_unix again. Jeremy.
* Fixed (hopefully) last bug with username mapping.Jeremy Allison1998-07-071-4/+5
| | | | | | map_username wasn't returning true on a map which was causing find_service not to find a home directory. Jeremy.
* Fix for pidfile startup message.Jeremy Allison1998-07-021-35/+34
| | | | Jeremy.
* nttrans.c: More code towards NT protocol.Jeremy Allison1998-06-301-2/+6
| | | | | | smb.h: More code towards NT protocol. time.c: Fix for sco bug. Jeremy.
* clientgen: Added USE_SSL for client shutdown.Jeremy Allison1998-06-161-19/+0
| | | | | | | | | | | | clitar.c: Added 'Samba style' comments before string_create_s(). loadparm.c: Fixed missing comma in SSL code. util.c: Removed string_create_s(). Currently it's only called from clitar.c and having it here as well as a static in clitar causes the compile to break (Richard, please decide where you want this function). lib/rpc/parse/parse_net.c: Fix from <anders.blomdell@control.lth.se> to stop coredump on missing parameter. Jeremy.
* CLITAR changes to overcome some reported problems and add Jay's changesRichard Sharpe1998-06-161-0/+19
|
* Added SSL support from Christian Starkjohann <cs@obdev.at>Jeremy Allison1998-06-161-16/+64
| | | | | | | 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.
* Makefile: Added ubi_sLinkList.o as the groupname.o file needs it. Added ↵Jeremy Allison1998-06-131-212/+127
| | | | | | | | | | | | | | | 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.
* ipc.c: map_username is now a BOOL function.Jeremy Allison1998-06-121-16/+187
| | | | | | | | | | | 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-1/+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-101-26/+27
| | | | | | | | | | | | 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.
* Fixed file descriptor leak in open_socket_out - this couldJeremy Allison1998-06-041-0/+1
| | | | | cause nmbd to run out of fd's. Test case found by Eloy Paris. Jeremy.
* 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.