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

9969 Commits

Author SHA1 Message Date
Andrew Bartlett
9128aa3dd2 Add LIBSMB_OBJ for the new ntlm_auth functionality.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Jeremy Allison
c3544c119e More Heimdal changes. Still not compiling with Heimdal yet...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
4333be5732 More Heimdal changes. Still not compiling with Heimdal yet...
Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
54d83de8a2 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.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
b5ae49544d Fix a signed/unsigned warning. 0001-01-01 00:00:00 +00:00
Jeremy Allison
af8a5d7968 Add mutex protection around auth calls.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ea4fe9baad Add mutex protection around auth calls.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
bf8bb62023 Merge of holding pattern stuff from HEAD. 0001-01-01 00:00:00 +00:00
Gerald Carter
dc6cda5951 s/WIFSIGNALLED/WIFSIGNALED/g 0001-01-01 00:00:00 +00:00
Gerald Carter
251585142b s/WIFSIGNALLED/WIFSIGNALED/g 0001-01-01 00:00:00 +00:00
Gerald Carter
1df9f3e259 missed a file 0001-01-01 00:00:00 +00:00
Tim Potter
d74382ccfe Remove debugging stmt. 0001-01-01 00:00:00 +00:00
Tim Potter
225182a3a3 Sync up compiler warning fixes. 0001-01-01 00:00:00 +00:00
Tim Potter
7ed8046d04 Removed level 0 DEBUG leftover from testing. 0001-01-01 00:00:00 +00:00
Richard Sharpe
ef59740060 Remove a wayward file. 0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Gerald Carter
c8e77809ad playing janitor for tpot; remove holding pattern 0001-01-01 00:00:00 +00:00
Gerald Carter
dfeab6ff24 remove torture tools on make clean 0001-01-01 00:00:00 +00:00
Gerald Carter
0fb724b321 *lots of small merges form HEAD
*sync up configure.in
*don't build torture tools in make all
*make sure to remove torture tools as part of make clean
0001-01-01 00:00:00 +00:00
Gerald Carter
9ac196dad4 small merges from SAMBA_3_0; mostly typos, renames, etc... 0001-01-01 00:00:00 +00:00
Gerald Carter
787830782c sync up ignored files from HEAD 0001-01-01 00:00:00 +00:00
Gerald Carter
8bd91a50d4 winbindd merges from HEAD 0001-01-01 00:00:00 +00:00
Gerald Carter
7a4c874842 merging some rpcclient and net functionality from HEAD 0001-01-01 00:00:00 +00:00
Herb Lewis
dc88827786 initialize acct_ctrl before using it
remove ldap_msgfree(result); as result is unitialized at this point
0001-01-01 00:00:00 +00:00
Herb Lewis
1102a6f8cd initialize acct_ctrl variable before it is used
remove ldap_msgfree(result); as result is unitialized at this point
0001-01-01 00:00:00 +00:00
Gerald Carter
d223ea87ae more unused files 0001-01-01 00:00:00 +00:00
Gerald Carter
e3f9b68dee remving more unused files 0001-01-01 00:00:00 +00:00
Gerald Carter
25a9681ddd [merge]
* removed unused variable from rpcclient code
* added container option to net command (patch from SuSE)
* Makefile patch for examples/VFS from SuSE
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Gerald Carter
4ff6f99040 removing unused files from release branch 0001-01-01 00:00:00 +00:00
cvs2svn Import User
619877ce03 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. 0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
c781e34d27 Doing a malloc(strlen(s)) then a pstrpcp(y, s) is just silly, make it a strdup
instead.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
919889de78 Fix warnings by getting the function into a shape the autoprototyper will
read, and add a static.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Martin Pool
82e4bb598c Run autoheader 0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Herb Lewis
04adfa001b IRIX uses libns_winbind.so instead of libnss_winbind.so 0001-01-01 00:00:00 +00:00
Herb Lewis
50adb8cc10 IRIX uses libns_winbind.so instead of libnss_winbind.so 0001-01-01 00:00:00 +00:00
Gerald Carter
099e844571 [merge] removing unused variable and unused file 0001-01-01 00:00:00 +00:00
Gerald Carter
c8266011b7 removing unused variable and unused file 0001-01-01 00:00:00 +00:00
Andrew Bartlett
68de9a5920 Fix some debug lines, and add a bit more info to help track down ldap
connectivity problems.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
54b054c1ed make -i flag work lik eit did in 2.2 0001-01-01 00:00:00 +00:00
Gerald Carter
5d821c0e23 make -i flag work lik eit did in 2.2 0001-01-01 00:00:00 +00:00
Andrew Bartlett
1df808ac89 Merge from HEAD - patch by metze to fill in 'workgroup' etc in testparm output,
and probably SWAT too..

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
7d52f011e7 Merge from HEAD:
Keep all the const warnings in one place, by adding a utility function to
make the TDB_DATA.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
9b70fa868e Merge from HEAD:
- fstring/pstring mixups
 - the detection code that found them (disabled)
 - a bit of whitespace
 - a static

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
c0fb53c31f Merge from HEAD:
- remove useless #else
 - signed/unsigned fixes
 - use an fstring for LM hash buffer.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
