samba.git
25 years agoQuick fix for a small problem. If you run 'nmbd -?' you'd get the usage
Christopher R. Hertel [Tue, 11 Aug 1998 21:25:55 +0000 (21:25 +0000)]
Quick fix for a small problem.  If you run 'nmbd -?' you'd get the usage
message *but the daemon would start anyway*.  I've added a call to exit()
in the default: case of the option processing loop.

Chris -)-----
(This used to be commit c69727bd29c0bf1cded0db84602e791304691e2e)

25 years agoI've come up with a different scheme for doing the DEBUG() and DEBUGADD()
Christopher R. Hertel [Tue, 11 Aug 1998 18:56:03 +0000 (18:56 +0000)]
I've come up with a different scheme for doing the DEBUG() and DEBUGADD()
macros that meets the RVALUE requirement and doesn't use the (a?b:c) format
that Andrew called "ugly".  I've added the new macros but kept the old
macros within a #if 0..#else..#endif block in case I've missed somthing.

Basically, I've used

  (void)( (a) && (b) )

or

  (void)( (a) && (b) && (c) )

instead of

  ( (a) ? (void)(b) : (void)(c) )

or similar.  I have this compiled and running now.

Here's the diff:

$ cvs diff smb.h
Enter passphrase for RSA key 'crh@Ruby':
Index: smb.h
===================================================================
RCS file: /data/cvs/samba/source/include/smb.h,v
retrieving revision 1.172
diff -r1.172 smb.h
143a144,145
> #if 0
>
150a153,164
>
> #else
>
> #define DEBUG( level, body ) \
>   (void)( (DEBUGLEVEL >= (level)) \
>        && (dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) )) \
>        && (dbgtext body) )
>
> #define DEBUGADD( level, body ) \
>   (void)( (DEBUGLEVEL >= (level)) && (dbgtext body) )
>
> #endif

Chris -)-----
(This used to be commit 53b433e6ab9fd69a02016ee4f2a3f756640ea565)

25 years agoCleaned up some lint warnings (functions with return values that were
Christopher R. Hertel [Tue, 11 Aug 1998 18:07:18 +0000 (18:07 +0000)]
Cleaned up some lint warnings (functions with return values that were
ignored).
(This used to be commit 8fedcfc48da2741722b867bbb056a078901e7431)

25 years agostrip out extra spaces from smbclient output that were added recently
Herb Lewis [Tue, 11 Aug 1998 17:34:00 +0000 (17:34 +0000)]
strip out extra spaces from smbclient output that were added recently
(This used to be commit 5f5562ff601b69c3f7629fa57ddd621e201c5806)

25 years agoRemoved a stray semicolon in the DEBUGADD() macro.
Christopher R. Hertel [Tue, 11 Aug 1998 15:54:15 +0000 (15:54 +0000)]
Removed a stray semicolon in the DEBUGADD() macro.
(This used to be commit efa67d6b2b6d4a1e007dba5f2f5da5aff723fe59)

25 years agoI've added a test for lp_loaded() so that timestamps *will* be output
Christopher R. Hertel [Tue, 11 Aug 1998 15:47:26 +0000 (15:47 +0000)]
I've added a test for lp_loaded() so that timestamps *will* be output
before the config file has been loaded.  Otherwise the default is no
timestamp.

Chris -)-----
(This used to be commit fd7eaed59efbe2ce6998d5902e70d79f533b3372)

25 years agofixed a nasty bug in debug.c
Andrew Tridgell [Tue, 11 Aug 1998 14:09:05 +0000 (14:09 +0000)]
fixed a nasty bug in debug.c

Debug1() was being called like this:

      Debug1( format_bufr );

but if format_bufr contains any %s or other % arguments (such as when
processing a smb.conf file containing % macros) then smbd dies a
horrible death.

The quick fix is to use:

Debug1( "%s", format_bufr);
(This used to be commit 5ae04012819ae3e63102d6875088ef00c27492b4)

25 years agomake sure that a fault cannot occur twice. The new Debug1() code is
Andrew Tridgell [Tue, 11 Aug 1998 13:55:16 +0000 (13:55 +0000)]
make sure that a fault cannot occur twice. The new Debug1() code is
causing seg faults on my machine and because the fault code calls
DEBUG() it is looping!

now to find the bug in the Debug1() code ...
(This used to be commit 83122bae2253221f085118c6e7e914982656bd64)

