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

437 Commits

Author SHA1 Message Date
Jelmer Vernooij
05ea5e23cf Revert "Rename smbd -> samba."
This reverts commit 0e9008be35.
2008-09-21 21:32:40 +02:00
Jelmer Vernooij
0e9008be35 Rename smbd -> samba. 2008-09-21 21:26:40 +02:00
Jelmer Vernooij
c2eb4e5f8e Let winbind depend directly on libnet rather than through the ejs bindings. 2008-09-16 18:03:36 +02:00
Andrew Bartlett
ba22de3d4f Return the same privilaged winbindd socket as we actually use.
Andrew Bartlett
(This used to be commit 2209787812)
2008-09-10 14:08:40 +10:00
Andrew Bartlett
ecc13c3b1f Fix winbindd not to sit in a busy loop...
Clearly winbindd in Samba4 has not ever been run against windows, as
when we fixed the Samba4 server not to cause XP to loop like this,
Samba4's own client starts looping...

Andrew Bartlett
(This used to be commit 9741772190)
2008-07-21 15:00:18 +10:00
Andrew Bartlett
234413fbd9 Use a configure-specified directory for the winbind priv pipe
This makes it easier for RPMs to specify an group for access to that
directory.

Andrew Bartlett
(This used to be commit fa36135443)
2008-06-28 22:02:19 +10:00
Andrew Bartlett
485a6354e5 Fix the wbinfo test on the LDAP backend.
The problem was that we would do a blocking wait for the LDAP server,
which was also blocking on us returning (because we were in single
process mode).

The LDAP connection being made here is useless anyway, and will need
to be an async ldb_connect() before anybody reintroucues it (nobody in
their right mind would program a winbindd backend on pure LDAP, when
the ldb abstraction is available).

Andrew Bartlett
(This used to be commit 23280b2e6e)
2008-06-28 18:10:59 +10:00
Simo Sorce
929adc9efa Make up the right dependencies now that ldb depends on libevents
(This used to be commit 3b8eec7ca3)
2008-06-14 11:59:19 -04:00
Jelmer Vernooij
4c70cda986 Fix a couple (well, little more than that..) of typos.
(This used to be commit a6b5211994)
2008-05-18 23:02:47 +02:00
Jelmer Vernooij
4c8756f147 Create prototype headers from Makefile directory, without smb_build in the middle.
(This used to be commit f4a77b96f9)
2008-05-18 22:30:08 +02:00
Jelmer Vernooij
03643aec88 Use variables for source directory in a couple more places.
(This used to be commit c41bd3005f)
2008-05-18 19:54:27 +02:00
Jelmer Vernooij
7b45a4d7fa Merge branch 'v4-0-test' into v4-0-gmake3
Conflicts:

	source/auth/config.mk
	source/auth/gensec/config.mk
	source/torture/smbtorture.c
(This used to be commit edfd02e59b)
2008-05-10 18:08:00 +02:00
Tiago Batista
674d089bea Tiago Batista posted a patch to fix the build:
Trying to compile the latest git tree, I got some errors
"auth/pam_error.h not found" errors, it looks like it moved to
auth/ntlm/pam_errors.h.

Andrew Bartlett
(This used to be commit 95831a015a)
2008-05-06 08:12:03 +10:00
Jelmer Vernooij
cc9c4aaa8d Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/Makefile
	source/auth/config.mk
	source/auth/gensec/config.mk
	source/build/m4/public.m4
	source/build/make/python.mk
	source/build/make/rules.mk
	source/build/smb_build/header.pm
	source/build/smb_build/main.pl
	source/build/smb_build/makefile.pm
	source/dsdb/config.mk
	source/dsdb/samdb/ldb_modules/config.mk
	source/kdc/config.mk
	source/lib/events/config.mk
	source/lib/events/events.c
	source/lib/ldb/config.mk
	source/lib/nss_wrapper/config.mk
	source/lib/policy/config.mk
	source/lib/util/config.mk
	source/libcli/smb2/config.mk
	source/libnet/config.mk
	source/librpc/config.mk
	source/nbt_server/config.mk
	source/ntptr/ntptr_base.c
	source/ntvfs/posix/config.mk
	source/ntvfs/sysdep/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/rpc_server/service_rpc.c
	source/scripting/ejs/config.mk
	source/scripting/python/config.mk
	source/smb_server/config.mk
	source/smbd/server.c
	source/torture/config.mk
	source/torture/smb2/config.mk
	source/wrepl_server/config.mk
(This used to be commit 13bbd42068)
2008-04-25 10:04:20 +01:00
Kai Blin
240d959005 libnet: Make UserInfo accept a SID as input as well, fix wb_cmd_getpwuid
(This used to be commit 5f3a70f285)
2008-04-24 11:17:23 +02:00
Andrew Bartlett
0321bc0259 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit e8da1559f7)
2008-04-18 18:21:52 +02:00
Andrew Tridgell
93c9de03af fixed a double free in winbind
state->domain->netlogon_binding is a child of ctx, and ctx is freed by
the composite_is_ok failure callback
(This used to be commit 3c217518ba)
2008-04-18 16:23:48 +02:00
Andrew Bartlett
bfbcfc41f5 Fix samba3 protocol to correctly include the NULL terminator
Andrew Bartlett
(This used to be commit fa45991303)
2008-04-18 11:37:43 +02:00
Jelmer Vernooij
21fc767378 Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a2)
2008-04-17 12:23:44 +02:00
Jelmer Vernooij
1efbd5fbf6 Remove event context tracking from the credentials struct.
(This used to be commit 4d7fc946b2)
2008-04-17 01:03:18 +02:00
Andrew Bartlett
a58df2f54c Fix struct_based winbind test for 'check machine account'.
The problem here was that we did not fill in the error strings in the
success case, and the testsuite checked against the incorrect
'freindly' error string.

Andrew Bartlett
(This used to be commit df05f11883)
2008-04-16 16:11:17 +02:00
Andrew Bartlett
008c8adfe3 Fix wbinfo --trusted-domains.
The problems here were that we did not bind to the LSA pipe, and we
did not consider it possible to have 0 trusted domains.

Andrew Bartlett
(This used to be commit 86694d429d)
2008-04-16 16:10:16 +02:00
Andrew Bartlett
e0eba5232d Fix winbind to check machine account.
This enables 'wbinfo -t', by checking the machine account with a
SamLogon call.

Andrew Bartlett
(This used to be commit abefa12029)
2008-04-15 16:29:13 +02:00
Jelmer Vernooij
e9017ba418 Use _OBJ_FILES variables in a couple more places.
(This used to be commit 92856d5054)
2008-04-14 17:22:58 +02:00
Andrew Tridgell
6abdaefb0f show what type of idmapping has failed
(This used to be commit 8a22241952)
2008-04-14 11:30:10 +02:00
Andrew Tridgell
3d01c8eb6d Fixed a crash bug in unixuid module on failed ID mapping
We need to intialise *ids regardless of the status of the call, as the
IDL specifies that the out[] array always exists. If we don't
initialise out then we get a segv when a id mapping fails.