6dd474d845 Merge from HEAD - eliminated unused arguments.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
2a1adb8f81 Merge indirection, signed/unsigned and uninitialiased-value fixes from HEAD.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
b328b67fd8 The last of the fstring/pstring mixups, and an extra 'static'. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
e5d2b1f6c3 A couple more pstcpy/fstrcpy mixups - doing an fstrcpy into a pstring is
harmless, but breaks my automated check.
0001-01-01 00:00:00 +00:00
Tim Potter
056bdfbce7 Added comment about a SMB_ASSERT() 0001-01-01 00:00:00 +00:00
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().
0001-01-01 00:00:00 +00:00
Tim Potter
c64e2308ba Added a comment in case anyone is thinking of doing a SMB_ASSERT in winbindd. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
20ebdee36d merge alt_name patch from head 0001-01-01 00:00:00 +00:00
Andrew Tridgell
e4ce26332b query_alt_name takes a forced unicode string in win2000. It is not
null terminated.

Thanks to Metze for finding this.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
31894ba0e5 clearer debug message when the user is already in the ldap db 0001-01-01 00:00:00 +00:00
Andrew Tridgell
2a642a1169 add help text for 'net ads lookup' 0001-01-01 00:00:00 +00:00
Jeremy Allison
3aea32c8e6 Don't touch data after a free.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
faf443e519 Missing indirect in final free.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
67a0b30f50 Merge of indirection fixes from HEAD.
Jeremy
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
d7452e73b5 Fix typo, and the build. 0001-01-01 00:00:00 +00:00
Richard Sharpe
f2529a35a7 More janitorial duties. Pulling these in from samba-head. 0001-01-01 00:00:00 +00:00
Richard Sharpe
9a38e37811 Make sure that those cleanups actually went in. 0001-01-01 00:00:00 +00:00
Richard Sharpe
fd847aa936 Now that I am running config.developer, I decided to get rif of some warnings:
1. reboot in parse_reg and cli_reg was shadowing a definition on FreeBSD
   4.3 from system includes.

2. Added a bit of const to places.

3. Made sure internal functions were declared where needed.
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
b6641badcb Updates to our NTLMSSP code:
This tries to extract our server-side code out of sessetup.c, and into a more
general lib.  I hope this is only a temporay resting place - I indend to
refactor it again into an auth-subsystem independent lib, using callbacks.

Move some of our our NTLMSSP #defines into a new file, and add two that I found
in the COMsource docs - we seem to have a double-up, but I've verified from
traces that the NTLMSSP_TARGET_TYPE_{DOMAIN,SERVER} is real.

This code also copes with ASCII clients - not that we will ever see any here,
but I hope to use this for HTTP, were we can get them.  Win2k authenticates
fine under forced ASCII, btw.

Tested with Win2k, NTLMv2 and Samba's smbclient.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
6e821285a4 Accessing data after it's been free()ed really is a no-no...
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
7abca6d281 Fix to debian bug #171071 - we had the wrong dereference on the pointer to be
Realloc()ed, causing it to fail.

