1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

433 Commits

Author SHA1 Message Date
Jeremy Allison
7448091da6 First implementation of ChangeNotify - this version only checks
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 used to be commit a0748c3f53)
1998-08-03 19:07:55 +00:00
Christopher R. Hertel
28900ea26f As per a Andrew's message, I went through and removed the timestring()
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 -)-----
(This used to be commit 60286cceca)
1998-07-31 22:39:15 +00:00
Jeremy Allison
7284bb5ca0 Makefile.in: Moved UBIQX stuff into UTILOBJ.
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.
(This used to be commit 3a5eea850b)
1998-07-30 21:18:57 +00:00
Andrew Tridgell
fb08c34cf3 get rid of the runtime test for broken getgroups() and add a compile
time test instead. This also allows us to get rid of the igroups
element of a couple of structures.
(This used to be commit 8b25fe7341)
1998-07-29 05:05:36 +00:00
Andrew Tridgell
64578c0589 merge from the autoconf2 branch to the main branch
(This used to be commit 3bda7ac417)
1998-07-29 03:08:05 +00:00
Jeremy Allison
c48b3fce6b locking.c: Print messages when we downgrade a lock.
reply.c: Do the same mask expansion we do in trans2.c - needed for Win98.
trans2.c: Make the mask expansion into a function call now we have to
          do it twice.
Jeremy.
(This used to be commit 7b3a9d6285)
1998-07-29 00:27:23 +00:00
Jeremy Allison
7abcd0521e loadparm.c: Added strict sync parameter.
locking.c: Added code to deal with real open mode of file.
reply.c: Added strict sync parameter.
server.c: Added strict sync parameter. Fixed open modes.
Jeremy.
(This used to be commit ed57b603b5)
1998-07-28 18:15:31 +00:00
Jeremy Allison
1aa138922e chgpasswd.c: Fixed up debug calls to stop crashes if ptsname failed.
local.h: Kept FSTYPE_STRING as Samba for now.
nmbd_browsesync.c: Added bugfix from Matt Chapman mattyc@cyberdude.com
                   - lmb_browserlist is now a struct ubi_dlList not a
                   struct browse_cache_record *.
server.c:
smb.h:
uid.c:
password.c: Removed attrs code - it is not used anywhere.
Jeremy
(This used to be commit ef1af7fe6d)
1998-07-27 18:50:45 +00:00
Christopher R. Hertel
0fa2fde675 Noticed that I was using the strlen() of a string that I had strdup()'d
before testing that the strdup() worked.  Fixed.
(This used to be commit 899d0d5de5)
1998-07-25 15:18:07 +00:00
Christopher R. Hertel
48a378f067 Changed the definition of the linked list header used in the directory
cache so that it uses the new ubi_dlNewList() macro in ubi_dLinkList.h.
(This used to be commit 16f0ad0c91)
1998-07-24 07:43:13 +00:00
Jeremy Allison
06c0349c44 locking.c: Added lock type to is_locked() and do_lock()
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.
(This used to be commit 80080abf77)
1998-07-23 00:10:26 +00:00
Jeremy Allison
f5866fd4ba Fixed bug found by Richard Sharpe. After increasing files_struct size by
MAX_OPEN_DIRECTORIES for nttrans I forgot to update the code that
enumerates the array.
Created new MAX_FNUMS in local.h, changed all code that iterates
through the files_struct array to use this.
(sorry Richard).
Jeremy.
(This used to be commit 339b102222)
1998-07-22 13:59:19 +00:00
Jeremy Allison
781c9e5082 includes.h: Added feature type USE_GRANTPT for pty code.
chgpasswd.c: Updated to use USE_GRANTPT feature definition.
Jeremy.
(This used to be commit 953c5dbbae)
1998-07-22 01:31:59 +00:00
Jeremy Allison
8668f6eac1 Forgot to increase size of files_struct by MAX_OPEN_DIRECTORIES in
previous checkin.
Jeremy.
(This used to be commit 7dfaca5d37)
1998-07-17 22:22:48 +00:00
Jeremy Allison
471087c9d2 Code added to fix the renaming of a directory under NT SMB calls.
local.h: Changed MAXDIR to MAX_OPEN_DIRECTORIES - shmem size also tuned by this.
dir.c: Use MAX_OPEN_DIRECTORIES.
nttrans.c: Allow opening of a directory to succeed. Doesn't actually open
           a file descriptor but takes a files_struct slot marked as an
           fd.
reply.c: Changed to close any outstanding is_directory files.
         reply_close changed to understand directory files.