25 years agoMakefile.in: Added CHECK target back in (at Herb's request). Added
Jeremy Allison [Tue, 11 Aug 1998 02:13:01 +0000 (02:13 +0000)]
Makefile.in: Added CHECK target back in (at Herb's request). Added
             manpath in (although we don't currently use it).
client/client.c: Added John Blair's fixes for "put -".
include/nterr.h: Added NT_STATUS_NOTIFY_ENUM_DIR error code.
smbd/nttrans.c: Added in devious fix for one-shot NT change notify bug.
Jeremy.
(This used to be commit 4ac3091e57e9ab234b3c051333ba521a92defa99)

25 years agoupdate for new directory structure
Herb Lewis [Mon, 10 Aug 1998 22:36:11 +0000 (22:36 +0000)]
update for new directory structure
(This used to be commit 5fc8b4a1d5d973028396b667daaa119d21f0c0f0)

25 years agoMakefile.in: Fixed make clean bug with CVS directory in bin/.
Jeremy Allison [Mon, 10 Aug 1998 20:12:53 +0000 (20:12 +0000)]
Makefile.in: Fixed make clean bug with CVS directory in bin/.
include/smb.h: Fixed bugs in Debug macro's with SGI compiler.
smbd/trans2.c: Fixed bug reported by Zoltan Palmai <ZSPA@chevron.com>
               PR#8903 where get_lanman2_dir_entry() could return a
               mangled name as a resume key and call_trans2findnext()
               wasn't doing the same.
Jeremy.
(This used to be commit 9d010e721c27af1d9498fd1e147993ba8ac8b41e)

25 years agomoved access.c into lib/ from smbd/ as it is needed by testparm. I
Andrew Tridgell [Mon, 10 Aug 1998 07:29:57 +0000 (07:29 +0000)]
moved access.c into lib/ from smbd/ as it is needed by testparm. I
modified it not to need any smbd specific structures and instead pass
things from smbd.
(This used to be commit 162141d3b3fcf53fbc6a1f18702df85c2b7f1781)

25 years agosplit the system password checking routines out of smbd/password.c and
Andrew Tridgell [Mon, 10 Aug 1998 07:04:53 +0000 (07:04 +0000)]
split the system password checking routines out of smbd/password.c and
into passdb/pass_check.c. This means SWAT no longer needs to link to
smbd/password.c
(This used to be commit 90d93889d722670cbb517017531264630af759bf)

25 years agomoved username.c into lib/ so we no longer $(PASSDB_OBJ) in most
Andrew Tridgell [Mon, 10 Aug 1998 05:22:10 +0000 (05:22 +0000)]
moved username.c into lib/ so we no longer $(PASSDB_OBJ) in most
utilities
(This used to be commit 745d38bfe7a989a602d14b8a04757893ae40ba8e)

25 years agosmbtorture now compiles
Andrew Tridgell [Mon, 10 Aug 1998 02:01:18 +0000 (02:01 +0000)]
smbtorture now compiles
(This used to be commit 12c8028eb45d3e274e3496da1a2e4f6d18c117fd)

25 years agofixed the installation scripts for the new layout
Andrew Tridgell [Mon, 10 Aug 1998 01:55:42 +0000 (01:55 +0000)]
fixed the installation scripts for the new layout
(This used to be commit 60cdb83f3f6dfd7755e46254662245a82a8ef498)

25 years agothe rest of the binaries now compile and link
Andrew Tridgell [Mon, 10 Aug 1998 01:25:32 +0000 (01:25 +0000)]
the rest of the binaries now compile and link
(This used to be commit 7fecc3d5a2fb641237f24a3f39c6556fde648a8a)

25 years agoa few more things compile.
Andrew Tridgell [Sun, 9 Aug 1998 14:58:51 +0000 (14:58 +0000)]
a few more things compile.

I'll do the rest tomorrow.
(This used to be commit b92ce41c54fa187bce3287257996f7a3e9c9b9ff)

25 years agoswat compiles, with some even uglier hacks. we really have to do
Andrew Tridgell [Sun, 9 Aug 1998 14:37:32 +0000 (14:37 +0000)]
swat compiles, with some even uglier hacks. we really have to do
something about our dependencies between seemingly unrelated code.
(This used to be commit 3ecfd271de5e6f7b4868800e7c06d51ed69278fd)

25 years agonmbd compiles and links. I had to do some ugly stuff, putting files in
Andrew Tridgell [Sun, 9 Aug 1998 14:20:02 +0000 (14:20 +0000)]
nmbd compiles and links. I had to do some ugly stuff, putting files in
illogical places. Once I get everything compiled these will need to be
revisited, but at least the new Makefile.in makes it really obvious
what is out of place.
(This used to be commit beef5341fc313249bf1117deccb9c21c510c4697)

25 years agoclose to having nmbd linking (just a bit of repository hacking to go)
Andrew Tridgell [Sun, 9 Aug 1998 14:08:42 +0000 (14:08 +0000)]
close to having nmbd linking (just a bit of repository hacking to go)
(This used to be commit 34dd9b79457ab01637e0d7374d33cafe2f859c99)

25 years agothis gets smbd compiling and linking correctly with the new layout.
Andrew Tridgell [Sun, 9 Aug 1998 13:25:34 +0000 (13:25 +0000)]
this gets smbd compiling and linking correctly with the new layout.
(This used to be commit d08fa39cec5c71a9034dbf4241fc7e195f1bbaa5)

25 years agoremoved the if statements from the DEBUG() macro definitions.
Andrew Tridgell [Sun, 9 Aug 1998 13:12:09 +0000 (13:12 +0000)]
removed the if statements from the DEBUG() macro definitions.

Chris, you should never put if statements in macros, use the ugly
(a?b:c) form instead, otherwise you can produce incorrect code when
you have things like:

if (foo)
   DEBUG((blah));
else
   DEBUG((blooh));
(This used to be commit ab912448c1ff2487b6a313574d72f389baa65e6d)

25 years agoanother dummy file
Andrew Tridgell [Sun, 9 Aug 1998 12:09:48 +0000 (12:09 +0000)]
another dummy file
(This used to be commit 251213898077a11d71b208434c65748f922d7e9a)

25 years agoadded ignore rules for the dummy files
Andrew Tridgell [Sun, 9 Aug 1998 11:25:49 +0000 (11:25 +0000)]
added ignore rules for the dummy files
(This used to be commit 687f76a17d6d3ebd33b4d9a848deef56f3c1f56a)

25 years agothese dummy files are needed for autoconf processing
Andrew Tridgell [Sun, 9 Aug 1998 11:24:15 +0000 (11:24 +0000)]
these dummy files are needed for autoconf processing
(This used to be commit be762dc3de6c1ef768790522dfe93007a61ce5d7)

25 years agothe autoconf scripts are now converted to the new directory structure
Andrew Tridgell [Sun, 9 Aug 1998 11:23:13 +0000 (11:23 +0000)]
the autoconf scripts are now converted to the new directory structure

now the Makefile .....
(This used to be commit 4fae7f129e46930960831af0da28496f9766f6ae)

25 years agonew directory structure in configure.in
Andrew Tridgell [Sun, 9 Aug 1998 11:14:23 +0000 (11:14 +0000)]
new directory structure in configure.in
(This used to be commit 7067261760516c01c2dd4fa7f0a717e9c48e1554)

25 years agowe have to have the test for -lsocket before the test for some
Andrew Tridgell [Sat, 8 Aug 1998 05:25:04 +0000 (05:25 +0000)]
we have to have the test for -lsocket before the test for some
functions (notably innetgr) to ensure we don't replace them if they
are in -lsocket
(This used to be commit d1212048903fff8725e501001ac84b019c21b939)

25 years agoadded --with-nisplus-home option
Andrew Tridgell [Sat, 8 Aug 1998 01:15:14 +0000 (01:15 +0000)]
added --with-nisplus-home option
(This used to be commit 70000c21909a154344b489e8aa18a5868ff52865)

25 years agoforgot to remove -nostrip option for packaging. Makes inst package too big.
Herb Lewis [Fri, 7 Aug 1998 19:01:59 +0000 (19:01 +0000)]
forgot to remove -nostrip option for packaging. Makes inst package too big.
(This used to be commit 8bf365a54a5aedbd1b2aa373aa6b26a9708d7156)

25 years agoadd startswat.sh to automate starting swat with inetd
Herb Lewis [Fri, 7 Aug 1998 18:56:12 +0000 (18:56 +0000)]
add startswat.sh to automate starting swat with inetd
update make scripts to use new autoconfigure setup
(This used to be commit 737a58c1568fd76afe32a78895ee09b1543a595d)

25 years agoFixed memory leak when freeing ChangeNotify structures.
Jeremy Allison [Wed, 5 Aug 1998 22:17:51 +0000 (22:17 +0000)]
Fixed memory leak when freeing ChangeNotify structures.
Jeremy.
(This used to be commit 996c5ac97a8d1443bc8abc59b9a10ff3aeb77389)

25 years agonttrans.c: Fix change_notify. Queue processing code wasn't changing to
Jeremy Allison [Tue, 4 Aug 1998 23:45:34 +0000 (23:45 +0000)]
nttrans.c: Fix change_notify. Queue processing code wasn't changing to
           the correct directory before doing the stat. Doh !
uid.c: Fix for performance in security=share mode. Invalid vuid meant
       that in security=share mode Samba was always doing the become_user/
       undebome_user pairs for *every* smb. This code fixes it, but tridge
       should review for security implications.
Jeremy.
(This used to be commit c3663379fdcec487feea2e5d848ee012ee6c6baf)

25 years agoloadparm.c: Added "debug timestamp" synonym for Chris.
Jeremy Allison [Tue, 4 Aug 1998 01:01:26 +0000 (01:01 +0000)]
loadparm.c: Added "debug timestamp" synonym for Chris.
nttrans.c: Moved common code into function in server.c
           Removed left over debug level 0.
server.c: Moved common code into function in server.c
Jeremy.
(This used to be commit 34ef55b7228155cef40cbdfcdc1fe623c1037bd6)

25 years agoMore formatting changes. Mostly converted some DEBUG() calls to DEBUGADD()
Christopher R. Hertel [Mon, 3 Aug 1998 22:10:53 +0000 (22:10 +0000)]
More formatting changes.  Mostly converted some DEBUG() calls to DEBUGADD()
so that we wouldn't get too many timestamps.

Chris -)-----
(This used to be commit 3e7e5fad378cf144927d9f2ffc82f80e150d44ab)

25 years agoFirst implementation of ChangeNotify - this version only checks
Jeremy Allison [Mon, 3 Aug 1998 19:07:55 +0000 (19:07 +0000)]
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 a0748c3f53974483680ebe2ea4f556ece8d7fa43)

25 years agoOne more minor change to the format of a DEBUG message. I broke up a
Christopher R. Hertel [Mon, 3 Aug 1998 18:33:49 +0000 (18:33 +0000)]
One more minor change to the format of a DEBUG message.  I broke up a
very long output line in become_domain_master_query_success().
Chris -)-----
(This used to be commit 9b5d431661c55056c31bedf9ef3900f27e1c5292)