Big thanks to Sandor Sonfeld <sonf@linuxmail.org> for the debug, stack and
valgrind traces!

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
c6535836f2 Don't force the DOS password into a 14 char space, as this would imply null
termination - the password will not be null terminated before hashing if
len >= 14.

related to debian bug #157432

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f8d9880c5f Ensure we do not pass uninitialised data to the kernel. (Picked up by
valgrind).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Martin Pool
26660f939f Fix typo in comment. 0001-01-01 00:00:00 +00:00
Tim Potter
089729c02c Merge of remove "winbindd holding pattern" from appliance. It's a bit
simpler as the rescanning of trusted domains helps us out a bit.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f087fe546f Keep all the const warnings in one place, by adding a utility function to
make the TDB_DATA.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
ef9c7586ac Oops, this is the change to use an fstring for the incoming service buffer -
the commit to reply.c just matches a pstrcpy for the pstring.  (harmless, fixes
it for the automated test).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
7854a439ac Make the 'service' in make_connection() use an fstrcpy(), and an fstring,
becouse that is what it's input (reply_tcon_and_x) uses, and becouse we really
don't want supprises for service names.

Also remove a legacy #define, in favor of the lp_ equiv.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
7b92d26d47 While the usage is most bisarre, this fixes up another fstring/pstring mixup.
(In this case, an fstrcpy() into a pstring, ie harmless).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f42cf0783f Use size_t for the counter vars, to match the type they are assigned from
(signed/unsigned mixup).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
9b76123732 A couple more fstring/pstring issues - and move from sizeof(fstring) to
sizeof(var) in slprintf statements, so as to ensure we don't get mixups there.

Also remove fstrcpy() into a variable that is about to be printed into anyway.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
5ff5f540cc Remove an unused paramter for our old LM-only password change code, and fix a
(harmless) fstring/pstring mixup.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
fe1cc779d5 Fix a number of client-side fstring/pstring mixups.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
a66ced2cf6 Patch from Nik Conwell <nik@bu.edu>. Don't reference free()ed data when trying
to figure out if we have got our ticket yet.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
90d0517653 Return the 'freindly' NT error message if at all possible.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
3b2e5f68cd No point having this for both parts of the 'if' statement.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
f8a915b14d [merge] make sure to update print queue cache during timeout_processing() to send notify events; CR 1491 0001-01-01 00:00:00 +00:00
Gerald Carter
1f33b4acb3 typo from merge 0001-01-01 00:00:00 +00:00
Gerald Carter
d1c97738ba fix tdb_append() prototype 0001-01-01 00:00:00 +00:00
Gerald Carter
df6e455992 fix tdb_append() prototype 0001-01-01 00:00:00 +00:00
Gerald Carter
142c5029c7 [merge] make sure to updatre print queue cache during timeout_processing() to send notify events; CR 1491 0001-01-01 00:00:00 +00:00
Jeremy Allison
ee0ceeff99 Added new message_send_pid() code that uses tdb append to reduce locking
contention on the messaging tdb.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5b8cf0810a Added new message_send_pid() code that uses tdb append to reduce locking
contention on the messaging tdb.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
724cefabb0 Added tdb_append() call. Efficiently adds to an entry. Used by new messaging
code. Also added torture tests for it.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b515525a06 Added tdb_append() call. Efficiently adds to an entry. Used by new messaging
code. Also added torture tests for it.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
04243e39cf First part of efficiency fixes for message sending to pid's (cutting down
the amount of time we hold tdb locks). Gulp down all messages at once rather
than reading/re-writing one at a time. NOTE: All dispatch routines *must*
be able to cope with incoming message on *odd* byte boundaries (all current
handlers do).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b752c0340f First part of efficiency fixes for message sending to pid's (cutting down
the amount of time we hold tdb locks). Gulp down all messages at once rather
than reading/re-writing one at a time. NOTE: All dispatch routines *must*
be able to cope with incoming message on *odd* byte boundaries (all current
handlers do).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
21c8acd25a Fix lpq_cache time check (missed from yesterday).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6cb9f6ccb1 Don't delete jobs subitted after the lpq time.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
3442c270f1 a 0 length printer data value is not a memory allocation error; fix CR601 0001-01-01 00:00:00 +00:00
Gerald Carter
47c1709425 a 0 length printer data value is not a memory allocation error; fix CR601 0001-01-01 00:00:00 +00:00
Martin Pool
575908cb06 tdb_chainlock_with_timeout: Add TODO: If we time out waiting for a
lock, it might be nice to use F_GETLK to get the pid of the process
currently holding the lock and print that as part of the debugging
message.

