1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

2347 Commits

Author SHA1 Message Date
Jelmer Vernooij
8d8a8c9633 Make init_module() and thus smb_load_module() return an int.
modules/developer.c: init_module() should return an int
(This used to be commit 7f59703550)
2003-02-20 22:26:28 +00:00
Jim McDonough
ffcee0c95e Correct way to keep fucntion from proto.h
(This used to be commit 762b072efb)
2003-02-19 15:22:46 +00:00
Alexander Bokovoy
02cb49bffa Improve detection of iconv(3) for various platforms. M4 code is similar to what I use in Midgard for past few years, modified for Samba needs.
(This used to be commit 747d2d70a9)
2003-02-19 13:24:06 +00:00
Andrew Bartlett
1f1125577c Move to a in-memory ccache for winbind, and replace setenv() properly.
(According to the manpages, you cannot put a stack variable into putenv()).

Yes, this leaks memory.

Andrew Bartlett
(This used to be commit 50bced1e26)
2003-02-19 11:33:35 +00:00
Jim McDonough
3b541bdcfe Get non-krb systems to compile. How the heck do I keep something from being sucked into proto.h?
(This used to be commit 7e84497882)
2003-02-19 03:19:30 +00:00
Jim McDonough
adfefcdcb6 Try to get heimdal working with HEAD.
- Provide generic functions for
  - get valid encryption types
  - free encryption types
- Add encryption type parm to generic function create_kerberos_key_from_string()
- Try to merge the two versions (between HEAD and SAMBA_3_0) of kerberos_verify.c

I think this should work for both MIT and heimdal, in HEAD.  If all goes smooth,
I'll move it over to 3.0 soon...
(This used to be commit 45e409fc8d)
2003-02-19 01:16:40 +00:00
Andrew Bartlett
b786858241 Add the 'session key' output of the NTLMSSP exchange to the cli struct, so
it can be used for 'net rpc join'.

Also fix a bug in our server-side NTLMSSP code - a client without any domain
trust links to us may calculate the NTLMv2 response with "" as the domain.

Andrew Bartlett
(This used to be commit ddaa42423b)
2003-02-16 22:10:48 +00:00
Gerald Carter
a703d55cd7 * set PRINTER_ATTRIBUTE_RAW_ONLY; CR 1736
* never save a pointer to an automatic variable (they go away)
  implement a deep copy for SPOOLSS_NOTIFY_MSG to correct
  messages being sent that have junk for strings;
  fix in response to changes for CR 1504
(This used to be commit 043b9dff22)
2003-02-15 23:36:18 +00:00
Andrew Bartlett
4aabc4cdfd Move our NTLMSSP client code into ntlmssp.c. The intention is to provide a
relitivly useful external lib from this code, and to remove the dupicate
NTLMSSP code elsewhere in samba (RPC pipes, LDAP client).

The code I've replaced this with in cliconnect.c is relitivly ugly, and
I hope to replace it with a more general SPENGO layer at some later date.

Andrew Bartlett
(This used to be commit b2b66909ac)
2003-02-15 12:20:22 +00:00
Jelmer Vernooij
1cf9b9be79 Remove obsolete file lib/netatalk.c - We have a VFS module now
(This used to be commit 28653989cf)
2003-02-15 02:02:51 +00:00
Andrew Bartlett
e4202a9fe7 Antti Andreimann <Antti.Andreimann@mail.ee> has done some changes to enable
users w/o full administrative access on computer accounts to join a
computer into AD domain.

The patch and detailed changelog is available at:
http://www.itcollege.ee/~aandreim/samba

This is a list of changes in general:

1. When creating machine account do not fail if SD cannot be changed.
   setting SD is not mandatory and join will work perfectly without it.
2. Implement KPASSWD CHANGEPW protocol for changing trust password so
   machine account does not need to have reset password right for itself.
3. Command line utilities no longer interfere with user's existing
   kerberos ticket cache.
4. Command line utilities can do kerberos authentication even if
   username is specified (-U). Initial TGT will be requested in this case.

I've modified the patch to share the kinit code, rather than copying it,
and updated it to current CVS.  The other change included in the original patch
(local realms) has been left out for now.

Andrew Bartlett
(This used to be commit ce52f1c2ed)
2003-02-15 00:29:21 +00:00
Andrew Bartlett
a2781ba60d Oops, forgot the header file changes.
(This used to be commit 5492fc1144)
2003-02-14 23:34:32 +00:00
Rafal Szczesniak
ce306f8b08 A few typo fixes Andrew eventually let off to me.
Rafal
(This used to be commit 16a66cf17a)
2003-02-13 21:40:35 +00:00
Andrew Tridgell
6c66e42d2c added the 'lsaenumacctwithright' command to rpcclient. This allows you
to lookup what SIDs have a particular privilege (that is how
privileges are stored).
(This used to be commit 3ddb5fb0dd)
2003-02-10 11:31:23 +00:00
Andrew Bartlett
ec7a1994b0 Some cleanups:
- Don't use pstrcpy into an allocated string - use safe_strcpy() directly
instead.