This still doesn't explain why the idmapping is failing, but at least
the client now gets NT_STATUS_NONE_MAPPED rather than a crashed
server.
(This used to be commit 4449ce381a)
2008-04-11 14:12:34 +10:00
Jelmer Vernooij
b5d84a74d1 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/auth/credentials/config.mk
	source/auth/gensec/config.mk
	source/build/smb_build/makefile.pm
	source/heimdal_build/config.mk
	source/lib/events/config.mk
	source/lib/nss_wrapper/config.mk
	source/lib/policy/config.mk
	source/lib/registry/config.mk
	source/lib/socket_wrapper/config.mk
	source/lib/tdb/config.mk
	source/lib/tls/config.mk
	source/lib/util/config.mk
	source/libcli/config.mk
	source/libcli/ldap/config.mk
	source/libnet/config.mk
	source/librpc/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/scripting/ejs/config.mk
	source/smbd/process_model.mk
(This used to be commit 760378e029)
2008-04-08 03:45:06 +02:00
Kai Blin
b6c48091d4 idmap: Also store sid type in the idmap db
(This used to be commit 018eb64f03)
2008-04-02 23:07:41 +02:00
Kai Blin
6ce0781413 wbclient: Add an async winbind client library.
(This used to be commit 3e3563f284)
2008-04-02 23:06:27 +02:00
Kai Blin
6ae76e5cdc winbind: Bump down the debuglevel.
(This used to be commit 02c7913bf2)
2008-04-02 23:06:07 +02:00
Jelmer Vernooij
18d80bdf1f Merge v4.0-test
(This used to be commit 977dbdeaf3)
2008-03-28 00:44:14 +01:00
Kai Blin
a1875b039b idmap: Map SIDs to unixids instead of uids/gids
(This used to be commit 73ac7c4a1c)
2008-03-18 10:55:31 +01:00
Jelmer Vernooij
fb6fdfce37 Fix the build.
(This used to be commit f2e4974471)
2008-03-08 17:02:40 +01:00
Jelmer Vernooij
b29d47edcf Move object file lists to the Makefile.
(This used to be commit a7e6d2a183)
2008-03-03 18:25:28 +01:00
Jelmer Vernooij
7e04591520 Remove use of global_loadparm.
(This used to be commit 3cf3922c80)
2008-02-28 21:02:49 +01:00
Jelmer Vernooij
3101cb888d Remove uses of global_loadparm.
(This used to be commit a16c9a2129)
2008-02-25 12:51:55 +01:00
Jelmer Vernooij
10e7f9f02d Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-trivial
(This used to be commit 52a8d06f00)
2008-02-21 16:11:13 +01:00
Jelmer Vernooij
263a77c561 Remove more uses of global_loadparm.
(This used to be commit a1715b1f48)
2008-02-21 15:45:32 +01:00
Kai Blin
99b311449f idmap: Handle SID->gid
(This used to be commit 78d22a28ec)
2008-02-21 11:22:15 +01:00
Kai Blin
705abe2cb3 idmap: Handle SID->uid
(This used to be commit 4037ca6b9c)
2008-02-21 11:22:10 +01:00
Kai Blin
9c7f714962 idmap: Handle gid->SID mapping
(This used to be commit 6f2d95030c)
2008-02-21 11:22:06 +01:00
Kai Blin
895874d966 idmap: Handle uid->SID mapping
(This used to be commit 6ac6de8476)
2008-02-21 11:21:59 +01:00
Andrew Bartlett
0f8eeb81ec Remove useless layer of indirection, where every service called
task_service_init() manually.  Now this is called from service.c for
all services.

Andrew Bartlett
(This used to be commit 9c9a4731ca)
2008-02-04 21:58:29 +11:00
Andrew Bartlett
23d681caf9 Rework service init functions to pass down service name. This is
needed to change prefork behaviour based on what service is being
started.

Andrew Bartlett and David Disseldorp
(This used to be commit 0d830580e3)
2008-02-04 17:48:51 +11:00
Jelmer Vernooij
df408d056e r26672: Janitorial: Remove uses of global_loadparm.
(This used to be commit 18cd08623e)
2008-01-05 13:06:03 -06:00
Jelmer Vernooij
86dc05e99f r26638: libndr: Require explicitly specifying iconv_convenience for ndr_struct_push_blob().
(This used to be commit 61ad78ac98)
2008-01-01 16:12:11 -06:00
Jelmer Vernooij
70ccac0f05 r26435: Remove global_loadparm instance.
(This used to be commit 66fd8d480b)
2007-12-21 05:50:04 +01:00
Jelmer Vernooij
a2cea02584 r26430: require explicit specification of loadparm context.
(This used to be commit 1b947fe0e6)
2007-12-21 05:49:58 +01:00
Jelmer Vernooij
5f4842cf65 r26376: Add context for libcli_resolve.
(This used to be commit 459e1466a4)
2007-12-21 05:49:12 +01:00
Jelmer Vernooij
b65dba2245 r26355: Eliminate global_loadparm in more places.
(This used to be commit 5d589a0d94)
2007-12-21 05:49:01 +01:00
Jelmer Vernooij
a72c5053c5 r26353: Remove use of global_loadparm.
(This used to be commit 17637e4490)
2007-12-21 05:48:57 +01:00
Jelmer Vernooij
949f3c7264 r26333: No more global_loadparm in finddcs.
(This used to be commit 0c91026e58)
2007-12-21 05:48:45 +01:00
Jelmer Vernooij
4c4323009f r26327: Explicit loadparm_context for RPC client functions.
(This used to be commit eeb2251d22)
2007-12-21 05:48:41 +01:00
Jelmer Vernooij
2f5ca872a8 r26313: Fix more uses of static loadparm.
(This used to be commit 6fd0d9d3b7)
2007-12-21 05:48:25 +01:00
Jelmer Vernooij
a693e6f1c7 r26295: Remove use of global_loadparm for net and wb_pam_auth.
(This used to be commit 47696b4298)
2007-12-21 05:48:12 +01:00
Jelmer Vernooij
509e82e402 r26272: Remove global_loadparm in some more places.
(This used to be commit 1ab76ecc53)
2007-12-21 05:47:55 +01:00
Jelmer Vernooij
b83a7a135f r26268: Avoid more use of global_loadparm - put lp_ctx in smb_server and wbsrv_connection.
(This used to be commit 7c00866423)
2007-12-21 05:47:47 +01:00
Jelmer Vernooij
ab69eb8d89 r26250: Avoid global_loadparm in a couple more places.
(This used to be commit 2c6b755309)
2007-12-21 05:47:28 +01:00
Jelmer Vernooij
291ddf4336 r26237: Add loadparm context to the server service interface.
(This used to be commit 1386c5c925)
2007-12-21 05:47:15 +01:00
Jelmer Vernooij
934e932387 r26235: Avoid global_loadparm.
(This used to be commit e903978220)
2007-12-21 05:47:13 +01:00
Jelmer Vernooij
b5594df87d r26230: Use task-provided loadparm context in a couple more places, avoid loadparm context inside ntlm_auth.
(This used to be commit 3a946d1ffd)
2007-12-21 05:47:07 +01:00
Stefan Metzmacher
529763a9aa r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/
lib/registry/
lib/ldb-samba/
librpc/rpc/
auth/auth_winbind.c
auth/gensec/
auth/kerberos/
dsdb/repl/
dsdb/samdb/
dsdb/schema/
torture/
cluster/ctdb/
kdc/
ntvfs/ipc/
torture/rap/
ntvfs/
utils/getntacl.c
ntptr/
smb_server/
libcli/wrepl/
wrepl_server/
libcli/cldap/
libcli/dgram/
libcli/ldap/
libcli/raw/
libcli/nbt/
libnet/
winbind/
rpc_server/