I'd like to have this in appliance_head, but the code is too different
so I won't worry for now.
0001-01-01 00:00:00 +00:00
Tim Potter
88eb9e9486 Remove read_with_timeout() and replaced its only caller (the passwd chat
stuff) with a call to read_socket_with_timeout() which does the same thing.

Passwd chat still works but I couldn't figure out the right arguments to
passwd chat to get it to work right but data was definitely getting
through.
0001-01-01 00:00:00 +00:00
Herb Lewis
9151cd7d64 Moved smbd process counting functions from smbd/server.c to smbd/process.c
so that bin/vfstest can link.  merge from head
0001-01-01 00:00:00 +00:00
Tim Potter
6ed4d80baa Remove dead function. 0001-01-01 00:00:00 +00:00
Tim Potter
812ce0368c Moved smbd process counting functions from smbd/server.c to smbd/process.c
so that bin/vfstest can link.
0001-01-01 00:00:00 +00:00
Martin Pool
be835d01e1 Correct misleading comment: winbindd_lookupname gets the SID for a
name, not vice versa.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6a2b7fd82c Ensure we return disk full by default on short writes.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
2a974bc284 Ensure we return disk full by default on short writes.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e048259472 Ensure we don't get an invalid number for total smbd's if the tdb update
fails.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
99e69fd74d Ensure we don't get an invalid number for total smbd's if the tdb update
fails.
Jeremy.
0001-01-01 00:00:00 +00:00
Herb Lewis
947042007d reran autoconf 0001-01-01 00:00:00 +00:00
Richard Sharpe
490ff93bbf Some fixes to editreg. Clientgen should not be touched, and an update to configure that Herb needs. 0001-01-01 00:00:00 +00:00
Jeremy Allison
48774e77ac Fix erroneous free of SAM_ACCOUNT (make clearer when allocated
memory is being returned).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b0d547b739 Fix erroneous free of SAM_ACCOUNT (make clearer when allocated
memory is being returned).
Jeremy
0001-01-01 00:00:00 +00:00
Tim Potter
db24489eb4 Removed pointless null statement in signal handler. 0001-01-01 00:00:00 +00:00
Tim Potter
451286febd Display an error message when the server cannot be resolved when running at
debug level 0.
0001-01-01 00:00:00 +00:00
Herb Lewis
01757e8b51 cannot assign to const 0001-01-01 00:00:00 +00:00
Jeremy Allison
1cff725e37 Fix open problem with changing attributes on an existing file - based
on work by  <steve@griffin.sio2.nl>.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
465d86d95f Fix open problem with changing attributes on an existing file - based
on work by  <steve@griffin.sio2.nl>.
Jeremy.
0001-01-01 00:00:00 +00:00
Volker Lendecke
434e496289 Fix memory leak. Thanks, Herb!
Volker
0001-01-01 00:00:00 +00:00
Volker Lendecke
8915d59a59 Fix memory leak. Thanks, Herb!
Volker
0001-01-01 00:00:00 +00:00
Herb Lewis
15b2b91f4b this makes it compile, but I'm not sure if it is correct. Are we really
testing a pointer value to be equal to 0x19 ???
0001-01-01 00:00:00 +00:00
Herb Lewis
e3b1e64d9f cannot make assignments to const values. 0001-01-01 00:00:00 +00:00
Herb Lewis
cfe2d01b7d add and escape before $( in regex string so it is not interpreted as the
perl variable for "real gid of this process"
0001-01-01 00:00:00 +00:00
Volker Lendecke
7977a025ae Merge from HEAD.
Volker
0001-01-01 00:00:00 +00:00
Volker Lendecke
c9d0c5254c Create a machine account correctly if the unix account exists.
With this, my test for W2kSP3 join after pdbedit -a -m works fine.

Volker
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
02986f3e3a Added code to the handling of the -M option to ensure that we default to
port 139 for that option.  The NetBIOS Messenger Service doesn't run on
a non-NBT port.
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
a10195b711 Added code to the handling of the -M option to ensure that we default to
port 139 for that option.  The NetBIOS Messenger Service doesn't run on
a non-NBT port.
0001-01-01 00:00:00 +00:00
Tim Potter
232116d2db Rename a local variable to avoid a warning. 0001-01-01 00:00:00 +00:00
Tim Potter
431ac28b5b 'index' is the name of a libc function. Rename to 'ndx' to avoid compiler
warnings.
0001-01-01 00:00:00 +00:00
Tim Potter
4bc82624f6 Remove unused variable. 0001-01-01 00:00:00 +00:00
Jeremy Allison
44ab8dc55e Fix memory leaks in pdb_ code.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ddf741c717 Fix memory leaks in pdb_ code.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
0f8ba688d4 add $(LDFLAGS) to libsmbclient 0001-01-01 00:00:00 +00:00
Gerald Carter
cd16064784 removed idpool from schema file (experimental) to remove the dependency
on nis.schema.

add $(LDFLAGS) to libsmbclient build
0001-01-01 00:00:00 +00:00
Andrew Bartlett
7b95151ddc Merge from HEAD - handle VFS module load failures, change some error returns to
avoid sending NT_STATUS_UNSUCCESSFUL.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
c3a779fc0d Fix from "Ken Cross" <kcross@nssolutions.com> for enumerating
groups.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
cde517cedf Fix from "Ken Cross" <kcross@nssolutions.com> for enumerating
groups.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
41178afdbd Fix a segfault when we don't correctly load a VFS module (don't keep it in
the loaded list on error).  Also change some of the error returns, becouse
NT_STATUS_UNSUCCESSFUL gives a most useless error message on the client.

