[Pkg-samba-maint] r2869 - in trunk/samba-gtk: . common debian tools
jelmer at alioth.debian.org
jelmer at alioth.debian.org
Fri Jun 19 15:42:48 UTC 2009
Author: jelmer
Date: 2009-06-19 15:42:46 +0000 (Fri, 19 Jun 2009)
New Revision: 2869
Modified:
trunk/samba-gtk/Makefile
trunk/samba-gtk/Makefile.settings.in
trunk/samba-gtk/common/gtk-smb.c
trunk/samba-gtk/common/gtk-smb.h
trunk/samba-gtk/common/gtk_events.c
trunk/samba-gtk/common/select.c
trunk/samba-gtk/configure.ac
trunk/samba-gtk/debian/changelog
trunk/samba-gtk/gregedit
trunk/samba-gtk/tools/gwcrontab.c
trunk/samba-gtk/tools/gwsam.c
trunk/samba-gtk/tools/gwsvcctl.c
Log:
new snapshot.
Modified: trunk/samba-gtk/Makefile
===================================================================
--- trunk/samba-gtk/Makefile 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/Makefile 2009-06-19 15:42:46 UTC (rev 2869)
@@ -4,7 +4,7 @@
SCRIPTS = gtkldb gepdump gregedit
gwcrontab_LIBS = $(DCERPC_ATSVC_LIBS)
CFLAGS = $(GTK_CFLAGS) $(TALLOC_CFLAGS) $(DCERPC_CFLAGS) $(GENSEC_CFLAGS) -I. -Wall
-LIBS = $(GTK_LIBS) $(TALLOC_LIBS) $(DCERPC_LIBS) $(GENSEC_LIBS) $(DCERPC_SAMR_LIBS)
+LIBS = $(GTK_LIBS) $(TALLOC_LIBS) $(DCERPC_LIBS) $(GENSEC_LIBS) $(DCERPC_SAMR_LIBS) $(TEVENT_LIBS)
# Should be determined by configure...
SHLIBEXT = so
Modified: trunk/samba-gtk/Makefile.settings.in
===================================================================
--- trunk/samba-gtk/Makefile.settings.in 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/Makefile.settings.in 2009-06-19 15:42:46 UTC (rev 2869)
@@ -22,6 +22,9 @@
REGISTRY_CFLAGS = @REGISTRY_CFLAGS@
REGISTRY_LIBS = @REGISTRY_LIBS@
+TEVENT_CFLAGS = @TEVENT_CFLAGS@
+TEVENT_LIBS = @TEVENT_LIBS@
+
XSLTPROC = @XSLTPROC@
prefix = @prefix@
Modified: trunk/samba-gtk/common/gtk-smb.c
===================================================================
--- trunk/samba-gtk/common/gtk-smb.c 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/common/gtk-smb.c 2009-06-19 15:42:46 UTC (rev 2869)
@@ -19,7 +19,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
Modified: trunk/samba-gtk/common/gtk-smb.h
===================================================================
--- trunk/samba-gtk/common/gtk-smb.h 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/common/gtk-smb.h 2009-06-19 15:42:46 UTC (rev 2869)
@@ -56,6 +56,10 @@
GtkDialogClass parent_class;
};
+#ifndef GTK_CHECK_CAST
+#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST
+#endif
+
#define SAMBAGTK_TYPE_RPC_BINDING_DIALOG gtk_rpc_binding_dialog_get_type()
#define SAMBAGTK_RPC_BINDING_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, gtk_rpc_binding_dialog_get_type (), GtkRpcBindingDialog)
@@ -73,8 +77,8 @@
const char *gtk_rpc_binding_dialog_get_host(GtkRpcBindingDialog *d);
int gtk_event_loop(void);
-struct event_context;
-struct event_context *gtk_event_context(void);
+struct tevent_context;
+struct tevent_context *gtk_event_context(void);
struct cli_credentials;
void cli_credentials_set_gtk_callbacks(struct cli_credentials *creds);
Modified: trunk/samba-gtk/common/gtk_events.c
===================================================================
--- trunk/samba-gtk/common/gtk_events.c 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/common/gtk_events.c 2009-06-19 15:42:46 UTC (rev 2869)
@@ -255,7 +255,7 @@
add a timed event
return NULL on failure (memory allocation error)
*/
-static struct tevent_timer *gtk_event_add_timed(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
+static struct tevent_timer *gtk_event_add_timer(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
struct timeval next_event,
tevent_timer_handler_t handler,
void *private_data,
@@ -296,7 +296,9 @@
/*
do a single event loop
*/
-static int gtk_event_loop_once(struct tevent_context *ev)
+
+static int gtk_event_loop_once(struct event_context *ev,
+ const char *location)
{
/*
* gtk_main_iteration ()
@@ -324,7 +326,9 @@
/*
return with 0
*/
-static int gtk_event_loop_wait(struct tevent_context *ev)
+
+static int gtk_event_loop_wait(struct event_context *ev,
+ const char *location)
{
/*
* gtk_main ()
@@ -345,7 +349,7 @@
.add_fd = gtk_event_add_fd,
.get_fd_flags = gtk_event_get_fd_flags,
.set_fd_flags = gtk_event_set_fd_flags,
- .add_timer = gtk_event_add_timed,
+ .add_timer = gtk_event_add_timer,
.loop_once = gtk_event_loop_once,
.loop_wait = gtk_event_loop_wait,
};
Modified: trunk/samba-gtk/common/select.c
===================================================================
--- trunk/samba-gtk/common/select.c 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/common/select.c 2009-06-19 15:42:46 UTC (rev 2869)
@@ -19,7 +19,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
@@ -131,10 +133,12 @@
GtkSelectDomainDialog *d = g_object_new(gtk_select_domain_dialog_get_type (), NULL);
NTSTATUS status;
struct samr_EnumDomains r;
+ struct samr_SamArray *sam;
struct samr_Connect cr;
struct samr_Close dr;
struct policy_handle handle;
uint32_t resume_handle = 0;
+ uint32_t num_entries;
int i;
TALLOC_CTX *mem_ctx = talloc_init("gtk_select_domain_dialog_new");
@@ -155,15 +159,17 @@
r.in.resume_handle = &resume_handle;
r.in.buf_size = (uint32_t)-1;
r.out.resume_handle = &resume_handle;
+ r.out.sam = &sam;
+ r.out.num_entries = &num_entries;
status = dcerpc_samr_EnumDomains(sam_pipe, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(NULL, "Enumerating domains", status);
- } else if (r.out.sam != NULL) {
- for (i=0;i<(*r.out.sam)->count;i++) {
+ } else if (r.out.sam) {
+ for (i=0;i<sam->count;i++) {
GtkTreeIter iter;
gtk_list_store_append(d->store_domains, &iter);
- gtk_list_store_set (d->store_domains, &iter, 0, (*r.out.sam)->entries[i].name.string, -1);
+ gtk_list_store_set (d->store_domains, &iter, 0, sam->entries[i].name.string, -1);
}
}
Modified: trunk/samba-gtk/configure.ac
===================================================================
--- trunk/samba-gtk/configure.ac 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/configure.ac 2009-06-19 15:42:46 UTC (rev 2869)
@@ -7,6 +7,7 @@
PKG_CHECK_MODULES(GTK, [glib-2.0 gtk+-2.0 >= 2.4])
PKG_CHECK_MODULES(TALLOC, [talloc])
+PKG_CHECK_MODULES(TEVENT, [tevent])
PKG_CHECK_MODULES(DCERPC, [dcerpc])
PKG_CHECK_MODULES(GENSEC, [gensec])
PKG_CHECK_MODULES(DCERPC_SAMR, [dcerpc_samr])
Modified: trunk/samba-gtk/debian/changelog
===================================================================
--- trunk/samba-gtk/debian/changelog 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/debian/changelog 2009-06-19 15:42:46 UTC (rev 2869)
@@ -1,4 +1,4 @@
-samba-gtk (0.0.1~bzr19-1) experimental; urgency=low
+samba-gtk (0.0.1~bzr59-1) experimental; urgency=low
* Initial release. (Closes: #413822)
Modified: trunk/samba-gtk/gregedit
===================================================================
--- trunk/samba-gtk/gregedit 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/gregedit 2009-06-19 15:42:46 UTC (rev 2869)
@@ -25,6 +25,7 @@
from samba import registry
class FindDialog(gtk.Dialog):
+
def _create(self):
self.set_title("Find Key or Value")
self.set_resizable(False)
Modified: trunk/samba-gtk/tools/gwcrontab.c
===================================================================
--- trunk/samba-gtk/tools/gwcrontab.c 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/tools/gwcrontab.c 2009-06-19 15:42:46 UTC (rev 2869)
@@ -19,7 +19,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <stdbool.h>
#include <gen_ndr/ndr_atsvc_c.h>
#include "common/gtk-smb.h"
Modified: trunk/samba-gtk/tools/gwsam.c
===================================================================
--- trunk/samba-gtk/tools/gwsam.c 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/tools/gwsam.c 2009-06-19 15:42:46 UTC (rev 2869)
@@ -19,7 +19,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <stdbool.h>
#include <gen_ndr/ndr_samr_c.h>
#include "common/select.h"
@@ -48,7 +50,9 @@
{
NTSTATUS status;
struct samr_EnumDomainUsers r;
+ struct samr_SamArray *sam;
uint32_t resume_handle=0;
+ uint32_t num_entries;
int i;
TALLOC_CTX *mem_ctx;
@@ -62,6 +66,8 @@
r.in.acct_flags = 0;
r.in.max_size = (uint32_t)100;
r.out.resume_handle = &resume_handle;
+ r.out.sam = &sam;
+ r.out.num_entries = &num_entries;
status = dcerpc_samr_EnumDomainUsers(sam_pipe, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -70,22 +76,22 @@
return;
}
- if (!*r.out.sam || (*r.out.sam)->count == 0) {
+ if (!sam || sam->count == 0) {
talloc_free(mem_ctx);
return;
}
- for (i=0;i<(*r.out.sam)->count;i++) {
+ for (i=0;i<sam->count;i++) {
GtkTreeIter iter;
gtk_list_store_append(store_users, &iter);
gtk_list_store_set (store_users, &iter,
- 0, (*r.out.sam)->entries[i].name.string,
- 1, (*r.out.sam)->entries[i].name.string,
+ 0, sam->entries[i].name.string,
+ 1, sam->entries[i].name.string,
2, 0, -1);
/* FIXME: Query user info */
- // if (!test_OpenUser(sam_pipe, mem_ctx, &sam_handle, r.out.sam->entries[i].idx)) {
+ // if (!test_OpenUser(sam_pipe, mem_ctx, &sam_handle, sam->entries[i].idx)) {
// ret = false;
// }
}
Modified: trunk/samba-gtk/tools/gwsvcctl.c
===================================================================
--- trunk/samba-gtk/tools/gwsvcctl.c 2009-06-19 15:11:48 UTC (rev 2868)
+++ trunk/samba-gtk/tools/gwsvcctl.c 2009-06-19 15:42:46 UTC (rev 2869)
@@ -19,7 +19,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <stdbool.h>
#include <gen_ndr/ndr_svcctl_c.h>
#include "common/gtk-smb.h"
More information about the Pkg-samba-maint
mailing list