diff options
author | Amarnath Valluri <amarnath.valluri@linux.intel.com> | 2013-08-22 15:27:24 +0300 |
---|---|---|
committer | Amarnath Valluri <amarnath.valluri@linux.intel.com> | 2013-08-22 16:59:26 +0300 |
commit | 1fd618eee96db111f3eea0806eccb8cf2ad91106 (patch) | |
tree | a5536e388228a0a1e51ffe8a49e0fc007d0074da /src/daemon | |
parent | e9a79beef3cd891ac16bae05a28c91c613df6442 (diff) | |
download | gsignond-1fd618eee96db111f3eea0806eccb8cf2ad91106.tar.gz gsignond-1fd618eee96db111f3eea0806eccb8cf2ad91106.tar.bz2 gsignond-1fd618eee96db111f3eea0806eccb8cf2ad91106.zip |
Release 0.0.3submit/tizen_ivi_stable/20131116.010012submit/tizen_ivi_milestone/20131113.054031submit/tizen_ivi_genivi/20140131.070607submit/tizen_ivi_generic/20140131.065427submit/tizen/20130823.063748ivi_oct_m2accepted/tizen_ivi_stable/20131116.012237accepted/tizen/ivi/genivi/20140131.070559tizen_ivi_geniviaccepted/tizen/ivi/stableaccepted/tizen/ivi/genivi
Diffstat (limited to 'src/daemon')
42 files changed, 1070 insertions, 808 deletions
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index 9d45622..2feb112 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am @@ -11,15 +11,15 @@ BUILT_SOURCES = \ gsignond-identity-enum-types.h: $(top_srcdir)/src/common/gsignond-enum.h.template gsignond-identity.h $(GLIB_MKENUMS) --template $(top_srcdir)/src/common/gsignond-enum.h.template \ --fhead "#ifndef GSIGNOND_IDENTITY_ENUM_TYPES_H_\n#define GSIGNOND_IDENTITY_ENUM_TYPES_H_\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS" \ - --identifier-prefix gsignond \ + --identifier-prefix GSignond \ --ftail "\nG_END_DECLS\n\n#endif\n" \ - gsignond-identity.h > $@ + $(srcdir)/gsignond-identity.h > $@ gsignond-identity-enum-types.c: $(top_srcdir)/src/common/gsignond-enum.c.template gsignond-identity.h $(GLIB_MKENUMS) --template $(top_srcdir)/src/common/gsignond-enum.c.template \ --fhead "#include \"gsignond-identity-enum-types.h\"\n" \ - --identifier-prefix gsignond \ - gsignond-identity.h > $@ + --identifier-prefix GSignond \ + $(srcdir)/gsignond-identity.h > $@ gsignond_includedir = $(includedir)/gsignond gsignond_pubhdr = ../../include/gsignond @@ -33,14 +33,12 @@ gsignond_include_HEADERS = \ $(gsignond_pubhdr)/gsignond-dictionary.h \ $(gsignond_pubhdr)/gsignond-error.h \ $(gsignond_pubhdr)/gsignond-extension-interface.h \ - $(gsignond_pubhdr)/gsignond-identity-info.h \ $(gsignond_pubhdr)/gsignond-log.h \ $(gsignond_pubhdr)/gsignond-plugin-interface.h \ $(gsignond_pubhdr)/gsignond-secret-storage.h \ $(gsignond_pubhdr)/gsignond-security-context.h \ $(gsignond_pubhdr)/gsignond-session-data.h \ $(gsignond_pubhdr)/gsignond-signonui-data.h \ - $(gsignond_pubhdr)/gsignond-signonui.h \ $(gsignond_pubhdr)/gsignond-storage-manager.h \ $(gsignond_pubhdr)/gsignond-utils.h @@ -58,6 +56,10 @@ gsignond_SOURCES = \ $(BUILT_SOURCES) \ $(NULL) +gsignond_CPPFLAGS = \ + -I. \ + $(NULL) + gsignond_CFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/include/ \ @@ -73,3 +75,13 @@ gsignond_LDADD = \ $(GSIGNOND_LIBS) \ $(NULL) +if SET_PERMISSIONS +install-exec-hook: + chown root $(DESTDIR)$(bindir)/gsignond || true + chmod u+s $(DESTDIR)$(bindir)/gsignond || true +endif + +CLEANFILES = \ + gsignond-identity-enum-types.h \ + gsignond-identity-enum-types.c \ + $(NULL) diff --git a/src/daemon/Makefile.in b/src/daemon/Makefile.in index 1076c86..36c7c95 100644 --- a/src/daemon/Makefile.in +++ b/src/daemon/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -41,9 +58,10 @@ DIST_COMMON = $(gsignond_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -111,6 +129,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -330,14 +353,12 @@ gsignond_include_HEADERS = \ $(gsignond_pubhdr)/gsignond-dictionary.h \ $(gsignond_pubhdr)/gsignond-error.h \ $(gsignond_pubhdr)/gsignond-extension-interface.h \ - $(gsignond_pubhdr)/gsignond-identity-info.h \ $(gsignond_pubhdr)/gsignond-log.h \ $(gsignond_pubhdr)/gsignond-plugin-interface.h \ $(gsignond_pubhdr)/gsignond-secret-storage.h \ $(gsignond_pubhdr)/gsignond-security-context.h \ $(gsignond_pubhdr)/gsignond-session-data.h \ $(gsignond_pubhdr)/gsignond-signonui-data.h \ - $(gsignond_pubhdr)/gsignond-signonui.h \ $(gsignond_pubhdr)/gsignond-storage-manager.h \ $(gsignond_pubhdr)/gsignond-utils.h @@ -355,6 +376,10 @@ gsignond_SOURCES = \ $(BUILT_SOURCES) \ $(NULL) +gsignond_CPPFLAGS = \ + -I. \ + $(NULL) + gsignond_CFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/include/ \ @@ -370,6 +395,11 @@ gsignond_LDADD = \ $(GSIGNOND_LIBS) \ $(NULL) +CLEANFILES = \ + gsignond-identity-enum-types.h \ + gsignond-identity-enum-types.c \ + $(NULL) + all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -407,8 +437,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -490,88 +523,88 @@ distclean-compile: @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< gsignond-main.o: main.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-main.o -MD -MP -MF $(DEPDIR)/gsignond-main.Tpo -c -o gsignond-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-main.o -MD -MP -MF $(DEPDIR)/gsignond-main.Tpo -c -o gsignond-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-main.Tpo $(DEPDIR)/gsignond-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='gsignond-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c gsignond-main.obj: main.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-main.obj -MD -MP -MF $(DEPDIR)/gsignond-main.Tpo -c -o gsignond-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-main.obj -MD -MP -MF $(DEPDIR)/gsignond-main.Tpo -c -o gsignond-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-main.Tpo $(DEPDIR)/gsignond-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='gsignond-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` gsignond-gsignond-auth-session.o: gsignond-auth-session.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-auth-session.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-auth-session.Tpo -c -o gsignond-gsignond-auth-session.o `test -f 'gsignond-auth-session.c' || echo '$(srcdir)/'`gsignond-auth-session.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-auth-session.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-auth-session.Tpo -c -o gsignond-gsignond-auth-session.o `test -f 'gsignond-auth-session.c' || echo '$(srcdir)/'`gsignond-auth-session.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-auth-session.Tpo $(DEPDIR)/gsignond-gsignond-auth-session.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-auth-session.c' object='gsignond-gsignond-auth-session.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-auth-session.o `test -f 'gsignond-auth-session.c' || echo '$(srcdir)/'`gsignond-auth-session.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-auth-session.o `test -f 'gsignond-auth-session.c' || echo '$(srcdir)/'`gsignond-auth-session.c gsignond-gsignond-auth-session.obj: gsignond-auth-session.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-auth-session.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-auth-session.Tpo -c -o gsignond-gsignond-auth-session.obj `if test -f 'gsignond-auth-session.c'; then $(CYGPATH_W) 'gsignond-auth-session.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-auth-session.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-auth-session.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-auth-session.Tpo -c -o gsignond-gsignond-auth-session.obj `if test -f 'gsignond-auth-session.c'; then $(CYGPATH_W) 'gsignond-auth-session.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-auth-session.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-auth-session.Tpo $(DEPDIR)/gsignond-gsignond-auth-session.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-auth-session.c' object='gsignond-gsignond-auth-session.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-auth-session.obj `if test -f 'gsignond-auth-session.c'; then $(CYGPATH_W) 'gsignond-auth-session.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-auth-session.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-auth-session.obj `if test -f 'gsignond-auth-session.c'; then $(CYGPATH_W) 'gsignond-auth-session.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-auth-session.c'; fi` gsignond-gsignond-daemon.o: gsignond-daemon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-daemon.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-daemon.Tpo -c -o gsignond-gsignond-daemon.o `test -f 'gsignond-daemon.c' || echo '$(srcdir)/'`gsignond-daemon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-daemon.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-daemon.Tpo -c -o gsignond-gsignond-daemon.o `test -f 'gsignond-daemon.c' || echo '$(srcdir)/'`gsignond-daemon.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-daemon.Tpo $(DEPDIR)/gsignond-gsignond-daemon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-daemon.c' object='gsignond-gsignond-daemon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-daemon.o `test -f 'gsignond-daemon.c' || echo '$(srcdir)/'`gsignond-daemon.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-daemon.o `test -f 'gsignond-daemon.c' || echo '$(srcdir)/'`gsignond-daemon.c gsignond-gsignond-daemon.obj: gsignond-daemon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-daemon.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-daemon.Tpo -c -o gsignond-gsignond-daemon.obj `if test -f 'gsignond-daemon.c'; then $(CYGPATH_W) 'gsignond-daemon.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-daemon.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-daemon.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-daemon.Tpo -c -o gsignond-gsignond-daemon.obj `if test -f 'gsignond-daemon.c'; then $(CYGPATH_W) 'gsignond-daemon.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-daemon.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-daemon.Tpo $(DEPDIR)/gsignond-gsignond-daemon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-daemon.c' object='gsignond-gsignond-daemon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-daemon.obj `if test -f 'gsignond-daemon.c'; then $(CYGPATH_W) 'gsignond-daemon.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-daemon.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-daemon.obj `if test -f 'gsignond-daemon.c'; then $(CYGPATH_W) 'gsignond-daemon.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-daemon.c'; fi` gsignond-gsignond-identity.o: gsignond-identity.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-identity.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-identity.Tpo -c -o gsignond-gsignond-identity.o `test -f 'gsignond-identity.c' || echo '$(srcdir)/'`gsignond-identity.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-identity.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-identity.Tpo -c -o gsignond-gsignond-identity.o `test -f 'gsignond-identity.c' || echo '$(srcdir)/'`gsignond-identity.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-identity.Tpo $(DEPDIR)/gsignond-gsignond-identity.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-identity.c' object='gsignond-gsignond-identity.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-identity.o `test -f 'gsignond-identity.c' || echo '$(srcdir)/'`gsignond-identity.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-identity.o `test -f 'gsignond-identity.c' || echo '$(srcdir)/'`gsignond-identity.c gsignond-gsignond-identity.obj: gsignond-identity.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-identity.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-identity.Tpo -c -o gsignond-gsignond-identity.obj `if test -f 'gsignond-identity.c'; then $(CYGPATH_W) 'gsignond-identity.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-identity.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-identity.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-identity.Tpo -c -o gsignond-gsignond-identity.obj `if test -f 'gsignond-identity.c'; then $(CYGPATH_W) 'gsignond-identity.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-identity.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-identity.Tpo $(DEPDIR)/gsignond-gsignond-identity.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-identity.c' object='gsignond-gsignond-identity.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-identity.obj `if test -f 'gsignond-identity.c'; then $(CYGPATH_W) 'gsignond-identity.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-identity.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-identity.obj `if test -f 'gsignond-identity.c'; then $(CYGPATH_W) 'gsignond-identity.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-identity.c'; fi` gsignond-gsignond-signonui-proxy.o: gsignond-signonui-proxy.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-signonui-proxy.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-signonui-proxy.Tpo -c -o gsignond-gsignond-signonui-proxy.o `test -f 'gsignond-signonui-proxy.c' || echo '$(srcdir)/'`gsignond-signonui-proxy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-signonui-proxy.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-signonui-proxy.Tpo -c -o gsignond-gsignond-signonui-proxy.o `test -f 'gsignond-signonui-proxy.c' || echo '$(srcdir)/'`gsignond-signonui-proxy.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-signonui-proxy.Tpo $(DEPDIR)/gsignond-gsignond-signonui-proxy.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-signonui-proxy.c' object='gsignond-gsignond-signonui-proxy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-signonui-proxy.o `test -f 'gsignond-signonui-proxy.c' || echo '$(srcdir)/'`gsignond-signonui-proxy.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-signonui-proxy.o `test -f 'gsignond-signonui-proxy.c' || echo '$(srcdir)/'`gsignond-signonui-proxy.c gsignond-gsignond-signonui-proxy.obj: gsignond-signonui-proxy.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-signonui-proxy.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-signonui-proxy.Tpo -c -o gsignond-gsignond-signonui-proxy.obj `if test -f 'gsignond-signonui-proxy.c'; then $(CYGPATH_W) 'gsignond-signonui-proxy.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-signonui-proxy.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-signonui-proxy.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-signonui-proxy.Tpo -c -o gsignond-gsignond-signonui-proxy.obj `if test -f 'gsignond-signonui-proxy.c'; then $(CYGPATH_W) 'gsignond-signonui-proxy.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-signonui-proxy.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-signonui-proxy.Tpo $(DEPDIR)/gsignond-gsignond-signonui-proxy.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-signonui-proxy.c' object='gsignond-gsignond-signonui-proxy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-signonui-proxy.obj `if test -f 'gsignond-signonui-proxy.c'; then $(CYGPATH_W) 'gsignond-signonui-proxy.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-signonui-proxy.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-signonui-proxy.obj `if test -f 'gsignond-signonui-proxy.c'; then $(CYGPATH_W) 'gsignond-signonui-proxy.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-signonui-proxy.c'; fi` gsignond-gsignond-identity-enum-types.o: gsignond-identity-enum-types.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-identity-enum-types.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-identity-enum-types.Tpo -c -o gsignond-gsignond-identity-enum-types.o `test -f 'gsignond-identity-enum-types.c' || echo '$(srcdir)/'`gsignond-identity-enum-types.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-identity-enum-types.o -MD -MP -MF $(DEPDIR)/gsignond-gsignond-identity-enum-types.Tpo -c -o gsignond-gsignond-identity-enum-types.o `test -f 'gsignond-identity-enum-types.c' || echo '$(srcdir)/'`gsignond-identity-enum-types.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-identity-enum-types.Tpo $(DEPDIR)/gsignond-gsignond-identity-enum-types.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-identity-enum-types.c' object='gsignond-gsignond-identity-enum-types.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-identity-enum-types.o `test -f 'gsignond-identity-enum-types.c' || echo '$(srcdir)/'`gsignond-identity-enum-types.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-identity-enum-types.o `test -f 'gsignond-identity-enum-types.c' || echo '$(srcdir)/'`gsignond-identity-enum-types.c gsignond-gsignond-identity-enum-types.obj: gsignond-identity-enum-types.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-identity-enum-types.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-identity-enum-types.Tpo -c -o gsignond-gsignond-identity-enum-types.obj `if test -f 'gsignond-identity-enum-types.c'; then $(CYGPATH_W) 'gsignond-identity-enum-types.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-identity-enum-types.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -MT gsignond-gsignond-identity-enum-types.obj -MD -MP -MF $(DEPDIR)/gsignond-gsignond-identity-enum-types.Tpo -c -o gsignond-gsignond-identity-enum-types.obj `if test -f 'gsignond-identity-enum-types.c'; then $(CYGPATH_W) 'gsignond-identity-enum-types.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-identity-enum-types.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsignond-gsignond-identity-enum-types.Tpo $(DEPDIR)/gsignond-gsignond-identity-enum-types.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-identity-enum-types.c' object='gsignond-gsignond-identity-enum-types.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-identity-enum-types.obj `if test -f 'gsignond-identity-enum-types.c'; then $(CYGPATH_W) 'gsignond-identity-enum-types.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-identity-enum-types.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gsignond_CPPFLAGS) $(CPPFLAGS) $(gsignond_CFLAGS) $(CFLAGS) -c -o gsignond-gsignond-identity-enum-types.obj `if test -f 'gsignond-identity-enum-types.c'; then $(CYGPATH_W) 'gsignond-identity-enum-types.c'; else $(CYGPATH_W) '$(srcdir)/gsignond-identity-enum-types.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -580,8 +613,11 @@ clean-libtool: -rm -rf .libs _libs install-gsignond_includeHEADERS: $(gsignond_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(gsignond_includedir)" || $(MKDIR_P) "$(DESTDIR)$(gsignond_includedir)" @list='$(gsignond_include_HEADERS)'; test -n "$(gsignond_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(gsignond_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(gsignond_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -764,13 +800,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -822,6 +855,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -831,6 +865,7 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +@SET_PERMISSIONS_FALSE@install-exec-hook: clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am @@ -860,7 +895,8 @@ install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS - + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: @@ -902,8 +938,8 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-gsignond_includeHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - ctags-recursive install install-am install-strip \ - tags-recursive + ctags-recursive install install-am install-exec-am \ + install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ @@ -912,29 +948,33 @@ uninstall-am: uninstall-binPROGRAMS uninstall-gsignond_includeHEADERS distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-gsignond_includeHEADERS install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-gsignond_includeHEADERS + install-exec-am install-exec-hook \ + install-gsignond_includeHEADERS install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-gsignond_includeHEADERS gsignond-identity-enum-types.h: $(top_srcdir)/src/common/gsignond-enum.h.template gsignond-identity.h $(GLIB_MKENUMS) --template $(top_srcdir)/src/common/gsignond-enum.h.template \ --fhead "#ifndef GSIGNOND_IDENTITY_ENUM_TYPES_H_\n#define GSIGNOND_IDENTITY_ENUM_TYPES_H_\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS" \ - --identifier-prefix gsignond \ + --identifier-prefix GSignond \ --ftail "\nG_END_DECLS\n\n#endif\n" \ - gsignond-identity.h > $@ + $(srcdir)/gsignond-identity.h > $@ gsignond-identity-enum-types.c: $(top_srcdir)/src/common/gsignond-enum.c.template gsignond-identity.h $(GLIB_MKENUMS) --template $(top_srcdir)/src/common/gsignond-enum.c.template \ --fhead "#include \"gsignond-identity-enum-types.h\"\n" \ - --identifier-prefix gsignond \ - gsignond-identity.h > $@ + --identifier-prefix GSignond \ + $(srcdir)/gsignond-identity.h > $@ + +@SET_PERMISSIONS_TRUE@install-exec-hook: +@SET_PERMISSIONS_TRUE@ chown root $(DESTDIR)$(bindir)/gsignond || true +@SET_PERMISSIONS_TRUE@ chmod u+s $(DESTDIR)$(bindir)/gsignond || true # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/daemon/db/Makefile.am b/src/daemon/db/Makefile.am index 3bb7fac..665f241 100644 --- a/src/daemon/db/Makefile.am +++ b/src/daemon/db/Makefile.am @@ -1,4 +1,4 @@ -lib_LTLIBRARIES = libgsignond-db.la +noinst_LTLIBRARIES = libgsignond-db.la libgsignond_db_la_CPPFLAGS = \ -I$(top_builddir) \ diff --git a/src/daemon/db/Makefile.in b/src/daemon/db/Makefile.in index b876238..7bf4f14 100644 --- a/src/daemon/db/Makefile.in +++ b/src/daemon/db/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,44 +55,17 @@ subdir = src/daemon/db DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libgsignond_db_la_DEPENDENCIES = \ $(top_builddir)/src/common/libgsignond-common.la \ @@ -115,6 +105,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgsignond_db_la_SOURCES) DIST_SOURCES = $(libgsignond_db_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -256,7 +251,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libgsignond-db.la +noinst_LTLIBRARIES = libgsignond-db.la libgsignond_db_la_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/src \ @@ -308,39 +303,17 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libgsignond-db.la: $(libgsignond_db_la_OBJECTS) $(libgsignond_db_la_DEPENDENCIES) $(EXTRA_libgsignond_db_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libgsignond_db_la_OBJECTS) $(libgsignond_db_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libgsignond_db_la_OBJECTS) $(libgsignond_db_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -481,9 +454,6 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -517,7 +487,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -544,7 +514,7 @@ install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-libLTLIBRARIES +install-exec-am: install-html: install-html-am @@ -584,23 +554,22 @@ ps: ps-am ps-am: -uninstall-am: uninstall-libLTLIBRARIES +uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/daemon/db/gsignond-db-credentials-database.c b/src/daemon/db/gsignond-db-credentials-database.c index a72a629..33e0c6c 100644 --- a/src/daemon/db/gsignond-db-credentials-database.c +++ b/src/daemon/db/gsignond-db-credentials-database.c @@ -371,20 +371,21 @@ gsignond_db_credentials_database_update_identity ( gsignond_db_credentials_database_is_open_secret_storage (self)) { GSignondCredentials *creds = NULL; gboolean un_sec, pwd_sec; + const gchar *tmp_str = NULL; creds = gsignond_credentials_new (); gsignond_credentials_set_id (creds, id); - pwd_sec = gsignond_identity_info_get_store_secret (identity); + pwd_sec = gsignond_identity_info_get_store_secret (identity) && + (tmp_str = gsignond_identity_info_get_secret (identity)); if (pwd_sec) { - gsignond_credentials_set_password (creds, - gsignond_identity_info_get_secret (identity)); + gsignond_credentials_set_password (creds, tmp_str); } - un_sec = gsignond_identity_info_get_is_username_secret (identity); + un_sec = gsignond_identity_info_get_is_username_secret (identity) && + (tmp_str = gsignond_identity_info_get_username (identity)); if (un_sec) { - gsignond_credentials_set_username (creds, - gsignond_identity_info_get_username (identity)); + gsignond_credentials_set_username (creds, tmp_str); } if (un_sec || pwd_sec) { diff --git a/src/daemon/db/gsignond-db-credentials-database.h b/src/daemon/db/gsignond-db-credentials-database.h index d4296d1..5cd481c 100644 --- a/src/daemon/db/gsignond-db-credentials-database.h +++ b/src/daemon/db/gsignond-db-credentials-database.h @@ -28,7 +28,7 @@ #include <glib.h> #include <glib-object.h> -#include <gsignond/gsignond-identity-info.h> +#include "common/gsignond-identity-info.h" #include <gsignond/gsignond-config.h> #include <gsignond/gsignond-secret-storage.h> diff --git a/src/daemon/db/gsignond-db-metadata-database.c b/src/daemon/db/gsignond-db-metadata-database.c index e191b4a..8b76b3a 100644 --- a/src/daemon/db/gsignond-db-metadata-database.c +++ b/src/daemon/db/gsignond-db-metadata-database.c @@ -22,6 +22,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA */ +#if HAVE_CONFIG_H +#include "config.h" +#endif #include <string.h> #include <sys/stat.h> @@ -130,7 +133,6 @@ static GSequence * _gsignond_db_metadata_database_list_to_sequence (GList *list) { GSequence *seq = NULL; - if (!list) return seq; seq = g_sequence_new ((GDestroyNotify)g_free); list = g_list_first (list); for ( ; list != NULL; list = g_list_next (list)) { @@ -504,7 +506,7 @@ _gsignond_db_metadata_database_open ( return FALSE; } dir = gsignond_config_get_string (self->config, - GSIGNOND_CONFIG_GENERAL_STORAGE_PATH); + GSIGNOND_CONFIG_GENERAL_SECURE_DIR); if (!dir) { ERR ("Invalid Metadata DB directory"); return FALSE; @@ -659,6 +661,7 @@ _gsignond_db_metadata_database_create ( " REFS.secctx_id = OLD.secctx_id) == 0;" "END;" +#ifdef ENABLE_DB_ACL_TRIGGERS // Trigger for deleting orphan METHODS entries "CREATE TRIGGER fkdstale_ACL_method_id_METHODS_id" "BEFORE DELETE ON [ACL]" @@ -676,6 +679,7 @@ _gsignond_db_metadata_database_create ( " AND (SELECT COUNT(*) FROM ACL WHERE " " ACL.mechanism_id = OLD.mechanism_id) == 1;" "END;" +#endif /* * triggers generated with @@ -1077,6 +1081,17 @@ gsignond_db_metadata_database_update_identity ( return 0; } + if (!gsignond_identity_info_get_is_identity_new (identity)) { + DBG ("Remove old acl and owner list as identity is not new"); + /* remove acl */ + _gsignond_db_metadata_database_exec (self, + "DELETE FROM ACL WHERE identity_id = %u;", id); + + /* remove owner */ + _gsignond_db_metadata_database_exec (self, + "DELETE FROM OWNER WHERE identity_id = %u;", id); + } + /* methods */ methods = gsignond_identity_info_get_methods (identity); if (!_gsignond_db_metadata_database_insert_methods (self, identity, @@ -1109,16 +1124,6 @@ gsignond_db_metadata_database_update_identity ( goto finished; } - if (!gsignond_identity_info_get_is_identity_new (identity)) { - DBG ("Remove old acl and owner list as identity is not new"); - /* remove acl */ - _gsignond_db_metadata_database_exec (self, - "DELETE FROM ACL WHERE identity_id = %u;", id); - - /* remove owner */ - _gsignond_db_metadata_database_exec (self, - "DELETE FROM OWNER WHERE identity_id = %u;", id); - } /* ACL insert, this will do basically identity level ACL */ g_hash_table_iter_init (&method_iter, methods); diff --git a/src/daemon/db/gsignond-db-metadata-database.h b/src/daemon/db/gsignond-db-metadata-database.h index 0a787af..4e5a943 100644 --- a/src/daemon/db/gsignond-db-metadata-database.h +++ b/src/daemon/db/gsignond-db-metadata-database.h @@ -28,7 +28,7 @@ #include <glib.h> #include <glib-object.h> -#include <gsignond/gsignond-identity-info.h> +#include "common/gsignond-identity-info.h" #include <gsignond/gsignond-config.h> #include <common/db/gsignond-db-sql-database.h> diff --git a/src/daemon/dbus/Makefile.am b/src/daemon/dbus/Makefile.am index 009a814..bfc2982 100644 --- a/src/daemon/dbus/Makefile.am +++ b/src/daemon/dbus/Makefile.am @@ -52,7 +52,7 @@ gsignond-dbus-remote-plugin-gen.c gsignond-dbus-remote-plugin-gen.h : $(INTERFAC --generate-docbook gsignond-dbus-remote-plugin-doc-gen \ $< -lib_LTLIBRARIES = libgsignond-dbus-glue.la +noinst_LTLIBRARIES = libgsignond-dbus-glue.la libgsignond_dbus_glue_la_CPPFLAGS = \ -I$(top_builddir) \ @@ -65,7 +65,7 @@ libgsignond_dbus_glue_la_LIBADD = \ libgsignond_dbus_glue_la_SOURCES = $(DBUS_BUILT_SOURCES) -lib_LTLIBRARIES += libgsignond-dbus.la +noinst_LTLIBRARIES += libgsignond-dbus.la libgsignond_dbus_la_CPPFLAGS = \ -I$(top_builddir) \ diff --git a/src/daemon/dbus/Makefile.in b/src/daemon/dbus/Makefile.in index 7f46d8e..8a7ea13 100644 --- a/src/daemon/dbus/Makefile.in +++ b/src/daemon/dbus/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -39,46 +56,17 @@ subdir = src/daemon/dbus DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(dbusinterfacesdir)" "$(DESTDIR)$(dbusservicedir)" \ - "$(DESTDIR)$(dbusservicedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libgsignond_dbus_glue_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) @@ -140,6 +128,40 @@ SOURCES = $(libgsignond_dbus_glue_la_SOURCES) \ $(libgsignond_dbus_la_SOURCES) DIST_SOURCES = $(libgsignond_dbus_glue_la_SOURCES) \ $(libgsignond_dbus_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(dbusinterfacesdir)" \ + "$(DESTDIR)$(dbusservicedir)" "$(DESTDIR)$(dbusservicedir)" DATA = $(dbusinterfaces_DATA) $(dbusservice_DATA) \ $(nodist_dbusservice_DATA) ETAGS = etags @@ -305,7 +327,7 @@ DBUS_BUILT_DOCS = \ $(NULL) DBUS_INTERFACE_PREFIX = "com.google.code.AccountsSSO.gSingleSignOn." -lib_LTLIBRARIES = libgsignond-dbus-glue.la libgsignond-dbus.la +noinst_LTLIBRARIES = libgsignond-dbus-glue.la libgsignond-dbus.la libgsignond_dbus_glue_la_CPPFLAGS = \ -I$(top_builddir) \ $(GSIGNOND_CFLAGS) \ @@ -392,41 +414,19 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libgsignond-dbus-glue.la: $(libgsignond_dbus_glue_la_OBJECTS) $(libgsignond_dbus_glue_la_DEPENDENCIES) $(EXTRA_libgsignond_dbus_glue_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libgsignond_dbus_glue_la_OBJECTS) $(libgsignond_dbus_glue_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libgsignond_dbus_glue_la_OBJECTS) $(libgsignond_dbus_glue_la_LIBADD) $(LIBS) libgsignond-dbus.la: $(libgsignond_dbus_la_OBJECTS) $(libgsignond_dbus_la_DEPENDENCIES) $(EXTRA_libgsignond_dbus_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libgsignond_dbus_la_OBJECTS) $(libgsignond_dbus_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libgsignond_dbus_la_OBJECTS) $(libgsignond_dbus_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -570,8 +570,11 @@ clean-libtool: -rm -rf .libs _libs install-dbusinterfacesDATA: $(dbusinterfaces_DATA) @$(NORMAL_INSTALL) - test -z "$(dbusinterfacesdir)" || $(MKDIR_P) "$(DESTDIR)$(dbusinterfacesdir)" @list='$(dbusinterfaces_DATA)'; test -n "$(dbusinterfacesdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dbusinterfacesdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dbusinterfacesdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -588,8 +591,11 @@ uninstall-dbusinterfacesDATA: dir='$(DESTDIR)$(dbusinterfacesdir)'; $(am__uninstall_files_from_dir) install-dbusserviceDATA: $(dbusservice_DATA) @$(NORMAL_INSTALL) - test -z "$(dbusservicedir)" || $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)" @list='$(dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dbusservicedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -606,8 +612,11 @@ uninstall-dbusserviceDATA: dir='$(DESTDIR)$(dbusservicedir)'; $(am__uninstall_files_from_dir) install-nodist_dbusserviceDATA: $(nodist_dbusservice_DATA) @$(NORMAL_INSTALL) - test -z "$(dbusservicedir)" || $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)" @list='$(nodist_dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dbusservicedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -709,7 +718,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(dbusinterfacesdir)" "$(DESTDIR)$(dbusservicedir)" "$(DESTDIR)$(dbusservicedir)"; do \ + for dir in "$(DESTDIR)$(dbusinterfacesdir)" "$(DESTDIR)$(dbusservicedir)" "$(DESTDIR)$(dbusservicedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -744,8 +753,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ - mostlyclean-am +clean-am: clean-generic clean-libtool clean-local \ + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -772,7 +781,7 @@ install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-libLTLIBRARIES +install-exec-am: install-html: install-html-am @@ -813,27 +822,26 @@ ps: ps-am ps-am: uninstall-am: uninstall-dbusinterfacesDATA uninstall-dbusserviceDATA \ - uninstall-libLTLIBRARIES uninstall-nodist_dbusserviceDATA + uninstall-nodist_dbusserviceDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-local ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-dbusinterfacesDATA install-dbusserviceDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man \ + clean-libtool clean-local clean-noinstLTLIBRARIES ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dbusinterfacesDATA \ + install-dbusserviceDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ install-nodist_dbusserviceDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-dbusinterfacesDATA \ - uninstall-dbusserviceDATA uninstall-libLTLIBRARIES \ - uninstall-nodist_dbusserviceDATA + uninstall-dbusserviceDATA uninstall-nodist_dbusserviceDATA gsignond-dbus-auth-service-gen.c gsignond-dbus-auth-service-gen.h : $(INTERFACES_DIR)/com.google.code.AccountsSSO.gSingleSignOn.AuthService.xml gdbus-codegen \ diff --git a/src/daemon/dbus/gsignond-dbus-auth-service-adapter.c b/src/daemon/dbus/gsignond-dbus-auth-service-adapter.c index 8be08f2..3c6f162 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-service-adapter.c +++ b/src/daemon/dbus/gsignond-dbus-auth-service-adapter.c @@ -23,11 +23,11 @@ * 02110-1301 USA */ -#include <config.h> +#include "config.h" +#include "gsignond/gsignond-log.h" #include "gsignond-dbus-auth-service-adapter.h" #include "gsignond-dbus-identity-adapter.h" #include "gsignond-dbus.h" -#include "gsignond/gsignond-log.h" enum { @@ -72,6 +72,7 @@ static gboolean _handle_query_identities (GSignondDbusAuthServiceAdapter *, const gchar *, gpointer); static gboolean _handle_clear (GSignondDbusAuthServiceAdapter *, GDBusMethodInvocation *, gpointer); +static void _on_identity_disposed (gpointer data, GObject *object); static void _set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) @@ -116,7 +117,11 @@ _get_property (GObject *object, guint property_id, GValue *value, GParamSpec *ps static void _identity_unref (gpointer data, gpointer user_data) { - if (data) g_object_unref (data); + if (data && GSIGNOND_IS_DBUS_IDENTITY_ADAPTER(data)) { + GObject *identity = G_OBJECT (data); + g_object_weak_unref (identity, _on_identity_disposed, user_data); + g_object_unref (identity); + } } static void @@ -127,7 +132,7 @@ _dispose (GObject *object) DBG("- unregistering dubs auth service. %d", G_OBJECT (self->priv->auth_service)->ref_count); if (self->priv->identities) { - g_list_foreach (self->priv->identities, _identity_unref, NULL); + g_list_foreach (self->priv->identities, _identity_unref, self); } if (self->priv->auth_service) { diff --git a/src/daemon/dbus/gsignond-dbus-auth-service-gen.c b/src/daemon/dbus/gsignond-dbus-auth-service-gen.c index 79b1adc..1ca2490 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-service-gen.c +++ b/src/daemon/dbus/gsignond-dbus-auth-service-gen.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.32.3. DO NOT EDIT. + * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -10,6 +10,7 @@ #include "gsignond-dbus-auth-service-gen.h" +#include <string.h> #ifdef G_OS_UNIX # include <gio/gunixfdlist.h> #endif @@ -124,7 +125,12 @@ _g_value_equal (const GValue *a, const GValue *b) ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); break; case G_TYPE_DOUBLE: - ret = (g_value_get_double (a) == g_value_get_double (b)); + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } break; case G_TYPE_STRING: ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); @@ -161,8 +167,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_regis { { -1, - "applicationContext", - "s", + (gchar *) "applicationContext", + (gchar *) "s", NULL }, FALSE @@ -178,8 +184,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_regis { { -1, - "objectPath", - "o", + (gchar *) "objectPath", + (gchar *) "o", NULL }, FALSE @@ -195,7 +201,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_re { { -1, - "registerNewIdentity", + (gchar *) "registerNewIdentity", (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_register_new_identity_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_register_new_identity_OUT_ARG_pointers, NULL @@ -208,8 +214,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_get_i { { -1, - "id", - "u", + (gchar *) "id", + (gchar *) "u", NULL }, FALSE @@ -219,8 +225,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_get_i { { -1, - "applicationContext", - "s", + (gchar *) "applicationContext", + (gchar *) "s", NULL }, FALSE @@ -237,8 +243,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_get_i { { -1, - "objectPath", - "o", + (gchar *) "objectPath", + (gchar *) "o", NULL }, FALSE @@ -248,8 +254,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_get_i { { -1, - "identityData", - "a{sv}", + (gchar *) "identityData", + (gchar *) "a{sv}", NULL }, FALSE @@ -266,7 +272,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_ge { { -1, - "getIdentity", + (gchar *) "getIdentity", (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_get_identity_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_get_identity_OUT_ARG_pointers, NULL @@ -279,8 +285,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - "authMethods", - "as", + (gchar *) "authMethods", + (gchar *) "as", NULL }, FALSE @@ -296,7 +302,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_qu { { -1, - "queryMethods", + (gchar *) "queryMethods", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_methods_OUT_ARG_pointers, NULL @@ -309,8 +315,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - "method", - "s", + (gchar *) "method", + (gchar *) "s", NULL }, FALSE @@ -326,8 +332,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - "mechanisms", - "as", + (gchar *) "mechanisms", + (gchar *) "as", NULL }, FALSE @@ -343,7 +349,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_qu { { -1, - "queryMechanisms", + (gchar *) "queryMechanisms", (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_mechanisms_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_mechanisms_OUT_ARG_pointers, NULL @@ -356,8 +362,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - "filter", - "a{sv}", + (gchar *) "filter", + (gchar *) "a{sv}", NULL }, FALSE @@ -367,8 +373,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - "applicationContext", - "s", + (gchar *) "applicationContext", + (gchar *) "s", NULL }, FALSE @@ -385,8 +391,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - "identities", - "aa{sv}", + (gchar *) "identities", + (gchar *) "aa{sv}", NULL }, FALSE @@ -402,7 +408,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_qu { { -1, - "queryIdentities", + (gchar *) "queryIdentities", (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_identities_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_identities_OUT_ARG_pointers, NULL @@ -415,8 +421,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_clear { { -1, - "unnamed_arg0", - "b", + (gchar *) "unnamed_arg0", + (gchar *) "b", NULL }, FALSE @@ -432,7 +438,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_cl { { -1, - "clear", + (gchar *) "clear", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_clear_OUT_ARG_pointers, NULL @@ -445,8 +451,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_backu { { -1, - "unnamed_arg0", - "y", + (gchar *) "unnamed_arg0", + (gchar *) "y", NULL }, FALSE @@ -462,7 +468,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_ba { { -1, - "backupStarts", + (gchar *) "backupStarts", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_backup_starts_OUT_ARG_pointers, NULL @@ -475,8 +481,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_backu { { -1, - "unnamed_arg0", - "y", + (gchar *) "unnamed_arg0", + (gchar *) "y", NULL }, FALSE @@ -492,7 +498,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_ba { { -1, - "backupFinished", + (gchar *) "backupFinished", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_backup_finished_OUT_ARG_pointers, NULL @@ -505,8 +511,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_resto { { -1, - "unnamed_arg0", - "y", + (gchar *) "unnamed_arg0", + (gchar *) "y", NULL }, FALSE @@ -522,7 +528,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_re { { -1, - "restoreStarts", + (gchar *) "restoreStarts", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_restore_starts_OUT_ARG_pointers, NULL @@ -535,8 +541,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_resto { { -1, - "unnamed_arg0", - "y", + (gchar *) "unnamed_arg0", + (gchar *) "y", NULL }, FALSE @@ -552,7 +558,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_re { { -1, - "restoreFinished", + (gchar *) "restoreFinished", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_restore_finished_OUT_ARG_pointers, NULL @@ -580,7 +586,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_auth_service_interface_i { { -1, - "com.google.code.AccountsSSO.gSingleSignOn.AuthService", + (gchar *) "com.google.code.AccountsSSO.gSingleSignOn.AuthService", (GDBusMethodInfo **) &_gsignond_dbus_auth_service_method_info_pointers, NULL, NULL, @@ -600,7 +606,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_auth_service_interface_i GDBusInterfaceInfo * gsignond_dbus_auth_service_interface_info (void) { - return (GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info; + return (GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct; } /** @@ -2176,7 +2182,7 @@ gsignond_dbus_auth_service_proxy_g_signal (GDBusProxy *proxy, guint num_params; guint n; guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, signal_name); + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, signal_name); if (info == NULL) return; num_params = g_variant_n_children (parameters); @@ -2218,7 +2224,7 @@ gsignond_dbus_auth_service_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_get (changed_properties, "a{sv}", &iter); while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, key); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, key); g_datalist_remove_data (&proxy->priv->qdata, key); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -2226,7 +2232,7 @@ gsignond_dbus_auth_service_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_iter_free (iter); for (n = 0; invalidated_properties[n] != NULL; n++) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, invalidated_properties[n]); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, invalidated_properties[n]); g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -2548,7 +2554,7 @@ _gsignond_dbus_auth_service_skeleton_handle_get_property ( _ExtendedGDBusPropertyInfo *info; GVariant *ret; ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) @@ -2582,7 +2588,7 @@ _gsignond_dbus_auth_service_skeleton_handle_set_property ( _ExtendedGDBusPropertyInfo *info; gboolean ret; ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) diff --git a/src/daemon/dbus/gsignond-dbus-auth-service-gen.h b/src/daemon/dbus/gsignond-dbus-auth-service-gen.h index 2d5eb2d..60f63bd 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-service-gen.h +++ b/src/daemon/dbus/gsignond-dbus-auth-service-gen.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.32.3. DO NOT EDIT. + * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/daemon/dbus/gsignond-dbus-auth-session-adapter.c b/src/daemon/dbus/gsignond-dbus-auth-session-adapter.c index c537118..53c24e5 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-session-adapter.c +++ b/src/daemon/dbus/gsignond-dbus-auth-session-adapter.c @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2012 Intel Corporation. + * Copyright (C) 2012-2013 Intel Corporation. * * Contact: Amarnath Valluri <amarnath.valluri@linux.intel.com> * @@ -23,9 +23,11 @@ * 02110-1301 USA */ -#include <config.h> -#include "gsignond-dbus-auth-session-adapter.h" +#include "config.h" #include "gsignond/gsignond-log.h" +#include "gsignond/gsignond-utils.h" +#include "gsignond/gsignond-error.h" +#include "gsignond-dbus-auth-session-adapter.h" #include "gsignond-dbus.h" enum @@ -92,7 +94,7 @@ gsignond_dbus_auth_session_adapter_set_property (GObject *object, } case PROP_CONNECTION: { if (self->priv->connection) g_object_unref (self->priv->connection); - self->priv->connection = G_DBUS_CONNECTION (g_value_get_object (value)); + self->priv->connection = G_DBUS_CONNECTION (g_value_dup_object (value)); break; } case PROP_APP_CONTEXT: { @@ -301,7 +303,7 @@ _emit_state_changed (gint state, const gchar *message, gpointer user_data) GSignondDbusAuthSessionAdapter *self = NULL; _AuthSessionDbusInfo *info = (_AuthSessionDbusInfo*) user_data; - if (!info) return ; + if (!info || !GSIGNOND_IS_DBUS_AUTH_SESSION_ADAPTER(info->adapter)) return ; self = info->adapter; gsignond_dbus_auth_session_emit_state_changed ( @@ -314,17 +316,23 @@ _on_process_done (GSignondSessionData *reply, const GError *error, gpointer user GSignondDbusAuthSessionAdapter *self = NULL; _AuthSessionDbusInfo *info = (_AuthSessionDbusInfo*) user_data; - if (!info) return ; + if (!info || !GSIGNOND_IS_DBUS_AUTH_SESSION_ADAPTER(info->adapter)) return ; self = info->adapter; - self->priv->is_process_active = FALSE; - if (error) - g_dbus_method_invocation_return_gerror (info->invocation, error); - else { - GVariant *result = gsignond_dictionary_to_variant ((GSignondDictionary *)reply); - gsignond_dbus_auth_session_complete_process ( - self->priv->dbus_auth_session, info->invocation, result); + if (self->priv->is_process_active) { + self->priv->is_process_active = FALSE; + + if (error) { + DBG("ERROR : %s(%d)", error->message, error->code); + GError *dbus_err = gsignond_get_gerror_for_id (error->code, error->message, NULL); + g_dbus_method_invocation_take_error (info->invocation, dbus_err); + } + else { + GVariant *result = gsignond_dictionary_to_variant ((GSignondDictionary *)reply); + gsignond_dbus_auth_session_complete_process ( + self->priv->dbus_auth_session, info->invocation, result); + } } gsignond_disposable_set_auto_dispose (GSIGNOND_DISPOSABLE (self), TRUE); @@ -402,13 +410,35 @@ gsignond_dbus_auth_session_adapter_get_object_path (GSignondDbusAuthSessionAdapt return g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON(self->priv->dbus_auth_session)); } +gboolean +gsignond_dbus_auth_session_adapter_is_process_active (GSignondDbusAuthSessionAdapter *self) +{ + g_return_val_if_fail (self && GSIGNOND_IS_DBUS_AUTH_SESSION_ADAPTER (self), FALSE); + + return self->priv->is_process_active; +} + +gboolean +gsignond_dbus_auth_session_adapter_abort_process (GSignondDbusAuthSessionAdapter *self) +{ + g_return_val_if_fail (self && GSIGNOND_IS_DBUS_AUTH_SESSION_ADAPTER (self), FALSE); + + if (self->priv->is_process_active) { + gsignond_auth_session_abort_process (self->priv->session); + self->priv->is_process_active = FALSE; + } + + return TRUE; +} + GSignondDbusAuthSessionAdapter * gsignond_dbus_auth_session_adapter_new_with_connection (GDBusConnection *connection, GSignondAuthSession *session, const gchar *app_context, guint timeout) { - static guint32 object_counter; + static guint32 object_counter = 0; + gchar *nonce; gchar *object_path = NULL; GSignondDbusAuthSessionAdapter *adapter = NULL; GError *error = NULL; @@ -419,7 +449,12 @@ gsignond_dbus_auth_session_adapter_new_with_connection (GDBusConnection *connect if (!adapter) return NULL; - object_path = g_strdup_printf ("%s/AuthSession_%d", GSIGNOND_DAEMON_OBJECTPATH, object_counter++); + nonce = gsignond_generate_nonce (); + object_path = g_strdup_printf ("%s/AuthSession_%s_%d", + GSIGNOND_DAEMON_OBJECTPATH, + nonce, + object_counter++); + g_free (nonce); if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (adapter->priv->dbus_auth_session), adapter->priv->connection, object_path, diff --git a/src/daemon/dbus/gsignond-dbus-auth-session-adapter.h b/src/daemon/dbus/gsignond-dbus-auth-session-adapter.h index 9405a4b..43fd652 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-session-adapter.h +++ b/src/daemon/dbus/gsignond-dbus-auth-session-adapter.h @@ -77,6 +77,14 @@ const gchar * gsignond_dbus_auth_session_adapter_get_object_path ( GSignondDbusAuthSessionAdapter *dbus_session) G_GNUC_CONST; +gboolean +gsignond_dbus_auth_session_adapter_is_process_active ( + GSignondDbusAuthSessionAdapter *dbus_session) G_GNUC_CONST; + +gboolean +gsignond_dbus_auth_session_adapter_abort_process ( + GSignondDbusAuthSessionAdapter *dbus_session); + G_END_DECLS #endif /* __GSIGNOND_DBUS_AUTH_SESSION_ADAPTER_H_ */ diff --git a/src/daemon/dbus/gsignond-dbus-auth-session-gen.c b/src/daemon/dbus/gsignond-dbus-auth-session-gen.c index eaea53d..76ac813 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-session-gen.c +++ b/src/daemon/dbus/gsignond-dbus-auth-session-gen.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.32.3. DO NOT EDIT. + * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -10,6 +10,7 @@ #include "gsignond-dbus-auth-session-gen.h" +#include <string.h> #ifdef G_OS_UNIX # include <gio/gunixfdlist.h> #endif @@ -124,7 +125,12 @@ _g_value_equal (const GValue *a, const GValue *b) ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); break; case G_TYPE_DOUBLE: - ret = (g_value_get_double (a) == g_value_get_double (b)); + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } break; case G_TYPE_STRING: ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); @@ -161,8 +167,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_query { { -1, - "wantedMechanisms", - "as", + (gchar *) "wantedMechanisms", + (gchar *) "as", NULL }, FALSE @@ -178,8 +184,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_query { { -1, - "unnamed_arg1", - "as", + (gchar *) "unnamed_arg1", + (gchar *) "as", NULL }, FALSE @@ -195,7 +201,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_qu { { -1, - "queryAvailableMechanisms", + (gchar *) "queryAvailableMechanisms", (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_query_available_mechanisms_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_query_available_mechanisms_OUT_ARG_pointers, NULL @@ -208,8 +214,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_proce { { -1, - "sessionDataVa", - "a{sv}", + (gchar *) "sessionDataVa", + (gchar *) "a{sv}", NULL }, FALSE @@ -219,8 +225,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_proce { { -1, - "mechanism", - "s", + (gchar *) "mechanism", + (gchar *) "s", NULL }, FALSE @@ -237,8 +243,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_proce { { -1, - "unnamed_arg2", - "a{sv}", + (gchar *) "unnamed_arg2", + (gchar *) "a{sv}", NULL }, FALSE @@ -254,7 +260,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_pr { { -1, - "process", + (gchar *) "process", (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_process_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_process_OUT_ARG_pointers, NULL @@ -266,8 +272,8 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_pr static const GDBusAnnotationInfo _gsignond_dbus_auth_session_method_cancel_annotation_info_0 = { -1, - "org.freedesktop.DBus.Method.NoReply", - "true", + (gchar *) "org.freedesktop.DBus.Method.NoReply", + (gchar *) "true", NULL }; @@ -281,7 +287,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_ca { { -1, - "cancel", + (gchar *) "cancel", NULL, NULL, (GDBusAnnotationInfo **) &_gsignond_dbus_auth_session_method_cancel_annotation_info_pointers @@ -302,8 +308,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_signal_info_state { { -1, - "state", - "i", + (gchar *) "state", + (gchar *) "i", NULL }, FALSE @@ -313,8 +319,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_signal_info_state { { -1, - "message", - "s", + (gchar *) "message", + (gchar *) "s", NULL }, FALSE @@ -331,7 +337,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_auth_session_signal_info_st { { -1, - "stateChanged", + (gchar *) "stateChanged", (GDBusArgInfo **) &_gsignond_dbus_auth_session_signal_info_state_changed_ARG_pointers, NULL }, @@ -342,7 +348,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_auth_session_signal_info_un { { -1, - "unregistered", + (gchar *) "unregistered", NULL, NULL }, @@ -360,7 +366,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_auth_session_interface_i { { -1, - "com.google.code.AccountsSSO.gSingleSignOn.AuthSession", + (gchar *) "com.google.code.AccountsSSO.gSingleSignOn.AuthSession", (GDBusMethodInfo **) &_gsignond_dbus_auth_session_method_info_pointers, (GDBusSignalInfo **) &_gsignond_dbus_auth_session_signal_info_pointers, NULL, @@ -380,7 +386,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_auth_session_interface_i GDBusInterfaceInfo * gsignond_dbus_auth_session_interface_info (void) { - return (GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info; + return (GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct; } /** @@ -994,7 +1000,7 @@ gsignond_dbus_auth_session_proxy_g_signal (GDBusProxy *proxy, guint num_params; guint n; guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, signal_name); + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, signal_name); if (info == NULL) return; num_params = g_variant_n_children (parameters); @@ -1036,7 +1042,7 @@ gsignond_dbus_auth_session_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_get (changed_properties, "a{sv}", &iter); while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, key); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, key); g_datalist_remove_data (&proxy->priv->qdata, key); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -1044,7 +1050,7 @@ gsignond_dbus_auth_session_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_iter_free (iter); for (n = 0; invalidated_properties[n] != NULL; n++) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, invalidated_properties[n]); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, invalidated_properties[n]); g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -1366,7 +1372,7 @@ _gsignond_dbus_auth_session_skeleton_handle_get_property ( _ExtendedGDBusPropertyInfo *info; GVariant *ret; ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) @@ -1400,7 +1406,7 @@ _gsignond_dbus_auth_session_skeleton_handle_set_property ( _ExtendedGDBusPropertyInfo *info; gboolean ret; ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) diff --git a/src/daemon/dbus/gsignond-dbus-auth-session-gen.h b/src/daemon/dbus/gsignond-dbus-auth-session-gen.h index 5059507..f1e2405 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-session-gen.h +++ b/src/daemon/dbus/gsignond-dbus-auth-session-gen.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.32.3. DO NOT EDIT. + * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/daemon/dbus/gsignond-dbus-identity-adapter.c b/src/daemon/dbus/gsignond-dbus-identity-adapter.c index 9e236aa..7de4ef6 100644 --- a/src/daemon/dbus/gsignond-dbus-identity-adapter.c +++ b/src/daemon/dbus/gsignond-dbus-identity-adapter.c @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2012 Intel Corporation. + * Copyright (C) 2012-2013 Intel Corporation. * * Contact: Amarnath Valluri <amarnath.valluri@linux.intel.com> * @@ -23,8 +23,9 @@ * 02110-1301 USA */ -#include <config.h> +#include "config.h" #include "gsignond/gsignond-log.h" +#include "gsignond/gsignond-utils.h" #include "gsignond-dbus-identity-adapter.h" #include "gsignond-dbus-auth-session-adapter.h" #include "gsignond-dbus.h" @@ -122,6 +123,7 @@ static gboolean _handle_store (GSignondDbusIdentityAdapter *, GDBusMethodInvocat static gboolean _handle_add_reference (GSignondDbusIdentityAdapter *, GDBusMethodInvocation *, const gchar *, gpointer); static gboolean _handle_remove_reference (GSignondDbusIdentityAdapter *, GDBusMethodInvocation *, const gchar *, gpointer); static void _emit_info_updated (GSignondIdentity *identity, GSignondIdentityChangeType change, gpointer userdata); +static void _on_session_disposed (gpointer data, GObject *session); static void gsignond_dbus_identity_adapter_set_property (GObject *object, @@ -203,8 +205,13 @@ gsignond_dbus_identity_adapter_get_property (GObject *object, static void _destroy_session (gpointer data, gpointer user_data) { - (void)user_data; - if (data) g_object_unref (G_OBJECT(data)); + if (data && GSIGNOND_IS_DBUS_AUTH_SESSION_ADAPTER (data)) { + GObject *dbus_session = G_OBJECT (data); + g_object_weak_unref (dbus_session, _on_session_disposed, user_data); + gsignond_dbus_auth_session_adapter_abort_process ( + GSIGNOND_DBUS_AUTH_SESSION_ADAPTER (dbus_session)); + g_object_unref (dbus_session); + } } static void @@ -212,6 +219,10 @@ gsignond_dbus_identity_adapter_dispose (GObject *object) { GSignondDbusIdentityAdapter *self = GSIGNOND_DBUS_IDENTITY_ADAPTER (object); + if (self->priv->sessions) { + g_list_foreach (self->priv->sessions, _destroy_session, self); + } + if (self->priv->identity) { if (self->priv->info_updated_handler_id) { g_signal_handler_disconnect (self->priv->identity, self->priv->info_updated_handler_id); @@ -235,10 +246,6 @@ gsignond_dbus_identity_adapter_dispose (GObject *object) self->priv->identity = NULL; } - if (self->priv->sessions) { - g_list_foreach (self->priv->sessions, _destroy_session, NULL); - } - if (self->priv->dbus_identity) { GDBusInterfaceSkeleton *iface = G_DBUS_INTERFACE_SKELETON(self->priv->dbus_identity); gsignond_dbus_identity_emit_unregistered (self->priv->dbus_identity); @@ -782,7 +789,8 @@ gsignond_dbus_identity_adapter_new_with_connection (GDBusConnection *connection, const gchar *app_context, guint timeout) { - static guint32 object_counter; + static guint32 object_counter = 0; + gchar *nonce; gchar *object_path = NULL; GError *err = NULL; GSignondDbusIdentityAdapter *adapter = GSIGNOND_DBUS_IDENTITY_ADAPTER ( @@ -791,7 +799,13 @@ gsignond_dbus_identity_adapter_new_with_connection (GDBusConnection *connection, if (!adapter) return NULL; - object_path = g_strdup_printf ("%s/Identity_%d", GSIGNOND_DAEMON_OBJECTPATH, object_counter++); + nonce = gsignond_generate_nonce (); + object_path = g_strdup_printf ("%s/Identity_%s_%d", + GSIGNOND_DAEMON_OBJECTPATH, + nonce, + object_counter++); + g_free (nonce); + if (!g_dbus_interface_skeleton_export ( G_DBUS_INTERFACE_SKELETON (adapter->priv->dbus_identity), adapter->priv->connection, object_path, &err)) { diff --git a/src/daemon/dbus/gsignond-dbus-identity-gen.c b/src/daemon/dbus/gsignond-dbus-identity-gen.c index 2f8b74b..b8399cc 100644 --- a/src/daemon/dbus/gsignond-dbus-identity-gen.c +++ b/src/daemon/dbus/gsignond-dbus-identity-gen.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.32.3. DO NOT EDIT. + * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -10,6 +10,7 @@ #include "gsignond-dbus-identity-gen.h" +#include <string.h> #ifdef G_OS_UNIX # include <gio/gunixfdlist.h> #endif @@ -124,7 +125,12 @@ _g_value_equal (const GValue *a, const GValue *b) ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); break; case G_TYPE_DOUBLE: - ret = (g_value_get_double (a) == g_value_get_double (b)); + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } break; case G_TYPE_STRING: ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); @@ -161,8 +167,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_request_c { { -1, - "message", - "s", + (gchar *) "message", + (gchar *) "s", NULL }, FALSE @@ -178,8 +184,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_request_c { { -1, - "unnamed_arg1", - "u", + (gchar *) "unnamed_arg1", + (gchar *) "u", NULL }, FALSE @@ -195,7 +201,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_reques { { -1, - "requestCredentialsUpdate", + (gchar *) "requestCredentialsUpdate", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_request_credentials_update_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_request_credentials_update_OUT_ARG_pointers, NULL @@ -208,8 +214,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_get_info_ { { -1, - "identityInfo", - "a{sv}", + (gchar *) "identityInfo", + (gchar *) "a{sv}", NULL }, FALSE @@ -225,7 +231,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_get_in { { -1, - "getInfo", + (gchar *) "getInfo", NULL, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_get_info_OUT_ARG_pointers, NULL @@ -238,8 +244,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_get_auth_ { { -1, - "method", - "s", + (gchar *) "method", + (gchar *) "s", NULL }, FALSE @@ -255,8 +261,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_get_auth_ { { -1, - "objectPath", - "o", + (gchar *) "objectPath", + (gchar *) "o", NULL }, FALSE @@ -272,7 +278,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_get_au { { -1, - "getAuthSession", + (gchar *) "getAuthSession", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_get_auth_session_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_get_auth_session_OUT_ARG_pointers, NULL @@ -285,8 +291,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_verify_us { { -1, - "params", - "a{sv}", + (gchar *) "params", + (gchar *) "a{sv}", NULL }, FALSE @@ -302,8 +308,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_verify_us { { -1, - "unnamed_arg1", - "b", + (gchar *) "unnamed_arg1", + (gchar *) "b", NULL }, FALSE @@ -319,7 +325,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_verify { { -1, - "verifyUser", + (gchar *) "verifyUser", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_verify_user_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_verify_user_OUT_ARG_pointers, NULL @@ -332,8 +338,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_verify_se { { -1, - "secret", - "s", + (gchar *) "secret", + (gchar *) "s", NULL }, FALSE @@ -349,8 +355,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_verify_se { { -1, - "unnamed_arg1", - "b", + (gchar *) "unnamed_arg1", + (gchar *) "b", NULL }, FALSE @@ -366,7 +372,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_verify { { -1, - "verifySecret", + (gchar *) "verifySecret", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_verify_secret_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_verify_secret_OUT_ARG_pointers, NULL @@ -379,7 +385,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_remove { { -1, - "remove", + (gchar *) "remove", NULL, NULL, NULL @@ -392,8 +398,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_sign_out_ { { -1, - "unnamed_arg0", - "b", + (gchar *) "unnamed_arg0", + (gchar *) "b", NULL }, FALSE @@ -409,7 +415,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_sign_o { { -1, - "signOut", + (gchar *) "signOut", NULL, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_sign_out_OUT_ARG_pointers, NULL @@ -422,8 +428,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_store_IN_ { { -1, - "unnamed_arg0", - "a{sv}", + (gchar *) "unnamed_arg0", + (gchar *) "a{sv}", NULL }, FALSE @@ -439,8 +445,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_store_OUT { { -1, - "unnamed_arg1", - "u", + (gchar *) "unnamed_arg1", + (gchar *) "u", NULL }, FALSE @@ -456,7 +462,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_store { { -1, - "store", + (gchar *) "store", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_store_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_store_OUT_ARG_pointers, NULL @@ -469,8 +475,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_add_refer { { -1, - "reference", - "s", + (gchar *) "reference", + (gchar *) "s", NULL }, FALSE @@ -486,8 +492,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_add_refer { { -1, - "unnamed_arg1", - "i", + (gchar *) "unnamed_arg1", + (gchar *) "i", NULL }, FALSE @@ -503,7 +509,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_add_re { { -1, - "addReference", + (gchar *) "addReference", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_add_reference_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_add_reference_OUT_ARG_pointers, NULL @@ -516,8 +522,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_remove_re { { -1, - "reference", - "s", + (gchar *) "reference", + (gchar *) "s", NULL }, FALSE @@ -533,8 +539,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_remove_re { { -1, - "unnamed_arg1", - "i", + (gchar *) "unnamed_arg1", + (gchar *) "i", NULL }, FALSE @@ -550,7 +556,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_remove { { -1, - "removeReference", + (gchar *) "removeReference", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_remove_reference_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_remove_reference_OUT_ARG_pointers, NULL @@ -578,7 +584,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_identity_signal_info_unregi { { -1, - "unregistered", + (gchar *) "unregistered", NULL, NULL }, @@ -589,8 +595,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_signal_info_info_upda { { -1, - "unnamed_arg0", - "i", + (gchar *) "unnamed_arg0", + (gchar *) "i", NULL }, FALSE @@ -606,7 +612,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_identity_signal_info_info_u { { -1, - "infoUpdated", + (gchar *) "infoUpdated", (GDBusArgInfo **) &_gsignond_dbus_identity_signal_info_info_updated_ARG_pointers, NULL }, @@ -624,7 +630,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_identity_interface_info { { -1, - "com.google.code.AccountsSSO.gSingleSignOn.Identity", + (gchar *) "com.google.code.AccountsSSO.gSingleSignOn.Identity", (GDBusMethodInfo **) &_gsignond_dbus_identity_method_info_pointers, (GDBusSignalInfo **) &_gsignond_dbus_identity_signal_info_pointers, NULL, @@ -644,7 +650,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_identity_interface_info GDBusInterfaceInfo * gsignond_dbus_identity_interface_info (void) { - return (GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info; + return (GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct; } /** @@ -2277,7 +2283,7 @@ gsignond_dbus_identity_proxy_g_signal (GDBusProxy *proxy, guint num_params; guint n; guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, signal_name); + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, signal_name); if (info == NULL) return; num_params = g_variant_n_children (parameters); @@ -2319,7 +2325,7 @@ gsignond_dbus_identity_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_get (changed_properties, "a{sv}", &iter); while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, key); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, key); g_datalist_remove_data (&proxy->priv->qdata, key); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -2327,7 +2333,7 @@ gsignond_dbus_identity_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_iter_free (iter); for (n = 0; invalidated_properties[n] != NULL; n++) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, invalidated_properties[n]); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, invalidated_properties[n]); g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -2649,7 +2655,7 @@ _gsignond_dbus_identity_skeleton_handle_get_property ( _ExtendedGDBusPropertyInfo *info; GVariant *ret; ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) @@ -2683,7 +2689,7 @@ _gsignond_dbus_identity_skeleton_handle_set_property ( _ExtendedGDBusPropertyInfo *info; gboolean ret; ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) diff --git a/src/daemon/dbus/gsignond-dbus-identity-gen.h b/src/daemon/dbus/gsignond-dbus-identity-gen.h index 752a70c..8745c2a 100644 --- a/src/daemon/dbus/gsignond-dbus-identity-gen.h +++ b/src/daemon/dbus/gsignond-dbus-identity-gen.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.32.3. DO NOT EDIT. + * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.c b/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.c index b8cb666..b0c19e9 100644 --- a/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.c +++ b/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.32.3. DO NOT EDIT. + * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -10,6 +10,7 @@ #include "gsignond-dbus-remote-plugin-gen.h" +#include <string.h> #ifdef G_OS_UNIX # include <gio/gunixfdlist.h> #endif @@ -124,7 +125,12 @@ _g_value_equal (const GValue *a, const GValue *b) ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); break; case G_TYPE_DOUBLE: - ret = (g_value_get_double (a) == g_value_get_double (b)); + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } break; case G_TYPE_STRING: ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); @@ -161,7 +167,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_c { { -1, - "cancel", + (gchar *) "cancel", NULL, NULL, NULL @@ -174,8 +180,19 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_requ { { -1, - "sessionData", - "a{sv}", + (gchar *) "sessionData", + (gchar *) "a{sv}", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_identityMethodCache = +{ + { + -1, + (gchar *) "identityMethodCache", + (gchar *) "a{sv}", NULL }, FALSE @@ -185,8 +202,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_requ { { -1, - "mechanism", - "s", + (gchar *) "mechanism", + (gchar *) "s", NULL }, FALSE @@ -195,6 +212,7 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_requ static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_pointers[] = { &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_sessionData, + &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_identityMethodCache, &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_mechanism, NULL }; @@ -203,7 +221,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_r { { -1, - "requestInitial", + (gchar *) "requestInitial", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_pointers, NULL, NULL @@ -216,8 +234,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_requ { { -1, - "sessionData", - "a{sv}", + (gchar *) "sessionData", + (gchar *) "a{sv}", NULL }, FALSE @@ -233,7 +251,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_r { { -1, - "request", + (gchar *) "request", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_request_IN_ARG_pointers, NULL, NULL @@ -246,8 +264,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_user { { -1, - "uiData", - "a{sv}", + (gchar *) "uiData", + (gchar *) "a{sv}", NULL }, FALSE @@ -263,7 +281,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_u { { -1, - "userActionFinished", + (gchar *) "userActionFinished", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_user_action_finished_IN_ARG_pointers, NULL, NULL @@ -276,8 +294,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_refr { { -1, - "uiData", - "a{sv}", + (gchar *) "uiData", + (gchar *) "a{sv}", NULL }, FALSE @@ -293,7 +311,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_r { { -1, - "refresh", + (gchar *) "refresh", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_refresh_IN_ARG_pointers, NULL, NULL @@ -306,8 +324,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_get_ { { -1, - "type", - "s", + (gchar *) "type", + (gchar *) "s", NULL }, FALSE @@ -317,8 +335,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_get_ { { -1, - "mechanisms", - "as", + (gchar *) "mechanisms", + (gchar *) "as", NULL }, FALSE @@ -335,7 +353,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_g { { -1, - "getInfo", + (gchar *) "getInfo", NULL, (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_pointers, NULL @@ -359,8 +377,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_resp { { -1, - "sessionData", - "a{sv}", + (gchar *) "sessionData", + (gchar *) "a{sv}", NULL }, FALSE @@ -376,7 +394,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_r { { -1, - "response", + (gchar *) "response", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_response_ARG_pointers, NULL }, @@ -387,8 +405,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_resp { { -1, - "sessionData", - "a{sv}", + (gchar *) "sessionData", + (gchar *) "a{sv}", NULL }, FALSE @@ -404,7 +422,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_r { { -1, - "responseFinal", + (gchar *) "responseFinal", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_response_final_ARG_pointers, NULL }, @@ -415,8 +433,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_stor { { -1, - "sessionData", - "a{sv}", + (gchar *) "sessionData", + (gchar *) "a{sv}", NULL }, FALSE @@ -432,7 +450,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_s { { -1, - "store", + (gchar *) "store", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_store_ARG_pointers, NULL }, @@ -443,8 +461,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_erro { { -1, - "error", - "(uis)", + (gchar *) "error", + (gchar *) "(uis)", NULL }, FALSE @@ -460,7 +478,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_e { { -1, - "error", + (gchar *) "error", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_error_ARG_pointers, NULL }, @@ -471,8 +489,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_user { { -1, - "uiData", - "a{sv}", + (gchar *) "uiData", + (gchar *) "a{sv}", NULL }, FALSE @@ -488,7 +506,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_u { { -1, - "userActionRequired", + (gchar *) "userActionRequired", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_user_action_required_ARG_pointers, NULL }, @@ -499,8 +517,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_refr { { -1, - "uiData", - "a{sv}", + (gchar *) "uiData", + (gchar *) "a{sv}", NULL }, FALSE @@ -516,7 +534,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_r { { -1, - "refreshed", + (gchar *) "refreshed", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_refreshed_ARG_pointers, NULL }, @@ -527,8 +545,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_stat { { -1, - "state", - "i", + (gchar *) "state", + (gchar *) "i", NULL }, FALSE @@ -538,8 +556,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_stat { { -1, - "message", - "s", + (gchar *) "message", + (gchar *) "s", NULL }, FALSE @@ -556,7 +574,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_s { { -1, - "statusChanged", + (gchar *) "statusChanged", (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_pointers, NULL }, @@ -579,7 +597,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_remote_plugin_interface_ { { -1, - "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", + (gchar *) "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", (GDBusMethodInfo **) &_gsignond_dbus_remote_plugin_method_info_pointers, (GDBusSignalInfo **) &_gsignond_dbus_remote_plugin_signal_info_pointers, NULL, @@ -599,7 +617,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_remote_plugin_interface_ GDBusInterfaceInfo * gsignond_dbus_remote_plugin_interface_info (void) { - return (GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info; + return (GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct; } /** @@ -677,6 +695,7 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) * @object: A #GSignondDbusRemotePlugin. * @invocation: A #GDBusMethodInvocation. * @arg_sessionData: Argument passed by remote caller. + * @arg_identityMethodCache: Argument passed by remote caller. * @arg_mechanism: Argument passed by remote caller. * * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.requestInitial">requestInitial()</link> D-Bus method. @@ -693,8 +712,8 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) NULL, g_cclosure_marshal_generic, G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING); + 4, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_STRING); /** * GSignondDbusRemotePlugin::handle-request: @@ -1130,6 +1149,7 @@ _out: * gsignond_dbus_remote_plugin_call_request_initial: * @proxy: A #GSignondDbusRemotePluginProxy. * @arg_sessionData: Argument to pass with the method invocation. + * @arg_identityMethodCache: Argument to pass with the method invocation. * @arg_mechanism: Argument to pass with the method invocation. * @cancellable: (allow-none): A #GCancellable or %NULL. * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. @@ -1145,6 +1165,7 @@ void gsignond_dbus_remote_plugin_call_request_initial ( GSignondDbusRemotePlugin *proxy, GVariant *arg_sessionData, + GVariant *arg_identityMethodCache, const gchar *arg_mechanism, GCancellable *cancellable, GAsyncReadyCallback callback, @@ -1152,8 +1173,9 @@ gsignond_dbus_remote_plugin_call_request_initial ( { g_dbus_proxy_call (G_DBUS_PROXY (proxy), "requestInitial", - g_variant_new ("(@a{sv}s)", + g_variant_new ("(@a{sv}@a{sv}s)", arg_sessionData, + arg_identityMethodCache, arg_mechanism), G_DBUS_CALL_FLAGS_NONE, -1, @@ -1193,6 +1215,7 @@ _out: * gsignond_dbus_remote_plugin_call_request_initial_sync: * @proxy: A #GSignondDbusRemotePluginProxy. * @arg_sessionData: Argument to pass with the method invocation. + * @arg_identityMethodCache: Argument to pass with the method invocation. * @arg_mechanism: Argument to pass with the method invocation. * @cancellable: (allow-none): A #GCancellable or %NULL. * @error: Return location for error or %NULL. @@ -1207,6 +1230,7 @@ gboolean gsignond_dbus_remote_plugin_call_request_initial_sync ( GSignondDbusRemotePlugin *proxy, GVariant *arg_sessionData, + GVariant *arg_identityMethodCache, const gchar *arg_mechanism, GCancellable *cancellable, GError **error) @@ -1214,8 +1238,9 @@ gsignond_dbus_remote_plugin_call_request_initial_sync ( GVariant *_ret; _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), "requestInitial", - g_variant_new ("(@a{sv}s)", + g_variant_new ("(@a{sv}@a{sv}s)", arg_sessionData, + arg_identityMethodCache, arg_mechanism), G_DBUS_CALL_FLAGS_NONE, -1, @@ -1804,7 +1829,7 @@ gsignond_dbus_remote_plugin_proxy_g_signal (GDBusProxy *proxy, guint num_params; guint n; guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info, signal_name); + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, signal_name); if (info == NULL) return; num_params = g_variant_n_children (parameters); @@ -1846,7 +1871,7 @@ gsignond_dbus_remote_plugin_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_get (changed_properties, "a{sv}", &iter); while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info, key); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, key); g_datalist_remove_data (&proxy->priv->qdata, key); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -1854,7 +1879,7 @@ gsignond_dbus_remote_plugin_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_iter_free (iter); for (n = 0; invalidated_properties[n] != NULL; n++) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info, invalidated_properties[n]); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, invalidated_properties[n]); g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -2176,7 +2201,7 @@ _gsignond_dbus_remote_plugin_skeleton_handle_get_property ( _ExtendedGDBusPropertyInfo *info; GVariant *ret; ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) @@ -2210,7 +2235,7 @@ _gsignond_dbus_remote_plugin_skeleton_handle_set_property ( _ExtendedGDBusPropertyInfo *info; gboolean ret; ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) diff --git a/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.h b/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.h index f704b0a..5732dea 100644 --- a/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.h +++ b/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.32.3. DO NOT EDIT. + * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -51,6 +51,7 @@ struct _GSignondDbusRemotePluginIface GSignondDbusRemotePlugin *object, GDBusMethodInvocation *invocation, GVariant *arg_sessionData, + GVariant *arg_identityMethodCache, const gchar *arg_mechanism); gboolean (*handle_user_action_finished) ( @@ -176,6 +177,7 @@ gboolean gsignond_dbus_remote_plugin_call_cancel_sync ( void gsignond_dbus_remote_plugin_call_request_initial ( GSignondDbusRemotePlugin *proxy, GVariant *arg_sessionData, + GVariant *arg_identityMethodCache, const gchar *arg_mechanism, GCancellable *cancellable, GAsyncReadyCallback callback, @@ -189,6 +191,7 @@ gboolean gsignond_dbus_remote_plugin_call_request_initial_finish ( gboolean gsignond_dbus_remote_plugin_call_request_initial_sync ( GSignondDbusRemotePlugin *proxy, GVariant *arg_sessionData, + GVariant *arg_identityMethodCache, const gchar *arg_mechanism, GCancellable *cancellable, GError **error); diff --git a/src/daemon/dbus/gsignond-dbus-signonui-adapter.c b/src/daemon/dbus/gsignond-dbus-signonui-adapter.c index 155348c..74b887b 100644 --- a/src/daemon/dbus/gsignond-dbus-signonui-adapter.c +++ b/src/daemon/dbus/gsignond-dbus-signonui-adapter.c @@ -232,9 +232,13 @@ _on_query_dialog_ready (GObject *proxy, GAsyncResult *res, gpointer user_data) if (info) { if (info->cb) { - GVariant *out_params = NULL; g_variant_get (reply, "(@a{sv})", &out_params); + GVariant *out_params = NULL; + + if (!error) { + g_variant_get (reply, "(@a{sv})", &out_params); + } ((GSignondDbusSignonuiQueryDialogCb)info->cb) (out_params, error, info->data); - g_variant_unref (out_params); + if(out_params) g_variant_unref (out_params); } g_object_unref (info->adapter); g_slice_free (_SignonuiDbusInfo, info); @@ -265,7 +269,7 @@ gsignond_dbus_signonui_adapter_query_dialog (GSignondDbusSignonuiAdapter *adapte info->data = user_data; g_dbus_proxy_call (adapter->priv->proxy, "queryDialog", - g_variant_new ("(a{sv})", params), G_DBUS_CALL_FLAGS_NONE, -1, NULL, + g_variant_new ("(@a{sv})", params), G_DBUS_CALL_FLAGS_NONE, G_MAXINT, NULL, _on_query_dialog_ready, (gpointer)info); return TRUE; diff --git a/src/daemon/dbus/interfaces/com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml b/src/daemon/dbus/interfaces/com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml index a7b97d2..ef09de0 100644 --- a/src/daemon/dbus/interfaces/com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml +++ b/src/daemon/dbus/interfaces/com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml @@ -5,6 +5,7 @@ </method> <method name="requestInitial"> <arg name="sessionData" type="a{sv}" direction="in"/> + <arg name="identityMethodCache" type="a{sv}" direction="in"/> <arg name="mechanism" type="s" direction="in"/> </method> <method name="request"> diff --git a/src/daemon/gsignond-auth-session.c b/src/daemon/gsignond-auth-session.c index 45dd640..f165a26 100644 --- a/src/daemon/gsignond-auth-session.c +++ b/src/daemon/gsignond-auth-session.c @@ -27,7 +27,6 @@ #include "gsignond/gsignond-error.h" #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-session-data.h" -#include "gsignond/gsignond-identity-info.h" #include "plugins/gsignond-plugin-proxy-factory.h" #include "gsignond-daemon.h" @@ -44,6 +43,7 @@ enum { SIG_PROCESS_STORE, SIG_PROCESS_USER_ACTION_REQUIRED, SIG_PROCESS_REFRESHED, + SIG_PROCESS_CANCELED, SIG_MAX }; @@ -145,12 +145,13 @@ _create_mechanism_cache (GSignondAuthSession *self) (gpointer) *iter, _sort_cmp, NULL); - DBG (" allow: '%s'", *iter); - if (pos) + if (pos) { + DBG (" allow: '%s'", *iter); g_sequence_insert_sorted (priv->available_mechanisms, (gpointer) *iter, _sort_cmp, NULL); + } } } if (allowed_mechanisms) @@ -207,7 +208,7 @@ gsignond_auth_session_process (GSignondAuthSession *self, GError **error) { if (!self || !GSIGNOND_IS_AUTH_SESSION (self)) { - WARN ("assertion (seöf && GSIGNOND_IS_AUTH_SESSION (self))failed"); + WARN ("assertion (self && GSIGNOND_IS_AUTH_SESSION (self)) failed"); if (error) *error = gsignond_get_gerror_for_id (GSIGNOND_ERROR_UNKNOWN, "Unknown error"); return FALSE; } @@ -224,21 +225,19 @@ gsignond_auth_session_process (GSignondAuthSession *self, } if (session_data && - !gsignond_session_data_get_username (session_data) - && self->priv->identity_info) { - const gchar *username = gsignond_identity_info_get_username (self->priv->identity_info); - - if (username) { - gsignond_session_data_set_username (session_data, username); + self->priv->identity_info) { + if (!gsignond_session_data_get_username (session_data)) { + const gchar *username = + gsignond_identity_info_get_username (self->priv->identity_info); + if (username) + gsignond_session_data_set_username (session_data, username); + } + if (!gsignond_session_data_get_secret (session_data)) { + const gchar *secret = + gsignond_identity_info_get_secret (self->priv->identity_info); + if (secret) + gsignond_session_data_set_secret (session_data, secret); } - } - - /* pass token data to session data */ - if (self->priv->token_data) { - GVariant *token_data = gsignond_dictionary_to_variant (self->priv->token_data); - /* FIXME: better add API GSignondSessionData to support(set/get) token data. - That will be the cleaner solution */ - gsignond_dictionary_set (session_data, "Token", token_data); } _ProcessData * data = g_slice_new0 (_ProcessData); @@ -247,6 +246,7 @@ gsignond_auth_session_process (GSignondAuthSession *self, data->state_change_cb = state_change_cb; data->userdata = userdata; gsignond_plugin_proxy_process(self->priv->proxy, self, session_data, + self->priv->token_data, mechanism, data); return TRUE; @@ -265,6 +265,7 @@ gsignond_auth_session_cancel (GSignondAuthSession *self, VALIDATE_READ_ACCESS (self->priv->identity_info, ctx, FALSE); gsignond_plugin_proxy_cancel(self->priv->proxy, self); + g_signal_emit (self, signals[SIG_PROCESS_CANCELED], 0, NULL); return TRUE; } @@ -275,6 +276,7 @@ gsignond_auth_session_abort_process (GSignondAuthSession *self) g_return_if_fail (self && GSIGNOND_IS_AUTH_SESSION (self)); gsignond_plugin_proxy_cancel (self->priv->proxy, self); + g_signal_emit (self, signals[SIG_PROCESS_CANCELED], 0, NULL); } void @@ -436,6 +438,18 @@ gsignond_auth_session_class_init (GSignondAuthSessionClass *klass) G_TYPE_NONE, 1, GSIGNOND_TYPE_SIGNONUI_DATA); + + signals[SIG_PROCESS_CANCELED] = g_signal_new ("process-canceled", + GSIGNOND_TYPE_AUTH_SESSION, + G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + NULL, + G_TYPE_NONE, + 0, + G_TYPE_NONE); + } /** @@ -519,8 +533,7 @@ gsignond_auth_session_notify_store (GSignondAuthSession *self, /* cache token data */ if (self->priv->token_data) gsignond_dictionary_unref (self->priv->token_data); - self->priv->token_data = token_data; - gsignond_dictionary_ref (self->priv->token_data); + self->priv->token_data = gsignond_dictionary_ref (token_data); g_signal_emit (self, signals[SIG_PROCESS_STORE], 0, token_data); } @@ -566,7 +579,8 @@ gsignond_auth_session_new (GSignondIdentityInfo *info, const gchar *method, GSig "method", method, NULL); auth_session->priv->proxy = proxy; auth_session->priv->identity_info = g_hash_table_ref ((GHashTable *)info); - auth_session->priv->token_data = token_data; + auth_session->priv->token_data = token_data ? gsignond_dictionary_ref(token_data) + : gsignond_dictionary_new(); return auth_session; } diff --git a/src/daemon/gsignond-auth-session.h b/src/daemon/gsignond-auth-session.h index 300da28..d59a3d2 100644 --- a/src/daemon/gsignond-auth-session.h +++ b/src/daemon/gsignond-auth-session.h @@ -30,7 +30,7 @@ #include "gsignond-types.h" #include <gsignond/gsignond-dictionary.h> -#include <gsignond/gsignond-identity-info.h> +#include "common/gsignond-identity-info.h" #include <gsignond/gsignond-signonui-data.h> #include <gsignond/gsignond-session-data.h> #include <gsignond/gsignond-access-control-manager.h> diff --git a/src/daemon/gsignond-daemon.c b/src/daemon/gsignond-daemon.c index ef4177b..735e6e4 100644 --- a/src/daemon/gsignond-daemon.c +++ b/src/daemon/gsignond-daemon.c @@ -181,6 +181,29 @@ _init_extension (GSignondDaemon *self) return TRUE; } +static void +_on_extension_dispose (gpointer data, GObject *object) +{ + if (data) *(GSignondExtension **)data = NULL; +} + +static GSignondExtension * _default_extension_init () +{ + static GSignondExtension *default_extension = NULL; + + if (!default_extension) { + default_extension = + g_object_new (GSIGNOND_TYPE_EXTENSION, NULL); + + g_object_weak_ref (G_OBJECT (default_extension), + _on_extension_dispose, + &default_extension); + } + + return default_extension; +} + + static gboolean _init_extensions (GSignondDaemon *self) { @@ -191,7 +214,7 @@ _init_extensions (GSignondDaemon *self) gchar *mod_name; gchar *mod_filename; gchar *initf_name; - GSignondExtensionInit ext_init; + GSignondExtension* (*ext_init) (void); ext_path = gsignond_config_get_string (self->priv->config, GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR); @@ -223,7 +246,7 @@ _init_extensions (GSignondDaemon *self) return FALSE; } } else { - ext_init = default_extension_init; + ext_init = _default_extension_init; } self->priv->extension = ext_init (); g_return_val_if_fail (self->priv->extension && @@ -660,11 +683,6 @@ gsignond_daemon_clear (GSignondDaemon *self, WARN ("gsignond_storage_manager_delete_storage() failed"); retval = FALSE; } - if (!gsignond_wipe_directory (gsignond_config_get_string (priv->config, - GSIGNOND_CONFIG_GENERAL_STORAGE_PATH))) { - WARN ("gsignond_wipe_directory() failed"); - retval = FALSE; - } DBG ("re-create storage"); if (!_init_storage (self)) { diff --git a/src/daemon/gsignond-daemon.h b/src/daemon/gsignond-daemon.h index 2dd8fa5..de77d28 100644 --- a/src/daemon/gsignond-daemon.h +++ b/src/daemon/gsignond-daemon.h @@ -30,7 +30,7 @@ #include "gsignond-types.h" #include <gsignond/gsignond-access-control-manager.h> -#include <gsignond/gsignond-identity-info.h> +#include "common/gsignond-identity-info.h" #include "gsignond-signonui-proxy.h" #include "plugins/gsignond-plugin-proxy-factory.h" diff --git a/src/daemon/gsignond-identity-enum-types.c b/src/daemon/gsignond-identity-enum-types.c index 0307956..a1a3b81 100644 --- a/src/daemon/gsignond-identity-enum-types.c +++ b/src/daemon/gsignond-identity-enum-types.c @@ -2,8 +2,8 @@ /* Generated data (by glib-mkenums) */ #include "gsignond-identity-enum-types.h" -/* enumerations from "gsignond-identity.h" */ -#include "gsignond-identity.h" +/* enumerations from "./gsignond-identity.h" */ +#include "./gsignond-identity.h" GType gsignond_identity_change_type_get_type (void) diff --git a/src/daemon/gsignond-identity-enum-types.h b/src/daemon/gsignond-identity-enum-types.h index f1a002a..82c3c92 100644 --- a/src/daemon/gsignond-identity-enum-types.h +++ b/src/daemon/gsignond-identity-enum-types.h @@ -7,7 +7,7 @@ #include <glib-object.h> G_BEGIN_DECLS -/* Enumeration from "gsignond-identity.h" */ +/* Enumeration from "./gsignond-identity.h" */ #define GSIGNOND_TYPE_IDENTITY_CHANGE_TYPE (gsignond_identity_change_type_get_type()) GType gsignond_identity_change_type_get_type (void) G_GNUC_CONST; diff --git a/src/daemon/gsignond-identity.c b/src/daemon/gsignond-identity.c index 145b68c..cb36fa1 100644 --- a/src/daemon/gsignond-identity.c +++ b/src/daemon/gsignond-identity.c @@ -33,7 +33,6 @@ #include "gsignond-identity-enum-types.h" #include "gsignond-auth-session.h" #include "gsignond/gsignond-config-dbus.h" -#include "gsignond/gsignond-signonui.h" #include "common/gsignond-identity-info-internal.h" #include "plugins/gsignond-plugin-proxy-factory.h" @@ -72,8 +71,11 @@ typedef struct _GSignondIdentityCbData G_DEFINE_TYPE (GSignondIdentity, gsignond_identity, G_TYPE_OBJECT); -static void _on_session_close (gpointer data, GObject *session); +static void _on_session_dead (gpointer data, GObject *session); static void _on_refresh_dialog (GSignondAuthSession *session, GSignondSignonuiData *ui_data, gpointer userdata); +static void _on_process_canceled (GSignondAuthSession *session, GSignondIdentityCbData *cb_data); +static void _on_user_action_required (GSignondAuthSession *session, GSignondSignonuiData *ui_data, gpointer userdata); +static void _on_store_token (GSignondAuthSession *session, GSignondDictionary *token_data, gpointer userdata); #define GSIGNOND_IDENTITY_PRIV(obj) G_TYPE_INSTANCE_GET_PRIVATE ((obj), GSIGNOND_TYPE_IDENTITY, GSignondIdentityPrivate) @@ -163,7 +165,10 @@ _set_property (GObject *object, guint property_id, const GValue *value, static void _release_weak_ref_on_session (gpointer key, gpointer value, gpointer data) { - g_object_weak_unref (G_OBJECT (value), _on_session_close, data); + GObject *session = G_OBJECT (value); + g_signal_handlers_disconnect_by_func (session, G_CALLBACK (_on_user_action_required), data); + g_signal_handlers_disconnect_by_func (session, G_CALLBACK (_on_store_token), data); + g_object_weak_unref (session, _on_session_dead, data); } static void @@ -334,8 +339,10 @@ _on_refresh_dialog (GSignondAuthSession *session, GSignondSignonuiData *ui_data, { GSignondIdentityCbData *cb_data = (GSignondIdentityCbData *) userdata; - gsignond_daemon_refresh_dialog (GSIGNOND_DAEMON (cb_data->identity->priv->owner), - G_OBJECT (cb_data->session), ui_data, _on_dialog_refreshed, userdata); + if (!gsignond_daemon_refresh_dialog (GSIGNOND_DAEMON (cb_data->identity->priv->owner), + G_OBJECT (cb_data->session), ui_data, _on_dialog_refreshed, userdata)) { + WARN ("Dialog Refresh Failed"); + } } static void @@ -355,21 +362,31 @@ _on_user_action_completed (GSignondSignonuiData *reply, GError *error, gpointer GSignondIdentityPrivate *priv = GSIGNOND_IDENTITY_PRIV (cb_data->identity); GSignondSignonuiError ui_error = SIGNONUI_ERROR_NONE; + g_return_if_fail (cb_data && GSIGNOND_IS_AUTH_SESSION (cb_data->session)); + g_signal_handlers_disconnect_by_func(cb_data->session, _on_refresh_dialog, user_data); + g_signal_handlers_disconnect_by_func(cb_data->session, _on_process_canceled, user_data); if (error) { WARN ("UI-Error: %s on identity %d", error->message, gsignond_identity_info_get_id (priv->info)); + if (cb_data->session) { + GSignondSignonuiData *reply = gsignond_dictionary_new(); + gsignond_signonui_data_set_query_error (reply, SIGNONUI_ERROR_GENERAL); + gsignond_auth_session_user_action_finished (cb_data->session, reply); + gsignond_dictionary_unref(reply); + } g_error_free (error); g_slice_free (GSignondIdentityCbData, cb_data); return; } - if (!gsignond_signonui_data_get_query_error (reply, &ui_error)) + if (gsignond_signonui_data_get_query_error (reply, &ui_error) + && ui_error != SIGNONUI_ERROR_NONE) { WARN ("signonui error %d for identity %d", - ui_error, - gsignond_identity_info_get_id (priv->info)); + ui_error, gsignond_identity_info_get_id (priv->info)); + } if (!gsignond_identity_info_get_validated (priv->info) && ui_error == SIGNONUI_ERROR_NONE) { @@ -407,12 +424,27 @@ _on_user_action_completed (GSignondSignonuiData *reply, GError *error, gpointer if (cb_data->session) { gsignond_auth_session_user_action_finished (cb_data->session, reply); } - else if (reply) gsignond_signonui_data_unref (reply); g_slice_free (GSignondIdentityCbData, cb_data); } static void +_on_process_canceled (GSignondAuthSession *session, GSignondIdentityCbData *cb_data) +{ + g_signal_handlers_disconnect_by_func(session, G_CALLBACK(_on_process_canceled), cb_data); + + if (!cb_data) { + WARN ("assert (cb_data)"); + return; + } + if (!gsignond_daemon_cancel_dialog ( + cb_data->identity->priv->owner, G_OBJECT(session), NULL, NULL)) { + WARN ("Fail to cancel dialog"); + } + g_slice_free (GSignondIdentityCbData, cb_data); +} + +static void _on_user_action_required (GSignondAuthSession *session, GSignondSignonuiData *ui_data, gpointer userdata) { GSignondIdentity *identity = GSIGNOND_IDENTITY (userdata); @@ -422,7 +454,9 @@ _on_user_action_required (GSignondAuthSession *session, GSignondSignonuiData *ui cb_data->session = session; gsignond_daemon_show_dialog (GSIGNOND_DAEMON (identity->priv->owner), G_OBJECT(session), - ui_data, _on_user_action_completed, _on_refresh_requested_by_ui, userdata); + ui_data, _on_user_action_completed, _on_refresh_requested_by_ui, cb_data); + + g_signal_connect (session, "process-canceled", G_CALLBACK(_on_process_canceled), cb_data); } static void @@ -448,7 +482,7 @@ _compare_session_by_pointer (gpointer key, gpointer value, gpointer dead_object) } static void -_on_session_close (gpointer data, GObject *session) +_on_session_dead (gpointer data, GObject *session) { GSignondIdentity *identity = GSIGNOND_IDENTITY (data); @@ -524,6 +558,7 @@ gsignond_identity_get_auth_session (GSignondIdentity *identity, GSIGNOND_IDENTITY_INFO_NEW_IDENTITY) { token_data = gsignond_daemon_load_identity_data (identity->priv->owner, identity_id, method); } + if (!token_data) token_data = gsignond_dictionary_new(); session = gsignond_auth_session_new (identity->priv->info, method, token_data); @@ -539,7 +574,7 @@ gsignond_identity_get_auth_session (GSignondIdentity *identity, g_signal_connect (session, "process-store", G_CALLBACK (_on_store_token), identity); g_hash_table_insert (identity->priv->auth_sessions, g_strdup (method), session); - g_object_weak_ref (G_OBJECT (session), _on_session_close, identity); + g_object_weak_ref (G_OBJECT (session), _on_session_dead, identity); DBG ("session %p creation for method '%s' complete", session, method); @@ -547,52 +582,55 @@ gsignond_identity_get_auth_session (GSignondIdentity *identity, } static void -_on_query_dialog_done (GSignondSignonuiData *reply, GError *error, gpointer user_data) +_on_credentials_updated (GSignondSignonuiData *reply, GError *error, gpointer user_data) { GSignondIdentity *identity = GSIGNOND_IDENTITY (user_data); guint32 id = 0; GError *err = NULL; - GSignondSignonuiError err_id = 0; if (error) { - WARN ("failed to verfiy user : %s", error->message); + WARN ("failed to verify user : %s", error->message); g_error_free (error); - err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, "Operation cancled"); + err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, "Operation canceled"); } + else + { + GSignondSignonuiError err_id = SIGNONUI_ERROR_NONE; + gboolean res = gsignond_signonui_data_get_query_error (reply, &err_id); + + if (!res) { + DBG ("No error code set by UI daemon, treating as ERROR_NONE"); + } - gboolean res = gsignond_signonui_data_get_query_error (reply, &err_id); - g_assert (res == TRUE); - - if (err_id != SIGNONUI_ERROR_NONE) { - switch (err_id) { - case SIGNONUI_ERROR_CANCELED: - err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, - "Operation cancled"); - break; - default: - err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_INTERNAL_SERVER, + if (err_id != SIGNONUI_ERROR_NONE) { + switch (err_id) { + case SIGNONUI_ERROR_CANCELED: + err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, + "Operation canceled"); + break; + default: + err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_INTERNAL_SERVER, "signon ui returned with error : %d", err_id); - break; + break; + } } - } - else { - const gchar *secret = gsignond_signonui_data_get_password (reply); + else { + const gchar *secret = gsignond_signonui_data_get_password (reply); - if (!secret) { - err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_INTERNAL_SERVER, + if (!secret) { + err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_INTERNAL_SERVER, "Server internal error occured"); - } else if (identity->priv->info) { - gsignond_identity_info_set_secret (identity->priv->info, secret) ; + } else if (identity->priv->info) { + gsignond_identity_info_set_secret (identity->priv->info, secret) ; - /* Save new secret in db */ - id = gsignond_daemon_store_identity (identity->priv->owner, identity); - if (!id) err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_STORE_FAILED, "Failed to store secret"); + /* Save new secret in db */ + id = gsignond_daemon_store_identity (identity->priv->owner, identity); + if (!id) err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_STORE_FAILED, "Failed to store secret"); + } } } - gsignond_signonui_data_unref (reply); - g_signal_emit (identity, signals[SIG_CREDENTIALS_UPDATED], 0 , id, err); if (err) g_error_free (err); @@ -625,69 +663,70 @@ gsignond_identity_request_credentials_update (GSignondIdentity *identity, return FALSE; } - ui_data = gsignond_signonui_data_new (); + ui_data = gsignond_dictionary_new (); - gsignond_signonui_data_set_query_username (ui_data, TRUE); + gsignond_signonui_data_set_query_password (ui_data, TRUE); gsignond_signonui_data_set_username (ui_data, gsignond_identity_info_get_username (identity->priv->info)); gsignond_signonui_data_set_caption (ui_data, gsignond_identity_info_get_caption (identity->priv->info)); gsignond_signonui_data_set_message (ui_data, message); gsignond_daemon_show_dialog (GSIGNOND_DAEMON (identity->priv->owner), G_OBJECT(identity), - ui_data, _on_query_dialog_done, NULL, identity); + ui_data, _on_credentials_updated, NULL, identity); - gsignond_signonui_data_unref (ui_data); + gsignond_dictionary_unref (ui_data); return TRUE; } static void -_on_user_verfied (GSignondSignonuiData *reply, GError *error, gpointer user_data) +_on_user_verified (GSignondSignonuiData *reply, GError *error, gpointer user_data) { GSignondIdentity *identity = GSIGNOND_IDENTITY (user_data); gboolean res = FALSE; GError *err = NULL; - GSignondSignonuiError err_id = 0; if (error) { - WARN ("failed to verfiy user : %s", error->message); + WARN ("failed to verify user : %s", error->message); g_error_free (error); - err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, "Operation cancled"); + err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, "Operation canceled"); } - - gboolean query_res = gsignond_signonui_data_get_query_error (reply, &err_id); - g_assert (query_res == TRUE); - - if (err_id != SIGNONUI_ERROR_NONE) { - switch (err_id) { - case SIGNONUI_ERROR_CANCELED: - err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, - "Operation cancled"); - break; - case SIGNONUI_ERROR_FORGOT_PASSWORD: - err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_FORGOT_PASSWORD, "Forgot password"); - break; - default: - err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_INTERNAL_SERVER, + else + { + GSignondSignonuiError err_id = SIGNONUI_ERROR_NONE; + gboolean res = gsignond_signonui_data_get_query_error (reply, &err_id); + if (!res) { + DBG ("No error code set by UI daemon, treating as ERROR_NONE"); + } + if (err_id != SIGNONUI_ERROR_NONE) { + switch (err_id) { + case SIGNONUI_ERROR_CANCELED: + err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, + "Operation canceled"); + break; + case SIGNONUI_ERROR_FORGOT_PASSWORD: + err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_FORGOT_PASSWORD, "Forgot password"); + break; + default: + err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_INTERNAL_SERVER, "signon ui returned error : %d", err_id); - break; + break; + } } - } - else { - const gchar *secret = gsignond_signonui_data_get_password (reply); + else { + const gchar *secret = gsignond_signonui_data_get_password (reply); - if (!secret) { - err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_INTERNAL_SERVER, + if (!secret) { + err = gsignond_get_gerror_for_id (GSIGNOND_ERROR_INTERNAL_SERVER, "Server internal error occured"); - } else if (identity->priv->info) { - res = g_strcmp0 (secret, gsignond_identity_info_get_secret + } else if (identity->priv->info) { + res = g_strcmp0 (secret, gsignond_identity_info_get_secret (identity->priv->info)) == 0; + } } } - gsignond_signonui_data_unref (reply); - - g_signal_emit (identity, signals[SIG_USER_VERIFIED], 0, res, error); + g_signal_emit (identity, signals[SIG_USER_VERIFIED], 0, res, err); if (err) g_error_free (err); } @@ -722,15 +761,15 @@ gsignond_identity_verify_user (GSignondIdentity *identity, return FALSE; } - ui_data = gsignond_signonui_data_new_from_variant (params); + ui_data = gsignond_dictionary_new_from_variant (params); gsignond_signonui_data_set_query_password (ui_data, TRUE); gsignond_signonui_data_set_username (ui_data, gsignond_identity_info_get_username (identity->priv->info)); gsignond_signonui_data_set_caption (ui_data, gsignond_identity_info_get_caption (identity->priv->info)); - + gsignond_daemon_show_dialog (GSIGNOND_DAEMON (identity->priv->owner), G_OBJECT (identity), - ui_data, _on_user_verfied, NULL, identity); + ui_data, _on_user_verified, NULL, identity); - gsignond_signonui_data_unref (ui_data); + gsignond_dictionary_unref (ui_data); return TRUE; } diff --git a/src/daemon/gsignond-identity.h b/src/daemon/gsignond-identity.h index b356d83..11b7654 100644 --- a/src/daemon/gsignond-identity.h +++ b/src/daemon/gsignond-identity.h @@ -30,7 +30,7 @@ #include <glib-object.h> #include "gsignond-types.h" -#include <gsignond/gsignond-identity-info.h> +#include "common/gsignond-identity-info.h" #include <gsignond/gsignond-access-control-manager.h> G_BEGIN_DECLS @@ -48,8 +48,7 @@ typedef enum { GSIGNOND_IDENTITY_DATA_UPDATED = 0, GSIGNOND_IDENTITY_REMOVED, GSIGNOND_IDENTITY_SIGNED_OUT -} IdentityChangeType; -typedef IdentityChangeType GSignondIdentityChangeType; +} GSignondIdentityChangeType; struct _GSignondIdentity { diff --git a/src/daemon/gsignond-signonui-proxy.c b/src/daemon/gsignond-signonui-proxy.c index ec79fca..6002049 100644 --- a/src/daemon/gsignond-signonui-proxy.c +++ b/src/daemon/gsignond-signonui-proxy.c @@ -25,7 +25,6 @@ #include "gsignond-signonui-proxy.h" #include <gsignond/gsignond-log.h> -#include <gsignond/gsignond-signonui.h> #include "dbus/gsignond-dbus-signonui-adapter.h" static void _process_next_request (GSignondSignonuiProxy *proxy); @@ -53,6 +52,7 @@ typedef struct { struct _GSignondSignonuiProxyPrivate { GSignondDbusSignonuiAdapter *signonui; + guint signonui_timer_id; _UIQueryRequest *active_request; /* Active dialog */ GQueue *request_queue; /* request queue */ gboolean is_idle; @@ -71,7 +71,7 @@ _ui_query_request_new (GObject *caller, _UIQueryRequest *req = g_new0(_UIQueryRequest, 1); req->caller = caller; - req->ui_data = gsignond_signonui_data_ref (ui_data); + req->ui_data = gsignond_dictionary_ref (ui_data); req->cb = cb; req->refresh_cb = refresh_cb; req->userdata = userdata; @@ -105,7 +105,7 @@ static void _ui_query_request_free (_UIQueryRequest *req) { if (!req) return; - if (req->ui_data) gsignond_signonui_data_unref (req->ui_data); + if (req->ui_data) gsignond_dictionary_unref (req->ui_data); g_free (req); } @@ -114,6 +114,10 @@ _dispose (GObject *object) { GSignondSignonuiProxy *self = GSIGNOND_SIGNONUI_PROXY (object); + if (self->priv->signonui_timer_id) { + g_source_remove (self->priv->signonui_timer_id); + self->priv->signonui_timer_id = 0; + } if (self->priv->signonui) { g_object_unref (self->priv->signonui); self->priv->signonui = NULL; @@ -151,10 +155,7 @@ gsignond_signonui_proxy_init (GSignondSignonuiProxy *proxy) { proxy->priv = GSIGNOND_SIGNONUI_PROXY_GET_PRIV (proxy); - proxy->priv->signonui = gsignond_dbus_signonui_adapter_new (); - - if (proxy->priv->signonui) - g_signal_connect_swapped (proxy->priv->signonui, "refresh", G_CALLBACK(_on_refresh_request), proxy); + proxy->priv->signonui = NULL; proxy->priv->active_request = NULL; proxy->priv->request_queue = g_queue_new (); proxy->priv->is_idle = TRUE; @@ -174,43 +175,92 @@ _on_refresh_request (GSignondSignonuiProxy *proxy, gchar *request_id, gpointer u } static void -_query_dialog_cb (GVariant *reply, GError *error, gpointer user_data) +_query_dialog_cb_internal (GSignondSignonuiProxy *proxy, GSignondSignonuiData *ui_data, GError *error) { - GSignondSignonuiProxy *proxy = GSIGNOND_SIGNONUI_PROXY (user_data); - _UIQueryRequest *req = proxy->priv->active_request; - if (req && req->cb) - req->cb (gsignond_signonui_data_new_from_variant (reply), error, req->userdata); + proxy->priv->active_request = NULL; + if (req && req->cb && G_OBJECT(req->caller)) { + req->cb (ui_data, error, req->userdata); + } else if (error) { WARN ("UI-Error: %s", error->message); g_error_free (error); } - _ui_query_request_free (req); - - proxy->priv->active_request = NULL; + if (req) _ui_query_request_free (req); + if (ui_data) gsignond_dictionary_unref (ui_data); _process_next_request (proxy); } static void +_query_dialog_cb (GVariant *reply, GError *error, gpointer user_data) +{ + GSignondSignonuiProxy *proxy = GSIGNOND_SIGNONUI_PROXY (user_data); + GSignondSignonuiData *ui_data = reply ? gsignond_dictionary_new_from_variant (reply) : NULL; + + _query_dialog_cb_internal (proxy, ui_data, error); +} + +static gboolean +_close_ui_connection (gpointer data) +{ + GSignondSignonuiProxy *proxy = GSIGNOND_SIGNONUI_PROXY(data); + g_return_val_if_fail (proxy, FALSE); + + proxy->priv->signonui_timer_id = 0; + + g_clear_object (&proxy->priv->signonui); + + return FALSE; +} + +static void _process_next_request (GSignondSignonuiProxy *proxy) { _UIQueryRequest *req = g_queue_pop_head (proxy->priv->request_queue); + GVariant *params = NULL; if (!req) { proxy->priv->is_idle = TRUE; proxy->priv->active_request = NULL; + proxy->priv->signonui_timer_id = + g_timeout_add_seconds (10, (GSourceFunc)_close_ui_connection, proxy); return; } + else { + proxy->priv->active_request = req; + + if (proxy->priv->signonui_timer_id) { + g_source_remove (proxy->priv->signonui_timer_id); + proxy->priv->signonui_timer_id = 0; + } + if (!proxy->priv->signonui) + proxy->priv->signonui = gsignond_dbus_signonui_adapter_new (); + if (proxy->priv->signonui) + g_signal_connect_swapped (proxy->priv->signonui, "refresh", + G_CALLBACK(_on_refresh_request), proxy); + else { + GSignondSignonuiData *reply = gsignond_dictionary_new (); + gsignond_signonui_data_set_query_error(reply, SIGNONUI_ERROR_NO_SIGNONUI); + _query_dialog_cb_internal (proxy, reply, NULL); + return; + } + } - proxy->priv->active_request = req; /* update request id */ gsignond_signonui_data_set_request_id (req->ui_data, G_OBJECT_TYPE_NAME(req->caller)); - gsignond_dbus_signonui_adapter_query_dialog (proxy->priv->signonui, - gsignond_signonui_data_to_variant(req->ui_data), _query_dialog_cb, proxy); + params = gsignond_dictionary_to_variant(req->ui_data) ; + if (!gsignond_dbus_signonui_adapter_query_dialog (proxy->priv->signonui, + params, _query_dialog_cb, proxy)) { + GSignondSignonuiData *reply = gsignond_dictionary_new (); + gsignond_signonui_data_set_query_error(reply, SIGNONUI_ERROR_GENERAL); + _query_dialog_cb_internal (proxy, reply, NULL); + g_variant_unref (params); + return; + } proxy->priv->is_idle = FALSE; } @@ -257,13 +307,15 @@ gsignond_signonui_proxy_refresh_dialog (GSignondSignonuiProxy *proxy, if (proxy->priv->active_request && proxy->priv->active_request->caller == caller) { _UIRefreshRequest *req = _ui_refresh_request_new (cb, userdata); + GVariant *var_uidata = gsignond_dictionary_to_variant (ui_data); - /* FIXME: Is it required to set refresh id for refresh data */ gsignond_signonui_data_set_request_id (ui_data, G_OBJECT_TYPE_NAME(caller)); - gsignond_dbus_signonui_adapter_refresh_dialog (proxy->priv->signonui, - gsignond_signonui_data_to_variant (ui_data), _refresh_dialog_cb, req); - - return TRUE; + if (gsignond_dbus_signonui_adapter_refresh_dialog (proxy->priv->signonui, + var_uidata, _refresh_dialog_cb, req)) { + return TRUE; + } + g_variant_unref (var_uidata); + g_free (req); } return FALSE; @@ -306,23 +358,32 @@ gsignond_signonui_proxy_cancel_request (GSignondSignonuiProxy *proxy, /* cancel active request */ if (proxy->priv->active_request->caller == caller) { _UICancelRequest *req = _ui_cancel_request_new (cb, userdata); - gsignond_dbus_signonui_adapter_cancel_request (proxy->priv->signonui, - G_OBJECT_TYPE_NAME (caller), _cancel_request_cb, req); + if (!gsignond_dbus_signonui_adapter_cancel_request (proxy->priv->signonui, + G_OBJECT_TYPE_NAME (caller), _cancel_request_cb, req)) { + g_free (req); + return FALSE; + } + _ui_query_request_free (proxy->priv->active_request); + proxy->priv->active_request = NULL; return TRUE; } /* cancel pending request */ element = g_queue_find_custom (proxy->priv->request_queue, caller, _find_request_by_caller); - if (!element) return FALSE; + req = element->data; - if (req->cb) { - gsignond_signonui_data_ref (req->ui_data); - gsignond_signonui_data_set_query_error(req->ui_data, SIGNONUI_ERROR_CANCELED); + g_queue_delete_link (proxy->priv->request_queue, element); - req->cb (req->ui_data, NULL, req->userdata); + if (req && req->cb) { + GSignondSignonuiData *reply = gsignond_dictionary_new (); + gsignond_signonui_data_set_query_error(reply, SIGNONUI_ERROR_CANCELED); + + req->cb (reply, NULL, req->userdata); + gsignond_dictionary_unref (reply); } + _ui_query_request_free (req); if (cb) cb(NULL, userdata); diff --git a/src/daemon/main.c b/src/daemon/main.c index 065ac7f..64a871a 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -29,6 +29,7 @@ #include <signal.h> #include <string.h> #include <stdio.h> +#include <grp.h> #include <glib-unix.h> #include <glib.h> #include <gio/gio.h> @@ -111,16 +112,23 @@ int main (int argc, char **argv) GOptionEntry opt_entries[] = { {NULL } }; + gid_t daemon_gid; + struct group *daemon_group; - DBG ("before: real uid %d effective uid %d", getuid (), geteuid ()); - if (setreuid (-1, getuid())) - WARN ("setreuid() failed"); - DBG ("after: real uid %d effective uid %d", getuid (), geteuid ()); DBG ("before: real gid %d effective gid %d", getgid (), getegid ()); - if (setregid (-1, getgid())) - WARN ("setregid() failed"); + daemon_gid = getgid (); + daemon_group = getgrnam ("gsignond"); + if (daemon_group) + daemon_gid = daemon_group->gr_gid; + if (setegid (daemon_gid)) + WARN ("setegid() failed"); DBG ("after: real gid %d effective gid %d", getgid (), getegid ()); + DBG ("before: real uid %d effective uid %d", getuid (), geteuid ()); + if (seteuid (getuid ())) + WARN ("seteuid() failed"); + DBG ("after: real uid %d effective uid %d", getuid (), geteuid ()); + #if !GLIB_CHECK_VERSION (2, 36, 0) g_type_init (); #endif diff --git a/src/daemon/plugins/Makefile.am b/src/daemon/plugins/Makefile.am index 1892a6a..796bea6 100644 --- a/src/daemon/plugins/Makefile.am +++ b/src/daemon/plugins/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = plugind -lib_LTLIBRARIES = libgsignond-plugins.la +noinst_LTLIBRARIES = libgsignond-plugins.la libgsignond_plugins_la_CPPFLAGS = \ -I$(top_builddir) \ diff --git a/src/daemon/plugins/Makefile.in b/src/daemon/plugins/Makefile.in index 9ecd358..1780ba2 100644 --- a/src/daemon/plugins/Makefile.in +++ b/src/daemon/plugins/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,44 +55,17 @@ subdir = src/daemon/plugins DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libgsignond_plugins_la_DEPENDENCIES = \ $(top_builddir)/src/common/libgsignond-common.la \ @@ -124,6 +114,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -297,7 +292,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = plugind -lib_LTLIBRARIES = libgsignond-plugins.la +noinst_LTLIBRARIES = libgsignond-plugins.la libgsignond_plugins_la_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/src \ @@ -354,39 +349,17 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libgsignond-plugins.la: $(libgsignond_plugins_la_OBJECTS) $(libgsignond_plugins_la_DEPENDENCIES) $(EXTRA_libgsignond_plugins_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libgsignond_plugins_la_OBJECTS) $(libgsignond_plugins_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libgsignond_plugins_la_OBJECTS) $(libgsignond_plugins_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -616,13 +589,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -647,9 +617,6 @@ check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -683,7 +650,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive @@ -710,7 +677,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: install-libLTLIBRARIES +install-exec-am: install-html: install-html-recursive @@ -750,26 +717,25 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-libLTLIBRARIES +uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-libLTLIBRARIES + all all-am check check-am clean clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/daemon/plugins/gsignond-plugin-proxy.c b/src/daemon/plugins/gsignond-plugin-proxy.c index cfb3638..7e2e225 100644 --- a/src/daemon/plugins/gsignond-plugin-proxy.c +++ b/src/daemon/plugins/gsignond-plugin-proxy.c @@ -61,6 +61,7 @@ struct _GSignondPluginProxyPrivate typedef struct { GSignondAuthSession* auth_session; GSignondSessionData* session_data; + GSignondDictionary* identity_method_cache; gchar* mechanism; gpointer userdata; } GSignondProcessData; @@ -73,12 +74,15 @@ static GSignondProcessData* gsignond_process_data_new ( GSignondAuthSession* auth_session, GSignondSessionData *session_data, + GSignondDictionary *identity_method_cache, const gchar* mechanism, gpointer userdata) { GSignondProcessData* data = g_slice_new0 (GSignondProcessData); data->auth_session = g_object_ref (auth_session); data->session_data = gsignond_dictionary_copy (session_data); + if (identity_method_cache) + data->identity_method_cache = gsignond_dictionary_copy (identity_method_cache); data->mechanism = g_strdup (mechanism); data->userdata = userdata; return data; @@ -90,6 +94,8 @@ gsignond_process_data_free ( { g_object_unref (data->auth_session); gsignond_dictionary_unref (data->session_data); + if (data->identity_method_cache) + gsignond_dictionary_unref (data->identity_method_cache); g_free (data->mechanism); g_slice_free (GSignondProcessData, data); } @@ -113,6 +119,7 @@ gsignond_plugin_proxy_process_queue ( priv->active_process_userdata); gsignond_plugin_request_initial (priv->plugin, next_data->session_data, + next_data->identity_method_cache, next_data->mechanism); gsignond_process_data_free (next_data); } @@ -255,6 +262,18 @@ gsignond_plugin_proxy_status_changed_callback ( priv->active_process_userdata); } +static void +_on_remote_plugin_dead (gpointer data, GObject *dead_obj) +{ +DBG("{"); + GSignondPluginProxy *proxy = NULL; + if (data && (proxy = GSIGNOND_PLUGIN_PROXY(data))) { + proxy->priv->plugin = NULL; + g_object_unref (G_OBJECT(data)); + } +DBG("}"); +} + static GObject * gsignond_plugin_proxy_constructor ( GType gtype, @@ -302,6 +321,8 @@ gsignond_plugin_proxy_constructor ( } g_free (type); + g_object_weak_ref (G_OBJECT(priv->plugin), _on_remote_plugin_dead, obj); + } return obj; } @@ -372,6 +393,7 @@ gsignond_plugin_proxy_dispose ( priv->active_session = NULL; } if (priv->plugin) { + g_object_weak_unref (G_OBJECT(priv->plugin), _on_remote_plugin_dead, self); g_object_unref (priv->plugin); priv->plugin = NULL; } @@ -500,6 +522,7 @@ gsignond_plugin_proxy_process ( GSignondPluginProxy *self, GSignondAuthSession *session, GSignondSessionData *session_data, + GSignondDictionary *identity_method_cache, const gchar *mechanism, gpointer userdata) { @@ -510,14 +533,15 @@ gsignond_plugin_proxy_process ( if (session == priv->active_session && priv->expecting_request == TRUE) { priv->expecting_request = FALSE; - // mechanism is discarded if this is not an initial request + // mechanism and identity_method_cache are discarded if this is not an initial request gsignond_plugin_request (priv->plugin, session_data); return; } g_queue_push_tail (priv->session_queue, gsignond_process_data_new (session, - session_data, + session_data, + identity_method_cache, mechanism, userdata)); gsignond_auth_session_notify_state_changed ( session, GSIGNOND_PLUGIN_STATE_PROCESS_PENDING, diff --git a/src/daemon/plugins/gsignond-plugin-proxy.h b/src/daemon/plugins/gsignond-plugin-proxy.h index 089e125..d5b5bc1 100644 --- a/src/daemon/plugins/gsignond-plugin-proxy.h +++ b/src/daemon/plugins/gsignond-plugin-proxy.h @@ -83,6 +83,7 @@ gsignond_plugin_proxy_process ( GSignondPluginProxy *self, GSignondAuthSession* session, GSignondSessionData *session_data, + GSignondDictionary *identity_method_cache, const gchar *mechanism, gpointer userdata); void diff --git a/src/daemon/plugins/gsignond-plugin-remote.c b/src/daemon/plugins/gsignond-plugin-remote.c index 6953057..7d6291a 100644 --- a/src/daemon/plugins/gsignond-plugin-remote.c +++ b/src/daemon/plugins/gsignond-plugin-remote.c @@ -444,6 +444,7 @@ static void gsignond_plugin_remote_request_initial ( GSignondPlugin *plugin, GSignondSessionData *session_data, + GSignondDictionary *identity_method_cache, const gchar *mechanism) { g_return_if_fail (session_data && plugin && @@ -451,8 +452,16 @@ gsignond_plugin_remote_request_initial ( GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (plugin); GVariant *data = gsignond_dictionary_to_variant (session_data); + GVariant *cache; + if (identity_method_cache) + cache = gsignond_dictionary_to_variant (identity_method_cache); + else { + GSignondDictionary* empty_cache = gsignond_dictionary_new(); + cache = gsignond_dictionary_to_variant (empty_cache); + gsignond_dictionary_unref(empty_cache); + } gsignond_dbus_remote_plugin_call_request_initial ( - self->priv->dbus_plugin_proxy, data, mechanism, NULL, + self->priv->dbus_plugin_proxy, data, cache, mechanism, NULL, _request_initial_async_cb, self); } @@ -514,7 +523,7 @@ gsignond_plugin_remote_user_action_finished ( GSIGNOND_IS_PLUGIN_REMOTE (plugin)); GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (plugin); - GVariant *data = gsignond_signonui_data_to_variant (signonui_data); + GVariant *data = gsignond_dictionary_to_variant (signonui_data); gsignond_dbus_remote_plugin_call_user_action_finished ( self->priv->dbus_plugin_proxy, data, NULL, _user_action_finished_async_cb, self); @@ -546,7 +555,7 @@ gsignond_plugin_remote_refresh ( GSIGNOND_IS_PLUGIN_REMOTE (plugin)); GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (plugin); - GVariant *data = gsignond_signonui_data_to_variant (signonui_data); + GVariant *data = gsignond_dictionary_to_variant (signonui_data); gsignond_dbus_remote_plugin_call_refresh ( self->priv->dbus_plugin_proxy, data, NULL, _refresh_async_cb, self); } @@ -624,9 +633,9 @@ _user_action_required_cb ( g_return_if_fail (self && GSIGNOND_IS_PLUGIN_REMOTE (self)); GSignondSignonuiData *data = (GSignondSignonuiData *) - gsignond_signonui_data_new_from_variant (ui_data); + gsignond_dictionary_new_from_variant (ui_data); gsignond_plugin_user_action_required (GSIGNOND_PLUGIN(self), data); - gsignond_signonui_data_unref (data); + gsignond_dictionary_unref (data); } static void @@ -638,9 +647,9 @@ _refreshed_cb( g_return_if_fail (self && GSIGNOND_IS_PLUGIN_REMOTE (self)); GSignondSignonuiData *data = (GSignondSignonuiData *) - gsignond_signonui_data_new_from_variant (ui_data); + gsignond_dictionary_new_from_variant (ui_data); gsignond_plugin_refreshed (GSIGNOND_PLUGIN(self), data); - gsignond_signonui_data_unref (data); + gsignond_dictionary_unref (data); } static void diff --git a/src/daemon/plugins/plugind/Makefile.am b/src/daemon/plugins/plugind/Makefile.am index c48eb15..0ee89ff 100644 --- a/src/daemon/plugins/plugind/Makefile.am +++ b/src/daemon/plugins/plugind/Makefile.am @@ -1,7 +1,7 @@ SUBDIRS= NULL= -lib_LTLIBRARIES = libgsignond-plugind-daemon.la +noinst_LTLIBRARIES = libgsignond-plugind-daemon.la libgsignond_plugind_daemon_la_CPPFLAGS = \ -I$(top_builddir) \ diff --git a/src/daemon/plugins/plugind/Makefile.in b/src/daemon/plugins/plugind/Makefile.in index 53bd9fe..97fb425 100644 --- a/src/daemon/plugins/plugind/Makefile.in +++ b/src/daemon/plugins/plugind/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -40,44 +57,17 @@ subdir = src/daemon/plugins/plugind DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" -LTLIBRARIES = $(lib_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libgsignond_plugind_daemon_la_DEPENDENCIES = \ $(top_builddir)/src/common/libgsignond-common.la \ @@ -90,6 +80,7 @@ libgsignond_plugind_daemon_la_OBJECTS = \ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = am_gsignond_plugind_OBJECTS = gsignond_plugind-main.$(OBJEXT) \ @@ -138,6 +129,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -312,7 +308,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = NULL = -lib_LTLIBRARIES = libgsignond-plugind-daemon.la +noinst_LTLIBRARIES = libgsignond-plugind-daemon.la libgsignond_plugind_daemon_la_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/src \ @@ -379,43 +375,24 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libgsignond-plugind-daemon.la: $(libgsignond_plugind_daemon_la_OBJECTS) $(libgsignond_plugind_daemon_la_DEPENDENCIES) $(EXTRA_libgsignond_plugind_daemon_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libgsignond_plugind_daemon_la_OBJECTS) $(libgsignond_plugind_daemon_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libgsignond_plugind_daemon_la_OBJECTS) $(libgsignond_plugind_daemon_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -686,13 +663,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -715,11 +689,9 @@ distdir: $(DISTFILES) check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local -install-binPROGRAMS: install-libLTLIBRARIES - installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -754,8 +726,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -781,7 +753,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES +install-exec-am: install-binPROGRAMS install-html: install-html-recursive @@ -821,27 +793,26 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES +uninstall-am: uninstall-binPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am all-local check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + clean-generic clean-libtool clean-noinstLTLIBRARIES ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-libLTLIBRARIES + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS all-local: slink diff --git a/src/daemon/plugins/plugind/gsignond-plugin-daemon.c b/src/daemon/plugins/plugind/gsignond-plugin-daemon.c index 641eeca..11e6fc7 100644 --- a/src/daemon/plugins/plugind/gsignond-plugin-daemon.c +++ b/src/daemon/plugins/plugind/gsignond-plugin-daemon.c @@ -175,6 +175,7 @@ _handle_request_initial_from_dbus ( GSignondPluginDaemon *self, GDBusMethodInvocation *invocation, const GVariant *session_data, + const GVariant *identity_method_cache, const gchar *mechanism, gpointer user_data) { @@ -186,8 +187,11 @@ _handle_request_initial_from_dbus ( GSignondSessionData *data = (GSignondSessionData *) gsignond_dictionary_new_from_variant ((GVariant *)session_data); - gsignond_plugin_request_initial (self->priv->plugin, data, mechanism); + GSignondSessionData *cache = + gsignond_dictionary_new_from_variant ((GVariant *)identity_method_cache); + gsignond_plugin_request_initial (self->priv->plugin, data, cache, mechanism); gsignond_dictionary_unref (data); + gsignond_dictionary_unref (cache); return TRUE; } @@ -206,9 +210,9 @@ _handle_user_action_finished_from_dbus ( self->priv->dbus_remote_plugin, invocation); GSignondSignonuiData *data = (GSignondSignonuiData *) - gsignond_signonui_data_new_from_variant ((GVariant *)ui_data); + gsignond_dictionary_new_from_variant ((GVariant *)ui_data); gsignond_plugin_user_action_finished (self->priv->plugin, data); - gsignond_signonui_data_unref (data); + gsignond_dictionary_unref (data); return TRUE; } @@ -226,9 +230,9 @@ _handle_refresh_from_dbus ( self->priv->dbus_remote_plugin, invocation); GSignondSignonuiData *data = (GSignondSignonuiData *) - gsignond_signonui_data_new_from_variant ((GVariant *)ui_data); + gsignond_dictionary_new_from_variant ((GVariant *)ui_data); gsignond_plugin_refresh (self->priv->plugin, data); - gsignond_signonui_data_unref (data); + gsignond_dictionary_unref (data); return TRUE; } @@ -321,7 +325,7 @@ _handle_user_action_required_from_plugin ( DBG (""); g_return_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self)); - GVariant *data = gsignond_signonui_data_to_variant (ui_data); + GVariant *data = gsignond_dictionary_to_variant (ui_data); gsignond_dbus_remote_plugin_emit_user_action_required ( self->priv->dbus_remote_plugin, data); } @@ -335,7 +339,7 @@ _handle_refreshed_from_plugin( DBG (""); g_return_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self)); - GVariant *data = gsignond_signonui_data_to_variant (ui_data); + GVariant *data = gsignond_dictionary_to_variant (ui_data); gsignond_dbus_remote_plugin_emit_refreshed (self->priv->dbus_remote_plugin, data); } |