As for which error, my logic is that a share without a valid VFS module is
not a valid share, and therefore should return the same error as a non-existant
share.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Tim Potter
71b09408ef Some more profiles merges from HEAD (cvsignore and a stray const). 0001-01-01 00:00:00 +00:00
Richard Sharpe
2636b2231c Add profiles utility support to Samba 3.0.x 0001-01-01 00:00:00 +00:00
Andrew Bartlett
32a1802a99 Merge from HEAD - updates to correctly recognise LMv2, and NT# in LM feild.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
5c2e34b5b6 Clear up the auth_sam password checking code (the core of our password checking
routines).  In particular, we now better support the NT# in LM feild, and the
LMv2 password scheme.  (LMv2 is basicly NTLMv2 capped at 24 bytes, slightly
more secure, and in the LM feild for compatiblity).

Thanks to the Samba-TNG team and Luke Leighton for various descriptions of this
algorithm, and to MS for a solution that seems to actually make sense for once
:-).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
4b1a316e79 Merge from HEAD - get the test the right way around, so that we can change
passwords over RAP again.

(found by the build farm)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
066e4f9a4b Even when I can't manage to do QA, at least the build farm will catch some of
the silly stuff.

(fixes password changes from RAP based clients like smbpasswd)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
3b24da8f99 The last of the merge of idra's shutdown changes from head...
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
5fc90b6cf4 Merge from HEAD - whitespace :-) 0001-01-01 00:00:00 +00:00
Andrew Bartlett
8129529c4f Merge from HEAD - vl's fix to my const patch. Also update the 'not have_krb5'
case.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
0d2da98590 The winbind in Samba 3.0 doesn't use the 'proof' for ntlm_auth_crap, so don't
include it in the struct.  (Important becouse it currently has the same version
number as the one in HEAD, which also doesn't have this).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
123ae99c7d Merge from HEAD - do an nt_errstr(nt_status) *after* assiging nt_status with
the actual error value :-)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
610be8d483 Make it clear that the credentials are being setup on the NETLOGON channel, and
may not be to our PDC (might be BDC, or trusted DC).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
91ca4771c6 Merge from HEAD - we already have one function for converting a unistr2 to a
static 'unix' string, so we don't need a second pdb specific version.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f5850928a0 Merge from HEAD - extract user's list of SIDs from their NT_TOKEN and return
this as thier list of groups, rather than do a seperate lookup.  This NT_TOKEN
is originally initgroups() (or equiv) based.

