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

11884 Commits

Author SHA1 Message Date
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
Jeremy Allison
d155f6ea54 Fixup the check for attr libraries, used ',' instead of ' '.
Jeremy.
(This used to be commit af62b6612e)
2003-06-06 05:10:26 +00:00
Andrew Tridgell
32bf831e25 fixed the string alignment of the QUERY_EA_SIZE trans2 findfirst level
(This used to be commit ff5e37ed29)
2003-06-06 04:31:48 +00:00
Andrew Tridgell
d51b463b3f fixed the layout of the FULL_DIRECTORY_INFO trans2 findfirst level
found by samba4 smbtorture SEARCH test
(This used to be commit 5a5f59cf5e)
2003-06-06 04:29:41 +00:00
Andrew Tridgell
7d4b53c2aa removed the 'valgrind fix' that (although it may well remove a
valgrind warning) causes us to return a completely wrong 8.3 filename
in directory searches!

come on guys, this close to a release you need to TEST CODE BEFORE COMMITTING
(This used to be commit 381cea68b8)
2003-06-06 04:21:43 +00:00
Jeremy Allison
398ce536e9 Missed (name) arg in fgetxattr.
Jeremy.
(This used to be commit f42e164e90)
2003-06-06 00:45:57 +00:00
Jeremy Allison
6fe5940109 Added EA operations to VFS layer.
Jeremy.
(This used to be commit 024de9213e)
2003-06-06 00:04:27 +00:00
Jeremy Allison
8e047054e8 Get ready for EA code... Add Linux interface.
Jeremy.
(This used to be commit 4885314074)
2003-06-05 20:29:55 +00:00
Jeremy Allison
bf50387f49 Never second guess tridge.... (always talloc an internal pointer... ).
Jeremy.
(This used to be commit 72ecdb387d)
2003-06-05 02:44:24 +00:00
Gerald Carter
3bdfd57a2d working draft of the idmap_ldap code.
Includes sambaUnixIdPool objectclass

Still needs cleaning up wrt to name space.
More changes to come, but at least we now have a
a working distributed winbindd solution.
(This used to be commit 8241758544)
2003-06-05 02:34:30 +00:00