server.c: Added open_directory(), close_directory() calls.
smb.h: Added is_directory to files_struct.
       Changed OPEN_FNUM to check that target is !is_directory (this
       prevents the normal file calls from processing a directory
       files_struct.
Jeremy.
(This used to be commit e01ce693f4)
1998-07-17 22:21:24 +00:00
Jeremy Allison
18067a7f0c nttrans.c: Added FILE_EXECUTE to required permissions checked.
trans2.c: Fixed up the SMB_QUERY_FILE_ALT_NAME_INFO code, now I've
          got an NT client to generate it. It uses unicode without
          bothering to check the unicode bit of course, but now we
          can execute 16 bit exe's on a WinNT client from a long
          filename directory (hurrah).
Jeremy.
(This used to be commit 6c31be7d3f)
1998-07-17 01:38:08 +00:00
Jeremy Allison
b61b50ac2c local.h: Added NTFS define if HAVE_NT_SMBS is defined.
nttrans.c: Fixed issue with access DELETE on renaming files.
Jeremy.
(This used to be commit 0fcf167af8)
1998-07-17 00:47:16 +00:00
Jeremy Allison
dc44d77c7f Makefile: Added nttrans.o
includes.h: Added termios.h for AIX.
nttrans.c: Working NT SMB calls !
pipes.c: Use strequal instead of strcmp.
server.c: Use #defines rather than numbers.
smb.h: Updated NT SMB #defines.
Jeremy.
(This used to be commit 3e5cada988)
1998-07-16 22:46:06 +00:00
Jeremy Allison
f1cd3cb54c Makefile: Added CC=gcc to DGUX on Intel. Comment from ross@filmworks.com.
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.
(This used to be commit 559a9bf2bb)
1998-07-16 00:06:29 +00:00
Jeremy Allison
59d07445b6 loadparm.c:
With apologies to Charlton Heston and Pierre Boule.

    "You damn fools, you finally did it".

    Changed default security mode to be security=user.
    Yes this is a big (although small in code) change.
    It's something we've been discussing for a while, to
    finally wean people off the legacy security=share mode
    which is *never* what you want.

    Jeremy.

nmbd_incomingrequests.c: Bug fix for nmbd core dumps caused by overrun.
                         Found by <samuel@public.szonline.net>.
nttrans.c: More NT smb stuff.
reply.c: Unlink will overwrite an existing file. Well you learn
         something new about POSIX every day. :-).
server.c: Tidyup unreadable code.
smbpasswd.c: Code to allow -U remote_username to allow ordinary
             users to change remote passwords if their NT username
             is different from their UNIX username.
             Patch from <torbjorn.lindh@allgon.se>.

Jeremy.
(This used to be commit 4eccb47cfb)
1998-07-14 21:23:59 +00:00
Jeremy Allison
ebad4278b7 nntrans.c: Fully implemented transact rename.
reply.c: Added NT specific rename if exists flag to rename_internals().
smb.h: Added NT rename flag.
Jeremy.
(This used to be commit b398f7daf5)
1998-07-11 01:25:02 +00:00
Jeremy Allison
5ffb30858f nttrans.c: More NT SMB stuff.
reply.c: Broke out the internals of reply_mv so that they may be called
         externally from the NT transact rename.
server.c: Changed stat calls to sys_stat - found in code review
          of bugfix.
Jeremy.
(This used to be commit fb19dad88e)
1998-07-11 00:28:34 +00:00
Jeremy Allison
1e4b0268aa Fix for bug PR#8294 reported by <detlef.lammermann@er.materna.de>
- 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.
(This used to be commit 5f4be1498f)
1998-07-10 20:03:09 +00:00
Jeremy Allison
ddb7b8a3d6 AIX patch from Michael Wojcik <mww@microfocus.com> adding detail
to the AIX specific (and undocumented) setpriv and setuidx calls.
Jeremy.
(This used to be commit 7a8d0a4ed4)
1998-07-10 01:13:16 +00:00
Jeremy Allison
769269c384 Needed fix to SIGHUP handling donated by branko.cibej@hermes.si
(I can't believe we've had that bug so long :-).
Jeremy.
(This used to be commit 4d26757776)
1998-07-09 22:01:51 +00:00
Jeremy Allison
86de50535f New version of the DFS_AUTH code from Karsten Muuss <muuss@or.uni-bonn.de>
Jeremy.
(This used to be commit cf7402c532)
1998-07-09 19:13:01 +00:00
Jeremy Allison
ddf62bbbdb NT SMB trans reply code.
Jeremy.
(This used to be commit 556254d725)
1998-07-09 00:41:32 +00:00
Jeremy Allison
8c1199c2c7 Implementing more NT SMB functionality.
Jeremy.
(This used to be commit d34c911260)
1998-07-08 01:42:05 +00:00
Jeremy Allison
7a2b695bcb password.c: Fixes to allow Win95 clients to have lm encrypted passwords
recognised.
lib/rpc/client/cli_login.c: Fix debug comment.
lib/rpc/parse/parse_misc.c: Fix for passing null pointers.
lib/rpc/parse/parse_net.c: Send correct password lengths when called
                           from Win95.