metze
(This used to be commit 6223c7fddc)
2007-12-21 05:45:02 +01:00
Jelmer Vernooij
efa384375f r25454: Use standard bool types in a couple more places.
(This used to be commit 9243b551f3)
2007-10-10 15:07:38 -05:00
Jelmer Vernooij
2f3551ca7c r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx.
2007-09-29 Fix warning.
2007-09-29 Pass loadparm contexts on a higher level.
2007-09-29 Avoid using global loadparm context.
(This used to be commit 3468952e77)
2007-10-10 15:07:34 -05:00
Jelmer Vernooij
37d53832a4 r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839)
2007-10-10 15:07:25 -05:00
Jeremy Allison
9a012df08e r25175: Change to talloc_asprintf_append_buffer().
Jeremy.
(This used to be commit 0844dbf597)
2007-10-10 15:06:46 -05:00
Stefan Metzmacher
7d554e4104 r25158: rename nsswitch/winbindd_nss.h => nsswitch/winbind_struct_protocol.h
metze
(This used to be commit 1fc3a37902)
2007-10-10 15:06:44 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
959915a8cb r25001: Fix more C++ and other warnings, fix some of the indentation with ts=4 lines that I accidently added earlier.
(This used to be commit 0bcb21ed74)
2007-10-10 15:05:28 -05:00
Jelmer Vernooij
61ffa08f4c r24712: No longer expose the 'BOOL' data type in any interfaces.
(This used to be commit 1ce32673d9)
2007-10-10 15:02:54 -05:00
Kai Blin
084036d78a r24577: Implement basic getpwent.
This one still cheats and only returns one winbindd_pw structure per call.
Also, doesn't get a new libnet_UserList yet.
(This used to be commit e1b93be1e1)
2007-10-10 15:02:19 -05:00
Kai Blin
67a9225b9b r24576: Implement endpwent
(This used to be commit ef93a7991d)
2007-10-10 15:02:19 -05:00
Kai Blin
01db94b953 r24575: Implement setpwent
(This used to be commit 9bbbedac99)
2007-10-10 15:02:18 -05:00
Kai Blin
46435bbcd0 r24574: Fix a warning in wb_samba3_cmd.c
(This used to be commit ebdd03ee9e)
2007-10-10 15:02:18 -05:00
Stefan Metzmacher
f14bd1a90a r24557: rename 'dcerpc_table_' -> 'ndr_table_'
metze
(This used to be commit 84651aee81)
2007-10-10 15:02:15 -05:00
Stefan Metzmacher
6f448ba6f9 r24556: forgot to commit the winbind/ subdir...sorry
metze
(This used to be commit 184a7cfc36)
2007-10-10 15:02:14 -05:00
Kai Blin
870bdc45e6 r24486: Bump another DEBUG to level 5
(This used to be commit 0454edc958)
2007-10-10 15:01:58 -05:00
Kai Blin
01e911ff5b r24483: Implement backend for wbinfo -u (list users)
(This used to be commit 9fbc8aa15f)
2007-10-10 15:01:57 -05:00
Kai Blin
c0e145f698 r24480: Bump another DEBUG down to level 5
(This used to be commit 6e6eac551a)
2007-10-10 15:01:56 -05:00
Kai Blin
477e1e9e19 r24397: Bump debug level of sid2(u|g)id calls to 5.
(This used to be commit ef9bc55a6b)
2007-10-10 15:01:50 -05:00
Kai Blin
0b96f54f04 r24396: Fix a typo.
Thanks to metze (metze@samba.org) for catching this one.
(This used to be commit abf631822d)
2007-10-10 15:01:50 -05:00
Kai Blin
c5719336dd r24395: Add check if talloc_strdup worked.
(This used to be commit 754b9ff696)
2007-10-10 15:01:49 -05:00
Kai Blin
5a0aaafb1b r24376: Missed this file from the checkin, sorry.
(This used to be commit c81b0980ca)
2007-10-10 15:01:49 -05:00
Kai Blin
a4439c5a1f r24375: Implement backend for wbinfo --uid-infp (getpwuid)
(This used to be commit 760973856f)
2007-10-10 15:01:48 -05:00
Kai Blin
677ccf3047 r24373: Implement backend for wbinfo -G (gid2sid)
(This used to be commit e928e56219)
2007-10-10 15:01:47 -05:00
Kai Blin
e1c832521f r24372: Implement backend for wbinfo -U
(This used to be commit a18cf553cf)
2007-10-10 15:01:47 -05:00
Kai Blin
9b30c7c008 r24371: Actually add the glue to make wbinfo -S and wbinfo -Y work
(This used to be commit a8893b3078)
2007-10-10 15:01:46 -05:00
Kai Blin
2091a146ef r24370: Implement wbinfo -i backend (getpwnam)
(This used to be commit 3b8d8fb2c1)
2007-10-10 15:01:46 -05:00
Kai Blin
803f8a7dcf r24369: Don't use goto in wb_name2domain, fix wb_samba3_split_names call.
Missed this one on my previous name2domain cleanup patch.
(This used to be commit 4305fab4a2)
2007-10-10 15:01:45 -05:00
Kai Blin
e6c02fc3ed r24366: Implemet backend for wbinfo -Y, sid2gid
(This used to be commit 599416ca31)
2007-10-10 15:01:45 -05:00
Kai Blin
f4b928fbf2 r24365: Implemet backend for wbinfo -S, sid2uid
(This used to be commit 682e7124fb)
2007-10-10 15:01:44 -05:00
Kai Blin
0188d0c9a3 r24364: Remove sync call from name2domain, bump debug level to 5
(This used to be commit 95783210d2)
2007-10-10 15:01:44 -05:00
Kai Blin
e87a0e5f69 r24157: Merge from kai/samba4-gsoc.git;h=728deba680f8cf85cab168a6278a2cf657f65fdb
Make WBSRV_SAMBA3_SET_STRING use safe_strcpy instead of strncpy.
(This used to be commit 6b92b816fc)
2007-10-10 15:01:28 -05:00
Andrew Bartlett
e0779e2d3b r24127: Set the Domain SID into the libnet context, and have libnet_UserInfo
return full SIDs for the user SID and primary group sid.

This should help kai with his getpwnam work in winbind.

Andrew Bartlett
(This used to be commit 078671d501)
2007-10-10 15:01:27 -05:00
Andrew Bartlett
3de02665fe r24112: Complete initialistion of the libnet_ctx when setting up the domain.
We need to set the access_mask and the domain name, or else libnet
will try to do this itself.

This seems to fix the issues Kai was having.

Andrew Bartlett
(This used to be commit 44c193272b)
2007-10-10 15:01:27 -05:00
Andrew Bartlett
07b15cd9fd r24111: Untested code is broken code, untested code is broken code...
Apologies for my previous commit, which should never have been
commited untested.

Andrew Bartlett
(This used to be commit ec69f41d09)
2007-10-10 15:01:26 -05:00
Andrew Bartlett
fa16e28424 r24110: I hate seeing callers manually filling in the composite context. Use
the helper functions instead (and in kai's new code, which just copied
the previous bad practice).

Andrew Bartlett
(This used to be commit 0908d8232e)
2007-10-10 15:01:25 -05:00
Kai Blin
6d10dc296c r24109: Add a wb_name2domain call
(This used to be commit a6a45ab970)
2007-10-10 15:01:25 -05:00
Kai Blin
91750a2825 r24108: Split out samba3_parse_domuser to a seperate file and rename, so it can be
used for a name2domain call.
(This used to be commit 75e41da039)
2007-10-10 15:01:25 -05:00
Andrew Bartlett
dc25ec5ce7 r23995: Work to allow mimir's libnet code to be called from winbind.
We now setup a libnet_ctx for each domain.  We should then be able to
replace/merge some more of the winbind code with libnet calls,
referencing domain->libnet_ctx.

