svn commit: samba r22968 - in branches/SAMBA_4_0/source/lib/events: .
Author: tridge Date: 2007-05-17 07:52:33 + (Thu, 17 May 2007) New Revision: 22968 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22968 Log: andrew bartlett pointed out that the parent process could add a fd to the epoll context which would then appear in the children. To fix this we need to check for pid changes in more places. Luckily on platforms where we have epoll(), getpid() is very very cheap. Modified: branches/SAMBA_4_0/source/lib/events/events_aio.c branches/SAMBA_4_0/source/lib/events/events_epoll.c branches/SAMBA_4_0/source/lib/events/events_standard.c Changeset: Modified: branches/SAMBA_4_0/source/lib/events/events_aio.c === --- branches/SAMBA_4_0/source/lib/events/events_aio.c 2007-05-17 05:46:45 UTC (rev 22967) +++ branches/SAMBA_4_0/source/lib/events/events_aio.c 2007-05-17 07:52:33 UTC (rev 22968) @@ -103,10 +103,14 @@ see http://junkcode.samba.org/ftp/unpacked/junkcode/epoll_fork.c for an demonstration of why this is needed */ -static void epoll_reopen(struct aio_event_context *aio_ev) +static void epoll_check_reopen(struct aio_event_context *aio_ev) { struct fd_event *fde; + if (aio_ev-pid == getpid()) { + return; + } + close(aio_ev-epoll_fd); aio_ev-epoll_fd = epoll_create(MAX_AIO_QUEUE_DEPTH); if (aio_ev-epoll_fd == -1) { @@ -131,16 +135,6 @@ struct epoll_event event; if (aio_ev-epoll_fd == -1) return; - /* during an add event we need to check if our pid has changed - and re-open the epoll socket. Note that we don't need to do this - for other epoll changes */ - if (aio_ev-pid != getpid()) { - epoll_reopen(aio_ev); - /* the current event gets added in epoll_reopen(), so - we can return here */ - return; - } - fde-additional_flags = ~EPOLL_ADDITIONAL_FD_FLAG_REPORT_ERROR; /* if we don't want events yet, don't add an aio_event */ @@ -424,6 +418,8 @@ struct aio_event_context); struct fd_event *fde; + epoll_check_reopen(aio_ev); + fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event); if (!fde) return NULL; @@ -468,6 +464,8 @@ fde-flags = flags; + epoll_check_reopen(aio_ev); + epoll_change_event(aio_ev, fde); } @@ -485,6 +483,8 @@ return 0; } + epoll_check_reopen(aio_ev); + return aio_event_loop(aio_ev, tval); } Modified: branches/SAMBA_4_0/source/lib/events/events_epoll.c === --- branches/SAMBA_4_0/source/lib/events/events_epoll.c 2007-05-17 05:46:45 UTC (rev 22967) +++ branches/SAMBA_4_0/source/lib/events/events_epoll.c 2007-05-17 07:52:33 UTC (rev 22968) @@ -102,10 +102,14 @@ see http://junkcode.samba.org/ftp/unpacked/junkcode/epoll_fork.c for an demonstration of why this is needed */ -static void epoll_reopen(struct epoll_event_context *epoll_ev) +static void epoll_check_reopen(struct epoll_event_context *epoll_ev) { struct fd_event *fde; + if (epoll_ev-pid == getpid()) { + return; + } + close(epoll_ev-epoll_fd); epoll_ev-epoll_fd = epoll_create(64); if (epoll_ev-epoll_fd == -1) { @@ -131,16 +135,6 @@ if (epoll_ev-epoll_fd == -1) return; - /* during an add event we need to check if our pid has changed - and re-open the epoll socket. Note that we don't need to do this - for other epoll changes */ - if (epoll_ev-pid != getpid()) { - epoll_reopen(epoll_ev); - /* the current event gets added in epoll_reopen(), so - we can return here */ - return; - } - fde-additional_flags = ~EPOLL_ADDITIONAL_FD_FLAG_REPORT_ERROR; /* if we don't want events yet, don't add an epoll_event */ @@ -373,6 +367,8 @@ struct epoll_event_context); struct fd_event *fde; + epoll_check_reopen(epoll_ev); + fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event); if (!fde) return NULL; @@ -417,6 +413,8 @@ fde-flags = flags; + epoll_check_reopen(epoll_ev); + epoll_change_event(epoll_ev, fde); } @@ -434,6 +432,8 @@ return 0; } + epoll_check_reopen(epoll_ev); + return epoll_event_loop(epoll_ev, tval); } Modified: branches/SAMBA_4_0/source/lib/events/events_standard.c === --- branches/SAMBA_4_0/source/lib/events/events_standard.c 2007-05-17 05:46:45 UTC (rev 22967) +++ branches/SAMBA_4_0/source/lib/events/events_standard.c 2007-05-17 07:52:33 UTC (rev 22968) @@
Rev 314: merged from samba4 in http://samba.org/~tridge/ctdb
revno: 314 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Thu 2007-05-17 17:54:02 +1000 message: merged from samba4 modified: lib/events/events_aio.cevents_aio.c-20070501213746-4fxluwiq4rcxib8p-1 lib/events/events_epoll.c events_epoll.c-20070501213746-4fxluwiq4rcxib8p-2 lib/events/events_standard.c events_standard.c-20061117234101-o3qt14umlg9en8z0-30 === modified file 'lib/events/events_aio.c' --- a/lib/events/events_aio.c 2007-05-17 02:43:09 + +++ b/lib/events/events_aio.c 2007-05-17 07:54:02 + @@ -103,10 +103,14 @@ see http://junkcode.samba.org/ftp/unpacked/junkcode/epoll_fork.c for an demonstration of why this is needed */ -static void epoll_reopen(struct aio_event_context *aio_ev) +static void epoll_check_reopen(struct aio_event_context *aio_ev) { struct fd_event *fde; + if (aio_ev-pid == getpid()) { + return; + } + close(aio_ev-epoll_fd); aio_ev-epoll_fd = epoll_create(MAX_AIO_QUEUE_DEPTH); if (aio_ev-epoll_fd == -1) { @@ -131,16 +135,6 @@ struct epoll_event event; if (aio_ev-epoll_fd == -1) return; - /* during an add event we need to check if our pid has changed - and re-open the epoll socket. Note that we don't need to do this - for other epoll changes */ - if (aio_ev-pid != getpid()) { - epoll_reopen(aio_ev); - /* the current event gets added in epoll_reopen(), so - we can return here */ - return; - } - fde-additional_flags = ~EPOLL_ADDITIONAL_FD_FLAG_REPORT_ERROR; /* if we don't want events yet, don't add an aio_event */ @@ -424,6 +418,8 @@ struct aio_event_context); struct fd_event *fde; + epoll_check_reopen(aio_ev); + fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event); if (!fde) return NULL; @@ -468,6 +464,8 @@ fde-flags = flags; + epoll_check_reopen(aio_ev); + epoll_change_event(aio_ev, fde); } @@ -485,6 +483,8 @@ return 0; } + epoll_check_reopen(aio_ev); + return aio_event_loop(aio_ev, tval); } === modified file 'lib/events/events_epoll.c' --- a/lib/events/events_epoll.c 2007-05-17 02:43:09 + +++ b/lib/events/events_epoll.c 2007-05-17 07:54:02 + @@ -102,10 +102,14 @@ see http://junkcode.samba.org/ftp/unpacked/junkcode/epoll_fork.c for an demonstration of why this is needed */ -static void epoll_reopen(struct epoll_event_context *epoll_ev) +static void epoll_check_reopen(struct epoll_event_context *epoll_ev) { struct fd_event *fde; + if (epoll_ev-pid == getpid()) { + return; + } + close(epoll_ev-epoll_fd); epoll_ev-epoll_fd = epoll_create(64); if (epoll_ev-epoll_fd == -1) { @@ -131,16 +135,6 @@ if (epoll_ev-epoll_fd == -1) return; - /* during an add event we need to check if our pid has changed - and re-open the epoll socket. Note that we don't need to do this - for other epoll changes */ - if (epoll_ev-pid != getpid()) { - epoll_reopen(epoll_ev); - /* the current event gets added in epoll_reopen(), so - we can return here */ - return; - } - fde-additional_flags = ~EPOLL_ADDITIONAL_FD_FLAG_REPORT_ERROR; /* if we don't want events yet, don't add an epoll_event */ @@ -373,6 +367,8 @@ struct epoll_event_context); struct fd_event *fde; + epoll_check_reopen(epoll_ev); + fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event); if (!fde) return NULL; @@ -417,6 +413,8 @@ fde-flags = flags; + epoll_check_reopen(epoll_ev); + epoll_change_event(epoll_ev, fde); } @@ -434,6 +432,8 @@ return 0; } + epoll_check_reopen(epoll_ev); + return epoll_event_loop(epoll_ev, tval); } === modified file 'lib/events/events_standard.c' --- a/lib/events/events_standard.c 2007-05-17 02:43:09 + +++ b/lib/events/events_standard.c 2007-05-17 07:54:02 + @@ -119,10 +119,14 @@ see http://junkcode.samba.org/ftp/unpacked/junkcode/epoll_fork.c for an demonstration of why this is needed */ -static void epoll_reopen(struct std_event_context *std_ev) +static void epoll_check_reopen(struct std_event_context *std_ev) { struct fd_event *fde; + if (std_ev-pid == getpid()) { + return; + } + close(std_ev-epoll_fd); std_ev-epoll_fd = epoll_create(64); if (std_ev-epoll_fd == -1) { @@ -147,16 +151,6 @@ struct epoll_event event; if
Rev 313: removed the CTDB_CTRL_FLAG_NOREQUEUE flag in http://samba.org/~tridge/ctdb
revno: 313 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Thu 2007-05-17 14:10:38 +1000 message: removed the CTDB_CTRL_FLAG_NOREQUEUE flag modified: common/ctdb_client.c ctdb_client.c-20070411010216-3kd8v37k61steeya-1 common/ctdb_control.c ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 === modified file 'common/ctdb_client.c' --- a/common/ctdb_client.c 2007-05-17 02:07:29 + +++ b/common/ctdb_client.c 2007-05-17 04:10:38 + @@ -705,13 +705,6 @@ ctdb_socket_connect(ctdb); } - /* if the caller specified a timeout it makes no sense for the - daemon to requeue the packet if the destination is unavailable -*/ - if (timeout) { - flags |= CTDB_CTRL_FLAG_NOREQUEUE; - } - state = talloc_zero(ctdb, struct ctdb_client_control_state); CTDB_NO_MEMORY(ctdb, state); === modified file 'common/ctdb_control.c' --- a/common/ctdb_control.c 2007-05-17 00:45:31 + +++ b/common/ctdb_control.c 2007-05-17 04:10:38 + @@ -32,6 +32,7 @@ uint32_t reqid; ctdb_control_callback_fn_t callback; void *private_data; + unsigned flags; }; /* @@ -362,19 +363,15 @@ struct timeval t, void *private_data) { struct ctdb_control_state *state = talloc_get_type(private_data, struct ctdb_control_state); - struct ctdb_req_control *c = (struct ctdb_req_control *)state-private_data; TALLOC_CTX *tmp_ctx = talloc_new(ev); state-ctdb-status.timeouts.control++; talloc_steal(tmp_ctx, state); - /* Dont retry the control if the caller asked for NOREQUEUE */ - if (!(c-flags CTDB_CTRL_FLAG_NOREQUEUE)) { - state-callback(state-ctdb, -1, tdb_null, - ctdb_control timed out, - state-private_data); - } + state-callback(state-ctdb, -1, tdb_null, + ctdb_control timed out, + state-private_data); talloc_free(tmp_ctx); } @@ -407,6 +404,7 @@ state-callback = callback; state-private_data = private_data; state-ctdb = ctdb; + state-flags = flags; talloc_set_destructor(state, ctdb_control_destructor); === modified file 'include/ctdb_private.h' --- a/include/ctdb_private.h2007-05-17 00:45:31 + +++ b/include/ctdb_private.h2007-05-17 04:10:38 + @@ -295,8 +295,8 @@ re-issue the call */ #define CTDB_CALL_TIMEOUT 2 -/* timeout for ctdb control calls */ -#define CTDB_CONTROL_TIMEOUT 10 +/* maximum timeout for ctdb control calls */ +#define CTDB_CONTROL_TIMEOUT 60 /* timeout for ctdb traverse calls. When this is reached we cut short the traverse */ @@ -520,7 +520,6 @@ uint64_t srvid; uint32_t client_id; #define CTDB_CTRL_FLAG_NOREPLY 1 -#define CTDB_CTRL_FLAG_NOREQUEUE 2 uint32_t flags; uint32_t datalen; uint8_t data[1];
svn commit: samba r22969 - in branches/SAMBA_4_0/source: auth/credentials auth/gensec auth/kerberos client dsdb/samdb dsdb/samdb/ldb_modules kdc torture torture/auth torture/basic torture/libnet tortu
Author: tridge Date: 2007-05-17 08:47:04 + (Thu, 17 May 2007) New Revision: 22969 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22969 Log: fix some more places where we could end up with more than one event context. We now have an event context on the torture_context, and we can also get one from the cli_credentials structure Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c branches/SAMBA_4_0/source/auth/credentials/credentials.h branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.h branches/SAMBA_4_0/source/client/client.c branches/SAMBA_4_0/source/dsdb/samdb/cracknames.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c branches/SAMBA_4_0/source/kdc/kdc.c branches/SAMBA_4_0/source/torture/auth/pac.c branches/SAMBA_4_0/source/torture/basic/misc.c branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c branches/SAMBA_4_0/source/torture/local/irpc.c branches/SAMBA_4_0/source/torture/local/messaging.c branches/SAMBA_4_0/source/torture/local/resolve.c branches/SAMBA_4_0/source/torture/raw/composite.c branches/SAMBA_4_0/source/torture/raw/open.c branches/SAMBA_4_0/source/torture/rpc/async_bind.c branches/SAMBA_4_0/source/torture/torture.c branches/SAMBA_4_0/source/torture/ui.h branches/SAMBA_4_0/source/torture/util_smb.c Changeset: Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-05-17 07:52:33 UTC (rev 22968) +++ branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-05-17 08:47:04 UTC (rev 22969) @@ -27,6 +27,7 @@ #include auth/credentials/credentials.h #include auth/credentials/credentials_krb5.h #include libcli/auth/libcli_auth.h +#include lib/events/events.h /** * Create a new credentials structure @@ -61,6 +62,7 @@ cred-tries = 3; cred-callback_running = False; + cred-ev = NULL; cli_credentials_set_kerberos_state(cred, CRED_AUTO_USE_KERBEROS); cli_credentials_set_gensec_features(cred, 0); @@ -747,3 +749,22 @@ return (cred-tries 0); } + +/* + set the common event context for this set of credentials + */ +void cli_credentials_set_event_context(struct cli_credentials *cred, struct event_context *ev) +{ + cred-ev = ev; +} + +/* + set the common event context for this set of credentials + */ +struct event_context *cli_credentials_get_event_context(struct cli_credentials *cred) +{ + if (cred-ev == NULL) { + cred-ev = event_context_find(cred); + } + return cred-ev; +} Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.h === --- branches/SAMBA_4_0/source/auth/credentials/credentials.h2007-05-17 07:52:33 UTC (rev 22968) +++ branches/SAMBA_4_0/source/auth/credentials/credentials.h2007-05-17 08:47:04 UTC (rev 22969) @@ -114,6 +114,9 @@ /* Whether any callback is currently running */ BOOL callback_running; + + /* an event context for anyone wanting to use the credentials */ + struct event_context *ev; }; struct ldb_context; Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c 2007-05-17 07:52:33 UTC (rev 22968) +++ branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c 2007-05-17 08:47:04 UTC (rev 22969) @@ -37,7 +37,8 @@ return 0; } - ret = smb_krb5_init_context(cred, cred-smb_krb5_context); + ret = smb_krb5_init_context(cred, cli_credentials_get_event_context(cred), + cred-smb_krb5_context); if (ret) { return ret; } Modified: branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c === --- branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c 2007-05-17 07:52:33 UTC (rev 22968) +++ branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c 2007-05-17 08:47:04 UTC (rev 22969) @@ -23,6 +23,7 @@ */ #include includes.h +#include lib/events/events.h #include system/kerberos.h #include heimdal/lib/gssapi/gssapi/gssapi.h #include auth/kerberos/kerberos.h @@ -226,6 +227,7 @@ } ret = smb_krb5_init_context(gensec_gssapi_state, + gensec_security-event_ctx, gensec_gssapi_state-smb_krb5_context); if (ret) { DEBUG(1,(gensec_krb5_start: krb5_init_context failed
svn commit: samba r22970 - in branches/SAMBA_4_0/source/lib/events: .
Author: tridge Date: 2007-05-17 09:44:58 + (Thu, 17 May 2007) New Revision: 22970 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22970 Log: the events code calls close(), which needs to use socket_wrapper.h in the build farm Modified: branches/SAMBA_4_0/source/lib/events/events_aio.c branches/SAMBA_4_0/source/lib/events/events_epoll.c branches/SAMBA_4_0/source/lib/events/events_standard.c Changeset: Modified: branches/SAMBA_4_0/source/lib/events/events_aio.c === --- branches/SAMBA_4_0/source/lib/events/events_aio.c 2007-05-17 08:47:04 UTC (rev 22969) +++ branches/SAMBA_4_0/source/lib/events/events_aio.c 2007-05-17 09:44:58 UTC (rev 22970) @@ -33,6 +33,7 @@ #include includes.h #include system/filesys.h +#include system/network.h #include lib/util/dlinklist.h #include lib/events/events.h #include lib/events/events_internal.h Modified: branches/SAMBA_4_0/source/lib/events/events_epoll.c === --- branches/SAMBA_4_0/source/lib/events/events_epoll.c 2007-05-17 08:47:04 UTC (rev 22969) +++ branches/SAMBA_4_0/source/lib/events/events_epoll.c 2007-05-17 09:44:58 UTC (rev 22970) @@ -23,6 +23,7 @@ #include includes.h #include system/filesys.h +#include system/network.h #include lib/util/dlinklist.h #include lib/events/events.h #include lib/events/events_internal.h Modified: branches/SAMBA_4_0/source/lib/events/events_standard.c === --- branches/SAMBA_4_0/source/lib/events/events_standard.c 2007-05-17 08:47:04 UTC (rev 22969) +++ branches/SAMBA_4_0/source/lib/events/events_standard.c 2007-05-17 09:44:58 UTC (rev 22970) @@ -30,6 +30,7 @@ #include includes.h #include system/filesys.h +#include system/network.h #include system/select.h /* needed for HAVE_EVENTS_EPOLL */ #include lib/util/dlinklist.h #include lib/events/events.h
svn commit: samba r22971 - in branches/SAMBA_4_0/source/lib/events: .
Author: tridge Date: 2007-05-17 09:48:17 + (Thu, 17 May 2007) New Revision: 22971 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22971 Log: fix build on systems without epoll Modified: branches/SAMBA_4_0/source/lib/events/events_standard.c Changeset: Modified: branches/SAMBA_4_0/source/lib/events/events_standard.c === --- branches/SAMBA_4_0/source/lib/events/events_standard.c 2007-05-17 09:44:58 UTC (rev 22970) +++ branches/SAMBA_4_0/source/lib/events/events_standard.c 2007-05-17 09:48:17 UTC (rev 22971) @@ -330,6 +330,7 @@ #define epoll_del_event(std_ev,fde) #define epoll_change_event(std_ev,fde) #define epoll_event_loop(std_ev,tvalp) (-1) +#define epoll_check_reopen(std_ev) #endif /*
svn commit: samba r22972 - in branches/SAMBA_4_0/source/setup: .
Author: tridge Date: 2007-05-17 10:33:40 + (Thu, 17 May 2007) New Revision: 22972 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22972 Log: added the basic ldif needed to support group policies in Samba4. WinXP clients do correctly see our group policies, but the gpmc admin tool doesn't yet work to allow you to edit the policies Modified: branches/SAMBA_4_0/source/setup/provision.ldif branches/SAMBA_4_0/source/setup/provision_basedn_modify.ldif Changeset: Modified: branches/SAMBA_4_0/source/setup/provision.ldif === --- branches/SAMBA_4_0/source/setup/provision.ldif 2007-05-17 09:48:17 UTC (rev 22971) +++ branches/SAMBA_4_0/source/setup/provision.ldif 2007-05-17 10:33:40 UTC (rev 22972) @@ -95,3 +95,31 @@ objectCategory: CN=Builtin-Domain,${SCHEMADN} isCriticalSystemObject: TRUE +dn: CN={${POLICYGUID}},CN=Policies,CN=System,DC=bludom,DC=tridgell,DC=net +objectClass: top +objectClass: container +objectClass: groupPolicyContainer +displayName: Default Domain Policy +objectCategory: CN=Group-Policy-Container,${SCHEMADN} +gPCFunctionalityVersion: 2 +gPCFileSysPath: \\${DNSDOMAIN}\sysvol\${DNSDOMAIN}\Policies\{${POLICYGUID}} +versionNumber: 1 +flags: 0 +gPCMachineExtensionNames: [{35378EAC-683F-11D2-A89A-00C04FBBCFA2}{53D6AB1B-248 + 8-11D1-A28C-00C04FB94F17}][{827D319E-6EAC-11D2-A4EA-00C04F79F83A}{803E14A0-B4 + FB-11D0-A0D0-00A0C90F574B}][{B1BE8D72-6EAC-11D2-A4EA-00C04F79F83A}{53D6AB1B-2 + 488-11D1-A28C-00C04FB94F17}] +gPCUserExtensionNames: [{3060E8D0-7020-11D2-842D-00C04FA372D4}{3060E8CE-7020-1 + 1D2-842D-00C04FA372D4}][{35378EAC-683F-11D2-A89A-00C04FBBCFA2}{0F6B957E-509E- + 11D1-A7CC-F87571E3}] +nTSecurityDescriptor: O:${DOMAINSID}-512G:${DOMAINSID}-512D:PAI(A;CI;RPWPCCDCLCLORCWOWDSDDTSW;;;${DOMAINSID}-512)(A;CI;RPWPCCDCLCLORCWOWDSDDTSW;;;${DOMAINSID}-519)(A;;RPWPCCDCLCLORCWOWDSDDTSW;;;${DOMAINSID}-512)(A;CIIO;RPWPCCDCLCLORCWOWDSDDTSW;;;CO)(A;CI;RPWPCCDCLCLORCWOWDSDDTSW;;;SY)(A;CI;RPLCLORC;;;AU)(OA;CI;CR;edacfd8f-ffb3-11d1-b41d-00a0c968f939;;AU)(A;CI;RPLCLORC;;;ED)S:AI(OU;CIIDSA;WPWD;;f30e3bc2-9ff0-11d1-b603-f80367c1;WD)(OU;CIIOIDSA;WP;f30e3bbe-9ff0-11d1-b603-f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)(OU;CIIOIDSA;WP;f30e3bbf-9ff0-11d1-b603-f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD) + +dn: CN=User,CN={${POLICYGUID}},CN=Policies,CN=System,${DOMAINDN} +objectClass: top +objectClass: container +objectCategory: CN=Container,${SCHEMADN} + +dn: CN=Machine,CN={${POLICYGUID}},CN=Policies,CN=System,${DOMAINDN} +objectClass: top +objectClass: container +objectCategory: CN=Container,${SCHEMADN} Modified: branches/SAMBA_4_0/source/setup/provision_basedn_modify.ldif === --- branches/SAMBA_4_0/source/setup/provision_basedn_modify.ldif 2007-05-17 09:48:17 UTC (rev 22971) +++ branches/SAMBA_4_0/source/setup/provision_basedn_modify.ldif 2007-05-17 10:33:40 UTC (rev 22972) @@ -85,4 +85,7 @@ replace: msDs-masteredBy msDs-masteredBy: CN=NTDS Settings,CN=${NETBIOSNAME},CN=Servers,CN=${DEFAULTSITE},CN=Sites,${CONFIGDN} - +replace: gPLink +gPLink: [LDAP://CN={${POLICYGUID}},CN=Policies,CN=System,${DOMAINDN};2] +- ${DOMAINGUID_MOD}
svn commit: samba-docs r1116 - in trunk/smbdotconf/tuning: .
Author: ab Date: 2007-05-17 12:19:46 + (Thu, 17 May 2007) New Revision: 1116 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=1116 Log: Document async I/O options Added: trunk/smbdotconf/tuning/aioreadsize.xml trunk/smbdotconf/tuning/aiowritesize.xml Changeset: Added: trunk/smbdotconf/tuning/aioreadsize.xml === --- trunk/smbdotconf/tuning/aioreadsize.xml 2007-05-16 17:47:29 UTC (rev 1115) +++ trunk/smbdotconf/tuning/aioreadsize.xml 2007-05-17 12:19:46 UTC (rev 1116) @@ -0,0 +1,22 @@ +samba:parameter name=aio read size + context=S +type=integer + xmlns:samba=http://www.samba.org/samba/DTD/samba-doc; +description + paraIf Samba has been built with asynchronous I/O support and this +integer parameter is set to non-zero value, +Samba will read from file asynchronously when size of request is bigger +than this value. Note that it happens only for non-chained and non-chaining +reads and when not using write cache./para + + paraCurrent implementation of asynchronous I/O in Samba 3.0 does support +only up to 10 outstanding asynchronous requests, read and write combined./para + + relatedwrite cache size/related + relatedaio write size/related +/description + +value type=default0/value +value type=example16384comment Use asynchronous I/O for reads bigger than 16KB +request size/comment/value +/samba:parameter Added: trunk/smbdotconf/tuning/aiowritesize.xml === --- trunk/smbdotconf/tuning/aiowritesize.xml2007-05-16 17:47:29 UTC (rev 1115) +++ trunk/smbdotconf/tuning/aiowritesize.xml2007-05-17 12:19:46 UTC (rev 1116) @@ -0,0 +1,22 @@ +samba:parameter name=aio write size + context=S +type=integer + xmlns:samba=http://www.samba.org/samba/DTD/samba-doc; +description + paraIf Samba has been built with asynchronous I/O support and this +integer parameter is set to non-zero value, +Samba will write to file asynchronously when size of request is bigger +than this value. Note that it happens only for non-chained and non-chaining +reads and when not using write cache./para + + paraCurrent implementation of asynchronous I/O in Samba 3.0 does support +only up to 10 outstanding asynchronous requests, read and write combined./para + + relatedwrite cache size/related + relatedaio read size/related +/description + +value type=default0/value +value type=example16384comment Use asynchronous I/O for writes bigger than 16KB +request size/comment/value +/samba:parameter
Re: svn commit: samba r22972 - in branches/SAMBA_4_0/source/setup: .
On Thu, 2007-05-17 at 10:33 +, [EMAIL PROTECTED] wrote: Author: tridge Date: 2007-05-17 10:33:40 + (Thu, 17 May 2007) New Revision: 22972 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22972 Log: added the basic ldif needed to support group policies in Samba4. WinXP clients do correctly see our group policies, but the gpmc admin tool doesn't yet work to allow you to edit the policies Modified: branches/SAMBA_4_0/source/setup/provision.ldif branches/SAMBA_4_0/source/setup/provision_basedn_modify.ldif Changeset: Modified: branches/SAMBA_4_0/source/setup/provision.ldif === --- branches/SAMBA_4_0/source/setup/provision.ldif2007-05-17 09:48:17 UTC (rev 22971) +++ branches/SAMBA_4_0/source/setup/provision.ldif2007-05-17 10:33:40 UTC (rev 22972) @@ -95,3 +95,31 @@ objectCategory: CN=Builtin-Domain,${SCHEMADN} isCriticalSystemObject: TRUE +dn: CN={${POLICYGUID}},CN=Policies,CN=System,DC=bludom,DC=tridgell,DC=net Tridge, I am not sure this is correct :-) ---^^^ Simo. -- Simo Sorce Samba Team GPL Compliance Officer email: [EMAIL PROTECTED] http://samba.org
svn commit: samba r22973 - in branches: SAMBA_3_0/source/utils SAMBA_3_0_25/source/utils SAMBA_3_0_26/source/utils
Author: ab Date: 2007-05-17 13:56:19 + (Thu, 17 May 2007) New Revision: 22973 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22973 Log: Apparently, 3.0.25 broke smb4k badly ;-) smb4k uses 'net rap server domain' to list servers in domain. Previously we just ignored all arguments in net_rap_server() but now we don't as 'net rap server name' has added an explicit check on arguments. Allow 'net rap server domain' to aid smb4k. Any other arguments will cause help message. Modified: branches/SAMBA_3_0/source/utils/net_rap.c branches/SAMBA_3_0_25/source/utils/net_rap.c branches/SAMBA_3_0_26/source/utils/net_rap.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rap.c === --- branches/SAMBA_3_0/source/utils/net_rap.c 2007-05-17 10:33:40 UTC (rev 22972) +++ branches/SAMBA_3_0/source/utils/net_rap.c 2007-05-17 13:56:19 UTC (rev 22973) @@ -435,10 +435,14 @@ int ret; if (argc 0) { - if (!strequal(argv[0], name)) { + if (strequal(argv[0], name)) { + return net_rap_server_name(argc, argv); + } + /* smb4k uses 'net [rap|rpc] server domain' to query servers in a domain */ + /* Fall through for 'domain', any other forms will cause to show usage message */ + if (!strequal(argv[0], domain)) { return net_rap_server_usage(argc-1, argv+1); } - return net_rap_server_name(argc, argv); } if (!(cli = net_make_ipc_connection(0))) Modified: branches/SAMBA_3_0_25/source/utils/net_rap.c === --- branches/SAMBA_3_0_25/source/utils/net_rap.c2007-05-17 10:33:40 UTC (rev 22972) +++ branches/SAMBA_3_0_25/source/utils/net_rap.c2007-05-17 13:56:19 UTC (rev 22973) @@ -435,10 +435,14 @@ int ret; if (argc 0) { - if (!strequal(argv[0], name)) { + if (strequal(argv[0], name)) { + return net_rap_server_name(argc, argv); + } + /* smb4k uses 'net [rap|rpc] server domain' to query servers in a domain */ + /* Fall through for 'domain', any other forms will cause to show usage message */ + if (!strequal(argv[0], domain)) { return net_rap_server_usage(argc-1, argv+1); } - return net_rap_server_name(argc, argv); } if (!(cli = net_make_ipc_connection(0))) Modified: branches/SAMBA_3_0_26/source/utils/net_rap.c === --- branches/SAMBA_3_0_26/source/utils/net_rap.c2007-05-17 10:33:40 UTC (rev 22972) +++ branches/SAMBA_3_0_26/source/utils/net_rap.c2007-05-17 13:56:19 UTC (rev 22973) @@ -435,10 +435,14 @@ int ret; if (argc 0) { - if (!strequal(argv[0], name)) { + if (strequal(argv[0], name)) { + return net_rap_server_name(argc, argv); + } + /* smb4k uses 'net [rap|rpc] server domain' to query servers in a domain */ + /* Fall through for 'domain', any other forms will cause to show usage message */ + if (!strequal(argv[0], domain)) { return net_rap_server_usage(argc-1, argv+1); } - return net_rap_server_name(argc, argv); } if (!(cli = net_make_ipc_connection(0)))
svn commit: samba r22974 - in branches/SAMBA_3_0/source: .
Author: idra Date: 2007-05-17 18:20:16 + (Thu, 17 May 2007) New Revision: 22974 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22974 Log: enable relro with PIE if available, this gives extra protection to the ELF segment Modified: branches/SAMBA_3_0/source/configure.in Changeset: Modified: branches/SAMBA_3_0/source/configure.in === --- branches/SAMBA_3_0/source/configure.in 2007-05-17 13:56:19 UTC (rev 22973) +++ branches/SAMBA_3_0/source/configure.in 2007-05-17 18:20:16 UTC (rev 22974) @@ -1763,6 +1763,29 @@ fi fi +#Check if we can enable relro as well +if test x${samba_cv_fpie} = xyes +then + AC_CACHE_CHECK(for relro, samba_cv_fpie_relro, + [ + cat conftest.c EOF +int foo; +main () { return 0;} +EOF +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fPIE -Wl,z,relro -o conftest conftest.c 1AS_MESSAGE_LOG_FD]) + then + samba_cv_fpie_relro=yes + else + samba_cv_fpie_relro=no + fi + rm -f conftest* + ]) + if test x${samba_cv_fpie_relro} = xyes + then + PIE_LDFLAGS=-pie -Wl,z,relro + fi +fi + # Assume non-shared by default and override below BLDSHARED=false
svn commit: samba r22975 - in branches: SAMBA_3_0/source/rpc_server SAMBA_3_0_25/source/rpc_server SAMBA_3_0_26/source/rpc_server
Author: jerry Date: 2007-05-17 19:16:27 + (Thu, 17 May 2007) New Revision: 22975 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22975 Log: BUG 4616: Don't return a dns or forest name when replying to the DsDGetPrimaryRoleInfo() and configured for security = domain. Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_ds_nt.c branches/SAMBA_3_0_25/source/rpc_server/srv_lsa_ds_nt.c branches/SAMBA_3_0_26/source/rpc_server/srv_lsa_ds_nt.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_ds_nt.c === --- branches/SAMBA_3_0/source/rpc_server/srv_lsa_ds_nt.c2007-05-17 18:20:16 UTC (rev 22974) +++ branches/SAMBA_3_0/source/rpc_server/srv_lsa_ds_nt.c2007-05-17 19:16:27 UTC (rev 22975) @@ -84,16 +84,16 @@ basic-dnsname_ptr = 1; init_unistr2( basic-dns_domain, dnsdomain, UNI_STR_TERMINATE); + + /* FIXME!! We really should fill in the correct forest + name. Should get this information from winbindd. */ basic-forestname_ptr = 1; init_unistr2( basic-forest_domain, dnsdomain, UNI_STR_TERMINATE); } else { - get_mydnsdomname(dnsdomain); - strlower_m(dnsdomain); - - basic-dnsname_ptr = 1; - init_unistr2( basic-dns_domain, dnsdomain, UNI_FLAGS_NONE); - basic-forestname_ptr = 1; - init_unistr2( basic-forest_domain, dnsdomain, UNI_FLAGS_NONE); + /* security = domain should not fill in the dns or + forest name */ + basic-dnsname_ptr = 0; + basic-forestname_ptr = 0; } *info = basic; Modified: branches/SAMBA_3_0_25/source/rpc_server/srv_lsa_ds_nt.c === --- branches/SAMBA_3_0_25/source/rpc_server/srv_lsa_ds_nt.c 2007-05-17 18:20:16 UTC (rev 22974) +++ branches/SAMBA_3_0_25/source/rpc_server/srv_lsa_ds_nt.c 2007-05-17 19:16:27 UTC (rev 22975) @@ -84,16 +84,16 @@ basic-dnsname_ptr = 1; init_unistr2( basic-dns_domain, dnsdomain, UNI_STR_TERMINATE); + + /* FIXME!! We really should fill in the correct forest + name. Should get this information from winbindd. */ basic-forestname_ptr = 1; init_unistr2( basic-forest_domain, dnsdomain, UNI_STR_TERMINATE); } else { - get_mydnsdomname(dnsdomain); - strlower_m(dnsdomain); - - basic-dnsname_ptr = 1; - init_unistr2( basic-dns_domain, dnsdomain, UNI_FLAGS_NONE); - basic-forestname_ptr = 1; - init_unistr2( basic-forest_domain, dnsdomain, UNI_FLAGS_NONE); + /* security = domain should not fill in the dns or + forest name */ + basic-dnsname_ptr = 0; + basic-forestname_ptr = 0; } *info = basic; Modified: branches/SAMBA_3_0_26/source/rpc_server/srv_lsa_ds_nt.c === --- branches/SAMBA_3_0_26/source/rpc_server/srv_lsa_ds_nt.c 2007-05-17 18:20:16 UTC (rev 22974) +++ branches/SAMBA_3_0_26/source/rpc_server/srv_lsa_ds_nt.c 2007-05-17 19:16:27 UTC (rev 22975) @@ -84,16 +84,16 @@ basic-dnsname_ptr = 1; init_unistr2( basic-dns_domain, dnsdomain, UNI_STR_TERMINATE); + + /* FIXME!! We really should fill in the correct forest + name. Should get this information from winbindd. */ basic-forestname_ptr = 1; init_unistr2( basic-forest_domain, dnsdomain, UNI_STR_TERMINATE); } else { - get_mydnsdomname(dnsdomain); - strlower_m(dnsdomain); - - basic-dnsname_ptr = 1; - init_unistr2( basic-dns_domain, dnsdomain, UNI_FLAGS_NONE); - basic-forestname_ptr = 1; - init_unistr2( basic-forest_domain, dnsdomain, UNI_FLAGS_NONE); + /* security = domain should not fill in the dns or + forest name */ + basic-dnsname_ptr = 0; + basic-forestname_ptr = 0; } *info = basic;
svn commit: samba r22976 - in branches/SAMBA_3_0/source: .
Author: idra Date: 2007-05-17 19:26:08 + (Thu, 17 May 2007) New Revision: 22976 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22976 Log: whoops typo Modified: branches/SAMBA_3_0/source/configure.in Changeset: Modified: branches/SAMBA_3_0/source/configure.in === --- branches/SAMBA_3_0/source/configure.in 2007-05-17 19:16:27 UTC (rev 22975) +++ branches/SAMBA_3_0/source/configure.in 2007-05-17 19:26:08 UTC (rev 22976) @@ -1772,7 +1772,7 @@ int foo; main () { return 0;} EOF -if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fPIE -Wl,z,relro -o conftest conftest.c 1AS_MESSAGE_LOG_FD]) +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fPIE -Wl,-z,relro -o conftest conftest.c 1AS_MESSAGE_LOG_FD]) then samba_cv_fpie_relro=yes else @@ -1782,7 +1782,7 @@ ]) if test x${samba_cv_fpie_relro} = xyes then - PIE_LDFLAGS=-pie -Wl,z,relro + PIE_LDFLAGS=-pie -Wl,-z,relro fi fi
svn commit: samba r22978 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd SAMBA_3_0_26/source/smbd
Author: jerry Date: 2007-05-17 22:27:42 + (Thu, 17 May 2007) New Revision: 22978 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22978 Log: Don't use current_user to prep the security ctx in change_to_user since any SID/uid/gid translation calls will reset the struct when popping the security ctx. This should fix the standalone server configuration issues reported by David Rankin (thanks for the logs). Modified: branches/SAMBA_3_0/source/smbd/uid.c branches/SAMBA_3_0_25/source/smbd/uid.c branches/SAMBA_3_0_26/source/smbd/uid.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/uid.c === --- branches/SAMBA_3_0/source/smbd/uid.c2007-05-17 19:56:54 UTC (rev 22977) +++ branches/SAMBA_3_0/source/smbd/uid.c2007-05-17 22:27:42 UTC (rev 22978) @@ -156,7 +156,9 @@ char group_c; BOOL must_free_token = False; NT_USER_TOKEN *token = NULL; - + int num_groups = 0; + gid_t *group_list = NULL; + if (!conn) { DEBUG(2,(change_to_user: Connection not open\n)); return(False); @@ -195,14 +197,14 @@ if (conn-force_user) /* security = share sets this too */ { uid = conn-uid; gid = conn-gid; - current_user.ut.groups = conn-groups; - current_user.ut.ngroups = conn-ngroups; + group_list = conn-groups; + num_groups = conn-ngroups; token = conn-nt_user_token; } else if (vuser) { uid = conn-admin_user ? 0 : vuser-uid; gid = vuser-gid; - current_user.ut.ngroups = vuser-n_groups; - current_user.ut.groups = vuser-groups; + num_groups = vuser-n_groups; + group_list = vuser-groups; token = vuser-nt_user_token; } else { DEBUG(2,(change_to_user: Invalid vuid used %d in accessing @@ -235,8 +237,8 @@ */ int i; - for (i = 0; i current_user.ut.ngroups; i++) { - if (current_user.ut.groups[i] == conn-gid) { + for (i = 0; i num_groups; i++) { + if (group_list[i] == conn-gid) { gid = conn-gid; gid_to_sid(token-user_sids[1], gid); break; @@ -248,6 +250,12 @@ } } + /* Now set current_user since we will immediately also call + set_sec_ctx() */ + + current_user.ut.ngroups = num_groups; + current_user.ut.groups = group_list; + set_sec_ctx(uid, gid, current_user.ut.ngroups, current_user.ut.groups, token); Modified: branches/SAMBA_3_0_25/source/smbd/uid.c === --- branches/SAMBA_3_0_25/source/smbd/uid.c 2007-05-17 19:56:54 UTC (rev 22977) +++ branches/SAMBA_3_0_25/source/smbd/uid.c 2007-05-17 22:27:42 UTC (rev 22978) @@ -156,7 +156,9 @@ char group_c; BOOL must_free_token = False; NT_USER_TOKEN *token = NULL; - + int num_groups = 0; + gid_t *group_list = NULL; + if (!conn) { DEBUG(2,(change_to_user: Connection not open\n)); return(False); @@ -195,14 +197,14 @@ if (conn-force_user) /* security = share sets this too */ { uid = conn-uid; gid = conn-gid; - current_user.ut.groups = conn-groups; - current_user.ut.ngroups = conn-ngroups; + group_list = conn-groups; + num_groups = conn-ngroups; token = conn-nt_user_token; } else if (vuser) { uid = conn-admin_user ? 0 : vuser-uid; gid = vuser-gid; - current_user.ut.ngroups = vuser-n_groups; - current_user.ut.groups = vuser-groups; + num_groups = vuser-n_groups; + group_list = vuser-groups; token = vuser-nt_user_token; } else { DEBUG(2,(change_to_user: Invalid vuid used %d in accessing @@ -235,8 +237,8 @@ */ int i; - for (i = 0; i current_user.ut.ngroups; i++) { - if (current_user.ut.groups[i] == conn-gid) { + for (i = 0; i num_groups; i++) { + if (group_list[i] == conn-gid) { gid = conn-gid; gid_to_sid(token-user_sids[1], gid); break; @@ -248,6 +250,12 @@ } } + /* Now set
svn commit: samba r22979 - in branches/SAMBA_3_0/source/client: .
Author: sfrench Date: 2007-05-17 22:28:28 + (Thu, 17 May 2007) New Revision: 22979 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22979 Log: Revert previous checkin (which had some debug junk) and fix misc frees that valgrind noticed Modified: branches/SAMBA_3_0/source/client/mount.cifs.c Changeset: Modified: branches/SAMBA_3_0/source/client/mount.cifs.c === --- branches/SAMBA_3_0/source/client/mount.cifs.c 2007-05-17 22:27:42 UTC (rev 22978) +++ branches/SAMBA_3_0/source/client/mount.cifs.c 2007-05-17 22:28:28 UTC (rev 22979) @@ -79,8 +79,8 @@ static char * mountpassword = NULL; char * domain_name = NULL; char * prefixpath = NULL; -char * servern = NULL; + /* BB finish BB cifs_umount @@ -128,8 +128,7 @@ struct passwd *password = getpwuid(getuid()); if (password) { - if(password-pw_name); - username = strdup(password-pw_name); + username = password-pw_name; } return username; } @@ -420,11 +419,6 @@ printf(password too long\n); return 1; } - } else if (strncmp(data, sec, 3) == 0) { - if (value) { - if (!strcmp(value, none)) - got_password = 1; - } } else if (strncmp(data, ip, 2) == 0) { if (!value || !*value) { printf(target ip address argument missing); @@ -573,6 +567,8 @@ *filesys_flags = ~MS_NOEXEC; } else if (strncmp(data, guest, 5) == 0) { got_password=1; +/* remove the parm since it would otherwise be logged by kern */ + goto nocopy; } else if (strncmp(data, ro, 2) == 0) { *filesys_flags |= MS_RDONLY; } else if (strncmp(data, rw, 2) == 0) { @@ -809,9 +805,6 @@ if(got_ip == 0) { host_entry = gethostbyname(unc_name); } - if(strnlen(unc_name, 16) 16) { - servern = strdup(unc_name); - } *(share - 1) = '/'; /* put the slash back */ if ((prefixpath = strchr(share, '/'))) { *prefixpath = 0; /* permanently terminate the string */ @@ -888,7 +881,7 @@ char * uuid = NULL; char * mountpoint = NULL; char * options = NULL; - char * resolved_path; + char * resolved_path = NULL; char * temp; int rc; int rsize = 0; @@ -899,7 +892,6 @@ int optlen = 0; int orgoptlen = 0; int retry = 0; /* set when we have to retry mount with uppercase */ - int retry_with_rfc1001name = 0; /* set when we have to retry with netbios name */ struct stat statbuf; struct utsname sysinfo; struct mntent mountent; @@ -1085,12 +1077,15 @@ get_password_from_file(0, getenv(PASSWD_FILE)); } -if (orgoptions parse_options(orgoptions, flags)) -return -1; +if (orgoptions parse_options(orgoptions, flags)) { +rc = -1; + goto mount_exit; + } ipaddr = parse_server(share_name); if((ipaddr == NULL) (got_ip == 0)) { printf(No ip address specified and hostname not found\n); - return -1; + rc = -1; + goto mount_exit; } /* BB save off path and pop after mount returns? */ @@ -1104,17 +1099,20 @@ } if(chdir(mountpoint)) { printf(mount error: can not change directory into mount target %s\n,mountpoint); - return -1; + rc = -1; + goto mount_exit; } if(stat (., statbuf)) { printf(mount error: mount point %s does not exist\n,mountpoint); - return -1; + rc = -1; + goto mount_exit; } if (S_ISDIR(statbuf.st_mode) == 0) { printf(mount error: mount point %s is not a directory\n,mountpoint); - return -1; + rc = -1; + goto mount_exit; } if((getuid() != 0) (geteuid() == 0)) { @@ -1160,40 +1158,28 @@ optlen += strlen(ipaddr) + 4; if(mountpassword) optlen += strlen(mountpassword) + 6; - if(options) { - printf(\norg options %s at %p\n, options, options); /* BB removeme BB */ - + if(options)
Rev 315: - don't try to send controls to dead nodes in http://samba.org/~tridge/ctdb
revno: 315 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Thu 2007-05-17 23:23:41 +1000 message: - don't try to send controls to dead nodes - use only connected nodes in a traverse modified: common/ctdb.c ctdb.c-20061127094323-t50f58d65iaao5of-2 common/ctdb_control.c ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1 common/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1 common/ctdb_traverse.c ctdb_traverse.c-20070503021550-ztfs5rwx8jfm8qqx-1 include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 === modified file 'common/ctdb.c' --- a/common/ctdb.c 2007-05-12 09:54:40 + +++ b/common/ctdb.c 2007-05-17 13:23:41 + @@ -217,6 +217,21 @@ return ctdb-num_nodes; } +/* + return the number of connected nodes +*/ +uint32_t ctdb_get_num_connected_nodes(struct ctdb_context *ctdb) +{ + int i; + uint32_t count=0; + for (i=0;ictdb-vnn_map-size;i++) { + if (ctdb-nodes[i]-flags NODE_FLAGS_CONNECTED) { + count++; + } + } + return count; +} + /* called by the transport layer when a packet comes in === modified file 'common/ctdb_control.c' --- a/common/ctdb_control.c 2007-05-17 04:10:38 + +++ b/common/ctdb_control.c 2007-05-17 13:23:41 + @@ -395,6 +395,15 @@ return -1; } + if (destnode != CTDB_BROADCAST_VNNMAP destnode != CTDB_BROADCAST_VNNMAP + (!ctdb_validate_vnn(ctdb, destnode) || +!(ctdb-nodes[destnode]-flags NODE_FLAGS_CONNECTED))) { + if (!(flags CTDB_CTRL_FLAG_NOREPLY)) { + callback(ctdb, -1, tdb_null, ctdb_control to disconnected node, private_data); + } + return 0; + } + /* the state is made a child of private_data if possible. This means any reply will be discarded if the private_data goes away */ state = talloc(private_data?private_data:ctdb, struct ctdb_control_state); === modified file 'common/ctdb_recoverd.c' --- a/common/ctdb_recoverd.c2007-05-16 01:12:28 + +++ b/common/ctdb_recoverd.c2007-05-17 13:23:41 + @@ -447,6 +447,8 @@ return -1; } + /* send a message to all clients telling them that the cluster has been reconfigured */ + ctdb_send_message(ctdb, CTDB_BROADCAST_ALL, CTDB_SRVID_RECONFIGURE, tdb_null); DEBUG(0, (__location__ Recovery complete\n)); return 0; @@ -465,7 +467,6 @@ uint64_t srvid; srvid = CTDB_SRVTYPE_RECOVERY; - srvid = 32; emsg.vnn = vnn; @@ -857,7 +858,6 @@ /* register a message port for recovery elections */ srvid = CTDB_SRVTYPE_RECOVERY; - srvid = 32; ctdb_set_message_handler(ctdb, srvid, election_handler, NULL); monitor_cluster(ctdb); === modified file 'common/ctdb_traverse.c' --- a/common/ctdb_traverse.c2007-05-10 07:43:45 + +++ b/common/ctdb_traverse.c2007-05-17 13:23:41 + @@ -365,7 +365,7 @@ if (key.dsize == 0 data.dsize == 0) { state-null_count++; - if (state-null_count != ctdb_get_num_nodes(ctdb)) { + if (state-null_count != ctdb_get_num_connected_nodes(ctdb)) { return 0; } } === modified file 'include/ctdb.h' --- a/include/ctdb.h2007-05-17 02:07:29 + +++ b/include/ctdb.h2007-05-17 13:23:41 + @@ -56,10 +56,16 @@ a message handler ID meaning give me all messages */ #define CTDB_SRVID_ALL (~(uint64_t)0) + /* srvid type : RECOVERY */ -#define CTDB_SRVTYPE_RECOVERY 0x64766372 +#define CTDB_SRVTYPE_RECOVERY 0xF100LL + +/* + a message handler ID meaning that the cluster has been reconfigured + */ +#define CTDB_SRVID_RECONFIGURE 0xF200LL struct event_context; === modified file 'include/ctdb_private.h' --- a/include/ctdb_private.h2007-05-17 04:10:38 + +++ b/include/ctdb_private.h2007-05-17 13:23:41 + @@ -802,4 +802,6 @@ int ctdb_start_recoverd(struct ctdb_context *ctdb); +uint32_t ctdb_get_num_connected_nodes(struct ctdb_context *ctdb); + #endif
svn commit: samba r22980 - in branches/SAMBA_3_0_26/source/client: .
Author: sfrench Date: 2007-05-17 22:31:41 + (Thu, 17 May 2007) New Revision: 22980 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22980 Log: Add in misc frees that valgrind noticed for mount.cifs.c Modified: branches/SAMBA_3_0_26/source/client/mount.cifs.c Changeset: Modified: branches/SAMBA_3_0_26/source/client/mount.cifs.c === --- branches/SAMBA_3_0_26/source/client/mount.cifs.c2007-05-17 22:28:28 UTC (rev 22979) +++ branches/SAMBA_3_0_26/source/client/mount.cifs.c2007-05-17 22:31:41 UTC (rev 22980) @@ -618,6 +618,7 @@ nocopy: data = next_keyword; } + free(*optionsp); *optionsp = out; return 0; } @@ -879,8 +880,8 @@ char * ipaddr = NULL; char * uuid = NULL; char * mountpoint = NULL; - char * options; - char * resolved_path; + char * options = NULL; + char * resolved_path = NULL; char * temp; int rc; int rsize = 0; @@ -1076,12 +1077,15 @@ get_password_from_file(0, getenv(PASSWD_FILE)); } -if (orgoptions parse_options(orgoptions, flags)) -return -1; +if (orgoptions parse_options(orgoptions, flags)) { +rc = -1; + goto mount_exit; + } ipaddr = parse_server(share_name); if((ipaddr == NULL) (got_ip == 0)) { printf(No ip address specified and hostname not found\n); - return -1; + rc = -1; + goto mount_exit; } /* BB save off path and pop after mount returns? */ @@ -1095,17 +1099,20 @@ } if(chdir(mountpoint)) { printf(mount error: can not change directory into mount target %s\n,mountpoint); - return -1; + rc = -1; + goto mount_exit; } if(stat (., statbuf)) { printf(mount error: mount point %s does not exist\n,mountpoint); - return -1; + rc = -1; + goto mount_exit; } if (S_ISDIR(statbuf.st_mode) == 0) { printf(mount error: mount point %s is not a directory\n,mountpoint); - return -1; + rc = -1; + goto mount_exit; } if((getuid() != 0) (geteuid() == 0)) { @@ -1151,6 +1158,8 @@ optlen += strlen(ipaddr) + 4; if(mountpassword) optlen += strlen(mountpassword) + 6; + if(options) + free(options); options = (char *)malloc(optlen + 10 + 64 /* space for commas in password */ + 8 /* space for domain= , domain name itself was counted as part of the length username string above */); if(options == NULL) { @@ -1233,14 +1242,11 @@ } } default: - printf(mount error %d = %s\n,errno,strerror(errno)); } printf(Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)\n); - if(mountpassword) { - memset(mountpassword,0,64); - } - return -1; + rc = -1; + goto mount_exit; } else { pmntfile = setmntent(MOUNTED, a+); if(pmntfile) { @@ -1270,7 +1276,7 @@ strcat(mountent.mnt_opts,,user=); strcat(mountent.mnt_opts,mount_user); } - free(mount_user); + /* free(mount_user); do not free static mem */ } } mountent.mnt_freq = 0; @@ -1283,6 +1289,8 @@ printf(could not update mount table\n); } } + rc = 0; +mount_exit: if(mountpassword) { int len = strlen(mountpassword); memset(mountpassword,0,len); @@ -1305,6 +1313,6 @@ if(free_share_name) { free(share_name); } - return 0; + return rc; }
svn commit: samba r22981 - in branches/SAMBA_3_0_26/source/client: .
Author: sfrench Date: 2007-05-17 22:36:08 + (Thu, 17 May 2007) New Revision: 22981 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22981 Log: Do not prompt for password on sec=none for mount.cifs (and allow guest option to pass to kernel code so it can know when to retry) Modified: branches/SAMBA_3_0_26/source/client/mount.cifs.c Changeset: Modified: branches/SAMBA_3_0_26/source/client/mount.cifs.c === --- branches/SAMBA_3_0_26/source/client/mount.cifs.c2007-05-17 22:31:41 UTC (rev 22980) +++ branches/SAMBA_3_0_26/source/client/mount.cifs.c2007-05-17 22:36:08 UTC (rev 22981) @@ -419,6 +419,11 @@ printf(password too long\n); return 1; } + } else if (strncmp(data, sec, 3) == 0) { + if (value) { + if (!strcmp(value, none)) + got_password = 1; + } } else if (strncmp(data, ip, 2) == 0) { if (!value || !*value) { printf(target ip address argument missing); @@ -567,8 +572,6 @@ *filesys_flags = ~MS_NOEXEC; } else if (strncmp(data, guest, 5) == 0) { got_password=1; -/* remove the parm since it would otherwise be logged by kern */ - goto nocopy; } else if (strncmp(data, ro, 2) == 0) { *filesys_flags |= MS_RDONLY; } else if (strncmp(data, rw, 2) == 0) {
svn commit: samba r22982 - in branches/SAMBA_3_0/source/client: .
Author: sfrench Date: 2007-05-17 22:40:48 + (Thu, 17 May 2007) New Revision: 22982 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22982 Log: Do not prompt for password on sec=none for mount.cifs (and allow guest option to pass to kernel code so it can know when to retry) Modified: branches/SAMBA_3_0/source/client/mount.cifs.c Changeset: Modified: branches/SAMBA_3_0/source/client/mount.cifs.c === --- branches/SAMBA_3_0/source/client/mount.cifs.c 2007-05-17 22:36:08 UTC (rev 22981) +++ branches/SAMBA_3_0/source/client/mount.cifs.c 2007-05-17 22:40:48 UTC (rev 22982) @@ -419,6 +419,11 @@ printf(password too long\n); return 1; } + } else if (strncmp(data, sec, 3) == 0) { + if (value) { + if (!strcmp(value, none)) + got_password = 1; + } } else if (strncmp(data, ip, 2) == 0) { if (!value || !*value) { printf(target ip address argument missing); @@ -567,8 +572,6 @@ *filesys_flags = ~MS_NOEXEC; } else if (strncmp(data, guest, 5) == 0) { got_password=1; -/* remove the parm since it would otherwise be logged by kern */ - goto nocopy; } else if (strncmp(data, ro, 2) == 0) { *filesys_flags |= MS_RDONLY; } else if (strncmp(data, rw, 2) == 0) {
Build status as of Fri May 18 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-05-17 00:01:20.0 + +++ /home/build/master/cache/broken_results.txt 2007-05-18 00:01:24.0 + @@ -1,25 +1,25 @@ -Build status as of Thu May 17 00:00:01 2007 +Build status as of Fri May 18 00:00:02 2007 Build counts: Tree Total Broken Panic SOC 0 0 0 build_farm 0 0 0 -ccache 35 6 0 +ccache 36 6 0 ctdb 0 0 0 distcc 3 0 0 -ldb 34 5 0 +ldb 35 6 0 libreplace 33 10 0 -lorikeet-heimdal 29 14 0 -pidl 18 3 0 -ppp 14 0 0 +lorikeet-heimdal 30 14 0 +pidl 19 4 0 +ppp 15 0 0 python 0 0 0 -rsync35 15 0 +rsync36 16 0 samba0 0 0 samba-docs 0 0 0 -samba-gtk2 2 0 -samba4 35 23 6 -samba_3_040 18 0 -smb-build31 30 0 -talloc 35 1 0 -tdb 34 3 0 +samba-gtk3 3 0 +samba4 32 20 6 +samba_3_036 15 0 +smb-build32 31 0 +talloc 36 1 0 +tdb 35 3 0
Rev 316: merge from samba4 in http://samba.org/~tridge/ctdb
revno: 316 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Fri 2007-05-18 08:33:10 +1000 message: merge from samba4 modified: lib/events/events_aio.cevents_aio.c-20070501213746-4fxluwiq4rcxib8p-1 lib/events/events_epoll.c events_epoll.c-20070501213746-4fxluwiq4rcxib8p-2 lib/events/events_standard.c events_standard.c-20061117234101-o3qt14umlg9en8z0-30 === modified file 'lib/events/events_aio.c' --- a/lib/events/events_aio.c 2007-05-17 07:54:02 + +++ b/lib/events/events_aio.c 2007-05-17 22:33:10 + @@ -33,6 +33,7 @@ #include includes.h #include system/filesys.h +#include system/network.h #include lib/util/dlinklist.h #include lib/events/events.h #include lib/events/events_internal.h === modified file 'lib/events/events_epoll.c' --- a/lib/events/events_epoll.c 2007-05-17 07:54:02 + +++ b/lib/events/events_epoll.c 2007-05-17 22:33:10 + @@ -23,6 +23,7 @@ #include includes.h #include system/filesys.h +#include system/network.h #include lib/util/dlinklist.h #include lib/events/events.h #include lib/events/events_internal.h === modified file 'lib/events/events_standard.c' --- a/lib/events/events_standard.c 2007-05-17 07:54:02 + +++ b/lib/events/events_standard.c 2007-05-17 22:33:10 + @@ -30,6 +30,7 @@ #include includes.h #include system/filesys.h +#include system/network.h #include system/select.h /* needed for HAVE_EVENTS_EPOLL */ #include lib/util/dlinklist.h #include lib/events/events.h @@ -329,6 +330,7 @@ #define epoll_del_event(std_ev,fde) #define epoll_change_event(std_ev,fde) #define epoll_event_loop(std_ev,tvalp) (-1) +#define epoll_check_reopen(std_ev) #endif /*
svn commit: samba r22983 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: abartlet Date: 2007-05-18 01:15:50 + (Fri, 18 May 2007) New Revision: 22983 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22983 Log: This should ensure that torture_create_testuser() can be called, without needing to change the user's password afterwoulds. (Accounts were being created with 'must change at next login' set). Andrew Bartlett Modified: branches/SAMBA_4_0/source/torture/rpc/testjoin.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/testjoin.c === --- branches/SAMBA_4_0/source/torture/rpc/testjoin.c2007-05-17 22:40:48 UTC (rev 22982) +++ branches/SAMBA_4_0/source/torture/rpc/testjoin.c2007-05-18 01:15:50 UTC (rev 22983) @@ -261,7 +261,7 @@ s.in.info = u; s.in.level = 21; - u.info21.acct_flags = acct_type; + u.info21.acct_flags = acct_type | ACB_PWNOEXP; u.info21.fields_present = SAMR_FIELD_ACCT_FLAGS | SAMR_FIELD_DESCRIPTION | SAMR_FIELD_COMMENT | SAMR_FIELD_FULL_NAME; u.info21.comment.string = talloc_asprintf(join,
svn commit: samba r22984 - in branches/SAMBA_4_0/source/setup: .
Author: tridge Date: 2007-05-18 01:22:27 + (Fri, 18 May 2007) New Revision: 22984 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22984 Log: not everyone uses tridgell.net (fortunately) Modified: branches/SAMBA_4_0/source/setup/provision.ldif Changeset: Modified: branches/SAMBA_4_0/source/setup/provision.ldif === --- branches/SAMBA_4_0/source/setup/provision.ldif 2007-05-18 01:15:50 UTC (rev 22983) +++ branches/SAMBA_4_0/source/setup/provision.ldif 2007-05-18 01:22:27 UTC (rev 22984) @@ -95,7 +95,7 @@ objectCategory: CN=Builtin-Domain,${SCHEMADN} isCriticalSystemObject: TRUE -dn: CN={${POLICYGUID}},CN=Policies,CN=System,DC=bludom,DC=tridgell,DC=net +dn: CN={${POLICYGUID}},CN=Policies,CN=System,${DOMAINDN} objectClass: top objectClass: container objectClass: groupPolicyContainer
svn commit: samba r22985 - in branches/SAMBA_4_0/source/lib/events: .
Author: tridge Date: 2007-05-18 01:23:35 + (Fri, 18 May 2007) New Revision: 22985 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22985 Log: don't do checkins late at night thanks to Volker for spotting this! Modified: branches/SAMBA_4_0/source/lib/events/events_standard.c Changeset: Modified: branches/SAMBA_4_0/source/lib/events/events_standard.c === --- branches/SAMBA_4_0/source/lib/events/events_standard.c 2007-05-18 01:22:27 UTC (rev 22984) +++ branches/SAMBA_4_0/source/lib/events/events_standard.c 2007-05-18 01:23:35 UTC (rev 22985) @@ -72,9 +72,7 @@ */ static void epoll_fallback_to_select(struct std_event_context *std_ev, const char *reason) { - const char *cmd = talloc_asprintf(std_ev, xterm -e gdb --pid %u, getpid()); DEBUG(0,(%s (%s) - falling back to select()\n, reason, strerror(errno))); - system(cmd); close(std_ev-epoll_fd); std_ev-epoll_fd = -1; talloc_set_destructor(std_ev, NULL);
Rev 317: merge from samba4 in http://samba.org/~tridge/ctdb
revno: 317 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Fri 2007-05-18 11:24:45 +1000 message: merge from samba4 modified: lib/events/events_standard.c events_standard.c-20061117234101-o3qt14umlg9en8z0-30 === modified file 'lib/events/events_standard.c' --- a/lib/events/events_standard.c 2007-05-17 22:33:10 + +++ b/lib/events/events_standard.c 2007-05-18 01:24:45 + @@ -72,9 +72,7 @@ */ static void epoll_fallback_to_select(struct std_event_context *std_ev, const char *reason) { - const char *cmd = talloc_asprintf(std_ev, xterm -e gdb --pid %u, getpid()); DEBUG(0,(%s (%s) - falling back to select()\n, reason, strerror(errno))); - system(cmd); close(std_ev-epoll_fd); std_ev-epoll_fd = -1; talloc_set_destructor(std_ev, NULL);
svn commit: samba r22986 - in branches/SAMBA_4_0/source/libcli/util: .
Author: sahlberg Date: 2007-05-18 05:21:25 + (Fri, 18 May 2007) New Revision: 22986 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22986 Log: error 2312 is returned when NetSessDel() fails because a matching session (username/clientname) could not be found Modified: branches/SAMBA_4_0/source/libcli/util/doserr.h Changeset: Modified: branches/SAMBA_4_0/source/libcli/util/doserr.h === --- branches/SAMBA_4_0/source/libcli/util/doserr.h 2007-05-18 01:23:35 UTC (rev 22985) +++ branches/SAMBA_4_0/source/libcli/util/doserr.h 2007-05-18 05:21:25 UTC (rev 22986) @@ -211,6 +211,7 @@ #define WERR_BUF_TOO_SMALL W_ERROR(2123) #define WERR_JOB_NOT_FOUND W_ERROR(2151) #define WERR_DEST_NOT_FOUND W_ERROR(2152) +#define WERR_SESSION_NOT_FOUND W_ERROR(2312) #define WERR_FID_NOT_FOUND W_ERROR(2314) #define WERR_NOT_LOCAL_DOMAIN W_ERROR(2320) #define WERR_DEVICE_NOT_AVAILABLE W_ERROR(4319)
Re: svn commit: samba r22958 - in branches/SAMBA_4_0/source/libcli/util: .
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] schrieb: Author: sahlberg Date: 2007-05-17 01:17:43 + (Thu, 17 May 2007) New Revision: 22958 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22958 Log: For SRVSVC/NetFileClose only Administrator is allowed to close open files. If a normal user tries to close a file that exists, even that users own files the server responds with this error on w2k if the file does not exist, the server instead responds with WERR_BADFILE Hi Ronnie, can you also add this to libcli/util/doserr.c so that win_errstr() displays it... met -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGTTWem70gjA5TCD8RAr70AJ9SMPBEZ8VJjUtvirBQgBuClLyW5QCfZxeO d65LF0dsYfHNcmT64w1f7Hw= =1qfW -END PGP SIGNATURE-
svn commit: samba r22987 - in branches/SAMBA_4_0/source/auth/kerberos: .
Author: abartlet Date: 2007-05-18 05:47:33 + (Fri, 18 May 2007) New Revision: 22987 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22987 Log: Clarify how the events are handled in the kerberos code, and standardise with the rest of the code. Andrew Bartlett Modified: branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c Changeset: Modified: branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c === --- branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c 2007-05-18 05:21:25 UTC (rev 22986) +++ branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c 2007-05-18 05:47:33 UTC (rev 22987) @@ -176,21 +176,27 @@ struct smb_krb5_socket *smb_krb5 = talloc_get_type(private, struct smb_krb5_socket); switch (smb_krb5-hi-proto) { case KRB5_KRBHST_UDP: - if (flags EVENT_FD_WRITE) { - smb_krb5_socket_send(smb_krb5); - } if (flags EVENT_FD_READ) { smb_krb5_socket_recv(smb_krb5); + return; } - break; + if (flags EVENT_FD_WRITE) { + smb_krb5_socket_send(smb_krb5); + return; + } + /* not reached */ + return; case KRB5_KRBHST_TCP: if (flags EVENT_FD_READ) { packet_recv(smb_krb5-packet); + return; } if (flags EVENT_FD_WRITE) { packet_queue_run(smb_krb5-packet); + return; } - break; + /* not reached */ + return; case KRB5_KRBHST_HTTP: /* can't happen */ break; @@ -277,9 +283,14 @@ } talloc_free(remote_addr); + /* Setup the FDE, start listening for read events +* from the start (otherwise we may miss a socket +* drop) and mark as AUTOCLOSE along with the fde */ + + /* Ths is equivilant to EVENT_FD_READABLE(smb_krb5-fde) */ smb_krb5-fde = event_add_fd(ev, smb_krb5-sock, socket_get_fd(smb_krb5-sock), -EVENT_FD_AUTOCLOSE, +EVENT_FD_READ|EVENT_FD_AUTOCLOSE, smb_krb5_socket_handler, smb_krb5); /* its now the job of the event layer to close the socket */ socket_set_flags(smb_krb5-sock, SOCKET_FLAG_NOCLOSE); @@ -316,7 +327,6 @@ RSIVAL(smb_krb5-request.data, 0, send_blob.length); memcpy(smb_krb5-request.data+4, send_blob.data, send_blob.length); packet_send(smb_krb5-packet, smb_krb5-request); - EVENT_FD_READABLE(smb_krb5-fde); break; case KRB5_KRBHST_HTTP: talloc_free(smb_krb5);