1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

9332 Commits

Author SHA1 Message Date
Andrew Tridgell
b9eff31b14 This removes the 3rd argument from init_unistr2(). There were 240
calls to init_unistr2() in the code and every one of them got the 3rd
argument incorrect, so I thought it best just to remove the argument.

The incorrect usage was caused by callers using strlen() to determine
the length of the string. The 3rd argument to init_unistr2() was
supposed to be the character length, not the byte length of the
string, so for non-english this could come out wrong.

I also removed the bogus 'always allocate at least 256 bytes'
hack. There may be some code that relies on this, but if there is then
the code is broken and needs fixing.
-
Andrew Tridgell
f2c9c64900 the 'static' keyword here is useless as we are not declaring a
variable or function
-
Andrew Tridgell
0e90da0810 fix some undefined behaviour with increments in C. In theory a
compiler could have produced complete crap for this code.
-
Tim Potter
a1c790b5ea Let's clean up client side ntlmssp!
Removed a dead function.
-
Tim Potter
60c13a7675 Remove unused variable in reply_spnego_ntlmssp_ok -
Richard Sharpe
e1e9c29c40 Fix an error where the SK Offset was truncated to 16 bits. Variables needed
to be unsigned int (DWORD) not unsigned int (WORD).
-
Jeremy Allison
3d04872499 Fixed up mutex protection around winbindd logon code. Sync with APP-HEAD.
Jeremy.
-
Andrew Bartlett
c7793f2718 (missed in last commit)
Change the 'cookie' to be the ntlmssp_context, and use the 'auth_context' on
that to store the cookie.  Ensures that simple callbacks can 'just work'.

Also make it clear that we are doing a pull_string into a pstring, not just
any sized buffer.

Andrew Bartlett
-
Andrew Tridgell
665cc9b1ac allow a couple of LSA functions to take a username instead of a SID,
They still accept a SID, it just can be tedious to have to type SIDs
instead of names all the time.
-
Andrew Bartlett
9128aa3dd2 Add LIBSMB_OBJ for the new ntlm_auth functionality.
Andrew Bartlett
-
Andrew Bartlett
fe50ca8f54 Updates to the NTLMSSP code again - moving the base64 decode fuctionality out
of the SWAT code, and adding a base64 encoder.

The main purpose of this patch is to add NTLMSSP support to 'ntlm_auth', for
use with Squid.  Unfortunetly the squid side doesn't quite support what we need
yet.

Changes to winbind to get us the info we need, and a couple of consequential
changes/cleanups in the rest of the code.

Andrew Bartlett
-
Jeremy Allison
c3544c119e More Heimdal changes. Still not compiling with Heimdal yet...
Jeremy.
-
Jeremy Allison
a776fbef32 Fist part of fixes to make us compile with Heimdal. Don't explicitly
detect for now, I still have vague hopes of hiding the differences
between MIT and Heimdal with a compatibility layer....
Jeremy.
-
Andrew Bartlett
b5ae49544d Fix a signed/unsigned warning. -
Jeremy Allison
af8a5d7968 Add mutex protection around auth calls.
Jeremy.
-
Gerald Carter
251585142b s/WIFSIGNALLED/WIFSIGNALED/g -
Tim Potter
7ed8046d04 Removed level 0 DEBUG leftover from testing. -
Andrew Bartlett
ba13e058d4 Missed auth_ntlmssp.c in last night's checkin. Also keep track of the current
challenge in the NTLMSSP context.

Andrew Bartlett
-
Gerald Carter
dfeab6ff24 remove torture tools on make clean -
Gerald Carter
9ac196dad4 small merges from SAMBA_3_0; mostly typos, renames, etc... -
Herb Lewis
dc88827786 initialize acct_ctrl before using it
remove ldap_msgfree(result); as result is unitialized at this point
-
Gerald Carter
4a6d8280ea * removed unused variable from rpcclient code
* added container option to net command (patch from SuSE)
* Makefile patch for examples/VFS from SuSE
-
Andrew Bartlett
9e48ab86da Refactor the NTLMSSP code again - this time we use function pointers to
eliminate the dependency on the auth subsystem.  The next step is to add
the required code to 'ntlm_auth', for export to Squid etc.

Andrew Bartlett
-
Andrew Bartlett
c781e34d27 Doing a malloc(strlen(s)) then a pstrpcp(y, s) is just silly, make it a strdup
instead.