25 years agoI finished removing timestring() calls from DEBUG() messages. Also went
Christopher R. Hertel [Mon, 3 Aug 1998 18:13:13 +0000 (18:13 +0000)]
I finished removing timestring() calls from DEBUG() messages.  Also went
through and changed some DEBUG() calls to DEBUGADD() to combine output
under a single timestamp.  There were too many timestamps.

Note that Jeremy has told me that he's working on adding a config parameter
to turn timestamps off.  Cool.

Chris -)-----
(This used to be commit 247dbc9a24987035a47f1ba4fa143b1e2c050e92)

25 years agoFixing clitar.c so that tar to stdout works correctly.
Richard Sharpe [Mon, 3 Aug 1998 10:35:00 +0000 (10:35 +0000)]
Fixing clitar.c so that tar to stdout works correctly.

Replaced printfs with DEBUG(0. Tested ... Works.

Hope I didn't disturb the autoconf code ... It feels
great to be able to run configure for Samba at long last!

Regards
Richard Sharpe
(This used to be commit b968aa31ba15742a9eadc010e03781583feb6455)

25 years agoThis is the remaining set of changes needed to replace the changes lost
Christopher R. Hertel [Mon, 3 Aug 1998 03:50:07 +0000 (03:50 +0000)]
This is the remaining set of changes needed to replace the changes lost
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 -)-----
(This used to be commit bedefc2066ac86199b29ccd7f65ad5f1d8a899c4)

