cvs2svn Import User [Fri, 13 Oct 2000 05:22:27 +0000 (05:22 +0000)]
This commit was manufactured by cvs2svn to create tag
'SAMBA_TNG_FORK'.
Tim Potter [Fri, 13 Oct 2000 05:22:26 +0000 (05:22 +0000)]
Fixed merging mess.
Tim Potter [Wed, 11 Oct 2000 05:55:52 +0000 (05:55 +0000)]
Renamed WINBINDD_INITGROUPS constant to WINBINDD_GETGROUPS.
Tim Potter [Wed, 11 Oct 2000 05:30:43 +0000 (05:30 +0000)]
Merge from HEAD.
Shirish Kalele [Fri, 29 Sep 2000 20:19:10 +0000 (20:19 +0000)]
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 [Thu, 28 Sep 2000 04:50:16 +0000 (04:50 +0000)]
Fixed memory leak in winbindd_getgrent()
Elrond [Sat, 16 Sep 2000 12:24:14 +0000 (12:24 +0000)]
typo
Elrond [Thu, 14 Sep 2000 18:03:29 +0000 (18:03 +0000)]
typo fix by Jerry
Elrond [Wed, 13 Sep 2000 19:35:29 +0000 (19:35 +0000)]
My new prs-pending stuff. I wanted to implement this for
a long time. Now it's done.
Elrond [Wed, 13 Sep 2000 19:33:33 +0000 (19:33 +0000)]
generic_list_prepend()
static
Luke Leighton [Mon, 11 Sep 2000 03:12:24 +0000 (03:12 +0000)]
assoc_gid overloaded with pid, causing bind nack to be sent back from nt.
Luke Leighton [Mon, 11 Sep 2000 03:11:23 +0000 (03:11 +0000)]
removed unnecessary align.
Tim Potter [Mon, 4 Sep 2000 04:09:58 +0000 (04:09 +0000)]
Debug cleanups.
Elrond [Sat, 2 Sep 2000 16:12:55 +0000 (16:12 +0000)]
Okay, I need util_list.c from Jerry.
I've modified it a little.
Elrond [Thu, 31 Aug 2000 19:18:30 +0000 (19:18 +0000)]
vfs_unlink-merge from HEAD.
vfs.c is now fully in sync.
Elrond [Wed, 30 Aug 2000 18:33:16 +0000 (18:33 +0000)]
some merge from HEAD
Elrond [Tue, 29 Aug 2000 19:13:47 +0000 (19:13 +0000)]
some merge from HEAD
and some moving around functions, so they are, where HEAD
keeps them
Elrond [Mon, 28 Aug 2000 18:32:50 +0000 (18:32 +0000)]
update from HEAD
Elrond [Mon, 28 Aug 2000 17:31:21 +0000 (17:31 +0000)]
doc-update from HEAD
Tim Potter [Mon, 28 Aug 2000 01:09:48 +0000 (01:09 +0000)]
Merge ... 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 [Sat, 26 Aug 2000 09:25:53 +0000 (09:25 +0000)]
VFS write update from HEAD.
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.
Tim Potter [Fri, 25 Aug 2000 04:19:43 +0000 (04:19 +0000)]
Replaced "\\MAILSLOT\\NET\\NETLOGON" with NET_LOGON_MAILSLOT constant.
cvs2svn Import User [Thu, 24 Aug 2000 19:48:32 +0000 (19:48 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
Jeremy Allison [Thu, 24 Aug 2000 19:48:31 +0000 (19:48 +0000)]
Modified to use sid_to_uid and sid_to_gid. Now ready for POSIX ACL
code....
Jeremy.
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 17:03:59 +0000 (17:03 +0000)]
Filling the fullname in SAM_DISP_INFO_1. So usrmgr now
shows the fullname in its main listing.
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.
Jeremy Allison [Wed, 23 Aug 2000 17:38:52 +0000 (17:38 +0000)]
Documentation on NT_USER_TOKEN. Requested by Sander.
Jeremy.
Jeremy Allison [Wed, 23 Aug 2000 00:45:40 +0000 (00:45 +0000)]
Added code to do SID to uid/gid conversion. Needed for ACL support.
Jeremy.
Tim Potter [Tue, 22 Aug 2000 06:28:33 +0000 (06:28 +0000)]
Patch from John Reilly <jreilly@hp.com> for not processing duplicate files
when moving printer driver to download area.
Jeremy Allison [Mon, 21 Aug 2000 19:30:19 +0000 (19:30 +0000)]
Fix for safe_free freeing static strings. From Robert August Vincent, II.
Jeremy.
Elrond [Sat, 19 Aug 2000 18:19:37 +0000 (18:19 +0000)]
little merge from HEAD
Luke Leighton [Fri, 18 Aug 2000 06:38:17 +0000 (06:38 +0000)]
elrond, in the case where num_shares == 0 or num_files == 0,
calloc() cannot do NULL memory allocation.
Luke Leighton [Fri, 18 Aug 2000 06:27:24 +0000 (06:27 +0000)]
oops. must return "" string and length zero when strlen(filebuf) == 0
Luke Leighton [Fri, 18 Aug 2000 06:26:41 +0000 (06:26 +0000)]
- created cli_connect_api:
typedef void *cli_rpc_info; /* peter samuelson's idea */
typedef struct cli_connect_fns
{
/* create new connection. strictly speaking, one arg should be
* full dce/rpc format: e.g "ncacn_np:\\server\pipe\pipename" */
cli_rpc_info *cli_connect_add(const char *pipe_name,
const vuser_key *key,
const char *srv_name,
const struct ntuser_creds *ntc,
BOOL reuse, BOOL *is_new_connection);
/* terminate client connection */
void cli_connection_free(cli_rpc_info *con);
/* 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 [Fri, 18 Aug 2000 06:03:13 +0000 (06:03 +0000)]
fixed an off by one error where I was tromping on memory
when initializing a driver_info_3 struct. See spoolss_addprinterdriver()
jerry
Gerald Carter [Fri, 18 Aug 2000 05:57:09 +0000 (05:57 +0000)]
fixed initialization errors (again!) I must have forgot to
check these in before.
jerry
Luke Leighton [Fri, 18 Aug 2000 05:56:57 +0000 (05:56 +0000)]
getfileline() - stopped filebuf[strlen(filebuf)-1] from being a problem
when strlen(filebuf) == 0.
Luke Leighton [Fri, 18 Aug 2000 05:56:19 +0000 (05:56 +0000)]
getfileline() - line with length of zero -> filebuf[strlen(filebuf)-1]
is NOT ok.
Gerald Carter [Fri, 18 Aug 2000 05:55:37 +0000 (05:55 +0000)]
changing some debug message levels
j-
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).
jerry
Gerald Carter [Thu, 17 Aug 2000 20:03:53 +0000 (20:03 +0000)]
added comment for my own memory purposes
jerry
David O'Neill [Wed, 16 Aug 2000 17:54:32 +0000 (17:54 +0000)]
Remove unused variable from init_unistr2_from_unistr
Gerald Carter [Wed, 16 Aug 2000 03:49:10 +0000 (03:49 +0000)]
merge from HEAD
jerry
Gerald Carter [Wed, 16 Aug 2000 03:44:04 +0000 (03:44 +0000)]
hack for unmarshalling unistr's on machines with BIG_ENDIAN arch
I think we have a lot more of these bugs lurking (i'm fairly
confident of it).
jerry
Gerald Carter [Wed, 16 Aug 2000 03:41:02 +0000 (03:41 +0000)]
- fixed memcpy bug in copy_unistr2()
- init_unistr2_from_unistr() does not NULL terminate
the buffer
--jerry
Gerald Carter [Wed, 16 Aug 2000 03:38:52 +0000 (03:38 +0000)]
fixed unitialized struct bug in enum_users (whatever it is called)
jerry
Gerald Carter [Wed, 16 Aug 2000 03:34:58 +0000 (03:34 +0000)]
fixed typo.
jerry
Gerald Carter [Tue, 15 Aug 2000 23:36:05 +0000 (23:36 +0000)]
fixed error in [public] spotted by Ron Alexander <rcalex@home.com>
changed to read only = yes
jerry
Tim Potter [Tue, 15 Aug 2000 21:09:54 +0000 (21:09 +0000)]
Merge ... uninitialised variable fix from APPLIANCE_HEAD.
Jeremy Allison [Tue, 15 Aug 2000 02:33:27 +0000 (02:33 +0000)]
Tidied up extra ()'s.
Jeremy
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.
Tim Potter [Mon, 14 Aug 2000 21:27:54 +0000 (21:27 +0000)]
Merge.
Gerald Carter [Mon, 14 Aug 2000 21:20:56 +0000 (21:20 +0000)]
merge from HEAD
Gerald Carter [Mon, 14 Aug 2000 21:18:02 +0000 (21:18 +0000)]
fixed a few bugs in new_smb_io_relarraystr().
Marshalling code path now uses spoolss_smb_io_unistr()
also caught a NULL pointer case.
i'll update TNG later.
Tim Potter [Mon, 14 Aug 2000 18:39:51 +0000 (18:39 +0000)]
NT printer permissions test program.
Luke Leighton [Mon, 14 Aug 2000 11:03:30 +0000 (11:03 +0000)]
restored IS_BITS_SET_xxx macros.
Luke Leighton [Mon, 14 Aug 2000 07:37:12 +0000 (07:37 +0000)]
hey, jerry: turns out you _have_ converted to get_safe_nt_errmsg!!!
[got confused with which way dirdiff was going :)].
... but you forgot to update TNG's lib/cmd_interp.c...
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.
Luke Leighton [Mon, 14 Aug 2000 06:00:09 +0000 (06:00 +0000)]
removed unused functions. srv_lookup.c _has_ to diiie.
Gerald Carter [Mon, 14 Aug 2000 03:18:17 +0000 (03:18 +0000)]
minor formatting fixes.
jerry
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...
jerry
Elrond [Sat, 12 Aug 2000 18:25:51 +0000 (18:25 +0000)]
Okay, one more, because it's too easy (simple copy).
Jerry: Can't you do that next time?
Elrond [Sat, 12 Aug 2000 18:15:35 +0000 (18:15 +0000)]
last merge for today
Gerald Carter [Sat, 12 Aug 2000 14:51:36 +0000 (14:51 +0000)]
removed the prs_align in spoolss_smb_io_unistr() (JF, please check)
as it was throwing things off when parsing buffers passed in SPOOLSS
RPCs
fixed the unmarshalling of UNISTR arrays to be double NULL terminated
jerry
Gerald Carter [Sat, 12 Aug 2000 14:31:29 +0000 (14:31 +0000)]
fixes to prs_unistr UNMARSHALLING only. Problem was due to talloc's
of 0 bytes.
jerry
Gerald Carter [Sat, 12 Aug 2000 14:26:01 +0000 (14:26 +0000)]
FIxed some unmarshalling problems with relstr and unistr arrays
jerry
Gerald Carter [Sat, 12 Aug 2000 14:20:40 +0000 (14:20 +0000)]
fixed unistr_to_ascii to deal with NULL src strings
jerry
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.
jerry
Gerald Carter [Sat, 12 Aug 2000 14:10:27 +0000 (14:10 +0000)]
removed (void) typecast from SMB_ASSERT
jerry
Elrond [Sat, 12 Aug 2000 12:46:43 +0000 (12:46 +0000)]
merge
No, this isn't fun.
Yes, I use dirdiff.
John Terpstra [Sat, 12 Aug 2000 02:41:42 +0000 (02:41 +0000)]
Updated by Patrick Powell <papowell@lprng.org>
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.
Tim Potter [Fri, 11 Aug 2000 22:49:25 +0000 (22:49 +0000)]
Debug cleanups.
Christopher R. Hertel [Fri, 11 Aug 2000 22:29:44 +0000 (22:29 +0000)]
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".
in head branch.
Chris -)-----
Tim Potter [Fri, 11 Aug 2000 21:51:46 +0000 (21:51 +0000)]
Debug statement cleanups.
Tim Potter [Fri, 11 Aug 2000 21:41:41 +0000 (21:41 +0000)]
Rearranged debug.
Luke Leighton [Fri, 11 Aug 2000 07:45:39 +0000 (07:45 +0000)]
removed get_rpc_vuser() static function.
Luke Leighton [Fri, 11 Aug 2000 07:34:32 +0000 (07:34 +0000)]
unused structure variable (spotted by gerry).
Tim Potter [Fri, 11 Aug 2000 02:02:05 +0000 (02:02 +0000)]
make proto for access_mask parameter in samr_open_user()
Tim Potter [Fri, 11 Aug 2000 02:00:24 +0000 (02:00 +0000)]
Updated with various binaries.
Tim Potter [Fri, 11 Aug 2000 01:56:25 +0000 (01:56 +0000)]
Updated test for initgroups function.
Tim Potter [Fri, 11 Aug 2000 01:55:49 +0000 (01:55 +0000)]
Test for winbindd initgroups function.
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 [Fri, 11 Aug 2000 01:51:38 +0000 (01:51 +0000)]
Added verbosity.
Jeremy Allison [Fri, 11 Aug 2000 00:53:13 +0000 (00:53 +0000)]
Fix case where volumename could be returned as UNIX charset or DOS codepage
depending on where it came from.
Jeremy.
Jeremy Allison [Thu, 10 Aug 2000 23:41:16 +0000 (23:41 +0000)]
Added "add_printer_hook" call to update printer for Win9x clients.
Patch from John Reilly <jreilly@hp.com>.
Jeremy.
Tim Potter [Thu, 10 Aug 2000 23:04:57 +0000 (23:04 +0000)]
The unknown argument to samr_open_user() looks like it's an access_mask.
Tim Potter [Thu, 10 Aug 2000 21:05:00 +0000 (21:05 +0000)]
Delete #ifdef'ed out duplicate definition of lp_driverfil() as it was
creating a conflict in proto.h
Tim Potter [Thu, 10 Aug 2000 20:35:03 +0000 (20:35 +0000)]
Added second argument to simple_compile procedure to link with other
libraries.
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.
Changes for enum user/group parameter.
Cleanup of nss header.
Tim Potter [Thu, 10 Aug 2000 20:12:41 +0000 (20:12 +0000)]
make proto
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?
Jeremy Allison [Thu, 10 Aug 2000 19:51:45 +0000 (19:51 +0000)]
Tidied up security rights definitions.
Jeremy.
Elrond [Thu, 10 Aug 2000 18:40:31 +0000 (18:40 +0000)]
Some merge from HEAD.
Mainly structure, but also printer-admin.
Elrond [Thu, 10 Aug 2000 18:21:19 +0000 (18:21 +0000)]
Moved sys_select() from system.c into select.c
This doesn't mean, TNG now has HEAD-sys_select-semantics
But system.c is now in sync.
Tim Potter [Thu, 10 Aug 2000 18:10:09 +0000 (18:10 +0000)]
Added verbosity.
Use compile.exp library.