Andrew Bartlett
-
Andrew Tridgell
65bac11d71 added cli_lsa_enum_account_rights() call. Note that this is in
principal similar to the existing cli_lsa_enum_privsaccount() call,
except that cli_lsa_enum_account_rights() doesn't require a call to
open_account first. There is also the minor matter that
cli_lsa_enum_account_rights() works whereas
cli_lsa_enum_privsaccount() doesn't!

this call can be used to find what privileges an account or group
has. This is a first step towards proper privileges support in Samba.
-
Andrew Bartlett
919889de78 Fix warnings by getting the function into a shape the autoprototyper will
read, and add a static.

Andrew Bartlett
-
Andrew Bartlett
51b1413056 Crash fixes:
- fix a crash when a second NTLMSSP session tried to free the first
 - fix a crash due to some NULL pointers in the Add Printer Wizard (or read
   printer code too it appears).  As far as I can tell it's just that the
   GUID just might not exist.

Andrew Bartlett
-
Martin Pool
1e33083fe6 One more from waitpid() audit: Correctly interpret waitstatus when a
child fails.  Possibly this was causing smbmount to exit(0) when it
really should have indicated a failure.
-
Martin Pool
82e4bb598c Run autoheader -
Martin Pool
468c487df4 Fix bug where the existence of config.cache would cause functions like
yp_get_default_domain to be misdetected.

According to the autoconf manual we need to check for libraries before
looking for functions in them.
-
Herb Lewis
50adb8cc10 IRIX uses libns_winbind.so instead of libnss_winbind.so -
Gerald Carter
099e844571 [merge] removing unused variable and unused file -
Andrew Bartlett
68de9a5920 Fix some debug lines, and add a bit more info to help track down ldap
connectivity problems.

Andrew Bartlett
-
Gerald Carter
54b054c1ed make -i flag work lik eit did in 2.2 -
Andrew Bartlett
2c2c52a18b Commit my (disabled) fstring/pstring mixup detection code.
We need to fix some 'overmalloc' cases before it can be enabled by default.

Andrew Bartlett
-
Andrew Bartlett
b328b67fd8 The last of the fstring/pstring mixups, and an extra 'static'. -
Andrew Bartlett
e5d2b1f6c3 A couple more pstcpy/fstrcpy mixups - doing an fstrcpy into a pstring is
harmless, but breaks my automated check.
-
Tim Potter
056bdfbce7 Added comment about a SMB_ASSERT() -
Tim Potter
7b0c03cbf1 Remove wrapper function _get_trust_account_password() as it doesn't
seem to do anything useful anymore other than call
secrets_fetch_trust_account_password().
-
Tim Potter
c64e2308ba Added a comment in case anyone is thinking of doing a SMB_ASSERT in winbindd. -
Andrew Tridgell
e4ce26332b query_alt_name takes a forced unicode string in win2000. It is not
null terminated.

Thanks to Metze for finding this.
-
Andrew Tridgell
31894ba0e5 clearer debug message when the user is already in the ldap db -
Andrew Tridgell
2a642a1169 add help text for 'net ads lookup' -
Jeremy Allison
faf443e519 Missing indirect in final free.
Jeremy.
-
Andrew Bartlett
740bf439d2 Always initialise this variable - and don't set the 'must change now' if it was
last changed at '0'.

We need to actually change this password sometime...

Andrew Bartlett
-
Andrew Bartlett
d7452e73b5 Fix typo, and the build. -
Richard Sharpe
9a38e37811 Make sure that those cleanups actually went in. -
Andrew Bartlett
18e598ec24 Patch from metze to add what he feels is the correct semantics for a Domain
Controller.  As we have had a number of attempts at this over the last little
while, I need to get my test rig going, and give this whole area a poke...

Meanwhile, if you want to use this, just adjust your 'auth methods' line to use
samstrict_dc...

Andrew Bartlett
-
Andrew Bartlett
71f4d8efd3 Patch from metze to to make testparm show values for 'workgroup', 'netbios
name' and 'netbios scope'.  Probably has a similar effect on SWAT.

Also adds '-V' to testparm.

Andrew Bartlett
-
Andrew Bartlett
d0bebea521 Patch from ab, to make findsmb omit -r most of the time.
(original mail follows)
--
From:	Alexander Bokovoy <a.bokovoy@sam-solutions.net>
Greetings!

I propose to make an optional argument '-r' for findsmb utility to pass
'-r' option to nmblookup optionally and default to omit it. The reason is
to have findsmb working more user-friendly in contemporary office
environments where Windows 95/98 boxes are rare and also to allow usage of
the utility under non-priviledged accounts when Windows95/98 boxes are in
minority or even absent in network neighbourhood.

An attached patch provides this change for HEAD together with
documentation changes.

--
/ Alexander Bokovoy
-