Andrew Bartlett
(This used to be commit bad2dc14d7)
2007-10-10 15:01:16 -05:00
Andrew Bartlett
c86e98aa80 r23890: Allow wbinfo -a to work against Samba4's winbind.
Add a test for wbinfo -a to test_member.sh

Reimplement the server-side 'pam_auth' and 'pam_auth_crap' calls to
use the same SamLogon code as auth_winbind uses.

In my previous code, we did not bind to the LSA and SAMR pipes, before
attempting operations.  We now do this (how we passed any tests before
is beyond me).

This required some rework, particularly to make it easier to setup
secondary connections.  The new rpc_secondary_auth_connection()
function also performs the bind.

The dcerpc_connect.c file was getting to big, so things have been
merged into dcerpc_secondary.c.

Andrew Bartlett
(This used to be commit 365778a993)
2007-10-10 15:01:08 -05:00
Andrew Bartlett
b9d77db587 r23880: Don't crash when we run wbinfo -a against our own winbind when we are a DC.
Next step is to make it work...

Andrew Bartlett
(This used to be commit a1b6c9ecb9)
2007-10-10 15:01:07 -05:00
Andrew Bartlett
a87dea2a08 r23810: Make things static, and remove unsued code.
This includes some of the original ildap ldap client API.  ldb
provides a much easier abstraction on this to use, and doesn't use
these functions.

Andrew Bartlett
(This used to be commit dc27a7e41c)
2007-10-10 14:59:21 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
115b706939 r23653: add dummy implementation for all nss calls to let nsstest
pass against a samba4 winbind

metze
(This used to be commit 57dfc76743)
2007-10-10 14:53:30 -05:00
Kai Blin
3fb4bd1c06 r23311: Updating the samba4 winbind protocol to version 18.
nsswitch/winbindd_nss.h is just copied from SAMBA_3_0.
nsswitch/winbind_nss_config.h is copied from SAMBA_3_0, too, but I had to
drop some of the defines to make things build again.

Kai
(This used to be commit 553b7e146f)
2007-10-10 14:53:10 -05:00
Andrew Bartlett
de308569c1 r23149: Fix up the trusted domain lookup code to use the new structures.
Andrew Bartlett
(This used to be commit 6ecb3cb0b3)
2007-10-10 14:52:57 -05:00
Stefan Metzmacher
2d7d7948fb r23146: fix the build (temporary)
abartlet: please fix this correct!

metze
(This used to be commit a4df092c80)
2007-10-10 14:52:57 -05:00
Andrew Bartlett
1aaea2d3a7 r23141: Use the finddcs() library call rather than a winbind-specific version.
(I created finddcs() from the winbind code a while back, so this
finishes that work)

Andrew Bartlett
(This used to be commit 218b279a46)
2007-10-10 14:52:56 -05:00
Andrew Bartlett
64df4c7c57 r23133: I felt pity on Kai, as he starts work on winbind in Samba4, so I
decided to clean it up a little.

We now use SPNEGO for authentication if possible, and common routines
shared with the rest of the librpc codebase.  Rather than make a
connection to IPC$, then connect the pipes to it, we instead have the
lsa and samr pipes as 'secondary connections'.

Andrew Bartlett
(This used to be commit 86654056b2)
2007-10-10 14:52:53 -05:00
Stefan Metzmacher
40cd2d7780 r22944: fix bug #4618:
rename private -> private_data

metze
(This used to be commit 58551f2f28)
2007-10-10 14:52:30 -05:00
Stefan Metzmacher
68b531e817 r22748: fix memleaks by passing an mem_ctx to
irpc_servers_byname()

metze
(This used to be commit b54584dfab)
2007-10-10 14:52:09 -05:00
Andrew Bartlett
f5a94f978b r22612: Fix more cases where we have uninitialised values in the
composite_context, because we don't use the creation function.

Andrew Bartlett
(This used to be commit e37064e356)
2007-10-10 14:51:52 -05:00
Andrew Bartlett
fcdb99f7ce r22582: Cleanups towards making winbind work again. We still have a long way to go, as this has bitrotted over the past months.
This change in particular catches winbind up with the next
composite_create() function.

We also needed to remove an unused flags field, and fill in the lm
response.

Andrew Bartlett
(This used to be commit bd26e4ffaf)
2007-10-10 14:51:47 -05:00
Stefan Metzmacher
35ffca8932 r22403: this dependencies should be private
metze
(This used to be commit c3cc03ffb2)
2007-10-10 14:51:14 -05:00
Jelmer Vernooij
fd2d095048 r21541: Export mgmt, samr and atsvc for use in samba-gtk.
(This used to be commit 7f451cbb8d)
2007-10-10 14:48:55 -05:00
Andrew Tridgell
60fd088c48 r21535: - fixed a crash in the RAW-ACLS test. When a dcerpc_pipe is created
using the pattern in the clilsa code, it didn't fill in the p->binding
structure. This affects nearly all users of dcerpc_pipe_open_smb(), so
the simplest fix is to ensure that dcerpc_pipe_open_smb() initialises
the binding if its not already there.

- re-enable the RAW-ACLS test
(This used to be commit d8875c286d)
2007-10-10 14:48:54 -05:00
Andrew Tridgell
1cd4339b9a r20646: first preparations for cluster enablement. This changes "
uint32_t server_id
to
  struct server_id server_id;

which allows a server ID to have an node number. The node number will
be zero in non-clustered case. This is the most basic hook needed for
clustering, and ctdb.
(This used to be commit 2365abaa99)
2007-10-10 14:37:23 -05:00
Andrew Bartlett
13dbee3ffe r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world.

Add credentials_krb5.h with the kerberos dependent prototypes.

