1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

11993 Commits

Author SHA1 Message Date
Jeremy Allison
0118f6b417 Ensure idmap backends are added in the correct order (DLIST_ADD puts
things at the *front* of the list). Add more debug. Still broken.. :-(.
Jeremy.
(This used to be commit dd9251e6f5)
2003-06-25 19:01:17 +00:00
Gerald Carter
72876b79c9 * fix typos in a few debug statements
* check negative connection cache before ads_try_connect()
  in ads_find_dc()
(This used to be commit 2a76101a3a)
2003-06-25 19:00:15 +00:00
Gerald Carter
9e2f008bb9 forgot one file
(This used to be commit ef978bd851)
2003-06-25 18:08:00 +00:00
Gerald Carter
f51d769dd3 large change:
*)  consolidates the dc location routines again (dns
    and netbios)  get_dc_list() or get_sorted_dc_list()
    is the authoritative means of locating DC's again.

    (also inludes a flag to get_dc_list() to define
     if this should be a DNS only lookup or not)

    (however, if you set "name resolve order = hosts wins"
     you could still get DNS queries for domain name IFF
     ldap_domain2hostlist() fails.  The answer?  Fix your DNS
     setup)

*)  enabled DOMAIN<0x1c> lookups to be funneled through
    resolve_hosts resulting in a call to ldap_domain2hostlist()
    if lp_security() == SEC_ADS

*)  enables name cache for winbind ADS backend

*)  enable the negative connection cache for winbind
    ADS backend

*)  removes some old dead code

*)  consolidates some duplicate code

*)  moves the internal_name_resolve() to use an IP/port pair
    to deal with SRV RR dns replies.  The namecache code
    also supports the IP:port syntax now as well.

*)  removes 'ads server' and moves the functionality back
    into 'password server' (which can support "hostname:port"
    syntax now but works fine with defaults depending on
    the value of lp_security())
(This used to be commit d7f7fcda42)
2003-06-25 17:41:05 +00:00
Andrew Bartlett
eb61c82382 Patch to move functions directly from pdb_ldap.c into lib/smbldap.c
The functions are unchanged.  Next step is to make idmap_ldap use them.

Andrew Bartlett
(This used to be commit 57617a0f8c)
2003-06-25 12:51:58 +00:00
Tim Potter
23c45a79d0 Metze assures me that this will fix Heimdal et al.
I think the lesson to take away here is that refactoring configure.in
is a hazardous task and should only be attempted if you have a lot
of time and patience!
(This used to be commit 5ba121ac9d)
2003-06-25 12:20:29 +00:00
Volker Lendecke
e65b68b131 Fix a warning in a DEBUG
Clean up the init a little bit, less nested if-statements.

Agreed upon with Simo.

Volker
(This used to be commit fdcfefd7f1)
2003-06-25 10:18:22 +00:00
Simo Sorce
d993c171b2 Tought I already done.
Set back 3.0 to use only winbindd_idmap.tdb as idmap database as told on
samba-technical.
Tested and working so far.
(This used to be commit e154e50fed)
2003-06-25 08:15:51 +00:00
Tim Potter
86c9ba789c Only append to KRB5_LIBS when doing AC_CHECK_LIB for libkrb5.
I think we are done with MIT Kerberos for the moment.  The Heimdal detection
looks like it has been broken for ages so it's next on the list.
(This used to be commit 7690a722f9)
2003-06-25 02:24:48 +00:00
Tim Potter
1bc691069b Don't trash the values of CFLAGS and LIBS while engaged in Kerberos
detection.  On Solaris 9 extra libraries -lber and -lresolv are
required for Kerberos tests.  We used to have an extra check for
-lresolv only but I think the correct solution is not to forget about it
in the first place.

This should fix bug #125 although I don't have access to a
system to test it out on.
(This used to be commit 4ddfab4a57)
2003-06-25 01:33:27 +00:00
Jeremy Allison
911fbd5cdb More debugs for this... (these should have been here already !).
Jeremy.
(This used to be commit a118648d95)
2003-06-25 00:28:46 +00:00
Jeremy Allison
dba0005a9d More instrumentation tracking down this bug...
Jeremy.
(This used to be commit 705915d9f7)
2003-06-25 00:11:38 +00:00
Jeremy Allison
b5e2d8db28 Start to instrument this code as I try and track down a nasty bug that
causes mapping to dissapear...
Jeremy.
(This used to be commit bdffc81c9d)
2003-06-25 00:02:17 +00:00
Jeremy Allison
45f472ba21 Sequence number was not getting updated with ldap hack. Only a bug in this
branch.
Jeremy.
(This used to be commit 19629b41cb)
2003-06-24 23:07:26 +00:00
Jeremy Allison
11e6203896 Explain why winbindd is exiting.
Jeremy.
(This used to be commit a411923aa2)
2003-06-24 20:54:32 +00:00
Andrew Bartlett
137265b806 Fix pdb_ldap segfaults, and wrong default values for ldapsam_compat.
Reviewed by vl, metze.