25 years agoI have fixed some of the autoconfigure problems. I'm studying the diffs
Christopher R. Hertel [Mon, 3 Aug 1998 03:22:42 +0000 (03:22 +0000)]
I have fixed some of the autoconfigure problems.  I'm studying the diffs
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 -)-----
(This used to be commit b41cdbffb7233f73ac15526f7b5499658256cd82)

25 years agoAs per a Andrew's message, I went through and removed the timestring()
Christopher R. Hertel [Fri, 31 Jul 1998 22:39:15 +0000 (22:39 +0000)]
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 60286ccecaa6028d687e6406755016455e3b3a26)

25 years agoDebugging functions are now in their own module.
Christopher R. Hertel [Fri, 31 Jul 1998 20:17:36 +0000 (20:17 +0000)]
Debugging functions are now in their own module.

Chris -)-----
(This used to be commit 2c6dc2779647bbc0c27a102632882e617ef7643e)

25 years agoThis is the checkin of the debug changes.
Christopher R. Hertel [Fri, 31 Jul 1998 20:16:35 +0000 (20:16 +0000)]
This is the checkin of the debug changes.

  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 -)-----
(This used to be commit 653c17c1b8e34bfbd05ea35ada9436a50d5a7ba4)

25 years agoadded test for getpwanam().
Andrew Tridgell [Fri, 31 Jul 1998 03:33:25 +0000 (03:33 +0000)]
added test for getpwanam().
(This used to be commit 4eb28f7148f61a215ca644cbe704a4e8dbd83a77)