- Keep a copy of the 'server_info' attached to the vuid.  In future use this
for things like the session key, homedir and full name instead of current
copies.

- Try to avoid memory leak/segfault on Realloc failure

- clear up #endif comments

Andrew Bartlett
(This used to be commit 162477bb08)
2003-02-10 09:16:05 +00:00
Andrew Bartlett
868d169a40 (only for HEAD at the moment).
Add NTLMv2 support to our client, used when so configured ('client use NTLMv2 =
yes') and only when 'client use spengo = no'.  (A new option to allow the
client and server ends to chose spnego seperatly).

NTLMv2 signing doesn't yet work, and NTLMv2 is not done for NTLMSSP yet.

Also some parinoia checks in our input parsing.

Andrew Bartlett
(This used to be commit 85e9c060ea)
2003-02-09 12:26:58 +00:00
Andrew Tridgell
81356b6269 ignore config.h.in in cvs as generated by autoheader
(This used to be commit 830423abd8)
2003-02-06 09:55:21 +00:00
Andrew Bartlett
d13a3ce9f0 Remove configure and config.h.in from CVS.
configure and config.h.in is now regenerated by the 'autogen.sh' script.

However, samba.org will run autoconf and autoheader to keep the anonyomous
rsync 'unpacked' areas intact (helping the build farm), and released will ship
with the genereated files.

Andrew Bartlett
(This used to be commit 15bba73dea)
2003-02-06 09:20:32 +00:00
Andrew Tridgell
b4776d89ea added the LSA privileges server backend stubs. Right now they just log
what was requested.
(This used to be commit 64ac6c2bcb)
2003-02-06 05:42:19 +00:00
Andrew Bartlett
2f5d3e7a64 We now have client-side SMB signing support!
This checking allows us to connect to Microsoft servers the use SMB signing,
within a few restrictions:

 - I've not get the NTLMSSP stuff going - it appears to work, but if you break
the sig - say by writing a zero in it - it still passes...
 - We don't currently verfiy the server's reply
 - It works against one of my test servers, but not the other...

However, it provides an excellent basis to work from.  Enable it with 'client
signing' in your smb.conf.

Doc to come (tomorrow) and this is not for 3.0, till we get it complete.

The CIFS Spec is misleading - the session key (for NTLMv1 at least) is the
standard session key, ie MD4(NT#).

Thanks to jra for the early work on this.

Andrew Bartlett
(This used to be commit 1a2738937e)
2003-02-01 13:01:31 +00:00
Andrew Bartlett
7c1698d302 Bitmap offsets and counts are always positive.
(This used to be commit 8f495e8634)
2003-02-01 06:30:12 +00:00
Jeremy Allison
2a3c62b747 Sync up with 3.0 heimdal.
Jeremy.
(This used to be commit 371f4aca92)
2003-01-30 20:36:59 +00:00
Jeremy Allison
13e5145b1a Fix kerberos compile after the tpot massicre :-).
Jeremy
(This used to be commit d63849db6d)
2003-01-30 20:16:18 +00:00
Jeremy Allison
f26591b3de Fix for interesting resource constraint condition. When all opens are
level 2 and a request for open with no oplock is received then the
smbd should send *synchronous* break messages, not asynchronous,
otherwise it spins very rapidly, releasing the lock, sending the
'break to none' messages and then re-acquiring the lock before
any other process has a chance to get the lock and remove it's own
oplock (at least on linux).
Jeremy.
(This used to be commit d1e8991a76)
2003-01-30 01:42:08 +00:00
Andrew Tridgell
79b26867c0 added LsaRemoveAccountRights
this now gives us complete remove privileges control in the client
libs, so we are in good shape for starting on the server side.
(This used to be commit bf99440398)
2003-01-28 21:31:45 +00:00
Andrew Tridgell
5f9112ac1b cleaned up the lsa_enum_acct_rights function and added a
lsa_add_acct_rights function.

This allows us to add privileges remotely to accounts using rpcclient.
(This used to be commit 2e5e659e09)
2003-01-28 12:52:51 +00:00
Andrew Bartlett
dc4bb3bed8 Factor out common code in the NTLMSSP/SPNEGO code.
The idea here is to seperate, as much as possible, the SPNEGO layer from the
NTLMSSP layer.  This not only helps us with protocol correctness, but also
should allow further mechinisms to be added with relitive ease.  I indend to
make the kerberos code use this shortly.