Jeremy.
(This used to be commit ad1848b355)
1998-07-06 22:48:21 +00:00
Jeremy Allison
6491a956ef nttrans.c: More NT SMB stuff.
shmem_sysv.c: Fix for shared memory problems on several systems,
              Second and subsequent use of shmget should use zero
              as the size. Fix from Veselin Terzic <vterzic@systems.DHL.COM>
Jeremy.
(This used to be commit 1cd94b2459)
1998-07-02 22:23:56 +00:00
Jeremy Allison
3daefed54e chgpasswd.c: Fix from Peter Debus <pdebus@turing.une.edu.au> for Digital UNIX
password change core dump bug.
nmbd_subnetdb.c: Make namelist_entry_compare() static.
nttrans.c: More NT SMB stuff.
Jeremy.
(This used to be commit 1925a29c6b)
1998-07-02 18:49:08 +00:00
Jeremy Allison
139a34157e includes.h: AIX fix.
nttrans.c: More NT SMB work.
smb.h: More NT SMB defines.
trans2.c: Change call response as I now have docs
          on what the flags mean. #ifdef it with JRATEST
          until I'm sure it's ok though.
Jeremy.
(This used to be commit ce2503fddd)
1998-07-01 21:49:49 +00:00
Jeremy Allison
1829528d1f nttrans.c: More code towards NT protocol.
smb.h: More code towards NT protocol.
time.c: Fix for sco bug.
Jeremy.
(This used to be commit e53f4396ea)
1998-06-30 21:19:40 +00:00
Jeremy Allison
cb757820f5 Added SSL support from Christian Starkjohann <cs@obdev.at>
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.
(This used to be commit 31e768369f)
1998-06-16 01:35:52 +00:00
Jeremy Allison
7ed5a181ac client.c: Made -L do a null-session share unless -U user is specified.
clientutil.c: Fixed NT session to add NT password.
groupname.c: Added lookup function.
Jeremy.
(This used to be commit 8216363e83)
1998-06-15 22:02:14 +00:00
Jeremy Allison
644fbaaf9b Makefile:
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.
(This used to be commit 21ca6bfb3b)
1998-06-15 18:19:54 +00:00
Jeremy Allison
5b5eb35c91 Makefile: Added ubi_sLinkList.o as the groupname.o file needs it. Added 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.
(This used to be commit beef636a4d)
1998-06-13 03:04:00 +00:00
Jeremy Allison
a32ad6733b Groupname mapping code now lives here.
Jeremy.
(This used to be commit a70b929ec7)
1998-06-13 03:00:06 +00:00
Jeremy Allison
9a735eb7e2 ipc.c: map_username is now a BOOL function.
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
(This used to be commit fa95fae5ee)
1998-06-12 03:08:23 +00:00
Jeremy Allison
cd3de05fb5 Minor changes as I've now discovered gcc -pedantic-errors. This
does the signed/unsigned warnings I've been missing.
Jeremy
(This used to be commit 6d94e67624)
1998-06-10 23:15:42 +00:00
Jeremy Allison
72bf410b6e De-coupled the mapping of a Windows to UNIX username from the Get_Pwnam
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.
(This used to be commit fb6ed81844)
1998-06-10 19:45:13 +00:00
Jeremy Allison
28029c73b7 client.c: Allowed client to proceed even if it gets error 234 (more data
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.
(This used to be commit ae3510e9fb)
1998-06-04 18:49:13 +00:00
Jeremy Allison
c435955b02 ipc.c: Fix bug where we don't return the correct error code when client
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.
(This used to be commit 05c85df3c7)
1998-06-03 01:04:45 +00:00
Jeremy Allison
9bd7e1e887 loadparm.c: Added machine password timeout parameter - set to 7 days be default.
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.
(This used to be commit b8fedca619)
1998-05-27 00:30:52 +00:00
Jeremy Allison
1d16f75051 smb.h: More NT SMB stuff (just defines).
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.
(This used to be commit 42a6551106)
1998-05-26 19:37:31 +00:00
Christopher R. Hertel
cfc43a5a2f I've put the ubiqx headers back into includes.h, and removed them from
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 -)-----
(This used to be commit a1f4c8567c)
1998-05-22 07:46:39 +00:00
Christopher R. Hertel
6580fa6b5c Removed all ubiqx includes from includes.h. So far, this was only a problem
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 -)-----
(This used to be commit 2b6be7084d)
1998-05-22 05:16:27 +00:00
Jeremy Allison
bfa013908f Fixed 'revalidate' parameter so it's only considered in security=share
mode.
Jeremy.
(This used to be commit 7727f09ea9)
1998-05-21 23:59:04 +00:00
Jeremy Allison
35c65576f7 printing.c: Fixed overflow by one problem in LPRng.
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.
(This used to be commit 720b565349)
1998-05-21 23:50:16 +00:00
Jeremy Allison
67850c4574 Fixed incorrect last arg to safe_strcpy in new wildcard code.
Jeremy.
(This used to be commit 67007d98b9)
1998-05-20 04:20:31 +00:00