#include <errno.h>
-static int sys_waitpid(pid_t pid,int *status,int options)
-{
-#ifdef HAVE_WAITPID
- return waitpid(pid,status,options);
-#else /* USE_WAITPID */
- return wait4(pid, status, options, NULL);
-#endif /* USE_WAITPID */
-}
-
#define DATA "conftest.fcntl"
#ifndef SEEK_SET
#include <errno.h>
-static int sys_waitpid(pid_t pid,int *status,int options)
-{
-#ifdef HAVE_WAITPID
- return waitpid(pid,status,options);
-#else /* USE_WAITPID */
- return wait4(pid, status, options, NULL);
-#endif /* USE_WAITPID */
-}
-
#define DATA "conftest.fcntl64"
/* lock a byte range in a open file */
*/
#include "includes.h"
-#include "gtk-smb.h"
+#include "gtk/common/select.h"
+#include "gtk/common/gtk-smb.h"
void gtk_show_werror(GtkWidget *win, WERROR err)
{
#endif
+/* subsystem prototypes */
+GtkWidget *create_gtk_samba_about_dialog (const char *appname);
+void gtk_show_ntstatus(GtkWidget *win, NTSTATUS status);
+GtkWidget *gtk_rpc_binding_dialog_new (BOOL nocredentials, struct sam_pipe *sam_pipe);
+GType gtk_rpc_binding_dialog_get_type (void);
+struct dcerpc_binding *gtk_rpc_binding_dialog_get_binding(GtkRpcBindingDialog *d, TALLOC_CTX *mem_ctx);
+GtkWidget *gtk_select_host_dialog_new (struct sam_pipe *sam_pipe, BOOL nocredentials);
+const char *gtk_select_host_dialog_get_host (GtkSelectHostDialog *d);
+GType gtk_select_host_dialog_get_type (void);
+void gtk_show_werror(GtkWidget *win, WERROR err);
+const char *gtk_rpc_binding_dialog_get_binding_string(GtkRpcBindingDialog *d, TALLOC_CTX *mem_ctx);
+const char *gtk_rpc_binding_dialog_get_username(GtkRpcBindingDialog *d);
+const char *gtk_rpc_binding_dialog_get_password(GtkRpcBindingDialog *d);
+const char *gtk_rpc_binding_dialog_get_host(GtkRpcBindingDialog *d);
+GtkWidget *gtk_select_domain_dialog_new (struct dcerpc_pipe *sam_pipe);
+GType gtk_select_domain_dialog_get_type (void);
+struct policy_handle gtk_select_domain_dialog_get_handle(GtkSelectDomainDialog *d);
+
+
#endif
#include "includes.h"
#include "librpc/gen_ndr/ndr_samr.h"
-#include "gtk-smb.h"
+#include "gtk/common/select.h"
+#include "gtk/common/gtk-smb.h"
/* GtkSelectDomainDialog */
AC_DEFINE(HAVE_GTK, 1, [Whether GTK+ is available])
fi
+SMB_SUBSYSTEM_NOPROTO(GTKSMB)
SMB_SUBSYSTEM_MK(GTKSMB,gtk/config.mk)
SMB_BINARY_MK(gregedit,gtk/config.mk)
SMB_BINARY_MK(gwcrontab,gtk/config.mk)
SMB_BINARY_MK(gwsam,gtk/config.mk)
SMB_BINARY_MK(gepdump,gtk/config.mk)
+
#include "includes.h"
#include "librpc/gen_ndr/ndr_epmapper.h"
+#include "gtk/common/select.h"
#include "gtk/common/gtk-smb.h"
/*
gtk_tree_view_append_column(GTK_TREE_VIEW(tree_eps), curcol);
- store_eps = gtk_tree_store_new(2, GTK_TYPE_STRING, GTK_TYPE_STRING);
+ store_eps = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_STRING);
gtk_tree_view_set_model(GTK_TREE_VIEW(tree_eps), GTK_TREE_MODEL(store_eps));
g_object_unref(store_eps);
*/
#include "includes.h"
+#include "gtk/common/select.h"
#include "gtk/common/gtk-smb.h"
GtkWidget *openfilewin;
#include "includes.h"
#include "librpc/gen_ndr/ndr_atsvc.h"
+#include "gtk/common/select.h"
#include "gtk/common/gtk-smb.h"
struct dcerpc_pipe *at_pipe = NULL;
}
-void
+static void
on_connect_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
#include "includes.h"
#include "librpc/gen_ndr/ndr_samr.h"
+#include "gtk/common/select.h"
#include "gtk/common/gtk-smb.h"
struct policy_handle sam_handle;
}
-void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data)
+static void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data)
{
connect_sam();
}
-void on_disconnect_activate (GtkMenuItem *menuitem, gpointer user_data)
+static void on_disconnect_activate (GtkMenuItem *menuitem, gpointer user_data)
{
gtk_widget_set_sensitive (mnu_disconnect, FALSE);
gtk_window_set_title (GTK_WINDOW (mainwin), "User Manager");
*/
#include "includes.h"
+#include "gtk/common/select.h"
#include "gtk/common/gtk-smb.h"
#include <signal.h>
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
#include "registry.h"
#include "rap.h"
#include "ldap_server/ldap_server.h"
-#include "gtk/common/gtk-smb.h"
-#include "gtk/common/select.h"
#include "libnet/libnet.h"
#include "utils/net/net.h"
--- /dev/null
+/*
+ Unix SMB/CIFS implementation.
+
+ waitpid system include wrappers
+
+ Copyright (C) Andrew Tridgell 2004
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
*/
#include "includes.h"
+#include "system/wait.h"
void replace_dummy(void);
void replace_dummy(void) {}
return i;
}
#endif
+
+int sys_waitpid(pid_t pid,int *status,int options)
+{
+#ifdef HAVE_WAITPID
+ return waitpid(pid,status,options);
+#else /* USE_WAITPID */
+ return wait4(pid, status, options, NULL);
+#endif /* USE_WAITPID */
+}
static void sig_cld(int signum)
{
- while (waitpid((pid_t)-1,(int *)NULL, WNOHANG) > 0)
+ while (sys_waitpid((pid_t)-1,(int *)NULL, WNOHANG) > 0)
;
/*
#include "includes.h"
#include "system/network.h"
+#include "system/wait.h"
/*
The idea is that this file will eventually have wrappers around all
in2.s_addr = in.s_addr;
return in2;
}
+
if (getpid() == pids[0]) {
for (i=0;i<NPROC-1;i++) {
int status;
- if (waitpid(pids[i+1], &status, 0) != pids[i+1]) {
+ if (sys_waitpid(pids[i+1], &status, 0) != pids[i+1]) {
printf("failed to wait for %d\n",
(int)pids[i+1]);
exit(1);
for (i=0;i<torture_nprocs;i++) {
int ret;
- while ((ret=waitpid(0, &status, 0)) == -1 && errno == EINTR) /* noop */ ;
+ while ((ret=sys_waitpid(0, &status, 0)) == -1 && errno == EINTR) /* noop */ ;
if (ret == -1 || WEXITSTATUS(status) != 0) {
*result = False;
}