Andrew Bartlett
(This used to be commit 9804ad458a)
2003-06-24 14:23:34 +00:00
Simo Sorce
a34ba41ae5 do not forget the include file :-)
(This used to be commit 73e13b9baf)
2003-06-24 14:02:57 +00:00
Simo Sorce
52826c034e 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
(This used to be commit 2bdbeb9e97)
2003-06-24 14:02:21 +00:00
Tim Potter
52e4b4d5ab More tuning of Kerberos detection - don't fall through to detect kerberos libs
when we have already decided that we can't do it.
(This used to be commit db792ed530)
2003-06-24 07:46:26 +00:00
Tim Potter
200af4e84c More sensible behaviour for bug 152. If we don't have krb5.h and were explicitly
configured using --with-ads then give an error, otherwise fall back to compiling
without ADS.

Tested on redhat 8.0 with and without MIT kerberos packages installed.  Metze,
let me know if this is working OK for you now!
(This used to be commit 7ea81535b8)
2003-06-24 05:31:08 +00:00
Jeremy Allison
98689251bb Fixes from Martin Dorey <mdorey@bluearc.com> to only ask for and change
the requested parts of the ACL.
Jeremy.
(This used to be commit c35a88201c)
2003-06-24 01:09:36 +00:00
Jeremy Allison
4f99186f6b Move the map acl inherit parameter into the protocol section.
Jeremy.
(This used to be commit 076d9a3c9b)
2003-06-24 00:58:54 +00:00
Jeremy Allison
951710b60d Fixed the merge_default_aces() code to work correctly with inheritance.
Hopefully will fix jcmd bugs :-).
Jeremy.
(This used to be commit 482e6c79ed)
2003-06-23 20:24:08 +00:00
Gerald Carter
f36c96d59c * s/get_dc_name/rpc_dc_name/g (revert a previous change)
* move back to qsort() for sorting IP address in get_dc_list()

* remove dc_name_cache in cm_get_dc_name() since it slowed
  things down more than it helped.  I've made a note of where
  to add in the negative connection cache in the ads code.
  Will come back to that.

* fix rpcclient to use PRINTER_ALL_ACCESS for set printer (instead
  of MAX_ALLOWED)

* only enumerate domain local groups in our domain