25 years agoMakefile.in: Moved UBIQX stuff into UTILOBJ.
Jeremy Allison [Thu, 30 Jul 1998 21:18:57 +0000 (21:18 +0000)]
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 3a5eea850bb256b39cff8ace1e4fb4e0c1f5472b)

25 years agoIn addition to the HAVE_FUNCTION_MACRO test that Andrew used as an example,
Christopher R. Hertel [Thu, 30 Jul 1998 20:39:30 +0000 (20:39 +0000)]
In addition to the HAVE_FUNCTION_MACRO test that Andrew used as an example,
I also need to know if the __FILE__ macro exists.  I followed the example,
but ran into two problems:

1) I don't have the autoconf tools installed.
2) The instructions did not say which files should be checked in after
   running autoheader and autoconf.

So I'm checking in the modified acconfig.h and configure.in on the
assumption that the next time someone runs autoheader and autoconf my
new tests will be included.

Hope that's not a problem (and I'll try to grab a copy of autoconf from
somewhere).

Chris -)-----
(This used to be commit 0637a49d5d6c03f10d462be4e92c4e4bbf7ff6c2)

25 years agoadded HAVE_FUNCTION_MACRO test
Andrew Tridgell [Thu, 30 Jul 1998 07:05:15 +0000 (07:05 +0000)]
added HAVE_FUNCTION_MACRO test
(This used to be commit cae580ccc397ea33fdb24a777bdedef6e8271244)

25 years agofixed sin_len test for FreeBSD
Andrew Tridgell [Thu, 30 Jul 1998 04:54:14 +0000 (04:54 +0000)]
fixed sin_len test for FreeBSD
(This used to be commit 15b666a0cebb994b6ed96c75716946afdbfa2861)

25 years agofixed a make proto bug pointed out by Chris.
Andrew Tridgell [Thu, 30 Jul 1998 01:49:58 +0000 (01:49 +0000)]
fixed a make proto bug pointed out by Chris.
(This used to be commit fc1947b52a37bf2c0739091f3dbd84c4a9781d93)

25 years agoupdated prototypes
Andrew Tridgell [Wed, 29 Jul 1998 07:11:33 +0000 (07:11 +0000)]
updated prototypes
(This used to be commit 0bdb51af3199eb32cd3da4c4b8d31fbed5d2ae85)

25 years agofixed a bug in the replacement inet_ntoa
Andrew Tridgell [Wed, 29 Jul 1998 07:07:08 +0000 (07:07 +0000)]
fixed a bug in the replacement inet_ntoa
(This used to be commit 32bd7137122eedf44dbb092da5ae3106d8fe994e)

25 years agotest for a broken inet_ntoa and replace it if necessary (for
Andrew Tridgell [Wed, 29 Jul 1998 07:02:06 +0000 (07:02 +0000)]
test for a broken inet_ntoa and replace it if necessary (for
IRIX+gcc-2.8.1)
(This used to be commit ddffbcbcb1284b6ead5f7f7b6665ba2456c0071a)

25 years agoignore the auto-generated dummy file
Andrew Tridgell [Wed, 29 Jul 1998 05:09:10 +0000 (05:09 +0000)]
ignore the auto-generated dummy file
(This used to be commit f4c629bde2bbcb0cfa4d6f5cb1aa7edddf569fac)

25 years agoadded Makefile to .cvsignore in the hope that this will prevent people
Andrew Tridgell [Wed, 29 Jul 1998 05:07:29 +0000 (05:07 +0000)]
added Makefile to .cvsignore in the hope that this will prevent people
from committing changes to it.
(This used to be commit a7d4e6697fb724def740b8bbfc3e88ae651cc20e)

25 years agoget rid of the runtime test for broken getgroups() and add a compile
Andrew Tridgell [Wed, 29 Jul 1998 05:05:36 +0000 (05:05 +0000)]
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 8b25fe734166b76ceebf8d9543c706ebe0fddc96)