We currently send all sids in our domain, perhaps this should be further
restricted, but this works for now.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f3432869b9 Merge from HEAD - don't base RID on a name being the lp_guest_account(), let
the actual passdb modules decide that.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
c8a809a2a8 Merge from HEAD - baseless parinoia about never having a closed dbf (the debug
file pointer).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f79324f730 Merge from HEAD - mimir's new gencache based namecache code.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
d9417b08d1 Merge from HEAD - move user password changes into the NTSTATUS era, and add
suppport for the 'min password age' and 'min passwd len' concepts.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
b596283352 Missed from previous commit - merge from HEAD the changes to the remote
shutdown struct - it's 2 byte-boolean flags, not 16 bits.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
a4f7777ca0 Merge from HEAD - idra's fix for the fact that the shutdown command takes two 1
byte boolean flags, not a 16 bit bitmask.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
42e1af2008 Fix another pstring/fstring typo 0001-01-01 00:00:00 +00:00
Jeremy Allison
6e0cfec165 Fix problem with "hide unreadable". stat file opens are baaack :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
62038a0abf Fix problem with "hide unreadable". stat file opens are baaack :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
a8db1b611d patch to include support for daemontools from Michael Handler 0001-01-01 00:00:00 +00:00
Gerald Carter
4c48c475a2 patch to include support for daemontools from Michael Handler 0001-01-01 00:00:00 +00:00
Gerald Carter
63d057fc78 make sure we create the PIDDIR and LOCKDIR from installdirs 0001-01-01 00:00:00 +00:00
Gerald Carter
1564ebfc99 make sure we create the PIDDIR and LOCKDIR from installdirs 0001-01-01 00:00:00 +00:00
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
96e9fa5f22 Fixed some simple typos, including one that would cause the wrong value
to be printed in a DEBUG() message.
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
42a4e5b851 Fixed some simple typos, including one that would have resulted in a
DEBUG() message printing the wrong value.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
9e5297131c Merge from HEAD - add PRINTF_ATTRIBUTE to a few more functions. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
353c6b2423 Merge from HEAD - tridge's new timegm() that actually works on solaris.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
c9994ab7bb Merge from HEAD - remove silly 'NT or LM# as password' stuff from pam_smbpass.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
585a73b810 pstring/fstring missmatches found by Andrew Bartlett.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
666861b1e2 pstring/fstring missmatches found by Andrew Bartlett.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
899d353a56 Typo..
Jeremy
0001-01-01 00:00:00 +00:00
Jeremy Allison
339f4fe15e Merge Andrew Bartletts (size_t)-1 checks.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
5023aec5ad WITH_SENDFILE #ifdef merged from SAMBA_2_2 0001-01-01 00:00:00 +00:00
Gerald Carter
aef9af7874 WITH_SENDFILE #ifdef merged from SAMBA_2_2 0001-01-01 00:00:00 +00:00
Andrew Bartlett
f71c8338d3 We already have one function to move unistr2 -> multibyte-static, so we
don't need a second just for pdb.