Andrew Bartlett
(This used to be commit 2b569c42e0)
2007-10-10 14:25:00 -05:00
Jelmer Vernooij
5a6e2bc9ae r19573: Move secrets.o into param/ (subsystems haven't been integrated yet).
(This used to be commit 8143de855c)
2007-10-10 14:24:55 -05:00
Jelmer Vernooij
4fa24df98d r19507: Merge my DSO fixes branch. Building Samba's libraries as shared libraries
works again now, by specifying --enable-dso to configure.
(This used to be commit 7a01235067)
2007-10-10 14:24:41 -05:00
Andrew Tridgell
e91cee468e r18309: FreeBSD 6.1 has a symbol ldap_new_connection() in the system ldap
library. Even though we don't like to that library, it gets loaded via
nss-ldap, which means nss-ldap calls into the samba ldap lib with the
wrong parameters, and crashes.

We really need to use a completely different namespace in libcli/ldap/
(This used to be commit c440e0eed9)
2007-10-10 14:18:06 -05:00
Andrew Bartlett
e905fed4e0 r17956: LSA Cleanup!
This commit cleans up a number of aspects of the LSA interface.

Firstly, we do 2 simple searches on opening the LSA policy, to obtain
the basic information we need.  This also avoids us searching for
dnsDomain (an invented attribute).

While I was at it, I added and tested new LSA calls, including the
enumTrustedDomainsEx call.  I have also merged the identical structures
lsa_DomainInformation and lsa_DomainList.

Also in this commit: Fix netlogon use of uninitialised variables.

Andrew Bartlett
(This used to be commit 3f3fa7f466)
2007-10-10 14:16:57 -05:00
Jelmer Vernooij
0329d755a7 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
(This used to be commit f7afa1cb77)
2007-10-10 14:16:54 -05:00
Stefan Metzmacher
e48ed74f4a r17342: implement a SamLogon via IRPC in samba4's winbind
metze
(This used to be commit c3ce7a0c37)
2007-10-10 14:15:17 -05:00
Stefan Metzmacher
edcbd24b6a r17306: fix compiler warning
metze
(This used to be commit cee012c570)
2007-10-10 14:15:10 -05:00
Stefan Metzmacher
689bbb41b9 r17290: don't do any stuff that can fail in the _recv function
metze
(This used to be commit 88bcb57e82)
2007-10-10 14:15:07 -05:00
Andrew Bartlett
e88bf7cae4 r17250: Fix comment, the Samba3 winbind protocol uses the host byte order here.
Andrew Bartlett
(This used to be commit dc4500eb90)
2007-10-10 14:10:23 -05:00
Jelmer Vernooij
806c5c9621 r15371: Revert some of my previous patch as it was breaking the plain build
(This used to be commit fac9871122)
2007-10-10 14:05:28 -05:00
Jelmer Vernooij
47bf79eac5 r15370: Fix more dependencies for shared libs
(This used to be commit 9a518661fb)
2007-10-10 14:05:27 -05:00
Jelmer Vernooij
e002300f23 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
(This used to be commit c19c2b51d3)
2007-10-10 14:05:17 -05:00
Jelmer Vernooij
b00c236906 r15301: Use static libraries internally. This required a few hacks in the build
system - these should be removed later on.
(This used to be commit 0654739166)
2007-10-10 14:05:07 -05:00
Jelmer Vernooij
69b51f702a r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
(This used to be commit adc8a019b6)
2007-10-10 14:04:18 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
9565c70898 r14567: Make some more functions public.
(This used to be commit 8e84e6cb6b)
2007-10-10 13:58:48 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513)
2007-10-10 13:58:42 -05:00
Jelmer Vernooij
4f1c8daa36 r14470: Remove some unnecessary headers.
(This used to be commit f7312dab3b)
2007-10-10 13:57:29 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Jelmer Vernooij
1060f6b3f6 r14402: Generate seperate headers for RPC client functions.
(This used to be commit 7054ebf024)
2007-10-10 13:57:19 -05:00
Jelmer Vernooij
e3f2414cf9 r14380: Reduce the size of structs.h
(This used to be commit 1a16a6f1df)
2007-10-10 13:57:16 -05:00
Jelmer Vernooij
3f16241a1d r14363: Remove credentials.h from the global includes.
(This used to be commit 98c4c30513)
2007-10-10 13:57:14 -05:00
Stefan Metzmacher
32b0bb64bc r14205: move smb specific stuff out of includes.h (finally!!!:-)
all this changes really help ccache to speed up the samba4 build:-)

metze
(This used to be commit 180a79d103)
2007-10-10 13:57:03 -05:00
Stefan Metzmacher
651ca6553e r14079: I just found the setproctitle library from alt linux:-)
- add set_title hook to the process models
- use setproctitle library in process_model standard if available
- the the title for the task servers and on connections

metze
(This used to be commit 526f20bbec)
2007-10-10 13:56:49 -05:00
Jelmer Vernooij
17ae598141 r13938: Around round of splitups
(This used to be commit 2d655f0528)
2007-10-10 13:52:29 -05:00
Jelmer Vernooij
9bd7dd9121 r13926: More header splitups.
(This used to be commit 930daa9f41)
2007-10-10 13:52:26 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Jelmer Vernooij
dfc517b053 r13658: More moving around of files:
- Collect the generic utility functions into a lib/util/ (a la GLib is
		for the GNOME folks)
 - Remove even more files from include/
(This used to be commit ba62880f5b)
2007-10-10 13:52:05 -05:00
Andrew Bartlett
9d1954c25d r13583: Realise that the member server name appears in all calls that use the
credentials.

Consistantly rename these elements in the IDL to computer_name.

Fix the server-side code to always lookup by this name.

Add new, even nastier tests to RPC-SCHANNEL to prove this.

Andrew Bartlett
(This used to be commit 341a0abeb4)
2007-10-10 13:51:58 -05:00
Andrew Bartlett
b70009649a r13244: Allow control of the location of the Samba3-compatible winbindd pipe
in Samba4.  This allows us to start winbindd by default, including in
'make test'.

This is via a new 'winbindd socket directory' parameter for utilities
linked against loadparm, as well as a --with-winbindd-socket-dir
option to configure (setting the default and the value for simple
clients).

I hope to add basic winbindd tests, to ensure continued correct
operation, but at least now I don't have to manually change my 'server
services' line.

The other problem with the hard-coded /tmp/.winbind is that RedHat has
moved this in Fedora (to /var/run I think).  For this reason, this
functionality should probably be ported to Samba3 as well.

The default for Samba4 is PREFIX/var/run/winbind_pipe.

I have also re-added the paranoia checks from Samba3 for correct
permissions on the socket directory.

Andrew Bartlett
(This used to be commit 8866aa06ff)
2007-10-10 13:51:37 -05:00
Andrew Bartlett
2fad2c945b r12868: Remove unused code. This has moved to libcli/finddcs.c.
Andrew Bartlett
(This used to be commit a30a359c45)
2007-10-10 13:50:56 -05:00
Andrew Bartlett
67b9c16f1d r12867: Remove deleted header.
(This used to be commit a6833db4e6)
2007-10-10 13:50:56 -05:00
Andrew Bartlett
f18194edae r12866: This removes the abstraction layer in winbindd intended to deal with
multiple protocols, replacing it with the packet handling subsystem.

We don't have multiple protocols at present, and the abstraction layer
only serves to confuse matters.  Also, the new packet subsystem removes
the need to handle partial reads.

We can easily add new protocols from the socket up instead, becaue the
difficult bits are done by the packet layer.

Andrew Bartlett
(This used to be commit acf9dc8fe9)
2007-10-10 13:50:55 -05:00
Andrew Bartlett
a5a79e8b8c r12865: Upgrade the librpc and libnet code.
In librpc, always try SMB level authentication, even if trying
schannel, but allow fallback to anonymous.  This should better
function with servers that set restrict anonymous.

There are too many parts of Samba that get, parse and modify the
binding parameters.  Avoid the extra work, and add a binding element
to the struct dcerpc_pipe

The libnet vampire code has been refactored, to reduce extra layers
and to better conform with the standard argument pattern.  Also, take
advantage of the new libnet_Lookup code, so we don't require the silly
'password server' smb.conf parameter.

To better support forcing traffic to be sealed for the vampire
operation, the dcerpc_bind_auth() function now takes an auth level
parameter.

Andrew Bartlett
(This used to be commit d65b354959)
2007-10-10 13:50:55 -05:00
Jelmer Vernooij
63d718e243 r12696: Reduce the size of include/structs.h
(This used to be commit 6391761601)
2007-10-10 13:49:40 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Jelmer Vernooij
acd6a086b3 r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface
name, UUID and version.

This removes the requirement for having a global list of DCE/RPC interfaces,
except for these parts of the code that use that list explicitly
(ndrdump and the scanner torture test).

This should also allow us to remove the hack that put the authservice parameter
in the dcerpc_binding struct as it can now be read directly from
dcerpc_interface_table.