25 years agoremoved some feedback request comments - we get enough email :)
Andrew Tridgell [Wed, 29 Jul 1998 03:34:43 +0000 (03:34 +0000)]
removed some feedback request comments - we get enough email :)
(This used to be commit 19aa9a1c95d357e1041e9a3ece89d7bb3cc6f6ac)

25 years agoupdated the UNIX install instructions to include ./configure
Andrew Tridgell [Wed, 29 Jul 1998 03:34:08 +0000 (03:34 +0000)]
updated the UNIX install instructions to include ./configure
(This used to be commit 8d916f3fdb8eeea179f25028adc2a60f2e4e9b24)

25 years agohopefully permissions are right now
Andrew Tridgell [Wed, 29 Jul 1998 03:20:19 +0000 (03:20 +0000)]
hopefully permissions are right now
(This used to be commit e7b6e8ef618029e6b2c372afcbf3f158217b04bd)

25 years agostill trying to get permissions right - CVS doesn't commit permissions changes it...
Andrew Tridgell [Wed, 29 Jul 1998 03:19:10 +0000 (03:19 +0000)]
still trying to get permissions right - CVS doesn't commit permissions changes it seems
(This used to be commit 0cf6529341aa8023137222c94b0895ff555b8791)

25 years agocheckin configure again in order to get permissions right
Andrew Tridgell [Wed, 29 Jul 1998 03:16:09 +0000 (03:16 +0000)]
checkin configure again in order to get permissions right
(This used to be commit e16c467303884277c8e6acb6bffe01a27c5e853f)

25 years agosome merge cleanups
Andrew Tridgell [Wed, 29 Jul 1998 03:15:02 +0000 (03:15 +0000)]
some merge cleanups
(This used to be commit 1d655b7c64231b0aec0548bb90fc3dcc3f37791c)

25 years agomerge from the autoconf2 branch to the main branch
Andrew Tridgell [Wed, 29 Jul 1998 03:08:05 +0000 (03:08 +0000)]
merge from the autoconf2 branch to the main branch
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)

25 years agolocking.c: Print messages when we downgrade a lock.
Jeremy Allison [Wed, 29 Jul 1998 00:27:23 +0000 (00:27 +0000)]
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 7b3a9d6285cc0d1967155a68845e28c6296ecc67)

25 years agolocking.c: Don't need to do map_lock_type on *testing* a lock, just on setting.
Jeremy Allison [Tue, 28 Jul 1998 18:26:47 +0000 (18:26 +0000)]
locking.c: Don't need to do map_lock_type on *testing* a lock, just on setting.
Jeremy.
(This used to be commit 17f68cc86cafbb04dbd9cc6ecc0aac7b911c9b70)

25 years agoloadparm.c: Added strict sync parameter.
Jeremy Allison [Tue, 28 Jul 1998 18:15:31 +0000 (18:15 +0000)]
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 ed57b603b5c9333d588e62d774ad2be67e43ffd9)

25 years agochgpasswd.c: Fixed up debug calls to stop crashes if ptsname failed.
Jeremy Allison [Mon, 27 Jul 1998 18:50:45 +0000 (18:50 +0000)]
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 ef1af7fe6d5c58ae57b8e4efff0729e1a315da43)

25 years agoCleaned up some testing code and made it more "permanent" looking. The
Christopher R. Hertel [Sat, 25 Jul 1998 15:45:42 +0000 (15:45 +0000)]
Cleaned up some testing code and made it more "permanent" looking.  The
NetBIOS name lists attached to the subnet records are now managed by
the splay tree code.  I am still working on the WINS database as a
separate issue.  Code is written, it's just a matter of incorporating it.
CRH
(This used to be commit 5ba96ddde4a4b2da2cc09190f5c6f0e633852f12)

25 years agoNoticed that I was using the strlen() of a string that I had strdup()'d
Christopher R. Hertel [Sat, 25 Jul 1998 15:18:07 +0000 (15:18 +0000)]
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 899d0d5de5dd9d080d5c4cb94874d4f939427d1b)

25 years agoConverted the browser database to a ubi_dLinkList. This should reduce code
Christopher R. Hertel [Fri, 24 Jul 1998 19:03:11 +0000 (19:03 +0000)]
Converted the browser database to a ubi_dLinkList.  This should reduce code
size, etc.  Also did a bit of work to add comments.
Chris -)-----
(This used to be commit d8b0a2104c05df957f0eb49c21388ec5a4858d98)

