Adding changes to winbind to make it work on Solaris. Added an nsswitch wrapper
for Solaris because the NSS mechanism in Solaris is a superset of the one in
Linux.
Also made changes to configure so that it builds winbind, nss and pam
modules depending on the OS.
Made a change to tests/fcntl_lock.c so it creates a file in /tmp. Trying to
lock a file in the working directory fails if the source directory is NFS
mounted. And you get the usual message about Locking not available on the
system.
Tim Potter [Mon, 28 Aug 2000 01:09:48 +0000 (01:09 +0000)]
Merge of memory leak fixes for group enumeration and other stuff from
APPLIANCE_TNG. This brings winbindd up to date between the SAMBA_TNG
and APPLIANCE_TNG branches.
Elrond [Fri, 25 Aug 2000 17:30:52 +0000 (17:30 +0000)]
MS_DFS -> WITH_MSDFS as in HEAD
smbd/nttrans.c:
moved around one function and added some #if 0 part
from HEAD.
msdfs/:
Removed old code
include/smb.h:
Merged Jeremy's comment from HEAD.
Elrond [Thu, 24 Aug 2000 17:21:56 +0000 (17:21 +0000)]
fullname and description were exchanged on the wire in
SAM_DISP_INFO_1.
Added info-level 6 for lsa_query_info_policy().
This one tells, if this machine is the primary or backup
controller for the domain it controls.
I added parsing and the server-side code.
This is needed for samba-as-pdc, w2k-in-workgroup,
user-list in acleditor.
w2k (at least the version, I had temporary access to) sends
some funky lsa_close-handle. Instead of typical 20 bytes,
the handle is only 2 bytes long and contains only a 01 00.
So I checked the return-value of every smb_io_pol_hnd in
parse_lsa.c, so lsarpcd could return a fault-pdu. (until
someone tells us, what's happening)
Elrond [Thu, 24 Aug 2000 16:58:51 +0000 (16:58 +0000)]
Filling the fullname from the part before the "," and the
description with the part after the ",". (That's, how the
unix-gecos field is mostly used)
Before, the gecos-field was completely copied to the
fullname.
Elrond [Thu, 24 Aug 2000 16:42:45 +0000 (16:42 +0000)]
SIDs from w2k:
S-1-5-7 -> "Anonymous Logon" (before, we had "", which nt4
gives)
S-1-5-8 -> "Proxy" (no idea)
S-1-5-10 -> "Self" (ditto)
S-1-5-12 -> "Restricted" (ditto)
S-1-5-13 -> "Terminal Server User" (I guess, you'll get in
this group, if you're
logged in through
terminal services)
Jeremy Allison [Wed, 23 Aug 2000 23:05:49 +0000 (23:05 +0000)]
Tidied up some error returns from printing calls. Still need to map UNIX
errors to NT error for print job failure returns. Patch from John Reilly at HP.
Jeremy.
/* get nt creds associated with an msrpc session. */
struct ntdom_info *cli_conn_get_ntinfo(cli_rpc_info *con);
/* get a server name associated with a connection */
const char *cli_con_get_srvname(cli_rpc_info *con);
/* write full PDU to a pipe */
BOOL rpc_api_write(cli_rpc_info *con, prs_struct *data);
/* read full PDU from a pipe */
BOOL rpc_api_rcv_pdu(cli_rpc_info *con, prs_struct *rdata);
/* detect dead servers. The fd is set to -1 when we get an error */
BOOL rpc_con_ok(cli_rpc_info *con);
/* write full PDU and read full PDU to a pipe */
BOOL rpc_api_send_rcv_pdu(cli_rpc_info *con, prs_struct *data,
prs_struct *rdata);
} cli_connect_fns;
- fixed memory leaks (sander!!!) due to change in semantics of prs_create()
which *used* to "take over" the memory passed to it, but now copies mem
into an smc_alloc buffer.
- getfileline() causing problems on zero-length lines and zero-length files.
Gerald Carter [Thu, 17 Aug 2000 20:05:05 +0000 (20:05 +0000)]
Fix for Win9x driver downloads when information is
stored in the TDB. See the message I posted about
this on samba-technical
* If the admin does not desire the new NT print driver
support, nothing needs to be done. All existing
parameters work the same.
* If the admin wants to take advantage of NT printer
driver support but does not want to migrate the 9x drivers
to the new setup, the leave the existing printers.def
file. When smbd attempts to locate a 9x driver for the
printer in the TDB and fails it will drop down to
using the printers.def (and all associated parameters).
The make_printerdef tool will also remain for backwards
compatibility but will be moved to the "this tool is the
old way of doing it" pile.
* If the admin installs a 9x driver for a printer on
a Samba host (in the printing TDB), this information will
take precedence and the three old printing parameters
will be ignored (including print driver location).
* If an admin wants to migrate the printers.def file into
the new setup, I can write a script to do this using
rpcclient. The main problem is the driver namespace
(we need the NT driver name first in order to
be consistent).
Jeremy Allison [Mon, 14 Aug 2000 23:48:07 +0000 (23:48 +0000)]
Reverted the change Luke made. Removed IS_BITS_SET_XX macros.
Do not re-add them. These macros are unsafe as they are not understood.
Change all TNG code using them to correct '&' and '|' please.
IS_BITS_SET_ALL was being used in cmd_interp.c when IS_BITS_SET_SOME
should have been used.
Jeremy.
Luke Leighton [Mon, 14 Aug 2000 07:33:34 +0000 (07:33 +0000)]
jeremy,
please do not remove IS_BITS_SET_XXX macros just because you happen
"not to like them". whilst still working on merging, you are not
responsible for this code, therefore do not hinder its development
whilst people are attempting to do merges. after the merge from
TNG to cvs main is completed, you can do what the hell you like.
thank you.
jerry,
please could you consider adding underlying routines (in this case
get_safe_smb_errstr()) instead of reverting to a [less secure]
previous coding method. thanks.
Gerald Carter [Mon, 14 Aug 2000 03:17:17 +0000 (03:17 +0000)]
fix for new_smb_io_relarraystr() and new_smb_io_relstr()
to use spool_smb_io_unistr() as this does not call prs_align()
befrore parsing the UNISTR.
Parsing a void* buffer from an RPC should not be aligned
on 4 byte boundaries. Don't think this change affects
any marshalling code, only unmarshalling...
Gerald Carter [Sat, 12 Aug 2000 14:14:40 +0000 (14:14 +0000)]
reworked talloc() to in order to help track down invalid
memory access.
Tridge, I don't think using 0xdeadbeef for size allocations
of 0 is going to work. I ended up having to use NULL
as much code that works on UNISTR checks to see if the buffer ptr
is NULL. So valid code ends up with a seg fault.
Rather than rewriting it all, I added a DEBUG_TALLOC
#ifdef in talloc.h that sets a macro BAD_PTR.
This is the value assigned to ptr for an allocation of 0 bytes.
Jeremy Allison [Fri, 11 Aug 2000 23:13:09 +0000 (23:13 +0000)]
Fixed the problem with UNISTR marshalling in a buffer5 struct.
The smb_io_unistr() code called a prs_align, this was not being
counted in the size or taken account of in the offset calculation.
Fixed size_ calculation to always return a size a multiple of 4
and also set the offset correctly. This fixes the problem I saw
and will hopefully fix the problem HP reported. JF please check
this change.
Jeremy.
First shot at actually *doing* WINS failover.
If libsmb/namequery.c:name_query() times out while doing a non-broadcast
query, I mark that WINS server 'dead'. Note that I don't try the new
WINS server. I think I can get that working too.
This is only for queries, not registrations. The biggest problem is that
I may have to fiddle with the UNICAST SUBNET, but I need to check talk
that over with someone (Jeremy?) before I hack at it.
I can't actually test the above change, I'm 'fraid. I'm getting:
4 errors detected in the compilation of "rpc_server/srv_spoolss_nt.c".
Tim Potter [Fri, 11 Aug 2000 01:55:10 +0000 (01:55 +0000)]
Discovered that glibc has a fallback routine for initgroups which is
basically a set/get/endgrent loop. Wrote a initgroups function for
winbind which calls samr_query_usergroups() to get the groups a NT
domain user is a member of. Very funky.
Tim Potter [Thu, 10 Aug 2000 20:17:31 +0000 (20:17 +0000)]
Group membership is now stored as an offset in the winbindd_gr struct
returned to the nss client code. For getgr{uid,nam} this offset is zero,
but for getgrent the lists of group members are tacked onto the end.
Tim Potter [Thu, 10 Aug 2000 20:08:15 +0000 (20:08 +0000)]
Added 'winbind enum users' and 'enum winbind groups' parameter to tell
winbindd not to return anything when getgrent() or getpwent() are called.
Groups of large trusted domains containing tens of thousands of users and
groups can take days to traverse (OK not quite but it seems like it).
I wonder how NIS and other distributed directory service type things handle
this?