I will now modify some of these functions to take a dcerpc_syntax_id
structure rather then a full dcerpc_interface_table.
(This used to be commit 8aae0f168e)
2007-10-10 13:47:48 -05:00
Jelmer Vernooij
d8e35f8828 r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
(This used to be commit b24f2583ed)
2007-10-10 13:47:45 -05:00
Stefan Metzmacher
a5b6b170a3 r12265: as all server_service modules are specified in smbd/config.mk
follow this rule for the winbind one too

metze
(This used to be commit 2ace7e0d2d)
2007-10-10 13:47:25 -05:00
Andrew Tridgell
111a920fdb r12116: got rid of composite_trigger_done() and composite_trigger_error(), and
instead make the normal composite_done() and composite_error()
functions automatically trigger a delayed callback if the caller has
had no opportunity to setup a async callback

this removes one of the common mistakes in writing a composite function
(This used to be commit f9413ce792)
2007-10-10 13:47:11 -05:00
Stefan Metzmacher
150848248a r12014: free the irpc_request structure with the irpc_call_recv functions,
to match all other _recv functions we have

metze
(This used to be commit bd4f85ab5f)
2007-10-10 13:46:59 -05:00
Tim Potter
b9b59fa798 r11968: More warning fixes. We're on track to getting to double digits for
the number of warnings generated now.
(This used to be commit d479f2d760)
2007-10-10 13:46:52 -05:00
Stefan Metzmacher
a1c8fe7ce2 r11828: split out the async helper function into a new subsystem WB_HELPER
to use it in torture tests too

metze
(This used to be commit 364b092355)
2007-10-10 13:46:35 -05:00
Volker Lendecke
ddc632378a r11825: Fix a debug msg
(This used to be commit fc6458d0d4)
2007-10-10 13:46:35 -05:00
Volker Lendecke
a6852523d6 r11812: Convert winbind to the async bind routines. Also remove tridge's hack for the
winbind "bug" :-)

Volker
(This used to be commit fb9a3c7ef3)
2007-10-10 13:46:32 -05:00
Volker Lendecke
f2dedc629c r11809: Make dcerpc_bind_auth async.
This also removes dcerpc_bind_auth_password, the only user of
dcerpc_bind_auth. And this was not only passwords anyway.

Andrew Bartlett, as usual: Please take a close look.

Thanks,

Volker
(This used to be commit 2ff2dae3d0)
2007-10-10 13:46:31 -05:00
Volker Lendecke
f7732560ee r11727: Minor cleanup
(This used to be commit 681451af72)
2007-10-10 13:46:18 -05:00
Tim Potter
0eeedb97a5 r11626: Fix unhandled enum in case statement warnings by noting appropriately
that some values aren't handled.  The remaining warnings I think are
actual bugs or required functionality that is missing (mostly lack of
server side Unix extensions).
(This used to be commit 03c7da27a0)
2007-10-10 13:46:01 -05:00
Volker Lendecke
69307693dc r11528: Separate finding dcs from initializing a domain. Makes it easier to possibly
support cldap and other stuff in the future.

This temporarily disables wbinfo -t, but that will come back soon.

Try an ldap bind using gss-spnego. This got me krb5 binds against "our" w2k3
and a trusted w2k, although with some memleaks from krb5 and a BAD_OPTION
tgs-rep error.

Volker
(This used to be commit d14948fdf6)
2007-10-10 13:45:49 -05:00
Volker Lendecke
6b6a739eca r11517: Cleanup time, this looks larger than it is. This mainly gets rid of
wb_domain_request, now that we have queued rpc requests.

Volker
(This used to be commit 848522d1b6)
2007-10-10 13:45:47 -05:00
Volker Lendecke
4bb85c2939 r11423: Add some TALLOC_CTX
(This used to be commit a043ef33dc)
2007-10-10 13:45:36 -05:00
Volker Lendecke
5ca7979b2c r11422: Remove unused args
(This used to be commit d5aef4e2f9)
2007-10-10 13:45:35 -05:00
Andrew Bartlett
55c6d93184 r11413: More comments, plus always check (and update) the credentials chain,
regardless the authentication result on a particular user.

Andrew Bartlett
(This used to be commit 2ee7ed000e)
2007-10-10 13:45:34 -05:00
Andrew Bartlett
ceff9881e4 r11412: These comments may not be much, but my eyes scan code with even
minimal comments much better (much like volker scans code of less than
80 cols better ;-)

Andrew Bartlett
(This used to be commit 8800e9b5b0)
2007-10-10 13:45:34 -05:00
Andrew Bartlett
0f44011f6f r11411: Add to Samba4 the Samba3 patch I just posted for machine account
logins (changing the winbindd interface).

Clean up the wbsrv_samba3_async_epilogue() handling, as it was mixing
auth and other replies, such that all replies were having the auth
error strings set.  We now do a better job of filling in the right
errors in the right places.

Andrew Bartlett
(This used to be commit 8ed975df52)
2007-10-10 13:45:33 -05:00
Andrew Bartlett
17f8b87cb0 r11374: On request from VL, put the plaintext auth patch in.
I still have some gremlins that get in the my way in testing this.

Andrew Bartlett
(This used to be commit 3353e906ad)
2007-10-10 13:45:28 -05:00
Stefan Metzmacher
228e07a6fe r11276: fix compiler warnings
metze
(This used to be commit 2f1930fb62)
2007-10-10 13:45:12 -05:00
Volker Lendecke
d6e070b74a r11274: Start a connection attempt to the DC's port 389. To do this properly, make
socket_connect and ldap_connect properly async.

Volker
(This used to be commit bcc71fc1de)
2007-10-10 13:45:12 -05:00
Volker Lendecke
28a3bc645b r11267: Fix a memleak and an uninitialized variable. Andrew Bartlett, this was the one
I sent to you. Sorry for bothering you.

Volker
(This used to be commit 3a9f2291ae)
2007-10-10 13:45:10 -05:00
Volker Lendecke
e2e2bb9245 r11263: Some cleanup
(This used to be commit 4fe3c9871b)
2007-10-10 13:45:10 -05:00
Jelmer Vernooij
4c5a4a7e02 r11244: Relative path names in .mk files
(This used to be commit 24e1030090)
2007-10-10 13:45:06 -05:00
Jelmer Vernooij
f4d590662e r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html)
(This used to be commit 7fffc5c917)
2007-10-10 13:45:03 -05:00
Volker Lendecke
1e60499880 r11193: Implement wbinfo -m
(This used to be commit 12a800bc85)
2007-10-10 13:44:59 -05:00
Volker Lendecke
0e6fefac49 r11192: Too many contexts around... :-)
(This used to be commit 134e104c3f)
2007-10-10 13:44:59 -05:00
Volker Lendecke
0f51ae83f0 r11181: Implement wbinfo -s and wbinfo --user-sids. The patch is so large because
--user-sids required the extension to trusted domains.

Implement "winbind sealed pipes" parameter for debugging purposes.

Volker
(This used to be commit 3821a17bdb)
2007-10-10 13:44:57 -05:00
Volker Lendecke
d68319431e r11095: Implement wb_getuserdomgroups.
Tridge, if you have the time, you might want to look at a problem I'm having
with unix domain stream sockets. From a comment in this commit:

	/* Using composite_trigger_error here causes problems with the client
	 * socket. Linux 2.6.8 gives me a ECONNRESET on the next read after
	 * writing the reply when I don't wait the 100 milliseconds. */

This is in winbind/wb_cmd_userdomgroups.c:93.

