1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

102 Commits

Author SHA1 Message Date
Volker Lendecke
3ce6c9f273 Commit the translation of the realm to the netbios domain name in the kerberos
session setup. After talking to jht and abartlet I made this unconditional, no
additional parameter.

Jerry: This is a change in behaviour, but I think it is necessary.

Volker
0001-01-01 00:00:00 +00:00
Andrew Bartlett
df14b0af31 Add a comment, and a useful debug message. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
702b35da0a as discussed on irc, this is a small patch that allows a few more
winbind functions to be accessed via NSS. This provides a much cleaner
way for applications that need (for example) to provide name->sid
mappings to do this via NSS rather than having to know the winbindd
pipe protocol (as this might change).

This patch also adds a varient of the winbindd_getgroups() call called
winbindd_getusersids() that provides direct SID->SIDs listing of a
users supplementary groups. This is enough to allow non-Samba
applications to do ACL checking.

A test program for the new functionality will be committed shortly.

I also added the 'wbinfo --user-sids' option to expose the new
function in wbinfo.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b3e024ce1d a small include file rearrangement that doesn't affect normal
compilation, but that allows Samba3 to take advantage of pre-compiled
headers in gcc if available.
0001-01-01 00:00:00 +00:00
Tim Potter
0519a7022b Final round of printf warnings fixes for the moment. 0001-01-01 00:00:00 +00:00
Richard Sharpe
7c7ef9680b Add a better error message to wb_common.c when unable to connect to a pipe
socket and add a comment to winbindd.c to explain the fancy calculation of
buffer offset.
0001-01-01 00:00:00 +00:00
Gerald Carter
3324adcace make sure we keep the trusted domain cache up to date 0001-01-01 00:00:00 +00:00
Gerald Carter
ae452e51b0 metze's autogenerate patch for version.h 0001-01-01 00:00:00 +00:00
Gerald Carter
4d3acce506 fix 2 bugs:
1)  don't ask trusted DC's for a list of trusted domains.  This causes
      us to treat non-transitive ones as if they were transitive.  Not
      needed anyways

  2)  Fix dc lookup bug where we would always try to use DNS to resolve
      the DC's for a domain (even if it was a trusted NT4 domain).
0001-01-01 00:00:00 +00:00
Gerald Carter
9f835b85dd convert snprintf() calls using pstrings & fstrings
to pstr_sprintf() and fstr_sprintf() to try to standardize.
lots of snprintf() calls were using len-1; some were using
len.  At least this helps to be consistent.
0001-01-01 00:00:00 +00:00
Tim Potter
f93528ba00 Fixup a bunch of printf-style functions and debugs to use unsigned long when
displaying pid_t, uid_t and gid_t values.  This removes a whole lot of warnings
on some of the 64-bit build farm machines as well as help us out when 64-bit
uid/gid/pid values come along.
0001-01-01 00:00:00 +00:00
Tim Potter
8b818ce381 Replace the eight (!) copies of dummy become/unbecome root with a single one. 0001-01-01 00:00:00 +00:00
Gerald Carter
837d7c54d3 fixes for 'net rpc vampire'. I can now take a blank Samba host
and migrate an NT4 domain and still logon from domain members
(tested logon scripts, system policies, profiles, & home directories)
(passdb backend = tdbsam)