I've never seen the 'zero length blob' form of the anonymous login, so I've
removed that case.

Andrew Bartlett
(This used to be commit a8773c9f82)
2003-01-28 03:37:14 +00:00
Richard Sharpe
c924528c86 Commit just a little more infrastructure for HAVE_GETDIRENTRIES
(This used to be commit fdd449fe7b)
2003-01-24 18:58:52 +00:00
Richard Sharpe
3a9beef2b7 At the prompting, start to add infrastructure to detect the presence of
getdirentries. We would also detect getdents if present. This has some
rudimentary support already.
(This used to be commit 916c8784d2)
2003-01-24 18:35:22 +00:00
Jeremy Allison
e0762fe08d Fixup proto generation to not include krb5 specific symbols
if no kerberos selected. Noticed by Metze.
Jeremy.
(This used to be commit 1684719695)
2003-01-21 13:33:36 +00:00
Jeremy Allison
e97e51f5fd More fixes getting us closer to full Heimdal compile....
Jeremy.
(This used to be commit 193cc4f4fc)
2003-01-21 06:23:10 +00:00
Jeremy Allison
a45db02a82 Merge in more of the SuSE patches for Heimdal. These changes show how
to add a function without an explicit #ifdef HEIMDAL which I'm trying
to avoid.
Jeremy.
(This used to be commit 77aeb262ef)
2003-01-19 22:25:34 +00:00
Jim McDonough
9eb368e068 Enable dynamic loading of RPC modules. See docs/textdocs/RPC_PLUGGIN.txt for instructions.
(This used to be commit d51e12df78)
2003-01-17 20:57:26 +00:00
Jeremy Allison
effbd70c21 Fixed up mutex protection around winbindd logon code. Sync with APP-HEAD.
Jeremy.
(This used to be commit 3d04872499)
2003-01-16 20:08:33 +00:00
Andrew Bartlett
d92b21280e 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
(This used to be commit fe50ca8f54)
2003-01-16 03:29:54 +00:00
Jeremy Allison
e4af5eaca6 More Heimdal changes. Still not compiling with Heimdal yet...
Jeremy.
(This used to be commit c3544c119e)
2003-01-16 02:58:25 +00:00
Jeremy Allison
4375fe73ba 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.
(This used to be commit a776fbef32)
2003-01-16 02:39:58 +00:00
Gerald Carter
5fb5950258 small merges from SAMBA_3_0; mostly typos, renames, etc...
(This used to be commit 9ac196dad4)
2003-01-15 18:31:46 +00:00
Andrew Bartlett
58fe4d9c20 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
(This used to be commit 9e48ab86da)
2003-01-15 12:52:38 +00:00
Andrew Tridgell
eb6312af9f 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.
(This used to be commit 65bac11d71)
2003-01-15 07:40:40 +00:00
Martin Pool
3710ea2223 Run autoheader
(This used to be commit 82e4bb598c)
2003-01-15 05:23:40 +00:00
Andrew Bartlett
5c076b62d7 Commit my (disabled) fstring/pstring mixup detection code.
We need to fix some 'overmalloc' cases before it can be enabled by default.

Andrew Bartlett
(This used to be commit 2c2c52a18b)
2003-01-14 06:53:35 +00:00
Andrew Bartlett
e3293c7181 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
(This used to be commit b6641badcb)
2003-01-13 12:48:37 +00:00
Andrew Bartlett
ebb60c0302 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
(This used to be commit 7854a439ac)
2003-01-12 11:29:02 +00:00
Jeremy Allison
a26f2fbe2b Fix problem with "hide unreadable". stat file opens are baaack :-).
Jeremy.
(This used to be commit 6e0cfec165)
2003-01-03 19:07:26 +00:00
Andrew Bartlett
a746483fd8 Add PRINTF_ATTRIBUTE() to a few more printf() style functions. Aids in
compiler-based argument checking.
(This used to be commit 16fe928e68)
2003-01-02 12:54:02 +00:00
Andrew Bartlett
6d66fb308a 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
(This used to be commit 92a777d0ea)
2003-01-02 09:07:17 +00:00
Simo Sorce
ed961ddf44 ignore tdbsam2_parse_info.h
(This used to be commit 1a1c746c9f)
2002-12-31 00:45:35 +00:00
Jeremy Allison
944fb243eb Catching up with old patches. Add define for VERITAS quota support.
Check return in ldap.
Jeremy.
(This used to be commit e789edbb28)
2002-12-30 23:55:58 +00:00
Simo Sorce
60667264b7 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
(This used to be commit c5892b656d)
2002-12-30 04:41:27 +00:00