* simplify ldap search for seqnum in winbindd's rpc backend
(This used to be commit f8cab8635b)
2003-06-23 19:05:23 +00:00
Gerald Carter
d21358308a wrap group enuemration in brcome/unbecome_root() (bug #110)
(This used to be commit 3918fffc7f)
2003-06-23 18:29:09 +00:00
Gerald Carter
7356d558ff fix typo (bug #170)
(This used to be commit d376b67de9)
2003-06-23 18:27:59 +00:00
Gerald Carter
fb82535d1f fix bug #178; available space in devmode should be int
(This used to be commit 944480b89a)
2003-06-23 17:47:25 +00:00
Andrew Tridgell
fd87564eec lp_security() is a function not an integer
(This used to be commit 71907f32ba)
2003-06-23 06:38:19 +00:00
Tim Potter
ab1ccfc487 Change AC_MSG_ERROR() in krb5.h detection code to AC_MSG_WARN()
until I repair my destroyed development system and check in a proper
fix for this.
(This used to be commit efad5dab52)
2003-06-23 05:32:16 +00:00
Gerald Carter
81d8eefc0d * set domain->last_status = NT_STATUS_SERVER_DISABLED on an ads_connect() failure
* Fix code to use winbind_rpc methods for trusted mixed mode or NT4 domains
  ( does no one ever test this? )
* add in LDAP code to get the sequence number for rpc based seqnum update.
  ( this is needed if the DC is upgraded and samba is not reconfigured
    to use security = ads; it's not pretty but it works (from app_head) )
* fix bug that caused us to enumerate domain local groups in domains
  other than our own
(This used to be commit 14f2cd139a)
2003-06-23 05:10:07 +00:00
Tim Potter
5f1ff72f7d Produce an error if Active Directory support is requested and we don't
have krb5.h

Should fix bug 152.
(This used to be commit 82d3dd757b)
2003-06-23 01:27:17 +00:00
Tim Potter
5779e6d15e Repair indentation in autoconf Kerberos detection code. This should
make it easier to understand/debug.
(This used to be commit 86b6ff134c)
2003-06-23 01:05:31 +00:00
Simo Sorce
f5974dfaae Found out a good number of NT_STATUS_IS_ERR used the wrong way.
As abartlet rememberd me NT_STATUS_IS_ERR != !NT_STATUS_IS_OK

This patch will cure the problem.
Working on this one I found 16 functions where I think NT_STATUS_IS_ERR() is
used correctly, but I'm not 100% sure, coders should check the use of
NT_STATUS_IS_ERR() in samba is ok now.

Simo.
(This used to be commit c501e84d41)
2003-06-22 10:09:52 +00:00
Andrew Bartlett
4830a87845 (fixing bug in my last commit)
This isn't C++ - start your code *after* all the variables are declared...

Andrew Bartlett
(This used to be commit b7760faedc)
2003-06-21 23:35:12 +00:00
Volker Lendecke
cc59bbfdea Fix memory leak. secrets_fetch allocates memory.
Volker
(This used to be commit 2ec8d1ff88)
2003-06-21 14:28:18 +00:00
Andrew Bartlett
668a9af94e This removes the StrCaseCmp() stuff from 'net idmap' and 'net
groupmap'.  The correct way to implement this stuff is via a function
table, as exampled in all the other parts of 'net'.

This also moves the idmap code into a new file.  Volker, is this your
code?  You might want to put your name on it.

Andrew Bartlett
(This used to be commit 477f2d9e39)
2003-06-21 08:35:30 +00:00
Andrew Bartlett
68f1ca6247 This patch fixes some issues with idmap_tdb as raised by bug #181
The idea here is to eliminate the need to *set* the 'HWM' (High Water
Mark) in the tdb.  Instead, each caller wanting to add an item to the
TDB uses the fact that an insert will *fail* if entry already exists.

More importantly, this means that we don't need to know the value of the
idmap uid/gid values when setting arbitrary entries, which can occur on
an smb.conf without such values specified.

Then all we need to do is loop until we get an id that will insert.
This means that the HWM does not need to be accurate, and we can have
IDs allocates safely above the HWM.

Setting the HWM to an arbitrary value was racy in the past - now we
don't even do it.

This patch also adds paranoia in reading the tdb - both the entry, and
it's reverse entry must be present.  This means that we don't need to
'clean up' after an abnormal failure (which would probably fail too),
instead we rely on readers to ignore the half-completed entry.  The way
this is done will allow SIDs to then allocated an ID when things are
normal again.

Andrew Bartlett
(This used to be commit 74709e159c)
2003-06-21 08:31:18 +00:00
Andrew Bartlett
3f5dc14457 Always initialize.
(This used to be commit 75081860af)
2003-06-21 07:54:03 +00:00
Gerald Carter
93bcb9963b 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.
(This used to be commit aac01dc7bc)
2003-06-21 04:05:01 +00:00
Andrew Bartlett
f70cc4cdc1 This patch works towards to goal of common code shared between idmap_ldap
and pdb_ldap.

So far, it's just a function rename, so that the next patch can be a very
simple matter of copying functions, without worrying about what changed
in the process.

Also removes the 'static' pointers for the rebind procedures, replacing them
with a linked list of value/key lookups.  (Only needed on older LDAP client
libs)

Andrew Bartlett
(This used to be commit f93167a7e1)
2003-06-21 00:45:03 +00:00
Jeremy Allison
deef8647c7 Fixed sorting algorithm to prevent problems with W2K clients.
Jeremy.
(This used to be commit fa8ca20ed4)
2003-06-20 20:07:13 +00:00
Jim McDonough
480918598b Fix bug #136. Add message about erroneous empty "passdb backend" parameter.
(This used to be commit 897125a9db)
2003-06-20 17:41:04 +00:00
Jim McDonough
187ef2eb2a Fix bug #136: "passdb backend = " caused smbd to segfault.
Instead, spit out an error message.
(This used to be commit 22f083b227)
2003-06-20 17:39:53 +00:00
Steve French
d1fafca608 Fix mount options for ro, dir_mode, file_mode
(This used to be commit 7e7cf0dd98)
2003-06-20 16:41:41 +00:00
Andrew Tridgell
85cc64731c fixed a bug found by volker
when we are traversing a readonly dababase we should not try to
cleanup the pending-delete records
(This used to be commit f327c06108)
2003-06-20 14:48:36 +00:00
Tim Potter
d7dfff92c1 The default action for AC_CHECK_LIB is to add the library to $LIBS so
this doesn't need to be done explicitly in the Kerberos checks.

Also there was a duplicate AC_CHECK_LIB(resolv, dn_expand) which is done
early on in the configure process.
(This used to be commit fa66e2e1e1)
2003-06-20 06:41:56 +00:00
Tim Potter
5e37c04c03 Back out some of the changes to nsstest. I've kept the NULL pointer
dereference bugfixes but left out the gethostbyname (wins) tests pending
a nicer way to integrate it.
(This used to be commit a7e67aaffe)
2003-06-20 02:31:15 +00:00
Jeremy Allison
be61fcef60 Missed initial param, typo.
Jeremy.
(This used to be commit 036a551b10)
2003-06-20 01:42:13 +00:00
Jeremy Allison
9251afe35b Mapping of Windows ACL inheritance and protected bits onto extended attributes
if available. Adds new parameter "map acl inheritance" (docs coming soon)
off by default. Allows W2K acl inheritance dialogs to work correctly on
POSIX acls.
Jeremy.
(This used to be commit a83595e80a)
2003-06-20 01:12:20 +00:00
Jelmer Vernooij
6605fec5dc Add installmodules to install
(This used to be commit 33e8dd8843)
2003-06-18 15:54:21 +00:00
Simo Sorce
75a5c0b307 Ok, this patch removes the privilege stuff we had in, unused, for some time.
The code was nice, but put in the wrong place (group mapping) and not
supported by most of the code, thus useless.

We will put back most of the code when our infrastructure will be changed
so that privileges actually really make sense to be set.

This is a first patch of a set to enhance all our mapping code cleaness and
stability towards a sane next beta for 3.0 code base

Simo.
(This used to be commit e341e7c49f)
2003-06-18 15:24:10 +00:00
Jim McDonough
c364128212 Remove the -A option of wbinfo, leaving only the long version,
--set-auth-user.  There was enough confusion, as in bug #158,
when a user accidentally typed -A instead of -a, and would get themselves
stuck with a non-working winbind.

I've made the changes to docs/docbook/manpages/wbinfo.xml, but I'm not
sure what to do beyond that.  Is checking that in enough?
(This used to be commit 70fe85e469)
2003-06-18 14:20:23 +00:00
Volker Lendecke
4a33bc9c73 There's nothing particularly secret in idmap.tdb, so create it with
0644 as the other databases.

Volker
(This used to be commit 5849053930)
2003-06-18 13:28:37 +00:00
Volker Lendecke
e6fd597fce And some more memory leaks in mapping.c and pdb_tdb.c. tdb_nextkey
mallocs its key, so we should free it after use.

Volker
(This used to be commit 9750799ba2)
2003-06-18 12:00:52 +00:00
Volker Lendecke
e48ebd09ff Better panic cleanly than segfault later when no sid can be found and created.
Everybody who calls get_global_sam_sid expects this to return non-NULL, and
there are way too many places where this is called.

Volker
(This used to be commit 2dfa896e6f)
2003-06-18 08:42:04 +00:00
Volker Lendecke
1eb6447727 And more other memory leaks. One new (idmap) and one ancient (groupdb).
Volker
(This used to be commit 2392f460ae)
2003-06-17 12:31:02 +00:00
Volker Lendecke
9606397ab1 Fix a memory leak in pdb_tdb.c.
Simo, I remember you complaining about a memleak there, could it be
this one, or did you resolve it at that time?

Volker
(This used to be commit c660595ded)
2003-06-17 12:03:48 +00:00
Jelmer Vernooij
c0e24984f0 Make static (patch from metze)
(This used to be commit 908b16cc2a)
2003-06-17 10:48:06 +00:00
Jelmer Vernooij
b9bf3252bf Fix building idmap_winbind as shared module
(This used to be commit 2556037796)
2003-06-17 10:41:08 +00:00
Jelmer Vernooij
cafb5c512d The return value of init_module functions is NTSTATUS, not int
(This used to be commit f09df852ac)
2003-06-17 10:38:22 +00:00
Volker Lendecke
7dae7d3fb4 Fix memory leak in idmap. Valgrind is soooo cool.
Volker
(This used to be commit dcdb6683a7)
2003-06-17 10:16:20 +00:00
Volker Lendecke
ea1cec68bb Const fixes by metze
Volker
(This used to be commit c0e35f3be8)
2003-06-17 09:40:35 +00:00
Jelmer Vernooij
ac44100674 Update link to DTD
(This used to be commit 2737518b25)
2003-06-16 21:34:59 +00:00
Richard Sharpe
5dd2d09a37 Squelch one small compiler warning
(This used to be commit d9ac2540dd)
2003-06-16 18:37:54 +00:00
Richard Sharpe
2740d35a7b Replace all use of bzero with memset ...
(This used to be commit e21aab516b)
2003-06-16 17:49:01 +00:00
Volker Lendecke
979c447060 This glosses over John's problem at SambaXP 2003. When we want to join
a NT4 domain as a BDC with an existing workstation account (existing
bdc is fine), we fail. Print a friendly error message in this case.

The correct solution would probably be to delete the account and try
again. But even this makes us better than NT: NT4 fails in this
situation with an empty warning message box and an unusable BDC. It
has unsuccessfully tried to suck down the domain database, and thus
has no administrator account to log in after reboot....

Volker
(This used to be commit 1ddeea2179)
2003-06-16 15:59:05 +00:00
Volker Lendecke
e2cda4a24e Fix misleading debug message.
Volker
(This used to be commit a4f76f2520)
2003-06-16 10:10:37 +00:00
Tim Potter
6a2b43db9c Make net rpc vampire return an error if the sam sync RPC returns an error.
E.g if we are pointing at a win2k native mode domain we are returned
an NT_STATUS_NOT_SUPPORTED error.
(This used to be commit 6053c30f26)
2003-06-16 05:39:26 +00:00
Tim Potter
3d65c033da Quieten another debug message.
(This used to be commit 2c47893c75)
2003-06-16 05:22:53 +00:00
Tim Potter
94d1dd96d6 Quieten debug message.
(This used to be commit 02d12cc4b9)
2003-06-16 05:20:37 +00:00
Tim Potter
7c16f64e38 Update nsstest to cope with wins NSS module as well as winbind NSS
module.  Use "wins" as the nss name to invoke this behaviour.

Also, fixed nsstest so it doesn't segfault when a nss function can't
be dlopened().  Log an error and abort the test gracefully instead.
(This used to be commit 66bafbe371)
2003-06-16 03:30:53 +00:00
Tim Potter
35d0f987db Build libnss_wins.so as part of nsswitch target. Fix for bug #160
found by andreas@conectiva.com.br
(This used to be commit fa24fd6f5b)
2003-06-16 03:28:27 +00:00
Andrew Tridgell
ec0303820f we need to call ads_first_entry() before using a ldap result,
otherwise we can segv or return garbage
(This used to be commit d1316656b0)
2003-06-16 02:42:00 +00:00
Andrew Tridgell
8cd67d7668 reverted locale patch put in by jht (originally from vorlon).
There are lots of things wrong with this patch, including:

1) it overrides a user chosen configuration option

2) it adds lots of complexity inside a loop when a tiny piece of code
   outside the loop would do the same thing

3) it does no error checking, and is sure to crash on some systems