Also, remove magic 'is lp_guest_account' test - the magic RID should be
up to the passdb backend to set.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
c7e5797a95 Becouse these functions return a size_t, they can't return negitive numbers.
So a < 0 check is pointless, instead check against -1, which will be cast to
unsigned.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
23abf75ade debugparse is a seperate utility, no need to include it in the main ubiqx
objects.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
16fe928e68 Add PRINTF_ATTRIBUTE() to a few more printf() style functions. Aids in
compiler-based argument checking.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
ceb2a79849 Call me parinoid, but I don't like the idea that we could ever have dbf point
to a closed file.  Swap the assign and the close around.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
6d201c9616 Add a dash of static. 0001-01-01 00:00:00 +00:00
Volker Lendecke
f5494f5ef6 One more const. Andrew, you seem to have krb5 :-)
Volker
0001-01-01 00:00:00 +00:00
cvs2svn Import User
73d32b336a This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Richard Sharpe
5d6c181033 Document the size constraints on a write request. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
028f808c03 Move our password change code along a little - use NTSTATUS, and implmenet
minimum password age and min password length for all password changes.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Simo Sorce
bcc633c409 from HEAD:
fix for bad check spotted by Ray Simard <ray@sylvan-glade.com>
0001-01-01 00:00:00 +00:00
Simo Sorce
63a669475b fix for bad check spotted by Ray Simard <ray@sylvan-glade.com> 0001-01-01 00:00:00 +00:00
Jeremy Allison
3b453a5963 Merge tridge's fix :
the 'padding' field in the query domain info reply is not a padding
field at all. It seems to be an optional 12 byte structure of some
kind. mkaplan found a situation where the structure was not present at
all (depending on ptr_0)
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
1a1c746c9f ignore tdbsam2_parse_info.h 0001-01-01 00:00:00 +00:00
Jeremy Allison
e789edbb28 Catching up with old patches. Add define for VERITAS quota support.
Check return in ldap.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
66eff26fc9 Catching up with old patches. Add define for VERITAS quota support.
Check return in ldap.
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
1eff36ff2f fix also net rpc shutdown
sorry
0001-01-01 00:00:00 +00:00
Jeremy Allison
5431bae894 Merge Richard's write > 4Gb fix.
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
c5892b656d the shutdown call does not have a 16 bit flags, but 2 byte representing booleans
this commit change the structure and code to reflect this

some test revelead I'm right.

some other revelead currently the abort shutdown does not work against my test machine even if it returns successfully ... need investigation
0001-01-01 00:00:00 +00:00
Richard Sharpe
4201038588 Port the fix to cli_setup_write to handle offsets greater than 32-bits from
Samba 2.2.x ...
0001-01-01 00:00:00 +00:00
Andrew Bartlett
1ad782282a Add a new VFS module, that just fiddles the file permissions. Still need to
make it fiddle with NT ACLs (or report no ACL, so Samba fakes it up).

The idea here is that Samba reports an NT ACL to Windows clients, which use
that ACL in downloaded profiles.

If the user doesn't have write permissions on the directories being downloaded,
then it cant put the subfolders in (yes, NT will set perms so that it can't
access the dir as the user the created it) and the profile download fails.

The current solution it to give the user unix write perms to the folders, but
this is rather dangerous - sombody could trojen the profile.  This should
avoid that mess.

I'll test this out properly next week, but it works in vfstest (thanks idra!).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Shirish Kalele
9df93b1ffc Add msdfs proxy functionality to HEAD. 0001-01-01 00:00:00 +00:00
Jeremy Allison
388cf13648 Revert by Simo's request. HEAD and 3.0 should be in sync for
this except for the modules load.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c7c3afbd0d Revert by Simo's request. HEAD and 3.0 should be in sync for
this except for the modules load.
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
54f11b7de8 some more work on gums.
- Building a tdbsam2 backend to see what I got right and what not about the proposed API
- Corrections to API based on tdbsam2 work
0001-01-01 00:00:00 +00:00
Jeremy Allison
0958a2ae73 Patch for coredump with missing arg from "Bradley W. Langhorst" <brad@langhorst.com>
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5914c38a54 Patch for coredump with missing arg from "Bradley W. Langhorst" <brad@langhorst.com>
Jeremy.
0001-01-01 00:00:00 +00:00
Shirish Kalele
560bb8a115 Modify DfsEnum to handle 'msdfs proxy' shares. No NETDFS editing support for
the proxy target.
0001-01-01 00:00:00 +00:00
Shirish Kalele
2a665ab60a Add check to prevent non-Dfs clients from connecting to an msdfs proxy. 0001-01-01 00:00:00 +00:00
Richard Sharpe
91e2d21bd1 For some reason, the configure tests for sendfile support in FreeBSD
were broken. This works for 4.3 and 4.6.2.
0001-01-01 00:00:00 +00:00
Shirish Kalele
514f548b18 Add msdfs proxy functionality; a CIFS share can directly be a stand-in for
another share, and when clients connect to the first share, they will be
redirected to the proxied share.
0001-01-01 00:00:00 +00:00
Jeremy Allison
aa8439a49e Finish adding strings to all talloc_init() calls.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
784d15761c Finish adding strings to all talloc_init() calls.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
d7f18c60f7 the 'padding' field in the query domain info reply is not a padding
field at all. It seems to be an optional 12 byte structure of some
kind. mkaplan found a situation where the structure was not present at
all (depending on ptr_0)
0001-01-01 00:00:00 +00:00
Jeremy Allison
35d00bacdc talloc_init_named -> talloc_init.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
20a44d4cf1 talloc_init_named -> talloc_init.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
842e08e52a Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
09a218a9f6 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
0637f582fe Merge removal of unpopular winbind client environment variable. 0001-01-01 00:00:00 +00:00
Tim Potter
4277262c74 Formatting syncup. 0001-01-01 00:00:00 +00:00
Tim Potter
cd11f10e84 Merge from HEAD:
>Fix fnum leak under error condition in cacl_dump.
0001-01-01 00:00:00 +00:00
Tim Potter
0f556b1c02 Merge of some kind of bugfix from idra. 0001-01-01 00:00:00 +00:00
Tim Potter
77b403434f Merge from HEAD:
>fix rpcclient querygroup command (from 2.2 and head)
0001-01-01 00:00:00 +00:00
Tim Potter
7a4a2cb8e8 Whitespace syncup. 0001-01-01 00:00:00 +00:00
Tim Potter
872c152d35 Merge of comment about apparent spoolss_io_user_info weirdness. 0001-01-01 00:00:00 +00:00
Tim Potter
102e490d68 Merge from HEAD.
- null termination of winbind request fix
 - bail out if we can't open winbind socket