The problem I have is that I can not *immediately* send an error reply to the
client because the next receive fails. Waiting 100 milliseconds helps. It
might also be a problem with epoll(), I don't really know.

I'd appreciate if you took a brief look at this, maybe I'm doing something
wrong.

Thanks,

Volker
(This used to be commit 3e535cce74)
2007-10-10 13:44:48 -05:00
Volker Lendecke
17355fbbd4 r11094: Connect to SAM, implement getdcname
(This used to be commit a14398715e)
2007-10-10 13:44:48 -05:00
Volker Lendecke
42ececdfae r11093: Implement wb_queue_domain_send: If the domain is not yet initialized, do that
first. And if a request is being processed, queue it. This correctly survived
3 endless loops with wbinfo's doing different things while starting up smbd.

The number of indirections starts to become a bit scary, but what can you do
without a decent programming language that provides closures :-)

One thing that we might consider is to auto-generate async rpc requests that
return composite_context structs instead of rpc_requests. Otherwise I'd have
to write a lot of wrappers like composite_netr_LogonSamLogon_send.

The alternative would be to write two versions of wb_queue_domain_send which I
would like to avoid. This is cluttered enough already.

Volker
(This used to be commit 66c1b674f9)
2007-10-10 13:44:48 -05:00
Volker Lendecke
d102d5ab57 r11082: Fix a segfault
(This used to be commit 576a724bf1)
2007-10-10 13:44:45 -05:00
Volker Lendecke
0aa0c5340f r11070: Fix a cut&paste error, now wbinfo can properly separate domain and user...
Volker
(This used to be commit 6e4f774a49)
2007-10-10 13:44:44 -05:00
Volker Lendecke
207a6bf397 r11068: Fix pam_auth_crap, remove the sync code. I don't know what it was when I
tested it, but I can not reproduce the problem I had with abartlett's initial
implementation anymore.

Fix a bug found using valgrind.

Volker
(This used to be commit 0c6c71ae3c)
2007-10-10 13:44:44 -05:00
Volker Lendecke
0a82914049 r10941: Hmmm. Making that fn static is more correct.
(This used to be commit eaf347bdea)
2007-10-10 13:39:44 -05:00
Volker Lendecke
67580434cf r10936: Commit work in progress: wb_pam_auth_crap made async. This does not work yet,
but the version before did not either, so we're not worse than before.

One thing this does better is to call the domain init code if it's not there
yet.

Volker
(This used to be commit 35bcfb185b)
2007-10-10 13:39:44 -05:00
Volker Lendecke
d617556ef5 r10878: Reply to some comments by tridge and metze:
* rename the composite helper functions from comp_* to composite_*

* Move the lsa initialization to wb_connect_lsa.c

* Equip smb_composite_connect with a fallback_to_anonymous

The latter two simplify wb_init_domain.c quite a bit.

Volker
(This used to be commit deb127e04e)
2007-10-10 13:39:39 -05:00
Volker Lendecke
8a3c865581 r10859: Make the flow a bit clearer
(This used to be commit 66c90483b4)
2007-10-10 13:39:37 -05:00
Volker Lendecke
12fb2fc09e r10853: Convert wbinfo -n to properly init the domain.
Volker
(This used to be commit 512ae49270)
2007-10-10 13:39:36 -05:00
Volker Lendecke
9e5d44d567 r10852: Continuation-based programming can become a bit spaghetti...
Initialize a domain structure properly. Excerpt from wb_init_domain.c:

/*
 * Initialize a domain:
 *
 * - With schannel credentials, try to open the SMB connection with the machine
 *   creds. Fall back to anonymous.
 *
 * - If we have schannel creds, do the auth2 and open the schannel'ed netlogon
 *   pipe.
 *
 * - Open LSA. If we have machine creds, try to open with ntlmssp. Fall back
 *   to schannel and then to anon bind.
 *
 * - With queryinfopolicy, verify that we're talking to the right domain
 *
 * A bit complex, but with all the combinations I think it's the best we can
 * get. NT4, W2k3SP1 and W2k all have different combinations, but in the end we
 * have a signed&sealed lsa connection on all of them.
 *
 * Is this overkill? In particular the authenticated SMB connection seems a
 * bit overkill, given that we do schannel for netlogon and ntlmssp for
 * lsa later on w2k3, the others don't do this anyway.
 */

Thanks to Jeremy for his detective work, and to the Samba4 team for providing
such a great infrastructure.

Next step is to connect to SAM. Do it via LDAP if we can, fall back to samr
with all we have.

Volker
(This used to be commit 3e69fdc07c)
2007-10-10 13:39:36 -05:00
Volker Lendecke
b468ba1386 r10846: Create a "wbsrv_domain", change wb_finddcs to the style of the rest of the
async helpers.

Volker
(This used to be commit 10585ba4e8)
2007-10-10 13:39:35 -05:00
Andrew Bartlett
bc42531213 r10844: Add challenge-response authentication to Samba4's winbindd for VL.
Plaintext should be simple, but I'm going to do some infrustructure
work first.

Andrew Bartlett
(This used to be commit c9273729e4)
2007-10-10 13:39:35 -05:00
Volker Lendecke
5952157ad2 r10843: Reformatting
(This used to be commit ecaa70f63b)
2007-10-10 13:39:34 -05:00
Volker Lendecke
c8cb36f08d r10838: Get us an schannel'ed netlogon pipe.
Abartlet, now I think I need some assistance to implement the pam auth & crap
auth calls.

Volker
(This used to be commit 90a30c8b65)
2007-10-10 13:39:34 -05:00
Volker Lendecke
e0c11738ae r10834: Work in progress on winbind. With some helper routines the composite functions
start to look sane.

Question: What about providing all winbind commands as irpc interfaces that
are called from the samba3 compatibility layer? This way it would be easy for
other samba components to access its functionality. Does that make sense?

Volker
(This used to be commit 2a6b805385)
2007-10-10 13:39:33 -05:00
Volker Lendecke
b1b6eb7b67 r10825: Complete wbinfo -n
(This used to be commit 1afa893506)
2007-10-10 13:39:32 -05:00
Andrew Tridgell
2c3e4bdadf r10704: don't try to free the netlogon pipe twice
(This used to be commit 2c3a9f04db)
2007-10-10 13:39:22 -05:00
Andrew Tridgell
6bc8d37c20 r10700: removed volkers temporary timer hack now that freeing the netlogon
pipe is safe while inside a rpc callback
(This used to be commit 5d752a5194)
2007-10-10 13:39:21 -05:00
Volker Lendecke
012893cb42 r10691: This gets half-way to wbinfo -n. It acquires an lsa pipe, and does a
queryinfopolicy. Idea is to get a consistency check between that and our
notion of the domain name and sid, and take the lsa pipe as the holder of the
central smbcli_tree that netlogon and samr use as well.

Volker
(This used to be commit 126c80aefc)
2007-10-10 13:39:19 -05:00
Volker Lendecke
3fece92b9d r10687: Another one...
(This used to be commit d18f7edf92)
2007-10-10 13:39:19 -05:00
Volker Lendecke
788129610b r10686: Fix the build
(This used to be commit a7137fd3ec)
2007-10-10 13:39:19 -05:00
Volker Lendecke
ea262d130b r10685: Why wait 5 seconds...
(This used to be commit 820b4180dd)
2007-10-10 13:39:18 -05:00
Volker Lendecke
faf2ad667a r10684: Add a nasty hack for the failure case of wbinfo -t. Tridge has a proper fix
for it pending.