If you want this functionality then try something like this at the end
of charset_name():

#ifdef HAVE_NL_LANGINFO
	if (strcasecmp(ret, "LOCALE") == 0) {
		const char *ln = nl_langinfo(CODESET);
		if (ln) {
			DEBUG(5,("Substituting charset '%s' for LOCALE\n", ln));
			return ln;
		}
	}
#endif

then users can set 'display charset = LOCALE' to get the locale based
charset. You could even make that the default for systems that have
nl_langinfo().
(This used to be commit 382b9b806b)
2003-06-16 02:22:52 +00:00
Tim Potter
145b01a496 Fix some compiler warnings.
(This used to be commit eec1758e04)
2003-06-16 02:16:58 +00:00
Andrew Tridgell
1209615504 another improved debug statement
(This used to be commit ac69b9c83c)
2003-06-16 01:13:17 +00:00
Andrew Tridgell
a2039bc4c6 made a debug statement more useful
(This used to be commit 3f7a24d183)
2003-06-16 01:12:42 +00:00
John Terpstra
489956c823 Patch from vorlon@debian.org, see bugzilal #122
Samba should preferentially use the locale information from the native system,
and only fall back on 'display charset' if this is unavailable or unsupported.
(This used to be commit 1e445fb422)
2003-06-15 06:07:53 +00:00
Volker Lendecke
bd1333ea74 Add 'net idmap restore'. This restores a broken idmap file
from the output of 'net idmap dump'.