removed call to idmap_init_wellknown_sids() from winbindd.c
since the local domain should be handled by the guest passdb backend
(and you don't really always want the Administrator account to be root)
...and we didn't pay attention to this anyways now.
0001-01-01 00:00:00 +00:00
Alexander Bokovoy
02c5e2fc6f Add support for MSG_SMB_CONF_UPDATED and MSG_SHUTDOWN to all daemons (smbd, nmbd, winbindd). Reviewed by jerry and tridge. 0001-01-01 00:00:00 +00:00
Gerald Carter
369a914ebe remove -B and default to dual-daemon mode (-Y to run as a single process) 0001-01-01 00:00:00 +00:00
Gerald Carter
1111bc7b0c Large set of changes to add UNIX account/group management
to winbindd.  See README.idmap-and-winbind-changes for details.
0001-01-01 00:00:00 +00:00
Gerald Carter
389fe1e51a fix linking issues in winbindd with become/unbecome_root() in passdb.c 0001-01-01 00:00:00 +00:00
Jeremy Allison
8f830c509a Some const correctness. Stop tdb being used as a remote backend. If an
idmap backend is specified cause smbd to ask winbindd (use winbindd if
you want a consistant remote backend solution).
Should work well enough for next beta now...
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
2bdbeb9e97 add tdb backup function separation and winbind idmap upgrade code form
pre-2.2.4 tdb database format.

tx volker for your work on this
0001-01-01 00:00:00 +00:00
Gerald Carter
aac01dc7bc merge of the netsamlogon caching code from APPLIANCE_HEAD
This replaces the universal group caching code (was originally
based on that code).  Only applies to the the RPC code.

One comment: domain local groups don't show up in 'getent group'
that's easy to fix.

Code has been tested against 2k domain but doesn't change anything
with respect to NT4 domains.

netsamlogon caching works pretty much like the universal group
caching code did but has had much more testing and puts winbind
mostly back in sync between branches.
0001-01-01 00:00:00 +00:00
Simo Sorce
0e58085978 And finally IDMAP in 3_0
We really need idmap_ldap to have a good solution with ldapsam, porting
it from the prvious code is beeing made, the code is really simple to do
so I am confident it is not a problem to commit this code in.

Not committing it would have been worst.
I really would have been able to finish also the group code, maybe we can
put it into a followin release after 3.0.0 even if it may be an upgrade
problem.

The code has been tested and seem to work right, more testing is needed for
corner cases.

Currently winbind pdc (working only for users and not for groups) is
disabled as I was not able to make a complete group code replacement that
works somewhat in a week (I have a complete patch, but there are bugs)

Simo.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
d817eaf0ec Reverse previous patch from Stefan and me after comments by Andrew Bartlett 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
74d9ecfe2d Patch from metze and me that adds dummy smb_register_*() functions so
that is now possible to, for example, load a module which contains
an auth method into a binary without the auth/ subsystem built in.
0001-01-01 00:00:00 +00:00
Tim Potter
25e55aca0f There appears to be no reason why we have to execute the
initialisation code in winbindd_init_common() after the fork when
running in dual daemon mode.

The only tricky bit is we have to run a tdb_reopen_all() somewhere in
the child to avoid tdb corruption.

Fixed bug #60.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
d4d5e6c2ee Merge HEAD's winbind into 3.0.
This includes the 'SIDs Rule' patch, mimir's trusted domains cacheing code,
the winbind_idmap abstraction (not idmap proper, but the stuff that held up
the winbind LDAP backend in HEAD).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
6735a9889f update copyright notice that is written to the logs 0001-01-01 00:00:00 +00:00
Tim Potter
b11f35fdde Merge:
- Jelmer's latest popt changes
 - debugging tdb messages now initialised and handled in lib/messages.c
0001-01-01 00:00:00 +00:00
Andrew Bartlett
92c2a33483 Winbind merges from HEAD:
- fix winbindd_pam bugs
 - give a better error message for unauthorized access to auth_crap
 - show this message in wbinfo
 - fix spelling: privilaged -> privileged
   ** This changes the location of the winbindd privileged pipe **
   (thanks to tpot)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
ec071ca3dc (merge from HEAD)
NTLM Authentication:

- Add a 'privileged' mode to Winbindd.  This is achieved by means of a directory
  under lockdir, that the admin can change the group access for.

- This mode is now required to access with 'CRAP' authentication feature.
- This *will* break the current SQUID helper, so I've fixed up our ntlm_auth
  replacement:
 - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a
   challenge.
 - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5
   servers.
 - Tested - works for Win2k clients, but not Win9X at present.  NTLMSSP updates
   are needed.
 - Now uses fgets(), not x_fgets() to cope with Squid environment (I think
   somthing to do with non-blocking stdin).

- Add much more robust connection code to wb_common.c - it will not connect to
  a server of a different protocol version, and it will automatically try and
  reconnect to the 'privileged' pipe if possible.
  - This could help with 'privileged' idmap operations etc in future.

- Add a generic HEX encode routine to util_str.c,
- fix a small line of dodgy C in StrnCpy_fn()

- Correctly pull our 'session key' out of the info3 from th the DC.  This is
  used in both the auth code, and in for export over the winbind pipe to
  ntlm_auth.

- Given the user's challenge/response and access to the privileged pipe,
  allow external access to the 'session key'.  To be used for MSCHAPv2
  integration.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
7a586552a3 *Excellent* patch from Michael Steffens <michael_steffens@hp.com> to limit
the unix domain sockets used by winbindd (also solves FD_SETSIZE problem
in winbindd to boot !). Adds a "last_access" field to winbindd connections,
and will close the oldest idle connection once the number of open connections
goes over WINBINDD_MAX_SIMULTANEOUS_CLIENTS (defined in local.h as 200
currently).
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
e9d6e2ea9a Merge minor library fixes from HEAD to 3.0.
- setenv() replacement
 - mimir's ASN1/SPNEGO typo fixes
 - (size_t)-1 fixes for push_* returns
 - function argument signed/unsigned correction
 - ASN1 error handling (ensure we don't use initiailsed data)
 - extra net ads join error checking
 - allow 'set security discriptor' to fail
 - escape ldap strings in libads.
 - getgrouplist() correctness fixes (include primary gid)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Tim Potter
5cfb30551a Mop and bucket for trusted domain enumeration fix. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
fbb46da79c Merge from HEAD:
- NTLMSSP over SPENGO (sesssion-setup-and-x) cleanup and code refactor.
  - also consequential changes to the NTLMSSP and SPNEGO parsing functions
  - and the client code that uses the same functions
 - Add ntlm_auth, a NTLMSSP authentication interface for use by applications
   like Squid and Apache.
  - also consquential changes to use common code for base64 encode/decode.
 - Winbind changes to support ntlm_auth (I don't want this program to need
   to read smb.conf, instead getting all it's details over the pipe).
 - nmbd changes for fstrcat() instead of fstrcpy().

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
a8db1b611d patch to include support for daemontools from Michael Handler 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
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
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
7bdaa03f2f Bug fix from appliance - we must initialise the winbindd server state
before reading smb.conf parameters, not after.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f755711df8 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
1175b62337 Last sync with HEAD 0001-01-01 00:00:00 +00:00
Jeremy Allison
faf92207e7 Keep branches in sync.....
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
ee0e3d31a1 Some winbindd cleanups I made trying to fix cr1020:
- move winbindd client handling into accessor functions in
   winbindd_util.c

 - move some winbindd socket routines into accessor functions in
   winbindd_utils.c

(The deadlock situation mentioned in the appliance branch is probably
not applicable since we don't clear the connection cache on SIGHUP.
Perhaps we should?)
0001-01-01 00:00:00 +00:00
Jeremy Allison
7d0dc36df0 Change to use sys_read/sys_write.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
3928578b52 sync 3.0 branch with head 0001-01-01 00:00:00 +00:00
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 0001-01-01 00:00:00 +00:00
Tim Potter
e24f6288b6 Merge of secrets_init() paranoia fix from 2.2 0001-01-01 00:00:00 +00:00
Jeremy Allison
b2350ed36c Fix up conversion code from old winbindd versions (some testing needed).
Added time based cache size check (#ifdef'ed out by default, just didn't
want to lose the code).
Jeremy.
0001-01-01 00:00:00 +00:00
Herb Lewis
205399dc17 merge winbindd WINS changes from 2.2 0001-01-01 00:00:00 +00:00