Also fix a bug with timed events: Don't call the same event recursively in the
handler's inner semi-async event loop.

Volker
(This used to be commit e38e50127a)
2007-10-10 13:39:18 -05:00
Volker Lendecke
e5c6a3e361 r10683: Samba3's wbinfo -t should give the correct answer now.
Tridge, if you have time, you might want to look at the segfault I was still
seeing. Now I store the handle to the netlogon pipe in the global winbind
state and free it on the next entry into check_machacc. The problem seems to
be that talloc_free()ing a pipe struct from within a callback function on that
pipe is not possible. I think I can live with that, but it has been not really
obvious. To reproduce the segfault you might want to look at putting a
talloc_free(state->getcreds->out.netlogon) into
wbsrv_samba3_check_machacc_receive_creds. This is called from a dcerpc
callback function.

In particular if the check failed it would be nice if I could delete the pipe
directly and not post a different event to some winbind queue.

I tried to delete the pipe from a timed event triggered immediately, but this
also fails because the inner loop seems to hit the same event again, calling
it twice.

Volker
(This used to be commit 5436d77648)
2007-10-10 13:39:18 -05:00
Volker Lendecke
68c70ef396 r10677: Add smb_composite_connectmulti: Send out multiple SYN packets at once, use the
first one that replies correctly.

Add a talloc context to smb_composite_connect()

Volker
(This used to be commit 6b88de182e)
2007-10-10 13:39:17 -05:00
Volker Lendecke
33834e2dda r10675: Connect to the DC's IPC$
Volker
(This used to be commit c755788484)
2007-10-10 13:39:17 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc51)
2007-10-10 13:39:08 -05:00
Stefan Metzmacher
98a7da2348 r10508: - implement WINBINDD_NETBIOS_NAME, WINBINDD_DOMAIN_NAME and WINBINDD_INFO
is there a way to test this calls?

vl: please review this

metze
(This used to be commit 85d4565fce)
2007-10-10 13:38:58 -05:00
Stefan Metzmacher
4b30e2bff7 r10506: set return data correctly
metze
(This used to be commit 37b5f6b417)
2007-10-10 13:38:57 -05:00
Stefan Metzmacher
ab4d635b92 r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
(This used to be commit 4527815a0a)
2007-10-10 13:38:57 -05:00
Volker Lendecke
9593101ec1 r10491: First step towards wbinfo -t: This issues a name request for the primary
domain and gets the DC's name via a mailslot call.

Metze, I renamed wbsrv_queue_reply to wbsrv_send_reply in accordance with
irpc_send_reply. Having _queue_ here and _send_ there is a bit confusing. And
as everything is async anyway, the semantics should not be too much of a
problem.

Volker
(This used to be commit 4637964b19)
2007-10-10 13:38:54 -05:00
Jelmer Vernooij
f3b412fbd6 r10438: Move portability functions to lib/replace/; replace now simply ensures
that a given set of (working) POSIX functions are available (without
prefixes to their names, etc). See lib/replace/README for a list.

Functions that behave different from their POSIX specification
(such as sys_select, sys_read, etc) have kept the sys_ prefix.
(This used to be commit 29919a7105)
2007-10-10 13:38:45 -05:00
Stefan Metzmacher
f59d435127 r10435: fill in the reference to the generic wbsrv_call in the wbsrv_samba3_call,
so that async function can use it.

metze
(This used to be commit 72302b5d3d)
2007-10-10 13:38:45 -05:00
Stefan Metzmacher
fdeff0fa50 r10434: add a short path to the event context that should be used for async replies
metze
(This used to be commit cc9579d085)
2007-10-10 13:38:45 -05:00
Stefan Metzmacher
bcf0615be5 r10426: - restructure the winbind server code a bit
- remove the echo test stuff
- abstract out the used protocol
- we have a seperate handler for the samba3 protocol now
- the backend can easy do async replies
  by setting WBSRV_CALL_FLAGS_REPLY_ASYNC in wbsrv_call
  and then call wbsrv_queue_reply() later

metze
(This used to be commit 32f3e68a56)
2007-10-10 13:38:44 -05:00
Volker Lendecke
0e2c62451d r10365: Use nsswitch/winbindd_nss.h in winbind/, update that file to the current 3_0
interface.

Volker
(This used to be commit 90f98e9be3)
2007-10-10 13:38:31 -05:00
Volker Lendecke
9a1ceab6d6 r10363: Nobody loudly screamed "noo", so commit the samba3 winbind interface to
samba4. Ok, maybe the silence is due to timezones, but what can you do... ;-)

Volker
(This used to be commit 9a5d8f55ab)
2007-10-10 13:38:31 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Stefan Metzmacher
a8ec371a61 r10078: - add a 'struct data_blob_list_item'
- use this for the send_queue's of the different stream_servers
  to not redefine the same struct so often, and it maybe will be used
  in other places too

metze
(This used to be commit b6694f067a)
2007-10-10 13:37:51 -05:00
Andrew Tridgell
b3e493470f r7911: task_terminate() is defined in the macosx headers, so change the name
to task_server_terminate()
(This used to be commit a7447e25ac)
2007-10-10 13:18:48 -05:00
Jelmer Vernooij
66a52992ff r7850: Support mkdir() with just one parameter. Patch from
Steven Edwards <steven_ed4153@yahoo.com>.

I've moved the Win32-specific tests to win32.m4 so it does not
make any of the POSIX configure stuff more complicated.
(This used to be commit bf85fdd015)
2007-10-10 13:18:42 -05:00
Andrew Tridgell
bed7c9ec32 r5304: removed lib/socket/socket.h from includes.h
(This used to be commit b902ea546d)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
35537c1255 r5302: fixed a compilation problem on solaris caused by the recent include
changes
(This used to be commit e7e015f79b)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
0798d54b4f r5195: most events don't need the time of the event, so save a gettimeofday() call
and just use timeval_current() when its actually needed
(This used to be commit 236403cc4d)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
66170ef8b3 r5185: make all the events data structures private to events.c. This will
make it possible to add optimisations to the events code such as
keeping the next timed event in a sorted list, and using epoll for
file descriptor events.

I also removed the loop events code, as it wasn't being used anywhere,
and changed timed events to always be one-shot (as adding a new timed
event in the event handler is so easy to do if needed)
(This used to be commit d7b4b6de51)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
26bf3063d3 r5122: fixed name of winbind stream ops
(This used to be commit 984c737c1b)
2007-10-10 13:09:24 -05:00
Andrew Tridgell
1447b9a8c1 r5104: - added support for task based servers. These are servers that within
themselves are run as a single process, but run as a child of the
  main process when smbd is run in the standard model, and run as part
  of the main process when in the single mode.

- rewrote the winbind template code to use the new task services. Also
  fixed the packet queueing

- got rid of event_context_merge() as it is no longer needed
(This used to be commit 339964a596)
2007-10-10 13:09:23 -05:00
Stefan Metzmacher
76b38d11fd r4729: add dummy "winbind" service
- this creates a new task and then starts a process_model "single"
  with service "winbind_task"

- that means with -M single everything is in one process

  with - M standard winbind is a seperate process but didn't fork for each connection
  with -M thread winbind is a seperate thread but didn't thread for each connection

- the dummy server listen s on /tmp/.winbind/echo
  and for better testing with telnet also on 127.0.255.1 port 55555

metze
(This used to be commit 5190f60ded)
2007-10-10 13:08:49 -05:00