'net idmap dump' now also prints the USER/GROUP HWM.

Volker
(This used to be commit c0575be936)
2003-06-14 17:51:09 +00:00
Andrew Bartlett
b85664047c This patch modifies 'net rpc vampire' to add new and existing users to both
the idmap and the SAM.

The basic idea is this:  Lookup the user with GetPwnam(), and if they
exist then use that uid.  This is what people expect.  If the user does
not exist, try and run the right script.

This is also what people expect from previous Samba 3.0 behaviour, where
the Get_Pwnam() was at runtime.

If the idmap entry for this SID isn't valid, or isn't the right value,
modify the idmap to account for this mapping.

Also, the same logic is applied to the primary gid - if it has changed,
update the user's primary unix group.

This patch allows users to be added without a mapping - this is fine for
machine accounts, for example.  I've given it a quick test against my
Win2k DC, and I *think* it's sane.

Andrew Bartlett
(This used to be commit d2a70bfff1)
2003-06-14 00:49:02 +00:00
Jeremy Allison
292a51eda1 Forward port the app-head changes for dc name cache into 3.0.
Jeremy.
(This used to be commit 8bcc3116a2)
2003-06-13 21:03:15 +00:00
Richard Sharpe
3d0d8f609d Fix an spelling mistake.
(This used to be commit 8e37c1d579)
2003-06-13 17:49:03 +00:00
Volker Lendecke
8ad364dd2e Trivial extension to 'net' to dump current local idmap.
(This used to be commit 18f3a5efea)
2003-06-13 16:19:02 +00:00
Tim Potter
0a9396dcca Rename some uuid functions so as not to conflict with system
versions.  Fixes bug #154.
(This used to be commit 986eae40f7)
2003-06-13 04:35:53 +00:00
Tim Potter
61742d1117 Fix shadow variable warning.
(This used to be commit c22a4074bd)
2003-06-13 04:29:20 +00:00
Tim Potter
88a5cb83a5 Delete outdated file.
(This used to be commit 406956645f)
2003-06-13 00:07:59 +00:00
Volker Lendecke
e1f4d66b73 Fix for bug#3. Show comments when doing 'net group -l'.
Volker
(This used to be commit e5664adc07)
2003-06-12 16:21:22 +00:00
Volker Lendecke
c8667b03f8 Working on bug#3. We want all of the aliases, so start with 0.
Volker
(This used to be commit ec1a58d09e)
2003-06-12 15:37:06 +00:00
Volker Lendecke
511789b855 Andrew's change to make 'security = domain' work again. Leave the user and group
that has been authenticated unmapped.

We need to make sure that every caller of idmap handles failure gracefully.

