Simo Sorce [Fri, 10 Aug 2001 09:52:10 +0000 (09:52 +0000)]
- avoid possible mem leaks in rpcclient/cmd_*.c (talloc_destroy not performed)
- ported two rpc back from TNG (WINREG: shutdown and abort shutdown)
- some optimizations and changed some DEBUG statement in loadparm.c
- changed rpcclient a bit moved from non reentrant next_token_nr to next_token
- in cmd_reg.c not sure if getopt will work ok on all platforms only setting optind=0
Tim Potter [Fri, 10 Aug 2001 07:41:18 +0000 (07:41 +0000)]
Debug cleanups.
Tim Potter [Fri, 10 Aug 2001 06:46:11 +0000 (06:46 +0000)]
Had the test for cli_is_error() reversed. You idiot Stimpy!
Tim Potter [Fri, 10 Aug 2001 06:16:05 +0000 (06:16 +0000)]
Fixes for new client error api.
Tim Potter [Fri, 10 Aug 2001 06:11:31 +0000 (06:11 +0000)]
Use new client error api.
Tim Potter [Fri, 10 Aug 2001 06:01:11 +0000 (06:01 +0000)]
Use the new client error api.
Tim Potter [Fri, 10 Aug 2001 06:00:33 +0000 (06:00 +0000)]
A rewrite of the error handling in the libsmb client code. I've separated
out the error handling into a bunch of separate functions rather than all
being handled in one big function.
Fetch error codes from the last received packet:
void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *num);
uint32 cli_nt_error(struct cli_state *);
Convert errors to UNIX errno values:
int cli_errno_from_dos(uint8 eclass, uint32 num);
int cli_errno_from_nt(uint32 status);
int cli_errno(struct cli_state *cli);
Detect different kinds of errors:
BOOL cli_is_dos_error(struct cli_state *cli);
BOOL cli_is_nt_error(struct cli_state *cli);
BOOL cli_is_error(struct cli_state *cli);
This also means we now support CAP_STATUS32 as we can decode and understand
NT errors instead of just DOS errors. Yay!
Ported a whole bunch of files in libsmb to use this new API instead of the
just the DOS error.
Tim Potter [Fri, 10 Aug 2001 05:50:47 +0000 (05:50 +0000)]
More constant conversions.
Tim Potter [Fri, 10 Aug 2001 05:50:20 +0000 (05:50 +0000)]
Removed nt_error field from cli_state as it was not used anywhere.
Tim Potter [Fri, 10 Aug 2001 05:41:53 +0000 (05:41 +0000)]
Replaced the duplicate DOS constants with appropriate ones from doserr.h to
emphasise the fact that the spoolss pipe returns DOS error codes instead of
32-bit nt status codes.
Tim Potter [Fri, 10 Aug 2001 05:37:52 +0000 (05:37 +0000)]
Moved dos error codes from smb.h into new file doserr.h
Tim Potter [Fri, 10 Aug 2001 04:59:05 +0000 (04:59 +0000)]
Changed the order of arguments in make_oem_passwd_hash(). All the other
encryption functions have outputs as the last arguments.
Gerald Carter [Fri, 10 Aug 2001 04:27:26 +0000 (04:27 +0000)]
merge from 2.2
Jeremy Allison [Fri, 10 Aug 2001 03:17:58 +0000 (03:17 +0000)]
Fixed typo in patch.
Jeremy.
Jeremy Allison [Thu, 9 Aug 2001 20:01:35 +0000 (20:01 +0000)]
Fixed wrong placement of allocate code :-(.
Changed alignment offset to 1 to allow netmon to parse ok.
Jeremy.
Jeremy Allison [Thu, 9 Aug 2001 19:36:12 +0000 (19:36 +0000)]
Added fix from Dan Thibadeau @ HP for parsing problem.
Jeremy.
Jeremy Allison [Thu, 9 Aug 2001 19:22:51 +0000 (19:22 +0000)]
Fix inspired by Don @ HP. Close down password server connection if keepalive
fails.
Jeremy.
Jeremy Allison [Thu, 9 Aug 2001 18:20:43 +0000 (18:20 +0000)]
Merged John's fix.
Jeremy.
Gerald Carter [Thu, 9 Aug 2001 15:53:49 +0000 (15:53 +0000)]
a few cleanups while mergeing the passdb code into 2.2
Andrew Bartlett [Thu, 9 Aug 2001 12:52:05 +0000 (12:52 +0000)]
Try to set the socket options early for some OSs (like Sol 8) where they
can't be set after the listen().
Andrew Bartlett
Tim Potter [Thu, 9 Aug 2001 03:41:18 +0000 (03:41 +0000)]
Link fix for smbpasswd.
Simo Sorce [Wed, 8 Aug 2001 16:54:16 +0000 (16:54 +0000)]
Change all realloc() statements to Realloc() (ecxept for tdb.c)
changed some code to exploit the fact that Realloc(NULL, size) == malloc(size)
fixed some possible mem leaks, or seg faults.
thanks to andreas moroder (mallocs not checked in client/client.c, client/smbumount.c)
Andrew Bartlett [Wed, 8 Aug 2001 03:25:47 +0000 (03:25 +0000)]
Some better debugs for our security=server code. I want to track down why
we occasionally don't make the connection to the server.
Tim Potter [Wed, 8 Aug 2001 03:21:43 +0000 (03:21 +0000)]
Merge of modesty patch from 2.2 spec file.
Tim Potter [Wed, 8 Aug 2001 03:18:49 +0000 (03:18 +0000)]
Factored out common rpc pipe initialisation and shutdown code.
Tim Potter [Tue, 7 Aug 2001 23:21:45 +0000 (23:21 +0000)]
Patch for having spaces in tdb keys, NULL termination fixes and other
stuff. From Andrew Esh <AEsh@tricord.com>
Jeremy Allison [Tue, 7 Aug 2001 19:48:54 +0000 (19:48 +0000)]
Update to work with no crypt available, just like it will in Samba.
Jermey.
Gerald Carter [Tue, 7 Aug 2001 19:34:38 +0000 (19:34 +0000)]
merge from 2.2
Jeremy Allison [Tue, 7 Aug 2001 19:18:27 +0000 (19:18 +0000)]
Always return NT_STATUS_DISK_FULL, even for quota errors.
Jeremy.
Jeremy Allison [Tue, 7 Aug 2001 01:19:32 +0000 (01:19 +0000)]
Added fixes to return correct error codes on space allocation fail.
Jeremy.
Jeremy Allison [Tue, 7 Aug 2001 00:36:10 +0000 (00:36 +0000)]
Correctly report amount written in debug when allocation space.
Jeremy.
Tim Potter [Tue, 7 Aug 2001 00:01:41 +0000 (00:01 +0000)]
A collection of fixes/cleanups to the security descriptor code by
matt_zinkevicius@hp.com
Tim Potter [Mon, 6 Aug 2001 23:29:25 +0000 (23:29 +0000)]
Fixed another possible memleak in cli_initialise()
Jeremy Allison [Mon, 6 Aug 2001 22:39:51 +0000 (22:39 +0000)]
Added Gerald's lanman printing only change to HEAD.
Jeremy.
Jeremy Allison [Mon, 6 Aug 2001 19:21:23 +0000 (19:21 +0000)]
Fix for getting allocate_file_space to return the correct errno.
Jeremy.
Andrew Bartlett [Mon, 6 Aug 2001 09:35:08 +0000 (09:35 +0000)]
Record the NT_STATUS constant rather than its number in the logfiles
Fix typo in lmhosts manpage
Richard Sharpe [Mon, 6 Aug 2001 08:52:39 +0000 (08:52 +0000)]
Stop HP/UX building shared libraries for the moment ...
Tim Potter [Mon, 6 Aug 2001 02:35:14 +0000 (02:35 +0000)]
We don't use indent in the HEAD branch.
Tim Potter [Mon, 6 Aug 2001 02:18:40 +0000 (02:18 +0000)]
Cleaned up error handling in cli_initialise() to fix a memleak found by
Claudia Moroder <claudiamoroder@st-ulrich.suedtirol.net>
Tim Potter [Mon, 6 Aug 2001 02:13:23 +0000 (02:13 +0000)]
Changed lone malloc() call to talloc(). Spotted by
Claudia Moroder <claudiamoroder@st-ulrich.suedtirol.net>
Tim Potter [Mon, 6 Aug 2001 02:10:59 +0000 (02:10 +0000)]
Added smbtree to list of ignored files.
Simo Sorce [Sun, 5 Aug 2001 16:05:40 +0000 (16:05 +0000)]
me stupid.
never commit without building.
sorry.
Tim Potter [Sun, 5 Aug 2001 11:19:34 +0000 (11:19 +0000)]
Another winbind test - fill in later.
Simo Sorce [Sun, 5 Aug 2001 10:10:16 +0000 (10:10 +0000)]
Some fixes about malloc/Realloc and mem leak
thanks to andreas moroder
Volker Lendecke [Sat, 4 Aug 2001 18:17:30 +0000 (18:17 +0000)]
Print an error message if database could not be opened.
Volker
Jeremy Allison [Sat, 4 Aug 2001 00:24:54 +0000 (00:24 +0000)]
Extra debug to see what errno is on write fail.
Jeremy.
Jeremy Allison [Fri, 3 Aug 2001 19:32:33 +0000 (19:32 +0000)]
The write zero bytes is an allocate, not set EOF.
Jeremy.
Jeremy Allison [Fri, 3 Aug 2001 17:28:18 +0000 (17:28 +0000)]
Added include guards...
We may need to rename this file smbauth.h, as auth.h
is so generic it will probably conflict with system header
files on some systems.
Jeremy.
Andrew Bartlett [Fri, 3 Aug 2001 13:24:38 +0000 (13:24 +0000)]
This is the fix for the PAM bug I probably introduced in the previous commit,
which I will confirm once I can find a box it would break on in the first place.
(this is the pam accounts as nobody thing we had with 2.2.0)
Andrew Bartlett
Andrew Bartlett [Fri, 3 Aug 2001 13:09:23 +0000 (13:09 +0000)]
This is my 'Authentication Rewrite' version 1.01, mostly as submitted to
samba-technical a few weeks ago.
The idea here is to standardize the checking of user names and passwords,
thereby ensuring that all authtentications pass the same standards. The
interface currently implemented in as
nt_status = check_password(user_info, server_info)
where user_info contains (mostly) the authentication data, and server_info
contains things like the user-id they got, and their resolved user name.
The current ugliness with the way the structures are created will be killed
the next revision, when they will be created and malloced by creator functions.
This patch also includes the first implementation of NTLMv2 in HEAD, but which
needs some more testing. We also add a hack to allow plaintext passwords to be
compared with smbpasswd, not the system password database.
Finally, this patch probably reintroduces the PAM accounts bug we had in
2.2.0, I'll fix that once this hits the tree. (I've just finished testing
it on a wide variety of platforms, so I want to get this patch in).
Tim Potter [Fri, 3 Aug 2001 03:43:24 +0000 (03:43 +0000)]
Fix for smbpasswd set_userinfo24 was in the wrong place!
Jeremy Allison [Thu, 2 Aug 2001 23:48:51 +0000 (23:48 +0000)]
Allow smbpasswd to join a W2K hosted AD domain.
Jeremy.
Jeremy Allison [Thu, 2 Aug 2001 20:52:57 +0000 (20:52 +0000)]
Put HPUX on mmap blacklist.
Jeremy.
Jeremy Allison [Thu, 2 Aug 2001 20:17:40 +0000 (20:17 +0000)]
Added mmap fix to pass lock test from HP.
Ok - now we're no longer trying to reach a silly 1k loc target,
change the formatting to be *readable* - eg.
change if (x) y else z to be :
if (x)
y
else
z
and other compact sillyness. Oh look - when I did this I found
some areas where we *WEREN'T CHECKING SYSTEM CALL ERROR RETURNS !!!!*
CompSci 101 guys....... :-).
Jeremy.
Gerald Carter [Thu, 2 Aug 2001 14:33:32 +0000 (14:33 +0000)]
changed --with-profile to --with-profiling-data to "stop the madness!"
of people somehow thinking this was related to user profiles.
Hope this is ok Herb.
jerry
Jeremy Allison [Wed, 1 Aug 2001 22:13:50 +0000 (22:13 +0000)]
Added "strict allocate" per share parameter. This causes actual on-disk allocation
to be done. Without it just does the ftruncate.
Jeremy.
Jeremy Allison [Wed, 1 Aug 2001 17:43:57 +0000 (17:43 +0000)]
Oops. Typo.
Jeremy.
Jeremy Allison [Wed, 1 Aug 2001 17:32:45 +0000 (17:32 +0000)]
Pidfile check can be read-only. Removed old ifdef in password.c
Jeremy.
Tim Potter [Wed, 1 Aug 2001 06:03:54 +0000 (06:03 +0000)]
Modifying spec files is PITA.
- Install winbind daemon, client programs, nss and pam libraries
- Removed codepage stuff so spec file works with current HEAD branch
Tim Potter [Wed, 1 Aug 2001 05:55:01 +0000 (05:55 +0000)]
Tweaked the installdirs target to ignore errors. This allows RPMS to be
built as non-root user, assuming you have permissions set up properly
in your /usr/src/redhat directory.
Added nsswitch sub-target to all target.
Tim Potter [Wed, 1 Aug 2001 03:19:58 +0000 (03:19 +0000)]
Reran autoconf.
Tim Potter [Wed, 1 Aug 2001 02:39:13 +0000 (02:39 +0000)]
Added autogenerated spec files for various rpm versions.
Tim Potter [Wed, 1 Aug 2001 02:30:33 +0000 (02:30 +0000)]
Rewrite of winbind autoconf fragment.
- can now use --with-winbind to force compilation on systems that are
not linux or solaris (-:
- don't compile winbind if the unix domain socket test fails
- compile right number of bits if --with-pam used
Tim Potter [Wed, 1 Aug 2001 02:12:36 +0000 (02:12 +0000)]
Fixed up compilation of pam_winbind.so to be consistent with value of
--with-pam passed to configure.
Fixed nsswitch target to compile the sbin and lib winbind targets.
Winbind still doesn't install its lib targets (libnss_winbind.so and
pam_winbind.so) properly - the install script is a big mess. )-:
Tim Potter [Wed, 1 Aug 2001 01:20:10 +0000 (01:20 +0000)]
Added some command line argument checking and usage info.
Tim Potter [Wed, 1 Aug 2001 01:00:53 +0000 (01:00 +0000)]
Added and populated .cvsignore files for packaging subdirectories.
Jeremy Allison [Tue, 31 Jul 2001 00:03:24 +0000 (00:03 +0000)]
Fix for rare tdb pattern store failure. Found & fixed by Rusty.
Jeremy.
Jeremy Allison [Mon, 30 Jul 2001 23:12:48 +0000 (23:12 +0000)]
Fixup error returns in updating driver db version.
Jeremy.
Jeremy Allison [Mon, 30 Jul 2001 22:21:31 +0000 (22:21 +0000)]
Added "use mmap" for HPUX.
Jeremy.
Jeremy Allison [Mon, 30 Jul 2001 20:25:35 +0000 (20:25 +0000)]
Throw out crappy (non-ascii unaware) mbtows stuff and use proper unicode
push calls. If this breaks authentication then good, it needed fixing anyway :-).
Jeremy.
Jeremy Allison [Mon, 30 Jul 2001 17:53:39 +0000 (17:53 +0000)]
uint -> uint32.
Jeremy.
Jeremy Allison [Mon, 30 Jul 2001 17:52:26 +0000 (17:52 +0000)]
Fixes for varargs problems with std c.
Fix from Rick Lake <rwlake@anp.nl> for QNX.
Jeremy.
Tim Potter [Mon, 30 Jul 2001 06:19:54 +0000 (06:19 +0000)]
Ignore some of the autoconf files.
Jeremy Allison [Sat, 28 Jul 2001 01:46:47 +0000 (01:46 +0000)]
Fix invalid uid being used after logoff. Thanks to Nigel Williams
for this bug report.
Jeremy.
Jeremy Allison [Sat, 28 Jul 2001 01:26:44 +0000 (01:26 +0000)]
Fix for potential crash bug with bad fid.
Jeremy.
Tim Potter [Fri, 27 Jul 2001 22:54:50 +0000 (22:54 +0000)]
Return an exit code when connect failed.
Patch from Michael Sweet <mike@easysw.com>
Simo Sorce [Thu, 26 Jul 2001 22:05:51 +0000 (22:05 +0000)]
better debug messages + fix typo in debug message
Jeremy Allison [Thu, 26 Jul 2001 21:16:39 +0000 (21:16 +0000)]
Fix from Michael Davidson <md@caldera.com> for DEC OSF/1 ACLs (ie.
Digital UNIX).
Jeremy.
Jeremy Allison [Wed, 25 Jul 2001 18:59:56 +0000 (18:59 +0000)]
Always check fstat for error.
Jeremy.
Jeremy Allison [Wed, 25 Jul 2001 18:07:36 +0000 (18:07 +0000)]
Excellent patch from Anselm Kruis <A.Kruis@science-computing.de> to fix
problem with wrong token being used in current_user.
Jeremy.
Andrew Tridgell [Wed, 25 Jul 2001 13:25:31 +0000 (13:25 +0000)]
we need to pull passwords in client charset for crypto to work
Andrew Tridgell [Wed, 25 Jul 2001 13:19:14 +0000 (13:19 +0000)]
need to push smb_search strings in client charset
Tim Potter [Wed, 25 Jul 2001 06:42:05 +0000 (06:42 +0000)]
Held a shoot-out between NT_STATUS_NO_PROBLEMO and NT_STATUS_NOPROBLEMO.
According to the incorruptible judges find and grep, the latter won.
Mmm - procrastination. (-:
Andrew Tridgell [Wed, 25 Jul 2001 06:29:26 +0000 (06:29 +0000)]
- don't try to print pointers
- removed some unused mangling code
Tim Potter [Wed, 25 Jul 2001 06:21:07 +0000 (06:21 +0000)]
Re-ran autoconf.
Tim Potter [Wed, 25 Jul 2001 06:16:27 +0000 (06:16 +0000)]
Merge ... change machine account password race fix from appliance branch.
Andrew Tridgell [Wed, 25 Jul 2001 04:10:23 +0000 (04:10 +0000)]
got rid of INFO: msgs at debug level 1
Andrew Tridgell [Wed, 25 Jul 2001 04:09:44 +0000 (04:09 +0000)]
nicer smbtree output
Andrew Tridgell [Wed, 25 Jul 2001 04:00:40 +0000 (04:00 +0000)]
ucs2 is always a multiple of 2 bytes
this gets rid of a bunch of iconv warnings
Andrew Tridgell [Wed, 25 Jul 2001 03:28:45 +0000 (03:28 +0000)]
a better test for unix domain sockets
Andrew Tridgell [Wed, 25 Jul 2001 03:05:00 +0000 (03:05 +0000)]
added a --with-libiconv=BASEDIR/ option to allow easier use of an
alternative iconv library
Andrew Tridgell [Wed, 25 Jul 2001 01:41:45 +0000 (01:41 +0000)]
build smbtree by default. It's a very useful utility.
Tim Potter [Tue, 24 Jul 2001 23:30:13 +0000 (23:30 +0000)]
Store winbindd in the sbin directory. Make the winbind pam module also as
a sbin program.
Currently the pam and nss modules are installed into @prefix@/sbin - I'm
not sure whether this is a good idea or not. Perhaps they should be left
in the build tree and copied across as needed by hand or a packaging tool.
Simo Sorce [Tue, 24 Jul 2001 20:02:48 +0000 (20:02 +0000)]
Convert other parameters (read list, write list, valid users...) to the P_LIST format.
changed functions to use list instead of strings
addedd lp_list_substitute function
Richard Sharpe [Tue, 24 Jul 2001 12:17:00 +0000 (12:17 +0000)]
Make sure that a shared library build of libsmbclient causes build
breakage if there are problems. I will take this out tomorrow if it
causes too many problems.
Tim Potter [Tue, 24 Jul 2001 06:54:58 +0000 (06:54 +0000)]
make nsswitch target wasn't building the winbind pam module.
Richard Sharpe [Tue, 24 Jul 2001 01:44:22 +0000 (01:44 +0000)]
Commit an updated configure, but the build_farm should run autoconf!
Jeremy Allison [Tue, 24 Jul 2001 01:18:43 +0000 (01:18 +0000)]
We were making an assumption in the oplock
break code path that was invalid (ie. we were assuming
we could infer a non-levelII oplock when such an oplock
was detected - this may no longer be valid once we've
processed the break process dealing with the break will
change the state of it anyway.
This prevents the state where we get the following packet
trace :
client server
NTcreate ->
<- NTcreate resp
NTcreate ->
<- break to level II
ok - broken ->
<- break to none
Thanks to Alan Romeril for providing the trace that allowed
me to track this down.
Jeremy.
Richard Sharpe [Tue, 24 Jul 2001 00:34:45 +0000 (00:34 +0000)]
Another fine mess, err, fine tune to the Slowaris build ...
Richard Sharpe [Tue, 24 Jul 2001 00:18:20 +0000 (00:18 +0000)]
Make the Slowaris build a bit nicer with cc