Volker Lendecke [Wed, 31 Jan 2007 12:01:52 +0000 (12:01 +0000)]
r21076: Two pieces of infrastructure from Samba4: An API-compatible messaging wrapper
and tdb_wrap_open.
Volker
Volker Lendecke [Wed, 31 Jan 2007 11:48:14 +0000 (11:48 +0000)]
r21074: Preparation for the import of samba4 notify: Add the file notify.idl and the
resulting marshalling/unmarshalling routines in gen_ndr/
Volker
Volker Lendecke [Wed, 31 Jan 2007 11:13:40 +0000 (11:13 +0000)]
r21073: Fix compiler warning
Gerald Carter [Wed, 31 Jan 2007 05:38:36 +0000 (05:38 +0000)]
r21070: * Add the new boolean 'winbind normalize names' option as discussed
on the samba-technical ml. The replacement character is hardcoded
as a '_' for now.
Jeremy Allison [Wed, 31 Jan 2007 00:49:49 +0000 (00:49 +0000)]
r21067: Finished refactoring setqpathinfo to be readable
and modifiable by other people. Now to look over
the build farm and fix any breakage.
Jeremy.
Volker Lendecke [Tue, 30 Jan 2007 22:22:06 +0000 (22:22 +0000)]
r21064: The core of this patch is
void message_register(int msg_type,
void (*fn)(int msg_type, struct process_id pid,
- void *buf, size_t len))
+ void *buf, size_t len,
+ void *private_data),
+ void *private_data)
{
struct dispatch_fns *dfn;
So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.
Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.
Volker
Jeremy Allison [Tue, 30 Jan 2007 22:20:55 +0000 (22:20 +0000)]
r21063: All case statements are now NTSTATUS returning
functions. Now to factor out the post processing
and make all cases behave the same (no mixture
of "early returns" and "break"s.
Jeremy
Jeremy Allison [Tue, 30 Jan 2007 20:49:37 +0000 (20:49 +0000)]
r21062: Should fix the build plus make all refactored
functions return NTSTATUS.
Jeremy.
Jeremy Allison [Tue, 30 Jan 2007 19:54:28 +0000 (19:54 +0000)]
r21061: Refactoring all the cases into NTSTATUS returns.
Jeremy.
Jeremy Allison [Tue, 30 Jan 2007 19:26:01 +0000 (19:26 +0000)]
r21060: Start refactoring out the non-return case statements
into functions.
Jeremy.
Jeremy Allison [Tue, 30 Jan 2007 18:45:19 +0000 (18:45 +0000)]
r21058: Finish the easy refactoring - split out all the case
statements that do early return. Next will be case
statements that need post processing, finally on to
qfilepathinfo and do the same.
Jeremy.
Jeremy Allison [Tue, 30 Jan 2007 18:16:51 +0000 (18:16 +0000)]
r21057: More refactoring into functions.
Jeremy.
Günther Deschner [Tue, 30 Jan 2007 16:51:42 +0000 (16:51 +0000)]
r21056: Moving the set_domain_online_request to fork_domain_child() (formerly
lived in trustdom_recv().
Jeremy, this is the better place I think but please check.
Guenther
Jeremy Allison [Tue, 30 Jan 2007 02:27:29 +0000 (02:27 +0000)]
r21054: More function refactoring.
Jeremy.
Jeremy Allison [Tue, 30 Jan 2007 02:13:58 +0000 (02:13 +0000)]
r21053: More refactoring and fix the tests (set position info
on a pathname is ignored).
Jeremy.
Jeremy Allison [Tue, 30 Jan 2007 01:54:07 +0000 (01:54 +0000)]
r21052: Refactoring.
Jeremy.
Jeremy Allison [Tue, 30 Jan 2007 01:46:14 +0000 (01:46 +0000)]
r21051: More function refactoring... Added #if 0 for
questionable practice (ignoring bad fsp on
handle based call).
Jeremy.
Jeremy Allison [Tue, 30 Jan 2007 01:36:45 +0000 (01:36 +0000)]
r21050: Factor out SMB_SET_FILE_DISPOSITION_INFO. My
intent is to factor out all cases where we
always return from the case.
Jeremy.
Jeremy Allison [Tue, 30 Jan 2007 01:14:48 +0000 (01:14 +0000)]
r21049: Start to refactor some of the setpath set code
into separate functions (tridge mailed me a fresh
batch) to make it easier to add the POSIX open we'll
need soon.
Jeremy.
Jeremy Allison [Mon, 29 Jan 2007 22:51:44 +0000 (22:51 +0000)]
r21047: Hand marshalling hack from Martin Zielinski <mz@seh.de>
to allow Vista to upload printer drivers (it wants level 8
which we don't support yet). Downgrade in the same way
that Windows servers do.
Jeremy.
Gerald Carter [Mon, 29 Jan 2007 21:15:25 +0000 (21:15 +0000)]
r21046: Backing out svn r20403 (Andrew's krb5 ticket cleanup
as this is causing the WRONG_PASSWORD error in the SetUserInfo()
call during net ads join).
We are now back to always list RC4-HMAC first if supported by
the krb5 libraries.
Gerald Carter [Sat, 27 Jan 2007 03:27:34 +0000 (03:27 +0000)]
r21036: Fix the ad nss info backend to not abort the search when called outside the idmap daemon
Jeremy Allison [Sat, 27 Jan 2007 02:33:21 +0000 (02:33 +0000)]
r21035: Remove unneeded checks on incoming uid/gid for
mknod (fifo) unix extensions code. Problem
discovered by Anders Karlsson <anders.karlsson@redhat.com>.
Jeremy.
James Peach [Fri, 26 Jan 2007 22:52:55 +0000 (22:52 +0000)]
r21034: Don't force user to have pidl in their PATH.
Günther Deschner [Fri, 26 Jan 2007 15:58:10 +0000 (15:58 +0000)]
r21033: To make the logs a bit more readable let the winbind dc connect child
write to a separate logfile.
Guenther
Günther Deschner [Thu, 25 Jan 2007 16:54:53 +0000 (16:54 +0000)]
r21021: Fix memleak.
Guenther
Günther Deschner [Thu, 25 Jan 2007 15:05:23 +0000 (15:05 +0000)]
r21020: Some pam_winbind fixes:
* make debug_state also configurable from the config file
* minor code cleanup
Guenther
Günther Deschner [Thu, 25 Jan 2007 15:00:41 +0000 (15:00 +0000)]
r21019: Fix typo.
Guenther
Günther Deschner [Thu, 25 Jan 2007 14:08:45 +0000 (14:08 +0000)]
r21018: Removing the set_domain_online_request again in trustdom_recv().
Jeremy, we really can't do that. There are setups with hundred and more
trusted domains out there, I have one customer who tells me it takes
more then half an hour for him after winbind is up and running. That
request registers the check_domain_online_handler which in turn forks
off the child immediately. Also discussed with Volker.
Guenther
Günther Deschner [Thu, 25 Jan 2007 10:29:04 +0000 (10:29 +0000)]
r21016: Fix pam_sm_setcred again.
Jerry, the switch statement must ignore the PAM_SILENT flag.
Guenther
Gerald Carter [Thu, 25 Jan 2007 02:36:20 +0000 (02:36 +0000)]
r21015: fix typo that breaks the build
Gerald Carter [Thu, 25 Jan 2007 02:28:00 +0000 (02:28 +0000)]
r21014: move some functionss to winbindd_group.c and make static
Gerald Carter [Thu, 25 Jan 2007 02:24:56 +0000 (02:24 +0000)]
r21013: * Remove "inline" keyword
* Remove anpther check for PAM_SILENT that prevents logging to syslog
* Add missing check for TRY_FIRST_PASS when using authtok (missed
from previous merge)
Gerald Carter [Thu, 25 Jan 2007 01:56:34 +0000 (01:56 +0000)]
r21012: Patch from Danilo Almeida @ Centeris (via me):
Details: Improve PAM logging
- The improved logging is far tracking down PAM-related bugs
- PAM_SILENT was being mis-used to suppress syslog output instead of
suppressing user output. This lets PAM_SILENT still log to syslog.
- Allow logging of item & data state via debug_state config file option.
- Logging tracks the pam handle used.
Gerald Carter [Thu, 25 Jan 2007 01:18:31 +0000 (01:18 +0000)]
r21011: Another patch from Danilo Almeida @ Centeris (via me):
Details: Reset the "new password prompt required" state whenever
we do a new auth. In more detail, in pam_sm_authenticate, if not
settting PAM_WINBIND_NEW_AUTHTOK_REQD, then clean any potentially
present PAM_WINBIND_NEW_AUTHTOK_REQD.
Gerald Carter [Thu, 25 Jan 2007 00:50:36 +0000 (00:50 +0000)]
r21010: fix the pstring change in ntlm_auth for require-membership-of in ntlm_auth
Gerald Carter [Thu, 25 Jan 2007 00:47:27 +0000 (00:47 +0000)]
r21009: Patch from Danilo Almeida @ Centeris (via me).
Patch details:
Support most options in pam_winbind.conf; support comma-separated names in
require-membership-of. Details below:
1) Provides support for almost all config options in pam_winbind.conf
(all except for use_first_pass, use_authtok, and unknown_ok).
- That allows us to work well when invoked via call_modules from
pam_unix2.conf as well as allowing use of spaces in names used
w/require_membership_of.
2) Support for comma-separated list of names or SID strings in
require_membership_of/require-membership-of.
- Increased require_membership_of field in winbind request from fstring
(256) to pstring (1024).
- In PAM side, parse out multiple names or SID strings and convert
all of them to SID strings.
- In Winbind side, support membership check against multiple SID strings.
Herb Lewis [Wed, 24 Jan 2007 19:53:58 +0000 (19:53 +0000)]
r21007: move $(SOCKET_WRAPPER_OBJ) to OBJ definition instead of link line like
all other uses - merge from 3_0_24
Volker Lendecke [Wed, 24 Jan 2007 16:15:29 +0000 (16:15 +0000)]
r21005: Add a debug message for EAGAIN error of setresuid.
Volker
Jim McDonough [Wed, 24 Jan 2007 15:29:58 +0000 (15:29 +0000)]
r21004: Patch from Mathias Dietz <MDIETZ@de.ibm.com> to fix multi-node
sharemodes in gpfs.
Günther Deschner [Wed, 24 Jan 2007 14:59:01 +0000 (14:59 +0000)]
r21003: Display LDAP base in debug statement.
Guenther
Herb Lewis [Wed, 24 Jan 2007 14:53:03 +0000 (14:53 +0000)]
r21002: Get rid of unused macros - merge change from 3_0_24
Gerald Carter [Wed, 24 Jan 2007 14:39:46 +0000 (14:39 +0000)]
r21001: * Use a simple '#define LDAPMessage void' to fix the build
problems in the nss_info interface when HAVE_LDAP is undefined.
* Revert previous ifdef HAVE_ADS brakets
* Remove an unused init function wrapper.
Volker Lendecke [Wed, 24 Jan 2007 11:26:22 +0000 (11:26 +0000)]
r20998: Fix debug message
Andrew Bartlett [Wed, 24 Jan 2007 08:55:00 +0000 (08:55 +0000)]
r20996: Build fix from Kai Blin
James Peach [Wed, 24 Jan 2007 05:03:15 +0000 (05:03 +0000)]
r20994: Remove unused code.
Gerald Carter [Wed, 24 Jan 2007 04:46:35 +0000 (04:46 +0000)]
r20993: temporary build fix to get things going again on non-ADS systems
Gerald Carter [Wed, 24 Jan 2007 04:44:27 +0000 (04:44 +0000)]
r20992: another attempt at fixing the build breakage
Gerald Carter [Wed, 24 Jan 2007 02:36:40 +0000 (02:36 +0000)]
r20987: fix build farm breakage when ADS support is not present (caused by nss_info_methods API)
Gerald Carter [Wed, 24 Jan 2007 01:48:08 +0000 (01:48 +0000)]
r20986: Commit the prototype of the nss_info plugin interface.
This allows a provider to supply the homedirectory, etc...
attributes for a user without requiring support in core
winbindd code. The idmap_ad.c module has been modified
to provide the idmap 'ad' library as well as the rfc2307 and sfu
"winbind nss info" support.
The SID/id mapping is working in idmap_ad but the nss_info
still has a few quirks that I'm in the process of resolving.
Gerald Carter [Wed, 24 Jan 2007 00:17:36 +0000 (00:17 +0000)]
r20985: leave room for terminating NULL when printing password hashes via 'pdbedit -L -w'
Volker Lendecke [Tue, 23 Jan 2007 20:38:14 +0000 (20:38 +0000)]
r20982: Fix a segfault -- I wonder why my make test did not show this earlier...
Volker Lendecke [Tue, 23 Jan 2007 16:50:27 +0000 (16:50 +0000)]
r20979: Fix description, thanks to Michael Adam <ma@sernet.de>
Günther Deschner [Tue, 23 Jan 2007 10:51:35 +0000 (10:51 +0000)]
r20970: Allow to define workstation for samlogon in rpcclient (for testing).
Guenther
James Peach [Tue, 23 Jan 2007 04:12:51 +0000 (04:12 +0000)]
r20966: Only attempt to reload the config file atfer the fork point if we
are in daemon mode. If we are in inetd mode, there's really no point
in rechecking it so soon.
James Peach [Tue, 23 Jan 2007 03:03:24 +0000 (03:03 +0000)]
r20965: Fix spelling.
Gerald Carter [Mon, 22 Jan 2007 16:54:02 +0000 (16:54 +0000)]
r20951: Remove the DOM_SID field in the struct idmap_domain and bounce
domain SID lookups through the struct winbindd_domain *domain_list
by searching by name.
Refactor the order lookup when searching for the correct idmap_domain
to a single function and remove the requirement that the default
domain be listed first in the config file.
I would still like to make the idmap_domain array a linked list and
remove the existing code which makes use of indexes into the list.
Basic testing with tdb pans out ok.
Volker Lendecke [Sun, 21 Jan 2007 16:25:25 +0000 (16:25 +0000)]
r20933: Fix the build without inotify
Volker Lendecke [Sun, 21 Jan 2007 16:05:49 +0000 (16:05 +0000)]
r20932: This is the basic infrastructure for inotify support. This is far from being
complete, in particular the various mask bits are not correctly supported
yet. Checkin in now, I want to see how the build farm likes it.
Volker
Volker Lendecke [Sun, 21 Jan 2007 11:49:00 +0000 (11:49 +0000)]
r20931: This changes the notify infrastructure from a polling-based to an event-driven
based approach. The only remaining hook into the backend is now
void *(*notify_add)(TALLOC_CTX *mem_ctx,
struct event_context *event_ctx,
files_struct *fsp, uint32 *filter);
(Should we put this through the VFS, so that others can more easily plug in?)
The trick here is that the backend can pick filter bits that the main smbd
should not handle anymore. Thanks to tridge for this idea.
The backend can notify the main smbd process via
void notify_fsp(files_struct *fsp, uint32 action, char *name);
The core patch is not big, what makes this more than 1800 lines are the
individual backends that are considerably changed but can be reviewed
one by one.
Based on this I'll continue with inotify now.
Volker
Jeremy Allison [Fri, 19 Jan 2007 23:08:20 +0000 (23:08 +0000)]
r20917: Fix missing error returns pointed out by "Li, Ying (ESG)" <ying.li2@hp.com>
Jeremy.
Jeremy Allison [Fri, 19 Jan 2007 21:46:12 +0000 (21:46 +0000)]
r20916: Add in the delete on close final fix - but only enabled
with -DDEVELOPER.
Jeremy.
Jeremy Allison [Fri, 19 Jan 2007 21:29:46 +0000 (21:29 +0000)]
r20915: Fixed the bad merge from 3.0.24.
Jeremy.
Jeremy Allison [Fri, 19 Jan 2007 20:05:02 +0000 (20:05 +0000)]
r20914: Sync up incorrect differences between 3.0.24 and 3.0
Jeremy.
Jeremy Allison [Fri, 19 Jan 2007 20:00:44 +0000 (20:00 +0000)]
r20913: Fix the build.
Jeremy.
Jeremy Allison [Fri, 19 Jan 2007 19:41:34 +0000 (19:41 +0000)]
r20912: Ensure the list always remains sorted even when
moving events around.
Jeremy.
Gerald Carter [Fri, 19 Jan 2007 18:13:53 +0000 (18:13 +0000)]
r20911: Fix copyright message in winbindd to use the macro from smb.h
Gerald Carter [Fri, 19 Jan 2007 14:54:05 +0000 (14:54 +0000)]
r20905: Windows 2000 returns NT_STATUS_ACCOUNT_RESTRICTION if the pw
chnage fails due to policy settings where as 2003 (the chgpasswd3()
request) fails with NT_STATUS_PASSWORD_RESTRICTION. Thunk down
to the same return code so we correctly retreive the password policy
in both cases.
Gerald Carter [Fri, 19 Jan 2007 14:33:36 +0000 (14:33 +0000)]
r20904: This is a placeholder fix. Apparently Windows 2000
is sharing the IDL for the SAMR pipe with Windows 2003
but returning NT_STATUS_NOT_SUPPORTED rather than a DCE/RCE
fault. We need to catch this in the general sense
by looking at the returned PDU size. But this immediate
change fixes password changes via pam_winbind against Windows 2000
DCs.
Gerald Carter [Fri, 19 Jan 2007 14:29:42 +0000 (14:29 +0000)]
r20903: Replace the hardcoded "smb.conf" string with the dyn_CONFIGFILE
Gerald Carter [Thu, 18 Jan 2007 22:08:38 +0000 (22:08 +0000)]
r20884: patch from Michael Adam <ma@sernet.de> to add new sambaTrustedDomainPassword object class
Jeremy Allison [Thu, 18 Jan 2007 21:51:52 +0000 (21:51 +0000)]
r20883: W00t! I now understand how "delete on close" really
works - even with the strange "initial delete on close"
semantics. The "initial delete on close" flag isn't
committed to the share mode db until the handle is
closed, and is discarded if any real "delete on close"
was set. This allows me to remove the "initial_delete_on_close"
flag from the share db, and move it into a BOOL in files_struct.
Warning ! You must do a make clean after this. Cope with
the wrinkle in directory delete on close which is done
differently from files. We now pass all Samba4 smbtortute
BASE-DELETE tests except for the one checking that files
can't be created in a directory which has the delete on
close set (possibly expensive to fix).
Jeremy.
Jeremy Allison [Thu, 18 Jan 2007 19:18:43 +0000 (19:18 +0000)]
r20880: Fix memory leak in new sitename code. You got *really*
close Guenther, then you forgot to use "key" :-) :-).
Jeremy.
Volker Lendecke [Thu, 18 Jan 2007 15:51:51 +0000 (15:51 +0000)]
r20878: Fix build with --enable-profiling
Volker Lendecke [Thu, 18 Jan 2007 12:49:59 +0000 (12:49 +0000)]
r20877: Random notify fixes
Volker Lendecke [Thu, 18 Jan 2007 11:31:38 +0000 (11:31 +0000)]
r20876: Fix bug 4346 -- Thanks to YAMASAKI Hiroyuki
Jelmer Vernooij [Thu, 18 Jan 2007 10:18:59 +0000 (10:18 +0000)]
r20875: Pass DCE/RPC server call arguments as a struct rather than as separate arguments.
This makes it a bit more similar to the Samba4 code.
Günther Deschner [Thu, 18 Jan 2007 09:58:57 +0000 (09:58 +0000)]
r20874: We need to distinguish client sitenames per realm. We were overwriting
the stored client sitename with the sitename from each sucessfull CLDAP
connection.
Guenther
Jeremy Allison [Thu, 18 Jan 2007 06:19:24 +0000 (06:19 +0000)]
r20873: Some correctness fixes w.r.t. Samba4 torture BASE-DELETE.
Allow us to correctly refuse to set delete on close on a
non-empty directory. There are still some delete-on-close
wrinkles to be fixed, but I understand how to do that better
now. I'll fix this tomorrow.
Jeremy.
Günther Deschner [Wed, 17 Jan 2007 19:20:11 +0000 (19:20 +0000)]
r20862: When in disconnected mode there is no need to try a fallback to a site
less DNS query. This speeds up offline detection slightly.
Guenther
Günther Deschner [Wed, 17 Jan 2007 19:14:34 +0000 (19:14 +0000)]
r20861: We only use sitespecific DNS lookups when looking for DCs or KDCs, not
for a PDC.
Guenther
Günther Deschner [Wed, 17 Jan 2007 19:11:45 +0000 (19:11 +0000)]
r20860: Adding some small tweaks. When we have no sitename, there is no need to
ask for the list of DCs twice.
Guenther
Volker Lendecke [Wed, 17 Jan 2007 18:26:37 +0000 (18:26 +0000)]
r20858: change_notify_reply_packet is static
Jeremy Allison [Wed, 17 Jan 2007 18:25:35 +0000 (18:25 +0000)]
r20857: Silence gives assent :-). Checking in the fix for
site support in a network where many DC's are down.
I heard via Volker there is still a bug w.r.t the
wrong site being chosen with trusted domains but
we'll have to layer that fix on top of this.
Gd - complain if this doesn't work for you.
Jeremy.
Volker Lendecke [Wed, 17 Jan 2007 18:23:37 +0000 (18:23 +0000)]
r20856: Make "struct notify_mid_map" private to notify.c
Volker Lendecke [Wed, 17 Jan 2007 16:23:45 +0000 (16:23 +0000)]
r20854: Ok, now I think we're at a point where looking at notify starts to make sense
again :-)
Volker
Volker Lendecke [Wed, 17 Jan 2007 15:47:36 +0000 (15:47 +0000)]
r20851: To read account policies from LDAP we need root.
Volker
Günther Deschner [Wed, 17 Jan 2007 14:09:14 +0000 (14:09 +0000)]
r20848: Minor typo.
Guenther
Volker Lendecke [Wed, 17 Jan 2007 12:59:14 +0000 (12:59 +0000)]
r20846: Before this gets out of control...
This add a struct event_context and infrastructure for fd events to smbd. This
is step zero to import lib/events.
Jeremy, I rely on you to watch the change in receive_message_or_smb()
closely. For the normal code path this should be the only relevant change. The
rest is either not yet used or is cosmetic.
Volker
Jeremy Allison [Wed, 17 Jan 2007 02:44:27 +0000 (02:44 +0000)]
r20845: Somehow I missed this one - should have been part of the
previous commit :-(.
Jeremy.
Jeremy Allison [Wed, 17 Jan 2007 02:09:37 +0000 (02:09 +0000)]
r20844: Somewhat radical change - this may break the build (I will
watch carefully - so I'm doing it in one transaction so I can
roll back).
Change check_name(), reduce_name() and dptr_create() to
return NTSTATUS. This helps a lot in error path processing
and especially in reduce_name() allows us to ditch the flaky
and error-prone saving of errno and return errors directly.
Jeremy.
Jeremy Allison [Tue, 16 Jan 2007 21:04:30 +0000 (21:04 +0000)]
r20843: Get rid of last BOOL ok.
Jeremy.
Jeremy Allison [Tue, 16 Jan 2007 20:53:50 +0000 (20:53 +0000)]
r20842: Only one more BOOL ok to go...
Jeremy.
Jeremy Allison [Tue, 16 Jan 2007 20:49:51 +0000 (20:49 +0000)]
r20841: Remove more BOOL ok.
Jeremy.
Jeremy Allison [Tue, 16 Jan 2007 20:32:39 +0000 (20:32 +0000)]
r20840: Keep removing the old BOOL ok logic.
Jeremy.
Jelmer Vernooij [Tue, 16 Jan 2007 18:26:02 +0000 (18:26 +0000)]
r20839: Fix other C++ warnings
Jeremy Allison [Tue, 16 Jan 2007 18:05:37 +0000 (18:05 +0000)]
r20838: Small fix from Jiri.Sasek@Sun.COM to fix null
pointer deref.
Jeremy
Jelmer Vernooij [Tue, 16 Jan 2007 17:48:59 +0000 (17:48 +0000)]
r20837: Use real type name, to fix compilation with -WC++-compat
Volker Lendecke [Tue, 16 Jan 2007 15:50:25 +0000 (15:50 +0000)]
r20833: Reformatting
Jelmer Vernooij [Tue, 16 Jan 2007 15:42:03 +0000 (15:42 +0000)]
r20832: Remove extra pointers previously added to unique [out] pointers. Instead,
add [ref] pointers where necessary (top-level [ref] pointers,
by spec, don't appear on the wire).
This brings us closer to the DCE/RPC standard again.