Volker
(This used to be commit 902d607b66)
2003-06-12 14:24:15 +00:00
Volker Lendecke
2cd38cd8e8 Fix some misleading debug messages.
(This used to be commit 9c003ae4ff)
2003-06-12 08:22:55 +00:00
Volker Lendecke
c899e4c874 Get rid of a const warning.
Volker
(This used to be commit 6684f5b11f)
2003-06-12 07:54:13 +00:00
Volker Lendecke
3117b4b6fc Fix typo found by Vance
(This used to be commit 678e68a295)
2003-06-12 07:32:44 +00:00
Volker Lendecke
0d8307fac3 Andrew is right, this is probably the wrong approach.
Take away the automatic mapping of users and groups again.

Volker
(This used to be commit 74510369d4)
2003-06-12 07:21:26 +00:00
Volker Lendecke
98c9504583 Set the user's primary unix group from usrmgr.exe.
This part of a fix to bug#45.

Volker
(This used to be commit 43d306011f)
2003-06-11 20:42:10 +00:00
Volker Lendecke
36a9033de8 Sorry idra for messing around with your stuff, but this was obviously not
tested.

Incrementing HWW_USER while allocating a GROUPID looked somewhat wrong.

Volker
(This used to be commit d1eac2c758)
2003-06-11 20:06:11 +00:00
Simo Sorce
6d360a15d9 avoid races in getting high watermark
(This used to be commit df0df941d8)
2003-06-11 18:14:34 +00:00
Volker Lendecke
a7e1bbbd06 Fix 'security = domain' without winbind. This stores the sid we got
from the PDC as a mapping to the uid we got from getpwnam in the
local idmap.

This should not be worse than the current state, so I decided to
commit it. It is different from abartlet's preliminary patch, but I
believe this is the better solution. Feel free to comment and/or
revert it.

Volker
(This used to be commit 0c16965e6f)
2003-06-11 16:36:04 +00:00
Andrew Tridgell
1d03ec88f1 several places in client.c rely in commands[i].name == NULL being a
termination condition for checking for commands. Make sure the last
element is indeed NULL.
(This used to be commit 294f79884d)
2003-06-11 06:23:53 +00:00
Andrew Tridgell
98f448b1f4 i'm getting rather sick of this
**********************************************************
**** PLEASE TEST YOUR CHANGES BEFORE CHECKING THEM IN ****
**********************************************************

Jelmer, your change did not fix the -b option, it just make it not
segfault on debian. It did however add a warning and make it not
compile on some systems. It also gave the io_bufsize the value of a
pointer, not the value the user specified.

(this doesn't apply just to Jelmer, I'm just seeing rather too many
checkins from everyone lately where the code could never have possibly
worked, so was obviously checked in without testing)
(This used to be commit 21931ad7a0)
2003-06-11 06:10:10 +00:00
Andrew Tridgell
d368845418 on AIX FD_ZERO() is defined in terms of bzero(), so we can't have
the "don't use bzero" macros.

In general I think it would be better to have a separate script that
checks for deprecated functions like these using grep rather than
using these cpp tricks. They just get us into trouble.
(This used to be commit 2a227c880d)
2003-06-11 05:34:14 +00:00
Jeremy Allison
3ef930a8e9 Add in rety loop for query_user_list (from APP_HEAD). Deals with a bug
using MSRPC backend and should be safe with ldap backend.
Jeremy.
(This used to be commit 67535329a2)
2003-06-10 22:11:30 +00:00
Jelmer Vernooij
33a7f1bba0 Don't segfault when -b is specified (fixes debian bug #196833)
(This used to be commit 4af9074397)
2003-06-10 19:27:32 +00:00
Jeremy Allison
5cee22714c Ok, I've tried being Mr. Nice Guy and people (you know who you are) still
keep putting bzero BSD'ism's into our source code. Make this an error like
bcopy and others to prevent it in future.
Jeremy.
(This used to be commit 80d0432316)
2003-06-10 17:30:28 +00:00
Richard Sharpe
09530bfa60 More updates on editreg.c to bring it better in line with the Samba source.
(This used to be commit dc69a638b9)
2003-06-10 17:18:07 +00:00
Andrew Tridgell
50585d4c04 removed editreg from standard build until it is portable. Right now it
fails to build on a ton of platforms as it completely bypasses all of
our portability code.

if you want it then use 'make bin/editreg'. If some distros want to
add that to their spec files then thats up to them, but we really
can't have non-portable code unconditionally built in our main tree.
(This used to be commit 3c66111f32)
2003-06-10 14:09:20 +00:00
Andrew Tridgell
d286e44209 fixed libsmb code to set correct timeout in cli_state when waiting for
a blocking lock
(This used to be commit 3515476fe4)
2003-06-10 14:02:46 +00:00
Andrew Tridgell
7c6aee526a fixed smbtorture LOCK1 test to know about the correct multiplier for
timed blocking locks
(This used to be commit 24feb1afa6)
2003-06-10 14:01:57 +00:00
Andrew Tridgell
0d556758de use lp_realm() to find the default realm for 'net ads password'
(This used to be commit 21d9280278)
2003-06-10 04:15:55 +00:00
Andrew Tridgell
057ec70b53 - fixed the bug that forced us not to use the winbindd cache when we
have a primary ADS domain and a secondary (trusted) NT4 domain. This
  caused winbindd to be *really* slow for that setup.