0001-01-01 00:00:00 +00:00
Tim Potter
1f2622f5cc Merge from HEAD. lp_winbind_separator() is now a const string. 0001-01-01 00:00:00 +00:00
Tim Potter
adb34ee5b1 Merge some more FUNCTION_MACRO stuff. 0001-01-01 00:00:00 +00:00
Tim Potter
36091157b2 Merge from HEAD:
>CR1333: Fix memory leak when unpacking some structures.
>
>* (pytdbunpack_item): PyList_Append creates an additional reference to
>  the appended object.  Therefore, release the initial reference after
>  it's added to the list.
0001-01-01 00:00:00 +00:00
Tim Potter
a2159610b9 Fixed bug in debug statement when tconX fails. 0001-01-01 00:00:00 +00:00
Jeremy Allison
65d5bf65c4 Protect nmbd against malformed reply packets. Some reports on the lists showing
these.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
4bc49cc943 Protect nmbd against malformed reply packets. Some reports on the lists showing
these.
Jeremy.
0001-01-01 00:00:00 +00:00
Herb Lewis
17f685fdbf merge from 2.2 fix for smbclient large files 0001-01-01 00:00:00 +00:00
Herb Lewis
723c4caf64 merge from 2.2 fix for smbclient large files 0001-01-01 00:00:00 +00:00
Herb Lewis
077c515ee9 merge from 2.2
actually print args for %g and %e
0001-01-01 00:00:00 +00:00
Herb Lewis
47a0ba53fd merge from 2.2
actually print args for %g and %e
0001-01-01 00:00:00 +00:00
John Terpstra
3163213081 Updated from Samba-2.2.7 code tree. 0001-01-01 00:00:00 +00:00
Gerald Carter
5b31125025 app_head merge for get_friendly_nt_err() 0001-01-01 00:00:00 +00:00
Gerald Carter
3ceff08eb7 app_head merge for get_friendly_nt_err() 0001-01-01 00:00:00 +00:00
Herb Lewis
773e5af6eb fix make proto to work with SGI smake 0001-01-01 00:00:00 +00:00
Herb Lewis
24dfb8c745 fix make proto to work with SGI smake 0001-01-01 00:00:00 +00:00
Gerald Carter
416fd947da * fix memory leak when constructing an driver_level_6 structure
and no dependent files (working on smbd memory leak).  No CR# yet.
0001-01-01 00:00:00 +00:00
Gerald Carter
f017fa7c47 * fix memory leak when constructing an driver_level_6 structure
and no dependent files (working on smbd memory leak).  No CR# yet.
0001-01-01 00:00:00 +00:00