25 years agoChanged the definition of the linked list header used in the directory
Christopher R. Hertel [Fri, 24 Jul 1998 07:43:13 +0000 (07:43 +0000)]
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 16f0ad0c913e2d5b0198409485c56ad4809ca077)

25 years agoTo each list type, I added a macro that makes it easier to define and
Christopher R. Hertel [Fri, 24 Jul 1998 07:39:14 +0000 (07:39 +0000)]
To each list type, I added a macro that makes it easier to define and
initialize a list header.
(This used to be commit 3c133778f13f690e70b8b5b923e10b5fe561c812)

25 years agoUpdates smbstatus to have a -S and -L flag.
Richard Sharpe [Fri, 24 Jul 1998 01:08:31 +0000 (01:08 +0000)]
Updates smbstatus to have a -S and -L flag.

Also updated the documentation :-)

The code is ugly, we need to rewrite smbstatus someday.
(This used to be commit a2a9f55a76fc16ef1d4656332ef6b1b455bb6259)

25 years agolocking.c: Added lock type to is_locked() and do_lock()
Jeremy Allison [Thu, 23 Jul 1998 00:10:26 +0000 (00:10 +0000)]
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 80080abf772a470d5f0f4dcd4a75fb2a09a9fb2a)

25 years agoFixed bug found by Richard Sharpe. After increasing files_struct size by
Jeremy Allison [Wed, 22 Jul 1998 13:59:19 +0000 (13:59 +0000)]
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 339b10222269d71c7a493cc08b7b1bfd35fd55fc)

25 years agoincludes.h: Added feature type USE_GRANTPT for pty code.
Jeremy Allison [Wed, 22 Jul 1998 01:31:59 +0000 (01:31 +0000)]
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 953c5dbbae8c1370e5988619746b508f26cb0390)

25 years agoForgot to increase size of files_struct by MAX_OPEN_DIRECTORIES in
Jeremy Allison [Fri, 17 Jul 1998 22:22:48 +0000 (22:22 +0000)]
Forgot to increase size of files_struct by MAX_OPEN_DIRECTORIES in
previous checkin.
Jeremy.
(This used to be commit 7dfaca5d370ccb472d85416c623692ae7ec2176f)

25 years agoCode added to fix the renaming of a directory under NT SMB calls.
Jeremy Allison [Fri, 17 Jul 1998 22:21:24 +0000 (22:21 +0000)]
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 e01ce693f47e75e277f3440d46e32b0bd866b550)

25 years agonttrans.c: Added FILE_EXECUTE to required permissions checked.
Jeremy Allison [Fri, 17 Jul 1998 01:38:08 +0000 (01:38 +0000)]
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 6c31be7d3ffff6a40bbbac6de53663fa707ac859)

25 years agolocal.h: Added NTFS define if HAVE_NT_SMBS is defined.
Jeremy Allison [Fri, 17 Jul 1998 00:47:16 +0000 (00:47 +0000)]
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 0fcf167af898a9c7a20fddc0d95c887477a22ed1)

25 years agoMakefile: Added nttrans.o
Jeremy Allison [Thu, 16 Jul 1998 22:46:06 +0000 (22:46 +0000)]
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 3e5cada9885059e9926eb6a56d350c4b1b53d245)

25 years agoMakefile: Added CC=gcc to DGUX on Intel. Comment from ross@filmworks.com.
Jeremy Allison [Thu, 16 Jul 1998 00:06:29 +0000 (00:06 +0000)]
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 559a9bf2bbdeae3e76ba9178779cd3a9537c4e91)

25 years agoutil.c: I've added a function called mem_dup(). Similar to strdup(),
Christopher R. Hertel [Wed, 15 Jul 1998 20:15:25 +0000 (20:15 +0000)]
util.c:  I've added a function called mem_dup().  Similar to strdup(),
         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().
(This used to be commit 7f7e265ab457d046441d502d4b8447bc2c966675)

25 years agoloadparm.c:
Jeremy Allison [Tue, 14 Jul 1998 21:23:59 +0000 (21:23 +0000)]
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 4eccb47cfb3c8907a6558b6ea9a02b0184458e34)

25 years agoAdded strupper() function call to up-case the scope field in the
Christopher R. Hertel [Tue, 14 Jul 1998 01:52:09 +0000 (01:52 +0000)]
Added strupper() function call to up-case the scope field in the
make_nmb_name() function.  Database lookups (eg. gdbm) will often use
byte-by-byte comparisons, so it is important that the case and padding
are correct.