- fixed winbindd_getgrgid(), which was calling uid_to_sid instead of
  gid_to_sid(). When you make changes to winbind *PLEASE* test using
  nsstest.
(This used to be commit cdd9b60a07)
2003-06-10 03:50:38 +00:00
Andrew Tridgell
1d008cd2cb use ZERO_STRUCT() instead of memset
(This used to be commit 0820840423)
2003-06-10 03:48:09 +00:00
Andrew Tridgell
2cfc19f899 added an auth flag that indicates if we should be allowed to fallback
to NTLMSSP for SASL if krb5 fails. This is important as otherwise the
admin may think that a join has succeeeded when kerberos is actually
broken.
(This used to be commit 23a6ea385c)
2003-06-10 03:47:42 +00:00
Andrew Tridgell
524da855ff don't call a function error_message() as that conflicts with a
kerberos name
(This used to be commit 8fa737f223)
2003-06-10 03:46:11 +00:00
Andrew Tridgell
093116c49f when creating aliased parameters in loadparm.c you *must* place the
alias directly after the main entry, otherwise it isn't treated as an
alias.
(This used to be commit 0f3d44858f)
2003-06-10 02:13:09 +00:00
Jeremy Allison
eaf0decab8 More instrumentation for winbindd.
Jeremy.
(This used to be commit 4161a122b7)
2003-06-10 00:55:37 +00:00
Jeremy Allison
2783e6f4f4 Instrument cache with debug statements so I can have a clue as to what
is going on in remote large sites.
Jeremy.
(This used to be commit 5987dad1f1)
2003-06-10 00:49:43 +00:00
Jeremy Allison
966578c615 Add some basic DEBUG statements at level 10 so we can see what is being
called. This is *essential* (and should be done on all the other cli_XX
rpc calls) to help debug winbindd problems remotely.
Jeremy.
(This used to be commit bc215612cb)
2003-06-09 23:15:34 +00:00
Jeremy Allison
98e1dfd3d9 Fix for crash bug noticed by Luke Howard | PADL Software Pty Ltd | www.padl.com.
Jeremy.
(This used to be commit 6a07d19b63)
2003-06-09 17:28:42 +00:00
Andrew Tridgell
7309f50062 applied patch from bug#140
this fixes a timestamp problem with 64 bit machines
(This used to be commit 0ce6eddad8)
2003-06-09 02:54:07 +00:00
Andrew Bartlett
46d106f2eb Fix some memory leaks and extra cache startups/shutdowns from the trusted
domains lookup code.

Andrew Bartlett
(This used to be commit 0ec1b12070)
2003-06-08 12:51:31 +00:00
Andrew Bartlett
e4bc8f08c3 Enforce 'client plaintext auth', 'client lanman auth' and 'client ntlmv2 auth'.
(this now causes things like the LANMAN protocol and contacting servers with 'encrypt passwords = no' set to fail, if configured)

'client ntlmv2 auth' (a BOOL) forces both plaintext and lanman off, and is the
most secure setting for compatible hosts.

Perhaps we should change this to 'client minimum auth'?

Andrew Bartlett
(This used to be commit e1fb681e4c)
2003-06-08 12:49:31 +00:00
Andrew Bartlett
850554084c Make sure that we use schannel (if configured) when checking for a valid
join to the DC.

Andrew Bartlett
(This used to be commit af526fa9b3)
2003-06-08 11:39:28 +00:00
Andrew Bartlett
54f7cde1eb Rework our smb signing code again, this factors out some of the common
MAC calcuation code, and now supports multiple outstanding packets.

Fixes bug #40

Andrew Bartlett
(This used to be commit dd33212f1e)
2003-06-08 03:49:35 +00:00
Gerald Carter
dd87bcb699 bumping cvs version number to distinguish between SAMBA_3_0 cvs tree
and 3.0.0beta1 release
(This used to be commit 2619cc5d44)
2003-06-07 18:07:30 +00:00
Gerald Carter
6a945d3354 add back the winbind uid/gid parameter but mark them as deprecated
(This used to be commit 61215c6849)
2003-06-07 13:51:13 +00:00
Andrew Bartlett
ed9c090737 Try to fix memory leaks found by valgrind in pdb_ldap code.
Andrew Bartlett
(This used to be commit decadfcc82)
2003-06-07 03:22:37 +00:00
Andrew Bartlett
1079bd40c5 Don't assume that the SAM knows the unix home directory - look it up by
getpwnam() if need be.

Fixes bug #130