Chris -)-----
(This used to be commit d64ca4250ff0df4ceffe49b7d462df699a6981b4)

25 years agonntrans.c: Fully implemented transact rename.
Jeremy Allison [Sat, 11 Jul 1998 01:25:02 +0000 (01:25 +0000)]
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 b398f7daf58459db6e8d3496502abeb634ac2183)

25 years agonttrans.c: More NT SMB stuff.
Jeremy Allison [Sat, 11 Jul 1998 00:28:34 +0000 (00:28 +0000)]
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 fb19dad88edfd7a5c7257a15afc9253fb41f4b99)

25 years agoFix for bug PR#8294 reported by <detlef.lammermann@er.materna.de>
Jeremy Allison [Fri, 10 Jul 1998 20:03:09 +0000 (20:03 +0000)]
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 5f4be1498f7c907a539fe9b5998dfbcaa9e20e20)

25 years agoAIX patch from Michael Wojcik <mww@microfocus.com> adding detail
Jeremy Allison [Fri, 10 Jul 1998 01:13:16 +0000 (01:13 +0000)]
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 7a8d0a4ed4e07090bfe776b5544712274d2426e4)

25 years agoNeeded fix to SIGHUP handling donated by branko.cibej@hermes.si
Jeremy Allison [Thu, 9 Jul 1998 22:01:51 +0000 (22:01 +0000)]
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 4d26757776af2aaba9cdaf4c956fab29bfde1599)

25 years agoNew version of the DFS_AUTH code from Karsten Muuss <muuss@or.uni-bonn.de>
Jeremy Allison [Thu, 9 Jul 1998 19:13:01 +0000 (19:13 +0000)]
New version of the DFS_AUTH code from Karsten Muuss <muuss@or.uni-bonn.de>
Jeremy.
(This used to be commit cf7402c5325afd1f9a737facf285cb905702adb2)

25 years agoFixing Oops. Thought I had added these - but not!
John Terpstra [Thu, 9 Jul 1998 07:45:08 +0000 (07:45 +0000)]
Fixing Oops. Thought I had added these - but not!
(This used to be commit 3d15f9d297a0b03c7e0f2434c9d9457dece60c9a)

25 years agoFixed typos and reformatted doco.
John Terpstra [Thu, 9 Jul 1998 07:44:07 +0000 (07:44 +0000)]
Fixed typos and reformatted doco.
(This used to be commit 4a0cda25fd96e81da2502c3e0efd83d9a4c0ced6)

25 years agoNT SMB trans reply code.
Jeremy Allison [Thu, 9 Jul 1998 00:41:32 +0000 (00:41 +0000)]
NT SMB trans reply code.
Jeremy.
(This used to be commit 556254d72517c8a5bf70cafaf443df1675fe64d9)

25 years agoImplementing more NT SMB functionality.
Jeremy Allison [Wed, 8 Jul 1998 01:42:05 +0000 (01:42 +0000)]
Implementing more NT SMB functionality.
Jeremy.
(This used to be commit d34c91126049b7d3094455d407aa99a6d0452304)

25 years agoincludes.h: Fixes for QNX 4.x.
Jeremy Allison [Tue, 7 Jul 1998 19:25:46 +0000 (19:25 +0000)]
includes.h: Fixes for QNX 4.x.
Jeremy.
(This used to be commit 6055be064ec1e9416bb9a7cd97a11976fb336fb6)

25 years agoFixed (hopefully) last bug with username mapping.
Jeremy Allison [Tue, 7 Jul 1998 16:58:29 +0000 (16:58 +0000)]
Fixed (hopefully) last bug with username mapping.
map_username wasn't returning true on a map which
was causing find_service not to find a home directory.
Jeremy.
(This used to be commit 97209a29467699173caf79e1c81729eb2afedda5)

25 years agoCorrected info.
Jeremy Allison [Tue, 7 Jul 1998 01:27:11 +0000 (01:27 +0000)]
Corrected info.
Jeremy.
(This used to be commit 2d0c9baa17d5d298a3e9c22a8a5d2c77998cee18)

25 years agopassword.c: Fixes to allow Win95 clients to have lm encrypted passwords
Jeremy Allison [Mon, 6 Jul 1998 22:48:21 +0000 (22:48 +0000)]
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 ad1848b35521b3d478ea3226db818a1edef78254)