Andrew Bartlett
(This used to be commit a4bc789a39)
2003-06-07 03:20:09 +00:00
Herb Lewis
9960487103 get rid of IRIX o32 builds - some libraries (kerberos and ldap) are only
n32 so smbwrapper fails to link.
(This used to be commit 392f207a35)
2003-06-06 23:55:24 +00:00
Herb Lewis
6ae4c3c966 remove o32 targets for IRIX. kerberos and ldap libraries are n32 only so
linking smbwrappers will fail.
(This used to be commit f95f306729)
2003-06-06 23:35:22 +00:00
Gerald Carter
babab82d9a applying David Lee's climessage patch to make sending messages more extendable
(This used to be commit a5240adc49)
2003-06-06 23:09:39 +00:00
Gerald Carter
e485bc7e3e support LDAP_EXOP_MODIFY_PASSWORD (not experiemental in OpenLDAP 2.1)
(This used to be commit 50fdc93822)
2003-06-06 22:50:54 +00:00
Gerald Carter
71298881c4 * add in David Lee's utmp patch (defaults to on if available)
* one more try at fixing builds when --with-ldap=no
(This used to be commit b516ab7bde)
2003-06-06 22:33:43 +00:00
Herb Lewis
40eacb1648 get rid of warning about malformed if in Makefile
(This used to be commit 1e1e56efd8)
2003-06-06 22:24:36 +00:00
Gerald Carter
70da79f8a8 fix build on systems w/o LDAP libs
(This used to be commit f33aeaa039)
2003-06-06 20:31:19 +00:00
Herb Lewis
f5c21fc365 delete extra PASSDBLIB at beginning
(This used to be commit 1c82a3aa91)
2003-06-06 20:11:23 +00:00
Herb Lewis
bea0cf2c79 pdbedit needs PASSDBLIBS
(This used to be commit 0e91aca22c)
2003-06-06 19:44:32 +00:00
Gerald Carter
0fb5750634 compile error
(This used to be commit 8804b059a4)
2003-06-06 18:19:02 +00:00
Gerald Carter
0d55e9c536 merge from APP_HEAD. Push negative connection cache
into rpc_find_dc().  Should probably be extended some more
in 3.0 but this is what we have for the moment.
(This used to be commit 0e23abf95c)
2003-06-06 14:11:14 +00:00
Gerald Carter
711f8d0a13 * break out more common code used between pdb_ldap and idmap_ldap
* remove 'winbind uid' and 'winbind gid' parameters (replaced
  by current idmap parameter)
* create the sambaUnixIdPool entries automatically in the 'ldap
  idmap suffix'
* add new 'ldap idmap suffix' and 'ldap group suffix' parametrer
* "idmap backend = ldap" now accepts 'ldap:ldap://server/' format
  (parameters are passed to idmap init() function
(This used to be commit 1665926281)
2003-06-06 13:48:39 +00:00
Andrew Tridgell
53f8d3f01a SMBlockingX timeouts are in units of 2 milliseconds, not 1
(This used to be commit 999cde3227)
2003-06-06 10:42:16 +00:00
Andrew Bartlett
adb710d028 No matter how special this session key is, it's not worth a level 0.
Hide it behind a level 10, with #ifdef DEBUG_PASSWORD instead.

Andrew Bartlett
(This used to be commit 9d4e327850)
2003-06-06 10:22:48 +00:00
Jeremy Allison
0bbbe382a5 Fix for valgrind - when doing a srvstr_push we must zero fill
any extra bytes, not clobber region them - otherwise valgrind
thinks they are invalid on send() or write().
Jeremy.
(This used to be commit 8aa5f7a65c)
2003-06-06 07:56:23 +00:00
Jeremy Allison
dff2bf904e Fixup of typos.
Jeremy.
(This used to be commit 99589b8a8f)
2003-06-06 07:08:21 +00:00
Jelmer Vernooij
bed2de0ff2 Use filedes as first argument to fsetxattr, not the undefined variable 'path' :-)
(This used to be commit d3c02b40c4)
2003-06-06 07:06:30 +00:00
Jeremy Allison
5d609bc9ff metze noticed some conn elements remaining in a VFS_NEXT.
Jeremy.
(This used to be commit b863be794b)
2003-06-06 06:35:24 +00:00
Jeremy Allison
b61d61dd60 Fix for VFS_NEXT xattr calls (from metze). I will add these to skel.c to
ensure they are tested.
Jeremy.
(This used to be commit 9ad02a7ba8)
2003-06-06 06:17:41 +00:00
Andrew Tridgell
7e82bf284c 2 more places where win2003 forces UCS2
(This used to be commit b64f6e52ec)
2003-06-06 06:01:45 +00:00
Andrew Tridgell
dc5f0b28cf - the ALL_INFO trans2 QFILEINFO level uses a forced UCS2 name
- win2003 returns 0 for ea_size when there are no EAs
(This used to be commit 83e0c21831)
2003-06-06 05:34:02 +00:00
Andrew Tridgell
e35917bb93 make the allocation_size consistent between trans2 QFILEINFO and SMBgetattrE
(This used to be commit 59f1a5e6fd)
2003-06-06 05:32:36 +00:00
Andrew Tridgell
49d71c7e7b fixed a pstrcpy() that is not on a pstring
(This used to be commit f644b3d6d2)
2003-06-06 05:31:30 +00:00
Andrew Tridgell
6b943b5b21 - the 8.3 name in BOTH_DIRECTORY_INFO is supposed to be always unicode
(to match win2003 behaviour)

- added the STR_TERMINATE_ASCII flag from samba4 so we can get the
  string termination right for the case where it is supposed to be
  non-terminated for UCS2 and terminated when ASCII
(This used to be commit 791a4cc7cf)
2003-06-06 05:15:28 +00:00