From 1fd618eee96db111f3eea0806eccb8cf2ad91106 Mon Sep 17 00:00:00 2001 From: Amarnath Valluri Date: Thu, 22 Aug 2013 15:27:24 +0300 Subject: Release 0.0.3 --- Makefile.am | 29 +- Makefile.in | 141 ++- aclocal.m4 | 79 +- build-aux/ar-lib | 13 +- build-aux/config.sub | 11 +- build-aux/depcomp | 124 ++- build-aux/ltmain.sh | 4 +- config.h.in | 6 + configure | 454 ++++---- configure.ac | 26 +- dists/debian/README.Debian | 6 + dists/debian/changelog | 5 + dists/debian/compat | 1 + dists/debian/control | 27 + dists/debian/copyright | 31 + dists/debian/docs | 2 + dists/debian/gsignond-dev.install | 5 + dists/debian/gsignond-doc.docs | 1 + dists/debian/gsignond-doc.install | 1 + dists/debian/install | 7 + dists/debian/postinst | 41 + dists/debian/postrm | 38 + dists/debian/preinst | 38 + dists/debian/prerm | 38 + dists/debian/rules | 19 + dists/debian/source/format | 1 + dists/rpm/gsignond-0.0.2-10/gsignond-0.0.2.tar.gz | Bin 0 -> 185701 bytes dists/rpm/gsignond-0.0.2-10/gsignond-suse.spec | 131 +++ dists/rpm/gsignond-0.0.2-10/gsignond-tizen.changes | 8 + dists/rpm/gsignond-0.0.2-10/gsignond-tizen.spec | 113 ++ dists/rpm/gsignond-suse.spec | 23 +- dists/rpm/gsignond-tizen.changes | 5 + dists/rpm/gsignond-tizen.spec | 23 +- docs/Makefile.am | 121 ++ docs/Makefile.in | 908 +++++++++++++++ docs/building.xml | 180 +++ docs/gsignond-docs.sgml | 77 ++ docs/gsignond-overrides.txt | 0 docs/gsignond-sections.txt | 391 +++++++ docs/gsignond.types | 10 + docs/html/GSignondAccessControlManager.html | 366 ++++++ docs/html/GSignondConfig.html | 275 +++++ docs/html/GSignondCredentials.html | 328 ++++++ docs/html/GSignondDigestPlugin.html | 128 +++ docs/html/GSignondExtension.html | 298 +++++ docs/html/GSignondPasswordPlugin.html | 113 ++ docs/html/GSignondSecretStorage.html | 598 ++++++++++ docs/html/GSignondSsoTestPlugin.html | 101 ++ docs/html/GSignondStorageManager.html | 305 +++++ docs/html/annotation-glossary.html | 36 + docs/html/api-index-full.html | 891 +++++++++++++++ docs/html/ch01.html | 33 + docs/html/ch02.html | 44 + docs/html/ch03.html | 44 + docs/html/ch04.html | 41 + docs/html/ch05.html | 50 + docs/html/ch06.html | 41 + docs/html/deprecated-api-index.html | 31 + docs/html/gsignond-DBus-configuration.html | 107 ++ docs/html/gsignond-Database-configuration.html | 89 ++ docs/html/gsignond-Errors.html | 433 ++++++++ docs/html/gsignond-GSignondDictionary.html | 771 +++++++++++++ docs/html/gsignond-GSignondPlugin.html | 694 ++++++++++++ docs/html/gsignond-GSignondSecurityContext.html | 550 ++++++++++ docs/html/gsignond-GSignondSessionData.html | 582 ++++++++++ docs/html/gsignond-GSignondSignonuiData.html | 1160 ++++++++++++++++++++ docs/html/gsignond-General-configuration.html | 161 +++ docs/html/gsignond-Logging.html | 177 +++ docs/html/gsignond-Utility-functions.html | 119 ++ docs/html/gsignond-building.html | 161 +++ docs/html/gsignond.devhelp2 | 320 ++++++ docs/html/home.png | Bin 0 -> 256 bytes docs/html/index.html | 116 ++ docs/html/index.sgml | 381 +++++++ docs/html/left-insensitive.png | Bin 0 -> 395 bytes docs/html/left.png | Bin 0 -> 262 bytes docs/html/object-tree.html | 42 + docs/html/right-insensitive.png | Bin 0 -> 373 bytes docs/html/right.png | Bin 0 -> 261 bytes docs/html/style.css | 321 ++++++ docs/html/up-insensitive.png | Bin 0 -> 374 bytes docs/html/up.png | Bin 0 -> 260 bytes docs/tmpl/gsignond-access-control-manager.sgml | 102 ++ docs/tmpl/gsignond-config-db.sgml | 45 + docs/tmpl/gsignond-config-dbus.sgml | 52 + docs/tmpl/gsignond-config-general.sgml | 80 ++ docs/tmpl/gsignond-config.sgml | 84 ++ docs/tmpl/gsignond-credentials.sgml | 123 +++ docs/tmpl/gsignond-dictionary.sgml | 245 +++++ docs/tmpl/gsignond-digest-plugin.sgml | 37 + docs/tmpl/gsignond-error.sgml | 114 ++ docs/tmpl/gsignond-extension-interface.sgml | 90 ++ docs/tmpl/gsignond-log.sgml | 67 ++ docs/tmpl/gsignond-password-plugin.sgml | 37 + docs/tmpl/gsignond-plugin-interface.sgml | 164 +++ docs/tmpl/gsignond-secret-storage.sgml | 173 +++ docs/tmpl/gsignond-security-context.sgml | 192 ++++ docs/tmpl/gsignond-session-data.sgml | 206 ++++ docs/tmpl/gsignond-signonui-data.sgml | 395 +++++++ docs/tmpl/gsignond-ssotest-plugin.sgml | 37 + docs/tmpl/gsignond-storage-manager.sgml | 102 ++ docs/tmpl/gsignond-unused.sgml | 0 docs/tmpl/gsignond-utils.sgml | 50 + gsignond.conf | 55 + gtk-doc.make | 302 +++++ include/gsignond/gsignond-access-control-manager.h | 25 - include/gsignond/gsignond-config-db.h | 28 + include/gsignond/gsignond-config-dbus.h | 42 +- include/gsignond/gsignond-config-general.h | 75 ++ include/gsignond/gsignond-config.h | 9 +- include/gsignond/gsignond-credentials.h | 1 + include/gsignond/gsignond-dictionary.h | 7 +- include/gsignond/gsignond-error.h | 106 +- include/gsignond/gsignond-extension-interface.h | 50 +- include/gsignond/gsignond-log.h | 52 + include/gsignond/gsignond-plugin-interface.h | 25 +- include/gsignond/gsignond-secret-storage.h | 71 +- include/gsignond/gsignond-security-context.h | 16 +- include/gsignond/gsignond-session-data.h | 4 +- include/gsignond/gsignond-signonui-data.h | 33 +- include/gsignond/gsignond-storage-manager.h | 30 - include/gsignond/gsignond-utils.h | 7 +- m4/gtk-doc.m4 | 71 ++ packaging/gsignond.changes | 5 + packaging/gsignond.spec | 23 +- src/Makefile.in | 42 +- src/common/Makefile.am | 18 +- src/common/Makefile.in | 63 +- src/common/db/Makefile.in | 31 +- src/common/db/gsignond-db-error.h | 4 - src/common/db/gsignond-db-secret-database.c | 38 +- src/common/db/gsignond-db-sql-database.c | 18 +- src/common/db/gsignond-secret-storage.c | 454 ++++---- src/common/gsignond-access-control-manager.c | 62 +- src/common/gsignond-config.c | 108 +- src/common/gsignond-credentials.c | 66 +- src/common/gsignond-dictionary.c | 180 ++- src/common/gsignond-enum.c.template | 2 +- src/common/gsignond-error.c | 115 +- src/common/gsignond-extension-interface.c | 90 +- src/common/gsignond-identity-info-internal.h | 2 +- src/common/gsignond-identity-info.c | 49 +- src/common/gsignond-identity-info.h | 187 ++++ src/common/gsignond-plugin-enum-types.h | 2 +- src/common/gsignond-plugin-interface.c | 326 +++++- src/common/gsignond-security-context.c | 107 +- src/common/gsignond-session-data.c | 197 +++- src/common/gsignond-signonui-data.c | 408 ++++++- src/common/gsignond-storage-manager.c | 97 +- src/common/gsignond-utils.c | 107 +- src/daemon/Makefile.am | 24 +- src/daemon/Makefile.in | 150 ++- src/daemon/db/Makefile.am | 2 +- src/daemon/db/Makefile.in | 117 +- src/daemon/db/gsignond-db-credentials-database.c | 13 +- src/daemon/db/gsignond-db-credentials-database.h | 2 +- src/daemon/db/gsignond-db-metadata-database.c | 29 +- src/daemon/db/gsignond-db-metadata-database.h | 2 +- src/daemon/dbus/Makefile.am | 4 +- src/daemon/dbus/Makefile.in | 170 +-- .../dbus/gsignond-dbus-auth-service-adapter.c | 13 +- src/daemon/dbus/gsignond-dbus-auth-service-gen.c | 112 +- src/daemon/dbus/gsignond-dbus-auth-service-gen.h | 2 +- .../dbus/gsignond-dbus-auth-session-adapter.c | 65 +- .../dbus/gsignond-dbus-auth-session-adapter.h | 8 + src/daemon/dbus/gsignond-dbus-auth-session-gen.c | 66 +- src/daemon/dbus/gsignond-dbus-auth-session-gen.h | 2 +- src/daemon/dbus/gsignond-dbus-identity-adapter.c | 34 +- src/daemon/dbus/gsignond-dbus-identity-gen.c | 116 +- src/daemon/dbus/gsignond-dbus-identity-gen.h | 2 +- src/daemon/dbus/gsignond-dbus-remote-plugin-gen.c | 137 ++- src/daemon/dbus/gsignond-dbus-remote-plugin-gen.h | 5 +- src/daemon/dbus/gsignond-dbus-signonui-adapter.c | 10 +- ...code.AccountsSSO.gSingleSignOn.RemotePlugin.xml | 1 + src/daemon/gsignond-auth-session.c | 56 +- src/daemon/gsignond-auth-session.h | 2 +- src/daemon/gsignond-daemon.c | 32 +- src/daemon/gsignond-daemon.h | 2 +- src/daemon/gsignond-identity-enum-types.c | 4 +- src/daemon/gsignond-identity-enum-types.h | 2 +- src/daemon/gsignond-identity.c | 195 ++-- src/daemon/gsignond-identity.h | 5 +- src/daemon/gsignond-signonui-proxy.c | 121 +- src/daemon/main.c | 20 +- src/daemon/plugins/Makefile.am | 2 +- src/daemon/plugins/Makefile.in | 140 +-- src/daemon/plugins/gsignond-plugin-proxy.c | 28 +- src/daemon/plugins/gsignond-plugin-proxy.h | 1 + src/daemon/plugins/gsignond-plugin-remote.c | 23 +- src/daemon/plugins/plugind/Makefile.am | 2 +- src/daemon/plugins/plugind/Makefile.in | 139 +-- .../plugins/plugind/gsignond-plugin-daemon.c | 18 +- src/extensions/Makefile.in | 42 +- src/extensions/test/Makefile.am | 6 +- src/extensions/test/Makefile.in | 45 +- src/extensions/tizen/Makefile.am | 1 + src/extensions/tizen/Makefile.in | 41 +- src/extensions/tizen/tizen-storage-manager.c | 80 +- src/plugins/Makefile.in | 42 +- src/plugins/digest/Makefile.in | 34 +- src/plugins/digest/gsignond-digest-plugin.c | 248 ++--- src/plugins/password/Makefile.in | 34 +- src/plugins/password/gsignond-password-plugin.c | 39 +- src/plugins/ssotest/Makefile.in | 34 +- src/plugins/ssotest/gsignond-ssotest-plugin.c | 25 +- test/Makefile.am | 10 +- test/Makefile.in | 83 +- test/common/Makefile.am | 1 - test/common/Makefile.in | 37 +- test/daemon/Makefile.in | 36 +- test/daemon/daemon-test.c | 35 +- test/db/Makefile.am | 3 +- test/db/Makefile.in | 40 +- test/db/dbtest.c | 33 +- test/plugins/Makefile.am | 1 - test/plugins/Makefile.in | 37 +- test/plugins/digestplugintest.c | 10 +- test/plugins/passwordplugintest.c | 8 +- test/plugins/pluginproxytest.c | 17 +- test/plugins/pluginremotetest.c | 8 +- test/valgrind.supp | 20 +- test/valgrind_common.mk | 5 +- tools/archive.sh | 6 +- tools/prepare-tizen.sh | 11 +- tools/run-tests.sh | 1 - tools/setup-and-start-daemon.sh | 1 - 226 files changed, 19883 insertions(+), 2319 deletions(-) create mode 100644 dists/debian/README.Debian create mode 100644 dists/debian/changelog create mode 100644 dists/debian/compat create mode 100644 dists/debian/control create mode 100644 dists/debian/copyright create mode 100644 dists/debian/docs create mode 100644 dists/debian/gsignond-dev.install create mode 100644 dists/debian/gsignond-doc.docs create mode 100644 dists/debian/gsignond-doc.install create mode 100644 dists/debian/install create mode 100644 dists/debian/postinst create mode 100644 dists/debian/postrm create mode 100644 dists/debian/preinst create mode 100644 dists/debian/prerm create mode 100755 dists/debian/rules create mode 100644 dists/debian/source/format create mode 100644 dists/rpm/gsignond-0.0.2-10/gsignond-0.0.2.tar.gz create mode 100644 dists/rpm/gsignond-0.0.2-10/gsignond-suse.spec create mode 100644 dists/rpm/gsignond-0.0.2-10/gsignond-tizen.changes create mode 100644 dists/rpm/gsignond-0.0.2-10/gsignond-tizen.spec create mode 100644 docs/Makefile.am create mode 100644 docs/Makefile.in create mode 100644 docs/building.xml create mode 100644 docs/gsignond-docs.sgml create mode 100644 docs/gsignond-overrides.txt create mode 100644 docs/gsignond-sections.txt create mode 100644 docs/gsignond.types create mode 100644 docs/html/GSignondAccessControlManager.html create mode 100644 docs/html/GSignondConfig.html create mode 100644 docs/html/GSignondCredentials.html create mode 100644 docs/html/GSignondDigestPlugin.html create mode 100644 docs/html/GSignondExtension.html create mode 100644 docs/html/GSignondPasswordPlugin.html create mode 100644 docs/html/GSignondSecretStorage.html create mode 100644 docs/html/GSignondSsoTestPlugin.html create mode 100644 docs/html/GSignondStorageManager.html create mode 100644 docs/html/annotation-glossary.html create mode 100644 docs/html/api-index-full.html create mode 100644 docs/html/ch01.html create mode 100644 docs/html/ch02.html create mode 100644 docs/html/ch03.html create mode 100644 docs/html/ch04.html create mode 100644 docs/html/ch05.html create mode 100644 docs/html/ch06.html create mode 100644 docs/html/deprecated-api-index.html create mode 100644 docs/html/gsignond-DBus-configuration.html create mode 100644 docs/html/gsignond-Database-configuration.html create mode 100644 docs/html/gsignond-Errors.html create mode 100644 docs/html/gsignond-GSignondDictionary.html create mode 100644 docs/html/gsignond-GSignondPlugin.html create mode 100644 docs/html/gsignond-GSignondSecurityContext.html create mode 100644 docs/html/gsignond-GSignondSessionData.html create mode 100644 docs/html/gsignond-GSignondSignonuiData.html create mode 100644 docs/html/gsignond-General-configuration.html create mode 100644 docs/html/gsignond-Logging.html create mode 100644 docs/html/gsignond-Utility-functions.html create mode 100644 docs/html/gsignond-building.html create mode 100644 docs/html/gsignond.devhelp2 create mode 100644 docs/html/home.png create mode 100644 docs/html/index.html create mode 100644 docs/html/index.sgml create mode 100644 docs/html/left-insensitive.png create mode 100644 docs/html/left.png create mode 100644 docs/html/object-tree.html create mode 100644 docs/html/right-insensitive.png create mode 100644 docs/html/right.png create mode 100644 docs/html/style.css create mode 100644 docs/html/up-insensitive.png create mode 100644 docs/html/up.png create mode 100644 docs/tmpl/gsignond-access-control-manager.sgml create mode 100644 docs/tmpl/gsignond-config-db.sgml create mode 100644 docs/tmpl/gsignond-config-dbus.sgml create mode 100644 docs/tmpl/gsignond-config-general.sgml create mode 100644 docs/tmpl/gsignond-config.sgml create mode 100644 docs/tmpl/gsignond-credentials.sgml create mode 100644 docs/tmpl/gsignond-dictionary.sgml create mode 100644 docs/tmpl/gsignond-digest-plugin.sgml create mode 100644 docs/tmpl/gsignond-error.sgml create mode 100644 docs/tmpl/gsignond-extension-interface.sgml create mode 100644 docs/tmpl/gsignond-log.sgml create mode 100644 docs/tmpl/gsignond-password-plugin.sgml create mode 100644 docs/tmpl/gsignond-plugin-interface.sgml create mode 100644 docs/tmpl/gsignond-secret-storage.sgml create mode 100644 docs/tmpl/gsignond-security-context.sgml create mode 100644 docs/tmpl/gsignond-session-data.sgml create mode 100644 docs/tmpl/gsignond-signonui-data.sgml create mode 100644 docs/tmpl/gsignond-ssotest-plugin.sgml create mode 100644 docs/tmpl/gsignond-storage-manager.sgml create mode 100644 docs/tmpl/gsignond-unused.sgml create mode 100644 docs/tmpl/gsignond-utils.sgml create mode 100644 gsignond.conf create mode 100644 gtk-doc.make create mode 100644 m4/gtk-doc.m4 create mode 100644 src/common/gsignond-identity-info.h diff --git a/Makefile.am b/Makefile.am index 22f236b..31cb70d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,14 +4,41 @@ ACLOCAL_AMFLAGS = -I m4 # also --enable-dbus-type=session here AM_DISTCHECK_CONFIGURE_FLAGS = \ --enable-debug \ + --enable-gtk-doc \ --enable-distcheck pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gsignond.pc -SUBDIRS = src test +dist_sysconf_DATA = gsignond.conf + +SUBDIRS = src test docs EXTRA_DIST = dists tools valgrind: cd test; make valgrind + +dist-hook: + @echo + @echo "==== Run 'make update-online-doc' to update online documentation ====" + @echo + +update-online-doc: + @tar zxf $(PACKAGE)-$(VERSION).tar.gz && \ + pushd . > /dev/null && \ + cd .. && \ + git clone https://code.google.com/p/accounts-sso.gsignon-docs/ ; \ + cd accounts-sso.gsignon-docs && \ + git pull ; \ + mkdir -p $(PACKAGE) && \ + rm -rf $(PACKAGE)/* && \ + popd > /dev/null && \ + cp -rf $(PACKAGE)-$(VERSION)/docs/html/* ../accounts-sso.gsignon-docs/$(PACKAGE)/ && \ + pushd . > /dev/null && \ + cd ../accounts-sso.gsignon-docs && \ + git add $(PACKAGE)/* && \ + git commit -m "Updated documentation for $(PACKAGE) to version $(VERSION)" && \ + git push ; \ + popd > /dev/null && \ + rm -rf $(PACKAGE)-$(VERSION) diff --git a/Makefile.in b/Makefile.in index 4475fd5..6b2796b 100644 --- a/Makefile.in +++ b/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@ @@ -35,7 +52,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) \ +DIST_COMMON = README $(am__configure_deps) $(dist_sysconf_DATA) \ $(srcdir)/${PACKAGE_NAME}-uninstalled.pc.in \ $(srcdir)/${PACKAGE_NAME}.pc.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ @@ -47,9 +64,10 @@ DIST_COMMON = README $(am__configure_deps) \ build-aux/install-sh build-aux/ltmain.sh build-aux/missing 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) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -75,6 +93,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/||"`;; \ @@ -102,8 +125,9 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(pkgconfigdir)" -DATA = $(pkgconfig_DATA) +am__installdirs = "$(DESTDIR)$(sysconfdir)" \ + "$(DESTDIR)$(pkgconfigdir)" +DATA = $(dist_sysconf_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -296,11 +320,13 @@ ACLOCAL_AMFLAGS = -I m4 # also --enable-dbus-type=session here AM_DISTCHECK_CONFIGURE_FLAGS = \ --enable-debug \ + --enable-gtk-doc \ --enable-distcheck pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gsignond.pc -SUBDIRS = src test +dist_sysconf_DATA = gsignond.conf +SUBDIRS = src test docs EXTRA_DIST = dists tools all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -372,10 +398,34 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt +install-dist_sysconfDATA: $(dist_sysconf_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ + done + +uninstall-dist_sysconfDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -560,13 +610,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; \ @@ -586,6 +633,9 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ @@ -652,7 +702,7 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -721,7 +771,7 @@ check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ + for dir in "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -782,7 +832,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: +install-exec-am: install-dist_sysconfDATA install-html: install-html-recursive @@ -822,7 +872,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-pkgconfigDATA +uninstall-am: uninstall-dist_sysconfDATA uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive @@ -830,24 +880,49 @@ uninstall-am: uninstall-pkgconfigDATA .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck 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-pkgconfigDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-pkgconfigDATA + dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dist_sysconfDATA 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-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-dist_sysconfDATA uninstall-pkgconfigDATA valgrind: cd test; make valgrind +dist-hook: + @echo + @echo "==== Run 'make update-online-doc' to update online documentation ====" + @echo + +update-online-doc: + @tar zxf $(PACKAGE)-$(VERSION).tar.gz && \ + pushd . > /dev/null && \ + cd .. && \ + git clone https://code.google.com/p/accounts-sso.gsignon-docs/ ; \ + cd accounts-sso.gsignon-docs && \ + git pull ; \ + mkdir -p $(PACKAGE) && \ + rm -rf $(PACKAGE)/* && \ + popd > /dev/null && \ + cp -rf $(PACKAGE)-$(VERSION)/docs/html/* ../accounts-sso.gsignon-docs/$(PACKAGE)/ && \ + pushd . > /dev/null && \ + cd ../accounts-sso.gsignon-docs && \ + git add $(PACKAGE)/* && \ + git commit -m "Updated documentation for $(PACKAGE) to version $(VERSION)" && \ + git push ; \ + popd > /dev/null && \ + rm -rf $(PACKAGE)-$(VERSION) + # 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. .NOEXPORT: diff --git a/aclocal.m4 b/aclocal.m4 index 5a28b91..6a7deef 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11.3 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, @@ -14,80 +14,12 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -dnl -*- mode: autoconf -*- - -# serial 1 - -dnl Usage: -dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) -AC_DEFUN([GTK_DOC_CHECK], -[ - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first - AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first - - dnl check for tools we added during development - AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) - AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) - AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) - - dnl for overriding the documentation installation directory - AC_ARG_WITH([html-dir], - AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, - [with_html_dir='${datadir}/gtk-doc/html']) - HTML_DIR="$with_html_dir" - AC_SUBST([HTML_DIR]) - - dnl enable/disable documentation building - AC_ARG_ENABLE([gtk-doc], - AS_HELP_STRING([--enable-gtk-doc], - [use gtk-doc to build documentation [[default=no]]]),, - [enable_gtk_doc=no]) - - if test x$enable_gtk_doc = xyes; then - ifelse([$1],[], - [PKG_CHECK_EXISTS([gtk-doc],, - AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], - [PKG_CHECK_EXISTS([gtk-doc >= $1],, - AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) - dnl don't check for glib if we build glib - if test "x$PACKAGE_NAME" != "xglib"; then - dnl don't fail if someone does not have glib - PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,) - fi - fi - - AC_MSG_CHECKING([whether to build gtk-doc documentation]) - AC_MSG_RESULT($enable_gtk_doc) - - dnl enable/disable output formats - AC_ARG_ENABLE([gtk-doc-html], - AS_HELP_STRING([--enable-gtk-doc-html], - [build documentation in html format [[default=yes]]]),, - [enable_gtk_doc_html=yes]) - AC_ARG_ENABLE([gtk-doc-pdf], - AS_HELP_STRING([--enable-gtk-doc-pdf], - [build documentation in pdf format [[default=no]]]),, - [enable_gtk_doc_pdf=no]) - - if test -z "$GTKDOC_MKPDF"; then - enable_gtk_doc_pdf=no - fi - - - AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) - AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) - AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) - AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) - AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) -]) - # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # @@ -266,7 +198,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.3], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -282,7 +214,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.3])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1335,6 +1267,7 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ax_check_gnu_make.m4]) +m4_include([m4/gtk-doc.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) diff --git a/build-aux/ar-lib b/build-aux/ar-lib index c0286a4..0f62c6f 100755 --- a/build-aux/ar-lib +++ b/build-aux/ar-lib @@ -2,7 +2,7 @@ # Wrapper for Microsoft lib.exe me=ar-lib -scriptversion=2012-01-30.22; # UTC +scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010, 2012 Free Software Foundation, Inc. # Written by Peter Rosin . @@ -153,7 +153,9 @@ action=${action#-} delete= extract= list= +quick= replace= +index= create= while test -n "$action" @@ -162,7 +164,10 @@ do d*) delete=yes ;; x*) extract=yes ;; t*) list=yes ;; + q*) quick=yes ;; r*) replace=yes ;; + s*) index=yes ;; + S*) ;; # the index is always updated implicitly c*) create=yes ;; u*) ;; # TODO: don't ignore the update modifier v*) ;; # TODO: don't ignore the verbose modifier @@ -173,8 +178,8 @@ do action=${action#?} done -case $delete$extract$list$replace in - yes) +case $delete$extract$list$quick$replace,$index in + yes,* | ,yes) ;; yesyes*) func_error "more than one action specified" @@ -225,7 +230,7 @@ elif test -n "$extract"; then done fi -elif test -n "$replace"; then +elif test -n "$quick$replace"; then if test ! -f "$orig_archive"; then if test -z "$create"; then echo "$me: creating $orig_archive" diff --git a/build-aux/config.sub b/build-aux/config.sub index c894da4..6205f84 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -225,6 +225,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -1537,6 +1543,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; diff --git a/build-aux/depcomp b/build-aux/depcomp index bd0ac08..25a39e6 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2011-12-04.11; # UTC +scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ scriptversion=2011-12-04.11; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -40,8 +40,8 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. @@ -57,6 +57,12 @@ EOF ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -102,6 +108,12 @@ if test "$depmode" = msvc7msys; then depmode=msvc7 fi +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -156,15 +168,14 @@ gcc) ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. @@ -203,18 +214,15 @@ sgi) # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else @@ -226,10 +234,17 @@ sgi) rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -259,12 +274,11 @@ aix) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. + # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. + # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -275,23 +289,26 @@ aix) ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want: + # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -300,15 +317,21 @@ icc) exit $stat fi rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; @@ -344,7 +367,7 @@ hp2) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// @@ -359,9 +382,9 @@ hp2) tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. + # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -407,8 +430,7 @@ tru64) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi @@ -443,11 +465,11 @@ msvc7) p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/ \1 \\/p +s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/ / + s/.*/'"$tab"'/ G p }' >> "$depfile" @@ -478,7 +500,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -498,15 +520,14 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -562,8 +583,7 @@ makedepend) # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -583,7 +603,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -652,8 +672,8 @@ msvisualcpp) sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index c2852d8..0096fe6 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu2 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1ubuntu2" TIMESTAMP="" package_revision=1.3337 diff --git a/config.h.in b/config.h.in index 34fd3d3..a13a050 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Enable ACL triggers */ +#undef ENABLE_DB_ACL_TRIGGERS + /* Enable debug features */ #undef ENABLE_DEBUG @@ -48,6 +51,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Keychain system context */ +#undef KEYCHAIN_SYSCTX + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR diff --git a/configure b/configure index 134f172..8c6f951 100755 --- a/configure +++ b/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for gsignond 0.0.2. +# Generated by GNU Autoconf 2.69 for gsignond 0.0.3. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -220,21 +244,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -336,6 +364,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -457,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -491,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -512,28 +552,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -567,10 +587,10 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gsignond' PACKAGE_TARNAME='gsignond' -PACKAGE_VERSION='0.0.2' -PACKAGE_STRING='gsignond 0.0.2' +PACKAGE_VERSION='0.0.3' +PACKAGE_STRING='gsignond 0.0.3' PACKAGE_BUGREPORT='' -PACKAGE_URL='http://code.google.com/p/accounts-sso/' +PACKAGE_URL='http://01.org/gsso' ac_unique_file="src/daemon/main.c" # Factoring default headers for most tests. @@ -631,6 +651,10 @@ GTKDOC_REBASE GTKDOC_CHECK DBUS_INTERFACES_DIR DBUS_SERVICES_DIR +SET_PERMISSIONS_FALSE +SET_PERMISSIONS_TRUE +HAVE_DEBUG_FALSE +HAVE_DEBUG_TRUE MESSAGE_BUS_TYPE USE_GTESTDBUS_FALSE USE_GTESTDBUS_TRUE @@ -779,8 +803,10 @@ with_sysroot enable_libtool_lock enable_distcheck enable_dbus_type +enable_keychain enable_debug enable_sql_log +enable_acltriggers with_html_dir enable_gtk_doc enable_gtk_doc_html @@ -1265,8 +1291,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1352,7 +1376,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gsignond 0.0.2 to adapt to many kinds of systems. +\`configure' configures gsignond 0.0.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1422,7 +1446,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gsignond 0.0.2:";; + short | recursive ) echo "Configuration of gsignond 0.0.3:";; esac cat <<\_ACEOF @@ -1444,8 +1468,12 @@ Optional Features: p2p(default): uses peer to peer dbus session: uses session message bus system: uses system message bus + --enable-keychain=sysctx + enable keychain access with + system context "sysctx" --enable-debug enable debug features - --enable-sql-log enable sql log feature + --enable-sql-log enable sql log feature + --enable-acltriggers enable ACL before delete triggers --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] @@ -1502,7 +1530,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. -gsignond home page: . +gsignond home page: . _ACEOF ac_status=$? fi @@ -1565,10 +1593,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gsignond configure 0.0.2 -generated by GNU Autoconf 2.68 +gsignond configure 0.0.3 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1644,7 +1672,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1930,8 +1958,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gsignond $as_me 0.0.2, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by gsignond $as_me 0.0.3, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2351,7 +2379,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2520,7 +2548,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2560,7 +2588,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2611,7 +2639,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2664,7 +2692,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2789,7 +2817,7 @@ fi # Define the identity of the package. PACKAGE='gsignond' - VERSION='0.0.2' + VERSION='0.0.3' cat >>confdefs.h <<_ACEOF @@ -2934,7 +2962,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2974,7 +3002,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3027,7 +3055,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3068,7 +3096,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3126,7 +3154,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3170,7 +3198,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3616,8 +3644,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3913,7 +3940,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3957,7 +3984,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4273,7 +4300,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -4349,7 +4376,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4415,7 +4442,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4482,7 +4509,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -4738,7 +4765,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4782,7 +4809,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5206,7 +5233,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5246,7 +5273,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5552,7 +5579,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5592,7 +5619,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5695,7 +5722,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5739,7 +5766,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5864,7 +5891,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5904,7 +5931,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5963,7 +5990,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6003,7 +6030,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6652,7 +6679,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6692,7 +6719,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6772,7 +6799,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6812,7 +6839,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6864,7 +6891,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6904,7 +6931,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6956,7 +6983,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6996,7 +7023,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7048,7 +7075,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7088,7 +7115,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7140,7 +7167,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7180,7 +7207,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11711,7 +11738,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11754,7 +11781,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12198,7 +12225,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GLIB_MKENUMS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12350,6 +12377,19 @@ if test "x$enable_dbus_type" != "xp2p" ; then fi fi +# Check whether --enable-keychain was given. +if test "${enable_keychain+set}" = set; then : + enableval=$enable_keychain; enable_keychain=$enableval +fi + +if test "x$enable_keychain" != "x" ; then + +cat >>confdefs.h <<_ACEOF +#define KEYCHAIN_SYSCTX "$enable_keychain" +_ACEOF + +fi + # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; enable_debug=yes @@ -12377,6 +12417,19 @@ fi $as_echo "#define ENABLE_SQL_LOG 1" >>confdefs.h fi +fi + +# Check whether --enable-acltriggers was given. +if test "${enable_acltriggers+set}" = set; then : + enableval=$enable_acltriggers; enable_acl_triggers=yes +else + enable_acl_triggers=no +fi + +if test "x$enable_acl_triggers" = "xyes" ; then + +$as_echo "#define ENABLE_DB_ACL_TRIGGERS 1" >>confdefs.h + fi if test x$gtestdbus = xyes; then @@ -12390,6 +12443,23 @@ fi MESSAGE_BUS_TYPE=$enable_dbus_type + if test x$enable_debug = xyes; then + HAVE_DEBUG_TRUE= + HAVE_DEBUG_FALSE='#' +else + HAVE_DEBUG_TRUE='#' + HAVE_DEBUG_FALSE= +fi + + if test x$enable_distcheck != xyes; then + SET_PERMISSIONS_TRUE= + SET_PERMISSIONS_FALSE='#' +else + SET_PERMISSIONS_TRUE='#' + SET_PERMISSIONS_FALSE= +fi + + @@ -12415,7 +12485,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12457,7 +12527,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12501,7 +12571,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12545,14 +12615,14 @@ fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk-doc") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.18\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.18") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else - as_fn_error $? "gtk-doc not installed and --enable-gtk-doc requested" "$LINENO" 5 + as_fn_error $? "You need to have gtk-doc >= 1.18 installed to build $PACKAGE_NAME" "$LINENO" 5 fi if test "x$PACKAGE_NAME" != "xglib"; then @@ -12614,31 +12684,11 @@ fi # Put the nasty error message in config.log where it belongs echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0) were not met: - -$GTKDOC_DEPS_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS -and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + : elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS -and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } + : else GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS @@ -12673,6 +12723,10 @@ fi enable_gtk_doc_pdf=no fi + if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 + fi + if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= @@ -12739,7 +12793,7 @@ GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Wall -Werror -DG_LOG_DOMAIN=\\\"gsignond\\\"" # Checks for library functions. -ac_config_files="$ac_config_files Makefile ${PACKAGE_NAME}.pc ${PACKAGE_NAME}-uninstalled.pc src/Makefile src/common/Makefile src/common/db/Makefile src/daemon/Makefile src/daemon/db/Makefile src/daemon/dbus/Makefile src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service src/daemon/plugins/Makefile src/daemon/plugins/plugind/Makefile src/extensions/Makefile src/extensions/test/Makefile src/extensions/tizen/Makefile src/plugins/Makefile src/plugins/password/Makefile src/plugins/ssotest/Makefile src/plugins/digest/Makefile test/Makefile test/common/Makefile test/db/Makefile test/daemon/Makefile test/daemon/gsignond-dbus.conf test/plugins/Makefile" +ac_config_files="$ac_config_files Makefile ${PACKAGE_NAME}.pc ${PACKAGE_NAME}-uninstalled.pc docs/Makefile src/Makefile src/common/Makefile src/common/db/Makefile src/daemon/Makefile src/daemon/db/Makefile src/daemon/dbus/Makefile src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service src/daemon/plugins/Makefile src/daemon/plugins/plugind/Makefile src/extensions/Makefile src/extensions/test/Makefile src/extensions/tizen/Makefile src/plugins/Makefile src/plugins/password/Makefile src/plugins/ssotest/Makefile src/plugins/digest/Makefile test/Makefile test/common/Makefile test/db/Makefile test/daemon/Makefile test/daemon/gsignond-dbus.conf test/plugins/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -12878,6 +12932,14 @@ if test -z "${USE_GTESTDBUS_TRUE}" && test -z "${USE_GTESTDBUS_FALSE}"; then as_fn_error $? "conditional \"USE_GTESTDBUS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_DEBUG_TRUE}" && test -z "${HAVE_DEBUG_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SET_PERMISSIONS_TRUE}" && test -z "${SET_PERMISSIONS_FALSE}"; then + as_fn_error $? "conditional \"SET_PERMISSIONS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -13196,16 +13258,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -13265,28 +13327,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -13307,8 +13357,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gsignond $as_me 0.0.2, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by gsignond $as_me 0.0.3, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13368,17 +13418,17 @@ Configuration commands: $config_commands Report bugs to the package provider. -gsignond home page: ." +gsignond home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gsignond config.status 0.0.2 -configured by $0, generated by GNU Autoconf 2.68, +gsignond config.status 0.0.3 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -13469,7 +13519,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -13786,6 +13836,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "${PACKAGE_NAME}.pc") CONFIG_FILES="$CONFIG_FILES ${PACKAGE_NAME}.pc" ;; "${PACKAGE_NAME}-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES ${PACKAGE_NAME}-uninstalled.pc" ;; + "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/common/Makefile" ;; "src/common/db/Makefile") CONFIG_FILES="$CONFIG_FILES src/common/db/Makefile" ;; @@ -15307,6 +15358,14 @@ if test -z "${USE_GTESTDBUS_TRUE}" && test -z "${USE_GTESTDBUS_FALSE}"; then as_fn_error $? "conditional \"USE_GTESTDBUS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_DEBUG_TRUE}" && test -z "${HAVE_DEBUG_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SET_PERMISSIONS_TRUE}" && test -z "${SET_PERMISSIONS_FALSE}"; then + as_fn_error $? "conditional \"SET_PERMISSIONS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -15629,16 +15688,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -15698,28 +15757,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -15740,8 +15787,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gsignond $as_me 0.0.2, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by gsignond $as_me 0.0.3, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15801,17 +15848,17 @@ Configuration commands: $config_commands Report bugs to the package provider. -gsignond home page: ." +gsignond home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gsignond config.status 0.0.2 -configured by $0, generated by GNU Autoconf 2.68, +gsignond config.status 0.0.3 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15902,7 +15949,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -16220,6 +16267,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "${PACKAGE_NAME}.pc") CONFIG_FILES="$CONFIG_FILES ${PACKAGE_NAME}.pc" ;; "${PACKAGE_NAME}-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES ${PACKAGE_NAME}-uninstalled.pc" ;; + "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/common/Makefile" ;; "src/common/db/Makefile") CONFIG_FILES="$CONFIG_FILES src/common/db/Makefile" ;; diff --git a/configure.ac b/configure.ac index 7c78167..3281447 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.60]) -AC_INIT([gsignond], [0.0.2],[],[],[http://code.google.com/p/accounts-sso/]) +AC_INIT([gsignond], [0.0.3],[],[],[http://01.org/gsso]) AC_CONFIG_SRCDIR([src/daemon/main.c]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([build-aux]) @@ -98,6 +98,15 @@ if test "x$enable_dbus_type" != "xp2p" ; then fi fi +AC_ARG_ENABLE(keychain, + [ --enable-keychain=sysctx + enable keychain access with + system context "sysctx"], + [enable_keychain=$enableval]) +if test "x$enable_keychain" != "x" ; then + AC_DEFINE_UNQUOTED(KEYCHAIN_SYSCTX, ["$enable_keychain"], [Keychain system context]) +fi + AC_ARG_ENABLE(debug, [ --enable-debug enable debug features], [enable_debug=yes], [enable_debug=no]) @@ -106,7 +115,7 @@ echo $enable_debug if test "x$enable_debug" = "xyes" ; then AC_DEFINE(ENABLE_DEBUG, [1], [Enable debug features]) AC_ARG_ENABLE(sql-log, - [ --enable-sql-log enable sql log feature], + [ --enable-sql-log enable sql log feature], [enable_sql_log=yes], [enable_sql_log=no]) echo -n "enable sql log feature... " echo $enable_sql_log @@ -115,14 +124,24 @@ if test "x$enable_debug" = "xyes" ; then fi fi +AC_ARG_ENABLE(acltriggers, + [ --enable-acltriggers enable ACL before delete triggers], + [enable_acl_triggers=yes], [enable_acl_triggers=no]) +if test "x$enable_acl_triggers" = "xyes" ; then + AC_DEFINE(ENABLE_DB_ACL_TRIGGERS, [1], [Enable ACL triggers]) +fi + AM_CONDITIONAL(USE_GTESTDBUS, [test x$gtestdbus = xyes]) AC_SUBST(MESSAGE_BUS_TYPE, [$enable_dbus_type]) +AM_CONDITIONAL(HAVE_DEBUG, [test x$enable_debug = xyes]) +AM_CONDITIONAL(SET_PERMISSIONS, [test x$enable_distcheck != xyes]) + AC_SUBST(DBUS_SERVICES_DIR) AC_SUBST(DBUS_INTERFACES_DIR) # gtk-doc -GTK_DOC_CHECK +GTK_DOC_CHECK([1.18],[--flavour no-tmpl]) # Checks for header files. AC_CHECK_HEADERS([string.h]) @@ -140,6 +159,7 @@ AC_OUTPUT([ Makefile ${PACKAGE_NAME}.pc ${PACKAGE_NAME}-uninstalled.pc +docs/Makefile src/Makefile src/common/Makefile src/common/db/Makefile diff --git a/dists/debian/README.Debian b/dists/debian/README.Debian new file mode 100644 index 0000000..1849f59 --- /dev/null +++ b/dists/debian/README.Debian @@ -0,0 +1,6 @@ +The Debian Package gsignond +---------------------------- + +This is default Debian packaging for gsignond. + + -- Jussi Laako Wed, 03 Jul 2013 17:24:53 +0300 diff --git a/dists/debian/changelog b/dists/debian/changelog new file mode 100644 index 0000000..8fedc96 --- /dev/null +++ b/dists/debian/changelog @@ -0,0 +1,5 @@ +gsignond (0.0.2-1) unstable; urgency=low + + * Initial Release. + + -- Jussi Laako Wed, 03 Jul 2013 17:24:53 +0300 diff --git a/dists/debian/compat b/dists/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/dists/debian/compat @@ -0,0 +1 @@ +8 diff --git a/dists/debian/control b/dists/debian/control new file mode 100644 index 0000000..19fd59d --- /dev/null +++ b/dists/debian/control @@ -0,0 +1,27 @@ +Source: gsignond +Section: net +Priority: extra +Maintainer: Jussi Laako +Build-Depends: debhelper (>= 8.0.0), autotools-dev, pkg-config, libdbus-1-dev, gtk-doc-tools, libsqlite3-dev, libglib2.0-dev +Standards-Version: 3.9.2 +Homepage: https://01.org/gsso +Vcs-Git: http://code.google.com/p/accounts-sso.gsignond/ +Vcs-Browser: http://code.google.com/p/accounts-sso/source/browse/?repo=gsignond + +Package: gsignond +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: gSSO daemon and default plugins + gSSO is a single sign-on framework, providing secure storage and single sign-on service. + +Package: gsignond-dev +Architecture: any +Depends: ${shlibs:Depens}, ${misc:Depends} +Description: development files for gsignond + Headers and libraries necessary for developing plugins and extensions. + +Package: gsignond-doc +Architecture: all +Description: documentation for gsignond + Developer documentation for developing plugins and extensions. + diff --git a/dists/debian/copyright b/dists/debian/copyright new file mode 100644 index 0000000..af37ea7 --- /dev/null +++ b/dists/debian/copyright @@ -0,0 +1,31 @@ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: gsignond +Source: http://code.google.com/p/accounts-sso/source/checkout?repo=gsignond + +Files: * +Copyright: 2012 - 2013 Intel Corporation +License: LGPL-2.1+ + +Files: debian/* +Copyright: 2013 Jussi Laako +License: LGPL-2.1+ + +License: LGPL-2.1+ + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU Lesser General + Public License can be found in "/usr/share/common-licenses/LGPL-2.1". + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/dists/debian/docs b/dists/debian/docs new file mode 100644 index 0000000..50bd824 --- /dev/null +++ b/dists/debian/docs @@ -0,0 +1,2 @@ +NEWS +README diff --git a/dists/debian/gsignond-dev.install b/dists/debian/gsignond-dev.install new file mode 100644 index 0000000..e6a08cc --- /dev/null +++ b/dists/debian/gsignond-dev.install @@ -0,0 +1,5 @@ +/usr/include/gsignond/* +/usr/lib/libgsignond-*.so +/usr/lib/libgsignond-*.la +/usr/lib/pkgconfig/gsignond.pc +/usr/share/dbus-1/interfaces/*SSO*.xml diff --git a/dists/debian/gsignond-doc.docs b/dists/debian/gsignond-doc.docs new file mode 100644 index 0000000..d4f4542 --- /dev/null +++ b/dists/debian/gsignond-doc.docs @@ -0,0 +1 @@ +#DOCS# diff --git a/dists/debian/gsignond-doc.install b/dists/debian/gsignond-doc.install new file mode 100644 index 0000000..c357621 --- /dev/null +++ b/dists/debian/gsignond-doc.install @@ -0,0 +1 @@ +/usr/share/gtk-doc/html/gsignond/* diff --git a/dists/debian/install b/dists/debian/install new file mode 100644 index 0000000..173ee00 --- /dev/null +++ b/dists/debian/install @@ -0,0 +1,7 @@ +/usr/bin/gsignond +/usr/bin/gsignond-plugind +/usr/lib/libgsignond-*.so.* +/usr/lib/gsignond/extensions/*.so* +/usr/lib/gsignond/plugins/*.so* +/usr/share/dbus-1/services/*SingleSignOn*.service +/etc/gsignond.conf diff --git a/dists/debian/postinst b/dists/debian/postinst new file mode 100644 index 0000000..301a61b --- /dev/null +++ b/dists/debian/postinst @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for gsignond +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ldconfig + groupadd -f -r gsignond + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/dists/debian/postrm b/dists/debian/postrm new file mode 100644 index 0000000..7723d3c --- /dev/null +++ b/dists/debian/postrm @@ -0,0 +1,38 @@ +#!/bin/sh +# postrm script for gsignond +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ldconfig + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/dists/debian/preinst b/dists/debian/preinst new file mode 100644 index 0000000..808b6f4 --- /dev/null +++ b/dists/debian/preinst @@ -0,0 +1,38 @@ +#!/bin/sh +# preinst script for gsignond +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install) + ;; + upgrade) + cp -a /etc/gsignond.conf /etc/gsignond.conf.orig + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/dists/debian/prerm b/dists/debian/prerm new file mode 100644 index 0000000..d111903 --- /dev/null +++ b/dists/debian/prerm @@ -0,0 +1,38 @@ +#!/bin/sh +# prerm script for gsignond +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/dists/debian/rules b/dists/debian/rules new file mode 100755 index 0000000..4658a60 --- /dev/null +++ b/dists/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +DEB_CONFIGURE_EXTRA_FLAGS += --enable-dbus-type=session + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +%: + dh $@ --parallel + +override_dh_auto_configure: + dh_auto_configure -- --enable-dbus-type=session --enable-gtk-doc + +override_dh_auto_test: + true diff --git a/dists/debian/source/format b/dists/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/dists/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/dists/rpm/gsignond-0.0.2-10/gsignond-0.0.2.tar.gz b/dists/rpm/gsignond-0.0.2-10/gsignond-0.0.2.tar.gz new file mode 100644 index 0000000..e134af9 Binary files /dev/null and b/dists/rpm/gsignond-0.0.2-10/gsignond-0.0.2.tar.gz differ diff --git a/dists/rpm/gsignond-0.0.2-10/gsignond-suse.spec b/dists/rpm/gsignond-0.0.2-10/gsignond-suse.spec new file mode 100644 index 0000000..92fa44e --- /dev/null +++ b/dists/rpm/gsignond-0.0.2-10/gsignond-suse.spec @@ -0,0 +1,131 @@ +# define used dbus type [p2p, session, system] +%define dbus_type session +# enable debug features such as control environment variables +# WARNING! do not use for production builds as it will break security +%define debug_build 0 + +Name: gsignond +Summary: GLib based Single Sign-On daemon +Version: 0.0.2 +Release: 11 +Group: System/Daemons +License: LGPL-2.1+ +Source: %{name}-%{version}.tar.gz +Provides: gsignon +%if %{dbus_type} != "p2p" +Requires: dbus-1 +%endif +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(gtk-doc) +BuildRequires: pkgconfig(glib-2.0) >= 2.30 +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(gio-unix-2.0) +BuildRequires: pkgconfig(gmodule-2.0) +BuildRequires: pkgconfig(sqlite3) + + +%description +%{summary}. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +%{summary}. + + +%package doc +Summary: Documentation files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description doc +%{summary}. + + +%prep +%setup -q -n %{name}-%{version} +#gtkdocize +# for repository snapshot packages +#aclocal +#autoheader +#libtoolize --copy --force +#autoconf +#automake --add-missing --copy +#autoreconf --install --force +# fore release source packages +autoreconf -f -i + + +%build +%if %{debug_build} == 1 +%configure --enable-dbus-type=%{dbus_type} --enable-debug +%else +%configure --enable-dbus-type=%{dbus_type} +%endif + +make %{?_smp_mflags} + + +%install +rm -rf %{buildroot} +%make_install + + +%post +/sbin/ldconfig +chmod u+s %{_bindir}/%{name} +groupadd -f -r gsignond + + +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING.LIB INSTALL NEWS README +%{_bindir}/%{name} +%{_bindir}/%{name}-plugind +%{_libdir}/lib%{name}-*.so.* +%{_libdir}/%{name}/extensions/*.so* +%{_libdir}/%{name}/plugins/*.so* +%if %{dbus_type} != "p2p" +%{_datadir}/dbus-1/services/*SingleSignOn*.service +%endif +%exclude %{_libdir}/gsignond/extensions/*.la +%exclude %{_libdir}/gsignond/plugins/*.la +%config(noreplace) %{_sysconfdir}/gsignond.conf + + +%files devel +%defattr(-,root,root,-) +%{_includedir}/%{name}/*.h +%{_libdir}/lib%{name}-*.so +%{_libdir}/lib%{name}-*.la +%{_libdir}/pkgconfig/%{name}.pc +%if %{dbus_type} != "p2p" +%{_datadir}/dbus-1/interfaces/*SSO*.xml +%endif + + +%files doc +%defattr(-,root,root,-) +%{_datadir}/gtk-doc/html/gsignond/* + + +%changelog +* Mon Jun 24 2013 Imran Zaman +- Release 0.0.2 that comprises of bug fixes + +* Wed Jun 12 2013 Jussi Laako +- Prepare for first release + +* Thu Feb 08 2013 Jussi Laako +- Initial RPM packaging + diff --git a/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.changes b/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.changes new file mode 100644 index 0000000..422e3d1 --- /dev/null +++ b/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.changes @@ -0,0 +1,8 @@ +* Mon Jun 24 2013 Imran Zaman +- Release 0.0.2 that comprises of bug fixes + +* Wed Jun 12 2013 Jussi Laako +- Prepare for first release + +* Thu Feb 08 2013 Jussi Laako +- Initial RPM packaging diff --git a/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.spec b/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.spec new file mode 100644 index 0000000..8c69349 --- /dev/null +++ b/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.spec @@ -0,0 +1,113 @@ +# define used dbus type [p2p, session, system] +%define dbus_type p2p +# enable debug features such as control environment variables +# WARNING! do not use for production builds as it will break security +%define debug_build 0 + +Name: gsignond +Summary: GLib based Single Sign-On daemon +Version: 0.0.2 +Release: 10 +VCS: p/accounts-sso.gsignond/#b31ed6e880b0dcd7635147a57b870c0c137cfce0 +Group: System/Daemons +License: LGPL-2.1+ +Source: %{name}-%{version}.tar.gz +Provides: gsignon +%if %{dbus_type} != "p2p" +Requires: dbus-1 +%endif +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(glib-2.0) >= 2.30 +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(gio-unix-2.0) +BuildRequires: pkgconfig(gmodule-2.0) +BuildRequires: pkgconfig(sqlite3) + + +%description +%{summary}. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +%{summary}. + + +%package doc +Summary: Documentation files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description doc +%{summary}. + + +%prep +%setup -q -n %{name}-%{version} +if [ -f = "gtk-doc.make" ] +then +rm gtk-doc.make +fi +touch gtk-doc.make +autoreconf -f -i + + +%build +%if %{debug_build} == 1 +%configure --enable-dbus-type=%{dbus_type} --enable-debug +%else +%configure --enable-dbus-type=%{dbus_type} +%endif + +make %{?_smp_mflags} + + +%install +rm -rf %{buildroot} +%make_install + + +%post +/sbin/ldconfig +chmod u+s %{_bindir}/%{name} +groupadd -f -r gsignond + + +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING.LIB INSTALL NEWS README +%{_bindir}/%{name} +%{_bindir}/%{name}-plugind +%{_libdir}/lib%{name}-*.so.* +%{_libdir}/%{name}/extensions/*.so* +%{_libdir}/%{name}/plugins/*.so* +%if %{dbus_type} != "p2p" +%{_datadir}/dbus-1/services/*SingleSignOn*.service +%endif +%config(noreplace) %{_sysconfdir}/gsignond.conf + + +%files devel +%defattr(-,root,root,-) +%{_includedir}/%{name}/*.h +%{_libdir}/lib%{name}-*.so +%{_libdir}/pkgconfig/%{name}.pc +%if %{dbus_type} != "p2p" +%{_datadir}/dbus-1/interfaces/*SSO*.xml +%endif + + +%files doc +%defattr(-,root,root,-) +%{_datadir}/gtk-doc/html/gsignond/* + diff --git a/dists/rpm/gsignond-suse.spec b/dists/rpm/gsignond-suse.spec index 1776ee4..15babec 100644 --- a/dists/rpm/gsignond-suse.spec +++ b/dists/rpm/gsignond-suse.spec @@ -6,11 +6,12 @@ Name: gsignond Summary: GLib based Single Sign-On daemon -Version: 0.0.2 -Release: 9 +Version: 0.0.3 +Release: 1 Group: System/Daemons -License: LGPL +License: LGPL-2.1+ Source: %{name}-%{version}.tar.gz +Provides: gsignon %if %{dbus_type} != "p2p" Requires: dbus-1 %endif @@ -39,6 +40,15 @@ Requires: %{name} = %{version}-%{release} %{summary}. +%package doc +Summary: Documentation files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description doc +%{summary}. + + %prep %setup -q -n %{name}-%{version} #gtkdocize @@ -71,6 +81,7 @@ rm -rf %{buildroot} %post /sbin/ldconfig chmod u+s %{_bindir}/%{name} +groupadd -f -r gsignond %postun -p /sbin/ldconfig @@ -89,6 +100,7 @@ chmod u+s %{_bindir}/%{name} %endif %exclude %{_libdir}/gsignond/extensions/*.la %exclude %{_libdir}/gsignond/plugins/*.la +%config(noreplace) %{_sysconfdir}/gsignond.conf %files devel @@ -102,6 +114,11 @@ chmod u+s %{_bindir}/%{name} %endif +%files doc +%defattr(-,root,root,-) +%{_datadir}/gtk-doc/html/gsignond/* + + %changelog * Mon Jun 24 2013 Imran Zaman - Release 0.0.2 that comprises of bug fixes diff --git a/dists/rpm/gsignond-tizen.changes b/dists/rpm/gsignond-tizen.changes index 422e3d1..0fc9fd8 100644 --- a/dists/rpm/gsignond-tizen.changes +++ b/dists/rpm/gsignond-tizen.changes @@ -1,3 +1,8 @@ +* Thu Aug 22 2013 Amarnath Valluri +- Release 0.0.3 +- Bug fixes in UI interaction +- Documentation support + * Mon Jun 24 2013 Imran Zaman - Release 0.0.2 that comprises of bug fixes diff --git a/dists/rpm/gsignond-tizen.spec b/dists/rpm/gsignond-tizen.spec index f5fa51d..8ee6300 100644 --- a/dists/rpm/gsignond-tizen.spec +++ b/dists/rpm/gsignond-tizen.spec @@ -6,11 +6,12 @@ Name: gsignond Summary: GLib based Single Sign-On daemon -Version: 0.0.2 -Release: 9 +Version: 0.0.3 +Release: 1 Group: System/Daemons -License: LGPL +License: LGPL-2.1+ Source: %{name}-%{version}.tar.gz +Provides: gsignon %if %{dbus_type} != "p2p" Requires: dbus-1 %endif @@ -38,6 +39,15 @@ Requires: %{name} = %{version}-%{release} %{summary}. +%package doc +Summary: Documentation files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description doc +%{summary}. + + %prep %setup -q -n %{name}-%{version} if [ -f = "gtk-doc.make" ] @@ -66,6 +76,7 @@ rm -rf %{buildroot} %post /sbin/ldconfig chmod u+s %{_bindir}/%{name} +groupadd -f -r gsignond %postun -p /sbin/ldconfig @@ -82,6 +93,7 @@ chmod u+s %{_bindir}/%{name} %if %{dbus_type} != "p2p" %{_datadir}/dbus-1/services/*SingleSignOn*.service %endif +%config(noreplace) %{_sysconfdir}/gsignond.conf %files devel @@ -93,3 +105,8 @@ chmod u+s %{_bindir}/%{name} %{_datadir}/dbus-1/interfaces/*SSO*.xml %endif + +%files doc +%defattr(-,root,root,-) +%{_datadir}/gtk-doc/html/gsignond/* + diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 0000000..dd8b8a5 --- /dev/null +++ b/docs/Makefile.am @@ -0,0 +1,121 @@ +## Process this file with automake to produce Makefile.in + +# We require automake 1.6 at least. +AUTOMAKE_OPTIONS = 1.6 + +# This is a blank Makefile.am for using gtk-doc. +# Copy this to your project's API docs directory and modify the variables to +# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples +# of using the various options. + +# The name of the module, e.g. 'glib'. +DOC_MODULE=gsignond + +# Uncomment for versioned docs and specify the version of the module, e.g. '2'. +#DOC_MODULE_VERSION=2 + + +# The top-level SGML file. You can change this if you want to. +DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml + +# Directories containing the source code. +# gtk-doc will search all .c and .h files beneath these paths +# for inline comments documenting functions and macros. +# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk +DOC_SOURCE_DIR=$(top_srcdir)/include\ +$(top_srcdir)/src/common\ +$(top_srcdir)/src/plugins + +# Extra options to pass to gtkdoc-scangobj. Not normally needed. +SCANGOBJ_OPTIONS= + +# Extra options to supply to gtkdoc-scan. +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" +SCAN_OPTIONS= + +# Extra options to supply to gtkdoc-mkdb. +# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml +MKDB_OPTIONS=--xml-mode --output-format=xml + +# Extra options to supply to gtkdoc-mktmpl +# e.g. MKTMPL_OPTIONS=--only-section-tmpl +MKTMPL_OPTIONS= + +# Extra options to supply to gtkdoc-mkhtml +MKHTML_OPTIONS= + +# Extra options to supply to gtkdoc-fixref. Not normally needed. +# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html +FIXXREF_OPTIONS= + +# Used for dependencies. The docs will be rebuilt if any of these change. +# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h +# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c +HFILE_GLOB= +CFILE_GLOB= + +# Extra header to include when scanning, which are not under DOC_SOURCE_DIR +# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h +EXTRA_HFILES= + +# Header files or dirs to ignore when scanning. Use base file/dir names +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code +IGNORE_HFILES=\ +gsignond-disposable.h\ +gsignond-identity-info.h\ +gsignond-identity-info-internal.h\ +gsignond-pipe-stream.h\ +gsignond-plugin-enum-types.h\ +gsignond-plugin-loader.h\ +gsignond-db-defines.h\ +gsignond-db-error.h\ +gsignond-db-secret-database.h\ +gsignond-db-sql-database.h\ +gsignond-db-sql-database-private.h + +# Images to copy into HTML directory. +# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png +HTML_IMAGES= + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). +# e.g. content_files=running.sgml building.sgml changes-2.0.sgml +content_files=building.xml + +# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded +# These files must be listed here *and* in content_files +# e.g. expand_content_files=running.sgml +expand_content_files= + +# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. +# Only needed if you are using gtkdoc-scangobj to dynamically query widget +# signals and properties. +# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) +GTKDOC_CFLAGS= + +GTKDOC_LIBS=\ + $(top_builddir)/src/common/libgsignond-common.la\ + $(top_builddir)/src/plugins/digest/libdigest.la\ + $(top_builddir)/src/plugins/password/libpassword.la\ + $(top_builddir)/src/plugins/ssotest/libssotest.la + +# This includes the standard gtk-doc make rules, copied by gtkdocize. +include $(top_srcdir)/gtk-doc.make + +# Other files to distribute +# e.g. EXTRA_DIST += version.xml.in +EXTRA_DIST += + +# Files not to distribute +# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types +# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt +#DISTCLEANFILES += + +# Comment this out if you want 'make check' to test you doc status +# and run some sanity checks +if ENABLE_GTK_DOC +TESTS_ENVIRONMENT = cd $(srcdir) && \ + DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ + SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) +TESTS = $(GTKDOC_CHECK) +endif diff --git a/docs/Makefile.in b/docs/Makefile.in new file mode 100644 index 0000000..0bb399e --- /dev/null +++ b/docs/Makefile.in @@ -0,0 +1,908 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### +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@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/gtk-doc.make +subdir = docs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ + $(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_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_INTERFACES_DIR = @DBUS_INTERFACES_DIR@ +DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GREP = @GREP@ +GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ +GSIGNOND_LIBS = @GSIGNOND_LIBS@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTestDBus_CFLAGS = @GTestDBus_CFLAGS@ +GTestDBus_LIBS = @GTestDBus_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ +LIBECRYPTFS_LIBS = @LIBECRYPTFS_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSMACK_CFLAGS = @LIBSMACK_CFLAGS@ +LIBSMACK_LIBS = @LIBSMACK_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MESSAGE_BUS_TYPE = @MESSAGE_BUS_TYPE@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +ifGNUmake = @ifGNUmake@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# We require automake 1.6 at least. +AUTOMAKE_OPTIONS = 1.6 + +# This is a blank Makefile.am for using gtk-doc. +# Copy this to your project's API docs directory and modify the variables to +# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples +# of using the various options. + +# The name of the module, e.g. 'glib'. +DOC_MODULE = gsignond + +# Uncomment for versioned docs and specify the version of the module, e.g. '2'. +#DOC_MODULE_VERSION=2 + +# The top-level SGML file. You can change this if you want to. +DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml + +# Directories containing the source code. +# gtk-doc will search all .c and .h files beneath these paths +# for inline comments documenting functions and macros. +# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk +DOC_SOURCE_DIR = $(top_srcdir)/include\ +$(top_srcdir)/src/common\ +$(top_srcdir)/src/plugins + + +# Extra options to pass to gtkdoc-scangobj. Not normally needed. +SCANGOBJ_OPTIONS = + +# Extra options to supply to gtkdoc-scan. +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" +SCAN_OPTIONS = + +# Extra options to supply to gtkdoc-mkdb. +# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml +MKDB_OPTIONS = --xml-mode --output-format=xml + +# Extra options to supply to gtkdoc-mktmpl +# e.g. MKTMPL_OPTIONS=--only-section-tmpl +MKTMPL_OPTIONS = + +# Extra options to supply to gtkdoc-mkhtml +MKHTML_OPTIONS = + +# Extra options to supply to gtkdoc-fixref. Not normally needed. +# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html +FIXXREF_OPTIONS = + +# Used for dependencies. The docs will be rebuilt if any of these change. +# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h +# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c +HFILE_GLOB = +CFILE_GLOB = + +# Extra header to include when scanning, which are not under DOC_SOURCE_DIR +# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h +EXTRA_HFILES = + +# Header files or dirs to ignore when scanning. Use base file/dir names +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code +IGNORE_HFILES = \ +gsignond-disposable.h\ +gsignond-identity-info.h\ +gsignond-identity-info-internal.h\ +gsignond-pipe-stream.h\ +gsignond-plugin-enum-types.h\ +gsignond-plugin-loader.h\ +gsignond-db-defines.h\ +gsignond-db-error.h\ +gsignond-db-secret-database.h\ +gsignond-db-sql-database.h\ +gsignond-db-sql-database-private.h + + +# Images to copy into HTML directory. +# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png +HTML_IMAGES = + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). +# e.g. content_files=running.sgml building.sgml changes-2.0.sgml +content_files = building.xml + +# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded +# These files must be listed here *and* in content_files +# e.g. expand_content_files=running.sgml +expand_content_files = + +# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. +# Only needed if you are using gtkdoc-scangobj to dynamically query widget +# signals and properties. +# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) +GTKDOC_CFLAGS = +GTKDOC_LIBS = \ + $(top_builddir)/src/common/libgsignond-common.la\ + $(top_builddir)/src/plugins/digest/libdigest.la\ + $(top_builddir)/src/plugins/password/libpassword.la\ + $(top_builddir)/src/plugins/ssotest/libssotest.la + +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) +TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) +SETUP_FILES = \ + $(content_files) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + + +# This includes the standard gtk-doc make rules, copied by gtkdocize. + +# Other files to distribute +# e.g. EXTRA_DIST += version.xml.in +EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) +DOC_STAMPS = setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ + html-build.stamp pdf-build.stamp \ + tmpl.stamp sgml.stamp html.stamp pdf.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +REPORT_FILES = \ + $(DOC_MODULE)-undocumented.txt \ + $(DOC_MODULE)-undeclared.txt \ + $(DOC_MODULE)-unused.txt + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp + +#### setup #### +GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) +GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; + +#### scan #### +GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) +GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; +GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) +GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; + +#### templates #### +GTK_DOC_V_TMPL = $(GTK_DOC_V_TMPL_$(V)) +GTK_DOC_V_TMPL_ = $(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_TMPL_0 = @echo " DOC Rebuilding template files"; + +#### xml #### +GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) +GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XML_0 = @echo " DOC Building XML"; + +#### html #### +GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) +GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; +GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) +GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; + +#### pdf #### +GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) +GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; + +# Files not to distribute +# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types +# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt +#DISTCLEANFILES += + +# Comment this out if you want 'make check' to test you doc status +# and run some sanity checks +@ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = cd $(srcdir) && \ +@ENABLE_GTK_DOC_TRUE@ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ +@ENABLE_GTK_DOC_TRUE@ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) + +@ENABLE_GTK_DOC_TRUE@TESTS = $(GTKDOC_CHECK) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/gtk-doc.make: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-local + +.MAKE: check-am install-am install-strip + +.PHONY: all all-am all-local check check-TESTS check-am clean \ + clean-generic clean-libtool clean-local dist-hook distclean \ + distclean-generic distclean-libtool distclean-local distdir \ + dvi dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-local 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 \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-local mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-local + + +@ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +@ENABLE_GTK_DOC_FALSE@all-local: + +docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) + +$(REPORT_FILES): sgml-build.stamp + +setup-build.stamp: + -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + test -f $(abs_srcdir)/$$file && \ + cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + done; \ + fi; \ + test -d $(abs_srcdir)/tmpl && \ + { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ + chmod -R u+w $(abs_builddir)/tmpl; } \ + fi + $(AM_V_at)touch setup-build.stamp + +scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) + $(GTK_DOC_V_SCAN)_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) + $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ + fi; \ + fi; \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ + gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ + else \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + $(AM_V_at)touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp + @true + +tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + if test -w $(abs_srcdir) ; then \ + cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ + fi \ + fi + $(AM_V_at)touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +$(srcdir)/tmpl/*.sgml: + @true + +sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) + -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) + $(AM_V_at)touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ + mkhtml_options=""; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkhtml_options="$$mkhtml_options --verbose"; \ + fi; \ + fi; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ + if test "$(?)" = "0"; then \ + mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ + fi; \ + cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + -@test "x$(HTML_IMAGES)" = "x" || \ + for file in $(HTML_IMAGES) ; do \ + if test -f $(abs_srcdir)/$$file ; then \ + cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + fi; \ + if test -f $(abs_builddir)/$$file ; then \ + cp $(abs_builddir)/$$file $(abs_builddir)/html; \ + fi; \ + done; + $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + $(AM_V_at)touch html-build.stamp + +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ + mkpdf_options=""; \ + gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkpdf_options="$$mkpdf_options --verbose"; \ + fi; \ + fi; \ + if test "x$(HTML_IMAGES)" != "x"; then \ + for img in $(HTML_IMAGES); do \ + part=`dirname $$img`; \ + echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ + if test $$? != 0; then \ + mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ + fi; \ + done; \ + fi; \ + gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + $(AM_V_at)touch pdf-build.stamp + +############## + +clean-local: + @rm -f *~ *.bak + @rm -rf .libs + +distclean-local: + @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ + rm -rf tmpl; \ + fi + +maintainer-clean-local: + @rm -rf xml html + +install-data-local: + @installfiles=`echo $(builddir)/html/*`; \ + if test "$$installfiles" = '$(builddir)/html/*'; \ + then echo 1>&2 'Nothing to install' ; \ + else \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + $(mkinstalldirs) $${installdir} ; \ + for i in $$installfiles; do \ + echo ' $(INSTALL_DATA) '$$i ; \ + $(INSTALL_DATA) $$i $${installdir}; \ + done; \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ + fi; \ + $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ + fi + +uninstall-local: + @if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + rm -rf $${installdir} + +# +# Require gtk-doc when making dist +# +@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: docs +@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: +@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" +@ENABLE_GTK_DOC_FALSE@ @false + +dist-hook: dist-check-gtkdoc dist-hook-local + @mkdir $(distdir)/tmpl + @mkdir $(distdir)/html + @-cp ./tmpl/*.sgml $(distdir)/tmpl + @cp ./html/* $(distdir)/html + @-cp ./$(DOC_MODULE).pdf $(distdir)/ + @-cp ./$(DOC_MODULE).types $(distdir)/ + @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ + @cd $(distdir) && rm -f $(DISTCLEANFILES) + @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + +.PHONY : dist-hook-local docs + +# 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. +.NOEXPORT: diff --git a/docs/building.xml b/docs/building.xml new file mode 100644 index 0000000..66ea61e --- /dev/null +++ b/docs/building.xml @@ -0,0 +1,180 @@ + + + + + Building and installing the gsignond daemon + 3 + GSignond + + + + Building gsignond + + GSignond uses the standard GNU build system, + using autoconf for package + configuration and resolving portability issues, + automake for building makefiles + that comply with the GNU Coding Standards, and + libtool for building shared + libraries on multiple platforms. The normal sequence for + compiling and installing gsignond from distribution tarballs is thus: + + + ./configure + make + make install + + + If you have obtained the source code directly from git repository, + execute the ./autogen.sh script + before the steps above. + + + + The standard options provided by GNU + autoconf may be passed to the + configure script. Please see the + autoconf documentation or run + ./configure --help for information about + the standard options. + + + + + Dependencies + + Before you can compile GSignond, you need to have + various other tools and libraries installed on your + system. The two tools needed during the build process + are pkg-config and + GNU make. + + + + + pkg-config + is a tool for tracking the compilation flags needed for + libraries that are used by the GSignond. (For each + library, a small .pc text file is + installed in a standard location that contains the compilation + flags needed for that library along with version number + information.) + + + + + GSignond depends on a number of other libraries. + + + + + The GLib + library is the development framework that GSignond is built on. + + + + + The SQLite library + provides a database implementation that GSignond is using for + storing data. + + + + + The check library + provides a unit testing framework. It is needed only if you would + like to run unit tests with make check. + + + + + For building Tizen extension module that integrates gsignond into + the Tizen platform, the + libsmack and + ecryptfs are required. + They are not needed otherwise. + + + + + + + Extra Configuration Options + + + In addition to the normal options, the + configure script supports these additional arguments: + + + + <systemitem>--enable-debug</systemitem> + + + Turns on debugging support. This enables unit tests and allows setting + environment variables to influence the runtime behaviour of GSignond + (see GSignondConfig and + GSignondAccessControlManager). + Also, the daemon will exit in case of critical errors. + + + + + <systemitem>--enable-sql-log</systemitem> + + + Turns on SQL statement logging. For this, also + --enable-debug must be used. + + + + + <systemitem>--enable-dbus-type=dbus-type</systemitem> + + + Sets the way in which GSignond is using DBus to communicate with + the client library. dbus-type can be one of + + + + 'p2p' which is the default and recommended + value. GSignond will use direct connection over a UNIX domain socket + with the client library without involving the DBus daemon. + + + + + 'session' which will use the session bus. + This is not recommended to use because session bus isn't secure + against eavesdropping, but it can be used for debugging purposes, + as it allows the use of standard tools such as + dbus-monitor, d-feet and + so on. + + + + + 'system' which will use the system bus. + Can be used on a single-user systems, but 'p2p' is preferred. + + + + + + + + + Building distribution packages + + + Instead of running make install to install gsignond + into a system location it is possible to build distribution-specific + packages. dists/ directory in the source tree + contains a number of package confuguration files, and to use them also + a distribution tarball is needed. If you are building from a git tree, + use make dist to create such a tarball. + + + + diff --git a/docs/gsignond-docs.sgml b/docs/gsignond-docs.sgml new file mode 100644 index 0000000..abd68c2 --- /dev/null +++ b/docs/gsignond-docs.sgml @@ -0,0 +1,77 @@ + + +]> + + + gsignond API Reference Manual + + for gsignond daemon. + The latest version of this documentation can be found on-line at + + http://gsignon-docs.accounts-sso.googlecode.com/git/gsignond/index.html. + + + + + GSignond building and installation + + + + + GSignond configuration + + + + + + + + GSignond API for writing authentication plugins + + + + + + + + Standard in-tree authentication plugins + + + + + + + + GSignond API for writing platform adaptation extensions + + + + + + + + + Miscellaneous + + + + + + + Object Hierarchy + + + + API Index + + + + Index of deprecated API + + + + + diff --git a/docs/gsignond-overrides.txt b/docs/gsignond-overrides.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/gsignond-sections.txt b/docs/gsignond-sections.txt new file mode 100644 index 0000000..d97978a --- /dev/null +++ b/docs/gsignond-sections.txt @@ -0,0 +1,391 @@ +
+gsignond-access-control-manager +GSignondAccessControlManager +GSignondAccessControlManager +GSignondAccessControlManagerClass +gsignond_access_control_manager_acl_is_valid +gsignond_access_control_manager_peer_is_allowed_to_use_identity +gsignond_access_control_manager_peer_is_owner_of_identity +gsignond_access_control_manager_security_context_of_keychain +gsignond_access_control_manager_security_context_of_peer + +GSIGNOND_ACCESS_CONTROL_MANAGER +GSIGNOND_ACCESS_CONTROL_MANAGER_CLASS +GSIGNOND_ACCESS_CONTROL_MANAGER_GET_CLASS +GSIGNOND_IS_ACCESS_CONTROL_MANAGER +GSIGNOND_IS_ACCESS_CONTROL_MANAGER_CLASS +GSIGNOND_TYPE_ACCESS_CONTROL_MANAGER +gsignond_access_control_manager_get_type +
+ +
+gsignond-config +GSignondConfig +GSignondConfig +GSignondConfigClass +gsignond_config_get_integer +gsignond_config_get_string +gsignond_config_new +gsignond_config_set_integer +gsignond_config_set_string + +GSIGNOND_CONFIG +GSIGNOND_CONFIG_CLASS +GSIGNOND_CONFIG_GET_CLASS +GSIGNOND_IS_CONFIG +GSIGNOND_IS_CONFIG_CLASS +GSIGNOND_TYPE_CONFIG +GSignondConfigPrivate +gsignond_config_get_type +
+ +
+gsignond-config-db +GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME +GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME +GSIGNOND_CONFIG_DB_SSO +
+ +
+gsignond-config-dbus +GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT +GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT +GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT +GSIGNOND_CONFIG_DBUS_TIMEOUTS +
+ +
+gsignond-config-general +GSIGNOND_CONFIG_GENERAL +GSIGNOND_CONFIG_GENERAL_BIN_DIR +GSIGNOND_CONFIG_GENERAL_EXTENSION +GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR +GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR +GSIGNOND_CONFIG_GENERAL_SECURE_DIR +GSIGNOND_CONFIG_GENERAL_STORAGE_PATH +GSIGNOND_CONFIG_PLUGIN_TIMEOUT +
+ +
+gsignond-credentials +GSignondCredentials +GSignondCredentials +GSignondCredentialsClass +gsignond_credentials_equal +gsignond_credentials_get_id +gsignond_credentials_get_password +gsignond_credentials_get_username +gsignond_credentials_new +gsignond_credentials_set_data +gsignond_credentials_set_id +gsignond_credentials_set_password +gsignond_credentials_set_username + +GSIGNOND_CREDENTIALS +GSIGNOND_CREDENTIALS_CLASS +GSIGNOND_CREDENTIALS_GET_CLASS +GSIGNOND_IS_CREDENTIALS +GSIGNOND_IS_CREDENTIALS_CLASS +GSIGNOND_TYPE_CREDENTIALS +GSignondCredentialsPrivate +gsignond_credentials_get_type +
+ +
+gsignond-dictionary +GSignondDictionary +gsignond_dictionary_copy +gsignond_dictionary_get +gsignond_dictionary_get_boolean +gsignond_dictionary_get_int32 +gsignond_dictionary_get_int64 +gsignond_dictionary_get_string +gsignond_dictionary_get_uint32 +gsignond_dictionary_get_uint64 +gsignond_dictionary_new +gsignond_dictionary_new_from_variant +gsignond_dictionary_ref +gsignond_dictionary_remove +gsignond_dictionary_set +gsignond_dictionary_set_boolean +gsignond_dictionary_set_int32 +gsignond_dictionary_set_int64 +gsignond_dictionary_set_string +gsignond_dictionary_set_uint32 +gsignond_dictionary_set_uint64 +gsignond_dictionary_to_variant +gsignond_dictionary_unref + +GSIGNOND_DICTIONARY +GSIGNOND_IS_DICTIONARY +GSIGNOND_TYPE_DICTIONARY +
+ +
+gsignond-digest-plugin +GSignondDigestPlugin +GSignondDigestPlugin +GSignondDigestPluginClass + +GSIGNOND_DIGEST_PLUGIN +GSIGNOND_DIGEST_PLUGIN_CLASS +GSIGNOND_DIGEST_PLUGIN_GET_CLASS +GSIGNOND_IS_DIGEST_PLUGIN +GSIGNOND_IS_DIGEST_PLUGIN_CLASS +GSIGNOND_TYPE_DIGEST_PLUGIN +GSignondDigestPluginPrivate +gsignond_digest_plugin_get_type +
+ +
+gsignond-error +GSIGNOND_ERROR +GSignondError +gsignond_error_new_from_variant +gsignond_error_quark +gsignond_error_to_variant +gsignond_get_gerror_for_id +
+ +
+gsignond-extension-interface +GSignondExtension +GSignondExtension +GSignondExtensionClass +gsignond_extension_get_access_control_manager +gsignond_extension_get_name +gsignond_extension_get_secret_storage +gsignond_extension_get_storage_manager +gsignond_extension_get_version + +GSIGNOND_EXTENSION +GSIGNOND_EXTENSION_CLASS +GSIGNOND_EXTENSION_GET_CLASS +GSIGNOND_IS_EXTENSION +GSIGNOND_IS_EXTENSION_CLASS +GSIGNOND_TYPE_EXTENSION +GSignondExtensionPrivate +gsignond_extension_get_type +
+ +
+gsignond-log +DBG +ERR +INFO +TRACEBACK +WARN +
+ +
+gsignond-password-plugin +GSignondPasswordPlugin +GSignondPasswordPlugin +GSignondPasswordPluginClass + +GSIGNOND_IS_PASSWORD_PLUGIN +GSIGNOND_IS_PASSWORD_PLUGIN_CLASS +GSIGNOND_PASSWORD_PLUGIN +GSIGNOND_PASSWORD_PLUGIN_CLASS +GSIGNOND_PASSWORD_PLUGIN_GET_CLASS +GSIGNOND_TYPE_PASSWORD_PLUGIN +gsignond_password_plugin_get_type +
+ +
+gsignond-plugin-interface +GSignondPlugin +GSignondPluginInterface +GSignondPluginState +gsignond_plugin_cancel +gsignond_plugin_error +gsignond_plugin_refresh +gsignond_plugin_refreshed +gsignond_plugin_request +gsignond_plugin_request_initial +gsignond_plugin_response +gsignond_plugin_response_final +gsignond_plugin_status_changed +gsignond_plugin_store +gsignond_plugin_user_action_finished +gsignond_plugin_user_action_required + +GSIGNOND_IS_PLUGIN +GSIGNOND_PLUGIN +GSIGNOND_PLUGIN_GET_INTERFACE +GSIGNOND_TYPE_PLUGIN +gsignond_plugin_get_type +
+ +
+gsignond-secret-storage +GSignondSecretStorage +GSignondSecretStorage +GSignondSecretStorageClass +gsignond_secret_storage_check_credentials +gsignond_secret_storage_clear_db +gsignond_secret_storage_close_db +gsignond_secret_storage_get_last_error +gsignond_secret_storage_is_open_db +gsignond_secret_storage_load_credentials +gsignond_secret_storage_load_data +gsignond_secret_storage_open_db +gsignond_secret_storage_remove_credentials +gsignond_secret_storage_remove_data +gsignond_secret_storage_update_credentials +gsignond_secret_storage_update_data + +GSIGNOND_IS_SECRET_STORAGE +GSIGNOND_IS_SECRET_STORAGE_CLASS +GSIGNOND_SECRET_STORAGE +GSIGNOND_SECRET_STORAGE_CLASS +GSIGNOND_SECRET_STORAGE_GET_CLASS +GSIGNOND_TYPE_SECRET_STORAGE +GSignondSecretStoragePrivate +gsignond_secret_storage_get_type +
+ +
+gsignond-security-context +GSignondSecurityContext +GSignondSecurityContextList +gsignond_security_context_check +gsignond_security_context_compare +gsignond_security_context_copy +gsignond_security_context_free +gsignond_security_context_from_variant +gsignond_security_context_get_application_context +gsignond_security_context_get_system_context +gsignond_security_context_list_copy +gsignond_security_context_list_free +gsignond_security_context_list_from_variant +gsignond_security_context_list_to_variant +gsignond_security_context_match +gsignond_security_context_new +gsignond_security_context_new_from_values +gsignond_security_context_set_application_context +gsignond_security_context_set_system_context +gsignond_security_context_to_variant +
+ +
+gsignond-session-data +GSignondSessionData +GSignondUiPolicy +gsignond_session_data_get_caption +gsignond_session_data_get_network_proxy +gsignond_session_data_get_network_timeout +gsignond_session_data_get_realm +gsignond_session_data_get_renew_token +gsignond_session_data_get_secret +gsignond_session_data_get_ui_policy +gsignond_session_data_get_username +gsignond_session_data_get_window_id +gsignond_session_data_set_caption +gsignond_session_data_set_network_proxy +gsignond_session_data_set_network_timeout +gsignond_session_data_set_realm +gsignond_session_data_set_renew_token +gsignond_session_data_set_secret +gsignond_session_data_set_ui_policy +gsignond_session_data_set_username +gsignond_session_data_set_window_id + +GSIGNOND_IS_SESSION_DATA +GSIGNOND_SESSION_DATA +GSIGNOND_TYPE_SESSION_DATA +
+ +
+gsignond-signonui-data +GSignondSignonuiData +GSignondSignonuiError +gsignond_signonui_data_get_captcha_response +gsignond_signonui_data_get_captcha_url +gsignond_signonui_data_get_caption +gsignond_signonui_data_get_confirm +gsignond_signonui_data_get_final_url +gsignond_signonui_data_get_forgot_password +gsignond_signonui_data_get_forgot_password_url +gsignond_signonui_data_get_message +gsignond_signonui_data_get_open_url +gsignond_signonui_data_get_password +gsignond_signonui_data_get_query_error +gsignond_signonui_data_get_query_password +gsignond_signonui_data_get_query_username +gsignond_signonui_data_get_remember_password +gsignond_signonui_data_get_request_id +gsignond_signonui_data_get_test_reply +gsignond_signonui_data_get_title +gsignond_signonui_data_get_url_response +gsignond_signonui_data_get_username +gsignond_signonui_data_set_captcha_response +gsignond_signonui_data_set_captcha_url +gsignond_signonui_data_set_caption +gsignond_signonui_data_set_confirm +gsignond_signonui_data_set_final_url +gsignond_signonui_data_set_forgot_password +gsignond_signonui_data_set_forgot_password_url +gsignond_signonui_data_set_message +gsignond_signonui_data_set_open_url +gsignond_signonui_data_set_password +gsignond_signonui_data_set_query_error +gsignond_signonui_data_set_query_password +gsignond_signonui_data_set_query_username +gsignond_signonui_data_set_remember_password +gsignond_signonui_data_set_request_id +gsignond_signonui_data_set_test_reply +gsignond_signonui_data_set_title +gsignond_signonui_data_set_url_response +gsignond_signonui_data_set_username + +GSIGNOND_IS_SIGNONUI_DATA +GSIGNOND_SIGNONUI_DATA +GSIGNOND_TYPE_SIGNONUI_DATA +
+ +
+gsignond-ssotest-plugin +GSignondSsoTestPlugin +GSignondSsoTestPlugin +GSignondSsoTestPluginClass + +GSIGNOND_IS_SSOTEST_PLUGIN +GSIGNOND_IS_SSOTEST_PLUGIN_CLASS +GSIGNOND_SSOTEST_PLUGIN +GSIGNOND_SSOTEST_PLUGIN_CLASS +GSIGNOND_SSOTEST_PLUGIN_GET_CLASS +GSIGNOND_TYPE_SSOTEST_PLUGIN +GSignondSsoTestPluginPrivate +gsignond_ssotest_plugin_get_type +
+ +
+gsignond-storage-manager +GSignondStorageManager +GSignondStorageManager +GSignondStorageManagerClass +gsignond_storage_manager_delete_storage +gsignond_storage_manager_filesystem_is_mounted +gsignond_storage_manager_initialize_storage +gsignond_storage_manager_mount_filesystem +gsignond_storage_manager_storage_is_initialized +gsignond_storage_manager_unmount_filesystem + +GSIGNOND_IS_STORAGE_MANAGER +GSIGNOND_IS_STORAGE_MANAGER_CLASS +GSIGNOND_STORAGE_MANAGER +GSIGNOND_STORAGE_MANAGER_CLASS +GSIGNOND_STORAGE_MANAGER_GET_CLASS +GSIGNOND_TYPE_STORAGE_MANAGER +GSignondStorageManagerPrivate +gsignond_storage_manager_get_type +
+ +
+gsignond-utils +gsignond_generate_nonce +gsignond_wipe_directory +gsignond_wipe_file +
+ diff --git a/docs/gsignond.types b/docs/gsignond.types new file mode 100644 index 0000000..fa429f9 --- /dev/null +++ b/docs/gsignond.types @@ -0,0 +1,10 @@ +gsignond_access_control_manager_get_type +gsignond_config_get_type +gsignond_credentials_get_type +gsignond_digest_plugin_get_type +gsignond_extension_get_type +gsignond_password_plugin_get_type +gsignond_plugin_get_type +gsignond_secret_storage_get_type +gsignond_ssotest_plugin_get_type +gsignond_storage_manager_get_type diff --git a/docs/html/GSignondAccessControlManager.html b/docs/html/GSignondAccessControlManager.html new file mode 100644 index 0000000..13c0117 --- /dev/null +++ b/docs/html/GSignondAccessControlManager.html @@ -0,0 +1,366 @@ + + + + +GSignondAccessControlManager + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondAccessControlManager

+

GSignondAccessControlManager — an object that performs access control checks

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GSignondAccessControlManager
+
+
+
+

Properties

+
+  "config"                   GSignondConfig*       : Read / Write / Construct Only
+
+
+
+

Description

+

+GSignondAccessControlManager performs access control checks using +available system services. gSSO can be configured to use a custom extension +that provides a subclassed implementation of GSignondAccessControlManager +(see GSignondExtension), otherwise a default implementation is used. +

+
+
+

Details

+
+

struct GSignondAccessControlManager

+
struct GSignondAccessControlManager;
+

+Opaque GSignondAccessControlManager data structure. +

+
+
+
+

struct GSignondAccessControlManagerClass

+
struct GSignondAccessControlManagerClass {
+    GObjectClass parent_class;
+
+    void (*security_context_of_peer) (
+                            GSignondAccessControlManager *self,
+                            GSignondSecurityContext *peer_ctx,
+                            int peer_fd, const gchar *peer_service,
+                            const gchar *peer_app_ctx);
+    gboolean (*peer_is_allowed_to_use_identity) (
+                            GSignondAccessControlManager *self,
+                            const GSignondSecurityContext *peer_ctx,
+                            const GSignondSecurityContext *owner_ctx,
+                            const GSignondSecurityContextList *identity_acl);
+    gboolean (*peer_is_owner_of_identity) (
+                            GSignondAccessControlManager *self,
+                            const GSignondSecurityContext *peer_ctx,
+                            const GSignondSecurityContext *owner_ctx);
+    gboolean (*acl_is_valid) (
+                            GSignondAccessControlManager *self,
+                            const GSignondSecurityContext *peer_ctx,
+                            const GSignondSecurityContextList *identity_acl);
+    GSignondSecurityContext * (*security_context_of_keychain) (
+                            GSignondAccessControlManager *self);
+};
+
+

+GSignondAccessControlManagerClass class containing pointers to class methods. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

GObjectClass parent_class;

parent class.

security_context_of_peer ()

an implementation of gsignond_access_control_manager_security_context_of_peer() +

peer_is_allowed_to_use_identity ()

an implementation of gsignond_access_control_manager_peer_is_allowed_to_use_identity() +

peer_is_owner_of_identity ()

an implementation of gsignond_access_control_manager_peer_is_owner_of_identity() +

acl_is_valid ()

an implementation of gsignond_access_control_manager_acl_is_valid() +

security_context_of_keychain ()

an implementation of gsignond_access_control_manager_security_context_of_keychain() +
+
+
+
+

gsignond_access_control_manager_acl_is_valid ()

+
gboolean            gsignond_access_control_manager_acl_is_valid
+                                                        (GSignondAccessControlManager *self,
+                                                         const GSignondSecurityContext *peer_ctx,
+                                                         const GSignondSecurityContextList *identity_acl);
+

+Checks if the specified peer is allowed to set the specified access +control list. gsignond_access_control_manager_peer_is_owner_of_identity() +is used before calling this method to verify identity ownership. +

+

+The default implementation always returns TRUE. +

+
++ + + + + + + + + + + + + + + + + + +

self :

object instance.

peer_ctx :

security context of the peer connection.

identity_acl :

access control list for the identity.

Returns :

access control list is OK?
+
+
+
+

gsignond_access_control_manager_peer_is_allowed_to_use_identity ()

+
gboolean            gsignond_access_control_manager_peer_is_allowed_to_use_identity
+                                                        (GSignondAccessControlManager *self,
+                                                         const GSignondSecurityContext *peer_ctx,
+                                                         const GSignondSecurityContext *owner_ctx,
+                                                         const GSignondSecurityContextList *identity_acl);
+

+Checks if specified peer is allowed to access the specified identity. +

+

+The default implementation goes over items in identity_acl, using +gsignond_security_context_check() to check them against peer_ctx. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

self :

object instance.

peer_ctx :

security context of the peer connection.

owner_ctx :

security context of the identity owner.

identity_acl :

access control list for the identity in question. Includes the owner_ctx as well.

Returns :

access is allowed?
+
+
+
+

gsignond_access_control_manager_peer_is_owner_of_identity ()

+
gboolean            gsignond_access_control_manager_peer_is_owner_of_identity
+                                                        (GSignondAccessControlManager *self,
+                                                         const GSignondSecurityContext *peer_ctx,
+                                                         const GSignondSecurityContext *owner_ctx);
+

+Checks if the peer specified in peer_ctx is the owner of the identity. +

+

+The default implementation is using gsignond_security_context_check() +to check peer_ctx against owner_ctx directly. +

+
++ + + + + + + + + + + + + + + + + + +

self :

object instance.

peer_ctx :

security context of the peer connection.

owner_ctx :

security context of the identity owner.

Returns :

is owner?
+
+
+
+

gsignond_access_control_manager_security_context_of_keychain ()

+
GSignondSecurityContext * gsignond_access_control_manager_security_context_of_keychain
+                                                        (GSignondAccessControlManager *self);
+

+Retrieves security context of the keychain application. Keychain application +has a special management access to all stored identities and is able to +perform deletion of all identities from storage. +

+

+The default implementation returns an empty context. If gSSO was compiled +with --enable-debug and SSO_KEYCHAIN_SYSCTX environment variable is set, then +the value of that variable is used to set the returned system context instead. +

+
++ + + + + + + + + + +

self :

object instance.

Returns :

security context of the keychain application.
+
+
+
+

gsignond_access_control_manager_security_context_of_peer ()

+
void                gsignond_access_control_manager_security_context_of_peer
+                                                        (GSignondAccessControlManager *self,
+                                                         GSignondSecurityContext *peer_ctx,
+                                                         int peer_fd,
+                                                         const gchar *peer_service,
+                                                         const gchar *peer_app_ctx);
+

+Retrieves and sets GSignondSecurityContext of the specified peer. +

+

+The default implementation sets the app context as it was passed, and sets +the system context to the binary path of the process that is determined from +peer_fd and peer_service parameters. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

self :

object instance.

peer_ctx :

instance of security context to be set.

peer_fd :

file descriptor of the peer connection if using peer-to-peer dbus, -1 otherwise.

peer_service :

g_dbus_method_invocation_get_sender() of the peer connection, if not using peer-to-peer dbus, NULL otherwise

peer_app_ctx :

application context of the peer connection.
+
+
+
+

Property Details

+
+

The "config" property

+
  "config"                   GSignondConfig*       : Read / Write / Construct Only
+

Configuration object.

+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/GSignondConfig.html b/docs/html/GSignondConfig.html new file mode 100644 index 0000000..dfe0222 --- /dev/null +++ b/docs/html/GSignondConfig.html @@ -0,0 +1,275 @@ + + + + +GSignondConfig + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondConfig

+

GSignondConfig — gSSO configuration information

+
+
+

Synopsis

+
+#include <gsignond/gsignond-config.h>
+
+struct              GSignondConfig;
+struct              GSignondConfigClass;
+gint                gsignond_config_get_integer         (GSignondConfig *self,
+                                                         const gchar *key);
+const gchar *       gsignond_config_get_string          (GSignondConfig *self,
+                                                         const gchar *key);
+GSignondConfig *    gsignond_config_new                 ();
+void                gsignond_config_set_integer         (GSignondConfig *self,
+                                                         const gchar *key,
+                                                         gint value);
+void                gsignond_config_set_string          (GSignondConfig *self,
+                                                         const gchar *key,
+                                                         const gchar *value);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GSignondConfig
+
+
+
+

Description

+

+GSignondConfig holds configuration information as a set of keys and values +(integer or strings). The key names are defined in +general config keys, +database config keys, and +DBus config keys. +

+

+The configuration is discovered from these sources, in decreasing order of +priority: +

+
    +
  • environment variables, if gSSO has been compiled with --enable-debug switch. +See the specific keys documentation for the variable names.

  • +
  • gSSO configuration file. See below for where the file is searched for.

  • +
  • default values. See the documentation for specific keys for those.

  • +
+

+

+

+

+
+

Where the configuration file is searched for

+
+

+

+

+If gSSO has been compiled with --enable-debug, then these locations are used, +in decreasing order of priority: +

+
+

+

+

+Otherwise, the config file location is determined at compilation time as +$(sysconfdir) + "gsignond/gsignond.conf" +

+

+

+
+

Example configuration file

+
+

+

+

+See example configuration file here: + +http://code.google.com/p/accounts-sso/source/browse/gsignond.conf?repo=gsignond +

+
+
+

Details

+
+

struct GSignondConfig

+
struct GSignondConfig;
+

+Opaque structure for the object. +

+
+
+
+

struct GSignondConfigClass

+
struct GSignondConfigClass {
+};
+
+

+Opaque structure for the class. +

+
+
+
+

gsignond_config_get_integer ()

+
gint                gsignond_config_get_integer         (GSignondConfig *self,
+                                                         const gchar *key);
+

+Get an integer configuration value. +

+
++ + + + + + + + + + + + + + +

self :

an instance of GSignondConfig +

key :

the key name

Returns :

the value corresponding to the key as an integer. If the key does not +exist or cannot be converted to the integer, 0 is returned.
+
+
+
+

gsignond_config_get_string ()

+
const gchar *       gsignond_config_get_string          (GSignondConfig *self,
+                                                         const gchar *key);
+

+Get a string configuration value. +

+
++ + + + + + + + + + + + + + +

self :

an instance of GSignondConfig +

key :

the key name

Returns :

the value corresponding to the key as string. If the key does not +exist, NULL is returned. [transfer none] +
+
+
+
+

gsignond_config_new ()

+
GSignondConfig *    gsignond_config_new                 ();
+

+Create a GSignondConfig object. +

+
++ + + + +

Returns :

an instance of GSignondConfig. gSSO extensions should not use this +as they're already provided with a config object when they're created.
+
+
+
+

gsignond_config_set_integer ()

+
void                gsignond_config_set_integer         (GSignondConfig *self,
+                                                         const gchar *key,
+                                                         gint value);
+

+Sets the configuration value to the provided integer. +

+
++ + + + + + + + + + + + + + +

self :

an instance of GSignondConfig +

key :

the key name

value :

the value
+
+
+
+

gsignond_config_set_string ()

+
void                gsignond_config_set_string          (GSignondConfig *self,
+                                                         const gchar *key,
+                                                         const gchar *value);
+

+Sets the configuration value to the provided string. +

+
++ + + + + + + + + + + + + + +

self :

an instance of GSignondConfig +

key :

the key name

value :

the value. [transfer none] +
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/GSignondCredentials.html b/docs/html/GSignondCredentials.html new file mode 100644 index 0000000..b986198 --- /dev/null +++ b/docs/html/GSignondCredentials.html @@ -0,0 +1,328 @@ + + + + +GSignondCredentials + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondCredentials

+

GSignondCredentials — credentials (username, password) associated with an identity

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GSignondCredentials
+
+
+
+

Description

+

+GSignondCredentials hold a username, password, and identity id, associated +with an identity. This information in stored in secret storage using +GSignondSecretStorage. +

+
+
+

Details

+
+

GSignondCredentials

+
typedef struct _GSignondCredentials GSignondCredentials;
+

+Opaque GSignondCredentials data structure. +

+
+
+
+

GSignondCredentialsClass

+
typedef struct {
+} GSignondCredentialsClass;
+
+

+Opaque GSignondCredentialsClass data structure. +

+
+
+
+

gsignond_credentials_equal ()

+
gboolean            gsignond_credentials_equal          (GSignondCredentials *one,
+                                                         GSignondCredentials *two);
+

+Compares elements of two GSignondCredentials object for equality. +

+
++ + + + + + + + + + + + + + +

one :

the first credential to be compared.

two :

the second credential to be compared.

Returns :

TRUE if id, username and password are same for both credential +objects, FALSE otherwise.
+
+
+
+

gsignond_credentials_get_id ()

+
guint32             gsignond_credentials_get_id         (GSignondCredentials *self);
+

+Gets the identity id +

+
++ + + + + + + + + + +

self :

the object whose id is to be set.

Returns :

the id
+
+
+
+

gsignond_credentials_get_password ()

+
const gchar *       gsignond_credentials_get_password   (GSignondCredentials *self);
+

+Gets the password from the GSignondCredentials object +

+
++ + + + + + + + + + +

self :

the object whose password is to be set.

Returns :

the password if the object is valid, NULL otherwise. [transfer none] +
+
+
+
+

gsignond_credentials_get_username ()

+
const gchar *       gsignond_credentials_get_username   (GSignondCredentials *self);
+

+Gets the username of the GSignondCredentials object +

+
++ + + + + + + + + + +

self :

the object whose username is to be set.

Returns :

the username if the object is valid, NULL otherwise. [transfer none] +
+
+
+
+

gsignond_credentials_new ()

+
GSignondCredentials * gsignond_credentials_new          ();
+

+Creates a new empty GSignondCredentials object +

+
++ + + + +

Returns :

the GSignondCredentials object. [transfer full] +
+
+
+
+

gsignond_credentials_set_data ()

+
gboolean            gsignond_credentials_set_data       (GSignondCredentials *self,
+                                                         const guint32 id,
+                                                         const gchar *username,
+                                                         const gchar *password);
+

+Sets the data of the GSignondCredentials. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

self :

the object whose data is to be set.

id :

the identity id associated with the credentials.

username :

the username. [transfer none] +

password :

the password. [transfer none] +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_credentials_set_id ()

+
gboolean            gsignond_credentials_set_id         (GSignondCredentials *self,
+                                                         const guint32 id);
+

+Sets the identity id of the GSignondCredentials object +

+
++ + + + + + + + + + + + + + +

self :

the object whose id is to be set.

id :

the id.

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_credentials_set_password ()

+
gboolean            gsignond_credentials_set_password   (GSignondCredentials *self,
+                                                         const gchar *password);
+

+Sets the password of the GSignondCredentials object +

+
++ + + + + + + + + + + + + + +

self :

the object whose password is to be set.

password :

the password. [transfer none] +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_credentials_set_username ()

+
gboolean            gsignond_credentials_set_username   (GSignondCredentials *self,
+                                                         const gchar *username);
+

+Sets the username of the GSignondCredentials object +

+
++ + + + + + + + + + + + + + +

self :

the object whose username is to be set.

username :

the username. [transfer none] +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/GSignondDigestPlugin.html b/docs/html/GSignondDigestPlugin.html new file mode 100644 index 0000000..a7b8b1c --- /dev/null +++ b/docs/html/GSignondDigestPlugin.html @@ -0,0 +1,128 @@ + + + + +GSignondDigestPlugin + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondDigestPlugin

+

GSignondDigestPlugin — a plugin that performs HTTP Digest authentication

+
+
+

Synopsis

+
+#include <gsignond/gsignond-digest-plugin.h>
+
+struct              GSignondDigestPlugin;
+struct              GSignondDigestPluginClass;
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GSignondDigestPlugin
+
+
+
+

Implemented Interfaces

+

+GSignondDigestPlugin implements + GSignondPlugin.

+
+
+

Description

+

+GSignondDigestPlugin performs HTTP Digest authentication without exposing +the password to the application. Digest authentication is described in +RFC 2617. +

+

+gsignond_plugin_request_initial() session_data parameter should include +the following string items, whose meaning is described in the RFC: +

+
    +
  • username and secret. If they are absent, they are requested from the user +via gSSO UI.

  • +
  • realm, "Algo", "Nonce", "Method", "DigestUri" - mandatory items.

  • +
  • "NonceCount", "Qop", "HEntity". "NonceCount" must be present if "Qop" is +present, "HEntity" must be present if "Qop" is present and set to "auth-int".

  • +
+

+

+

+If the plugin has all the data to calculate the digest, it issues +"response-final" signal. session_data in that signal contains +the username, "CNonce" item and the digest value under the "Response" key. +

+

+If some of the data is incorrect or not available, "error" +signal is issued instead. +

+

+"type" property is set to "digest", and "mechanisms" +property contains a single entry "digest". +

+
+
+

Details

+
+

struct GSignondDigestPlugin

+
struct GSignondDigestPlugin;
+

+Opaque GSignondDigestPlugin data structure. +

+
+
+
+

struct GSignondDigestPluginClass

+
struct GSignondDigestPluginClass {
+    GObjectClass parent_class;
+};
+
+

+Opaque GSignondDigestPluginClass data structure. +

+
++ + + + +

GObjectClass parent_class;

the parent class structure
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/GSignondExtension.html b/docs/html/GSignondExtension.html new file mode 100644 index 0000000..55b6e8a --- /dev/null +++ b/docs/html/GSignondExtension.html @@ -0,0 +1,298 @@ + + + + +GSignondExtension + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondExtension

+

GSignondExtension — provides platform adaptation functionality

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GSignondExtension
+
+
+
+

Description

+

+GSignondExtension provides access to platform adaptation functionality. It +contains getter methods for default implementations of GSignondAccessControlManager, +GSignondSecretStorage and GSignondStorageManager. +

+

+gSSO can be adapted to a specific platform environment by implementing a +custom extension module. The following steps need to be taken: +

+

+a) subclass and re-implement some (or all) of the functionality of the above +three classes. +

+

+b) subclass GSignondExtension and provide implementations of its getter methods for those +of the adaptation classes that have been changed. +

+

+d) provide a function GSignondExtension * extensionname_extension_init(void) +that returns an instance of the GSignondExtension subclass. +

+

+c) build and install these implementations as a gSSO extension module and +configure gSSO to use it. +

+

+Examples of custom extensions can be seen here: + +https://code.google.com/p/accounts-sso/source/browse/?repo=gsignond#git%2Fsrc%2Fextensions +and gSSO configuration is described in GSignondConfig. +

+
+
+

Details

+
+

struct GSignondExtension

+
struct GSignondExtension;
+

+Opaque GSignondExtension data structure. +

+
+
+
+

struct GSignondExtensionClass

+
struct GSignondExtensionClass {
+    GObjectClass parent_class;
+
+    const gchar * (*get_extension_name) (GSignondExtension *self);
+
+    guint32 (*get_extension_version) (GSignondExtension *self);
+
+    GSignondStorageManager * (*get_storage_manager) (GSignondExtension *self,
+                                                     GSignondConfig *config);
+
+    GSignondSecretStorage * (*get_secret_storage) (GSignondExtension *self,
+                                                   GSignondConfig *config);
+
+    GSignondAccessControlManager * (*get_access_control_manager) (
+                                                    GSignondExtension *self,
+                                                    GSignondConfig *config);
+};
+
+

+GSignondExtensionClass class containing pointers to class methods. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

GObjectClass parent_class;

the parent class

get_extension_name ()

implementation of gsignond_extension_get_name() +

get_extension_version ()

implementation of gsignond_extension_get_version() +

get_storage_manager ()

implementation of gsignond_extension_get_storage_manager() +

get_secret_storage ()

implementation of gsignond_extension_get_secret_storage() +

get_access_control_manager ()

implementation of gsignond_extension_get_access_control_manager() +
+
+
+
+

gsignond_extension_get_access_control_manager ()

+
GSignondAccessControlManager * gsignond_extension_get_access_control_manager
+                                                        (GSignondExtension *self,
+                                                         GSignondConfig *config);
+

+Factory method to get a singleton access control manager object. See +GSignondAccessControlManager for the description of the default implementation. +

+
++ + + + + + + + + + + + + + +

self :

object instance.

config :

configuration object instance.

Returns :

access control manager object instance. [transfer none] +
+
+
+
+

gsignond_extension_get_name ()

+
const gchar *       gsignond_extension_get_name         (GSignondExtension *self);
+

+Get a human readable name of the extension. Default implementation +returns "default". +

+
++ + + + + + + + + + +

self :

object instance.

Returns :

name of the extension. [transfer none] +
+
+
+
+

gsignond_extension_get_secret_storage ()

+
GSignondSecretStorage * gsignond_extension_get_secret_storage
+                                                        (GSignondExtension *self,
+                                                         GSignondConfig *config);
+

+Factory method to get a singleton secret storage object. See +GSignondSecretStorage for the description of the default implementation. +

+
++ + + + + + + + + + + + + + +

self :

object instance.

config :

configuration object instance.

Returns :

secret storage object instance. [transfer none] +
+
+
+
+

gsignond_extension_get_storage_manager ()

+
GSignondStorageManager * gsignond_extension_get_storage_manager
+                                                        (GSignondExtension *self,
+                                                         GSignondConfig *config);
+

+Factory method to get a singleton storage manager object. See +GSignondStorageManager for the description of the default implementation. +

+
++ + + + + + + + + + + + + + +

self :

object instance.

config :

configuration object instance.

Returns :

storage manager object instance. [transfer none] +
+
+
+
+

gsignond_extension_get_version ()

+
guint32             gsignond_extension_get_version      (GSignondExtension *self);
+

+Get version of the extension, split into four bytes in order from MSB to LSB; +major, minor, patchlevel, build. Default implementation returns 0. +

+
++ + + + +

self :

object instance.
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/GSignondPasswordPlugin.html b/docs/html/GSignondPasswordPlugin.html new file mode 100644 index 0000000..cd135a5 --- /dev/null +++ b/docs/html/GSignondPasswordPlugin.html @@ -0,0 +1,113 @@ + + + + +GSignondPasswordPlugin + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondPasswordPlugin

+

GSignondPasswordPlugin — a plugin for retrieving the username/password

+
+
+

Synopsis

+
+#include <gsignond/gsignond-password-plugin.h>
+
+struct              GSignondPasswordPlugin;
+struct              GSignondPasswordPluginClass;
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GSignondPasswordPlugin
+
+
+
+

Implemented Interfaces

+

+GSignondPasswordPlugin implements + GSignondPlugin.

+
+
+

Description

+

+GSignondPasswordPlugin is used in login/password based authentication protocols. +It returns to the applications the username and password associated with an +identity. The plugin first checks if the daemon has placed them in +gsignond_plugin_request_initial() session_data parameter +(that means they're already stored in gSSO secure database), and if not, +the user is asked for the username and password via gSSO UI. +

+

+The plugin returns the username and password via "response-final" +if it was able to obtain them, and issues "error" otherwise. +

+

+"type" property is set to "password", and "mechanisms" +property contains a single entry "password". +

+
+
+

Details

+
+

struct GSignondPasswordPlugin

+
struct GSignondPasswordPlugin;
+

+Opaque GSignondPasswordPlugin data structure. +

+
+
+
+

struct GSignondPasswordPluginClass

+
struct GSignondPasswordPluginClass {
+    GObjectClass parent_class;
+};
+
+

+Opaque GSignondPasswordPluginClass data structure. +

+
++ + + + +

GObjectClass parent_class;

the parent class structure
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/GSignondSecretStorage.html b/docs/html/GSignondSecretStorage.html new file mode 100644 index 0000000..4b26461 --- /dev/null +++ b/docs/html/GSignondSecretStorage.html @@ -0,0 +1,598 @@ + + + + +GSignondSecretStorage + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondSecretStorage

+

GSignondSecretStorage — provides access to the database that stores user credentials and identity/method cache

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GSignondSecretStorage
+
+
+
+

Properties

+
+  "config"                   GSignondConfig*       : Read / Write / Construct Only
+
+
+
+

Description

+

+GSignondSecretStorage provides access to the database where sensitive identity +data (GSignondCredentials) and identity/method cache are stored. It's preferred +that this database is protected against access by processes other than gSSO. +

+

+gSSO can be configured to use a custom extension +that provides a subclassed implementation of GSignondSecretStorage +(see GSignondExtension), otherwise a default implementation is used. +

+
+
+

Details

+
+

GSignondSecretStorage

+
typedef struct _GSignondSecretStorage GSignondSecretStorage;
+

+Opaque GSignondSecretStorage data structure. +

+
+
+
+

GSignondSecretStorageClass

+
typedef struct {
+    GObjectClass parent_class;
+
+    gboolean
+    (*open_db) (GSignondSecretStorage *self);
+
+    gboolean
+    (*close_db) (GSignondSecretStorage *self);
+
+    gboolean
+    (*clear_db) (GSignondSecretStorage *self);
+
+    gboolean
+    (*is_open_db) (GSignondSecretStorage *self);
+
+    GSignondCredentials*
+    (*load_credentials) (
+            GSignondSecretStorage *self,
+            const guint32 id);
+
+    gboolean
+    (*update_credentials) (
+            GSignondSecretStorage *self,
+            GSignondCredentials* creds);
+
+    gboolean
+    (*remove_credentials) (
+            GSignondSecretStorage *self,
+            const guint32 id);
+
+    gboolean
+    (*check_credentials) (
+            GSignondSecretStorage *self,
+            GSignondCredentials* creds);
+
+    GSignondDictionary*
+    (*load_data) (
+            GSignondSecretStorage *self,
+            const guint32 id,
+            const guint32 method);
+
+    gboolean
+    (*update_data) (
+            GSignondSecretStorage *self,
+            const guint32 id,
+            const guint32 method,
+            GSignondDictionary *data);
+
+    gboolean
+    (*remove_data) (
+            GSignondSecretStorage *self,
+            const guint32 id,
+            const guint32 method);
+
+    const GError*
+    (*get_last_error) (GSignondSecretStorage *self);
+} GSignondSecretStorageClass;
+
+

+GSignondSecretStorageClass class containing pointers to class methods. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GObjectClass parent_class;

parent class.

open_db ()

an implementation of gsignond_secret_storage_open_db() +

close_db ()

an implementation of gsignond_secret_storage_close_db() +

clear_db ()

an implementation of gsignond_secret_storage_clear_db() +

is_open_db ()

an implementation of gsignond_secret_storage_is_open_db() +

load_credentials ()

an implementation of gsignond_secret_storage_load_credentials() +

update_credentials ()

an implementation of gsignond_secret_storage_update_credentials() +

remove_credentials ()

an implementation of gsignond_secret_storage_remove_credentials() +

check_credentials ()

an implementation of gsignond_secret_storage_check_credentials() +

load_data ()

an implementation of gsignond_secret_storage_load_data() +

update_data ()

an implementation of gsignond_secret_storage_update_data() +

remove_data ()

an implementation of gsignond_secret_storage_remove_data() +

get_last_error ()

an implementation of gsignond_secret_storage_get_last_error() +
+
+
+
+

gsignond_secret_storage_check_credentials ()

+
gboolean            gsignond_secret_storage_check_credentials
+                                                        (GSignondSecretStorage *self,
+                                                         GSignondCredentials *creds);
+

+Checks whether the given credentials match what is stored in the database. +

+
++ + + + + + + + + + + + + + +

self :

instance of GSignondSecretStorage +

creds :

the credentials that are being checked. [transfer none] +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_secret_storage_clear_db ()

+
gboolean            gsignond_secret_storage_clear_db    (GSignondSecretStorage *self);
+

+Removes all stored secrets from the database. +

+
++ + + + + + + + + + +

self :

instance of GSignondSecretStorage +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_secret_storage_close_db ()

+
gboolean            gsignond_secret_storage_close_db    (GSignondSecretStorage *self);
+

+Closes the database. To reopen it, call gsignond_secret_storage_open_db(). +

+
++ + + + + + + + + + +

self :

instance of GSignondSecretStorage +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_secret_storage_get_last_error ()

+
const GError *      gsignond_secret_storage_get_last_error
+                                                        (GSignondSecretStorage *self);
+

+Retrieves the last occurred error that has occured +

+
++ + + + + + + + + + +

self :

instance of GSignondSecretStorage +

Returns :

last occurred GError. [transfer none] +
+
+
+
+

gsignond_secret_storage_is_open_db ()

+
gboolean            gsignond_secret_storage_is_open_db  (GSignondSecretStorage *self);
+

+Checks if the database is open or not. +

+
++ + + + + + + + + + +

self :

instance of GSignondSecretStorage +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_secret_storage_load_credentials ()

+
GSignondCredentials * gsignond_secret_storage_load_credentials
+                                                        (GSignondSecretStorage *self,
+                                                         const guint32 id);
+

+Loads the credentials from the database. +

+
++ + + + + + + + + + + + + + +

self :

instance of GSignondSecretStorage +

id :

the identity id whose credentials are being loaded.

Returns :

+GSignondCredentials if successful, +NULL otherwise. [transfer full] +
+
+
+
+

gsignond_secret_storage_load_data ()

+
GHashTable *        gsignond_secret_storage_load_data   (GSignondSecretStorage *self,
+                                                         const guint32 id,
+                                                         const guint32 method);
+

+Loads the secret data associated with a given identity and method. +

+
++ + + + + + + + + + + + + + + + + + +

self :

instance of GSignondSecretStorage +

id :

the identity id whose data are fetched

method :

the authentication method the data is used for.

Returns :

the secret data. [transfer full] +
+
+
+
+

gsignond_secret_storage_open_db ()

+
gboolean            gsignond_secret_storage_open_db     (GSignondSecretStorage *self);
+

+Opens (and initializes) the database. The implementation should take +care of creating the DB, if it doesn't exist, and it should use +GSIGNOND_CONFIG_GENERAL_SECURE_DIR and GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME +to determine database location in the filesystem. +

+

+The default implementation is using SQLite for the storage. +

+
++ + + + + + + + + + +

self :

instance of GSignondSecretStorage +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_secret_storage_remove_credentials ()

+
gboolean            gsignond_secret_storage_remove_credentials
+                                                        (GSignondSecretStorage *self,
+                                                         const guint32 id);
+

+Remove the credentials for the given identity. +

+
++ + + + + + + + + + + + + + +

self :

instance of GSignondSecretStorage +

id :

the identity whose credentials are being updated.

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_secret_storage_remove_data ()

+
gboolean            gsignond_secret_storage_remove_data (GSignondSecretStorage *self,
+                                                         const guint32 id,
+                                                         const guint32 method);
+

+Removes secret data associated with a given id/method. +

+
++ + + + + + + + + + + + + + + + + + +

self :

instance of GSignondSecretStorage +

id :

the identity whose data are fetched.

method :

the authentication method the data is used for.

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_secret_storage_update_credentials ()

+
gboolean            gsignond_secret_storage_update_credentials
+                                                        (GSignondSecretStorage *self,
+                                                         GSignondCredentials *creds);
+

+Stores/updates the credentials for the given identity. +

+
++ + + + + + + + + + + + + + +

self :

instance of GSignondSecretStorage +

creds :

the credentials that are being updated. [transfer none] +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_secret_storage_update_data ()

+
gboolean            gsignond_secret_storage_update_data (GSignondSecretStorage *self,
+                                                         const guint32 id,
+                                                         const guint32 method,
+                                                         GHashTable *data);
+

+Calling this method updates the secret data +associated with the given id/method. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

self :

instance of GSignondSecretStorage +

id :

the identity whose data are fetched.

method :

the authentication method the data is used for.

data :

the data to update. [transfer none] +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

Property Details

+
+

The "config" property

+
  "config"                   GSignondConfig*       : Read / Write / Construct Only
+

Configuration object.

+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/GSignondSsoTestPlugin.html b/docs/html/GSignondSsoTestPlugin.html new file mode 100644 index 0000000..ba18da5 --- /dev/null +++ b/docs/html/GSignondSsoTestPlugin.html @@ -0,0 +1,101 @@ + + + + +GSignondSsoTestPlugin + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondSsoTestPlugin

+

GSignondSsoTestPlugin — a plugin that is used internally in gsignond unit test

+
+
+

Synopsis

+
+#include <gsignond/gsignond-ssotest-plugin.h>
+
+struct              GSignondSsoTestPlugin;
+struct              GSignondSsoTestPluginClass;
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GSignondSsoTestPlugin
+
+
+
+

Implemented Interfaces

+

+GSignondSsoTestPlugin implements + GSignondPlugin.

+
+
+

Description

+

+GSignondSsoTestPlugin is used by gsignond unit tests. It should not be used +by applications. +

+
+
+

Details

+
+

struct GSignondSsoTestPlugin

+
struct GSignondSsoTestPlugin;
+

+Opaque GSignondSsoTestPlugin data structure. +

+
+
+
+

struct GSignondSsoTestPluginClass

+
struct GSignondSsoTestPluginClass {
+    GObjectClass parent_class;
+};
+
+

+Opaque GSignondSsoTestPluginClass data structure. +

+
++ + + + +

GObjectClass parent_class;

the parent class structure
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/GSignondStorageManager.html b/docs/html/GSignondStorageManager.html new file mode 100644 index 0000000..09eb1fb --- /dev/null +++ b/docs/html/GSignondStorageManager.html @@ -0,0 +1,305 @@ + + + + +GSignondStorageManager + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondStorageManager

+

GSignondStorageManager — manages encrypted disk storage for storing the secret database

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GSignondStorageManager
+
+
+
+

Properties

+
+  "config"                   GSignondConfig*       : Read / Write / Construct Only
+
+
+
+

Description

+

+GSignondStorageManager manages encrypted disk storage for storing the +databases. The default implementation maintains a simple per-user +directory accessible only to root and gsignond group, but gSSO can be +configured to use a custom extension that provides a subclassed +implementation of GSignondStorageManager +(see GSignondExtension for instructions and pointers to examples). +

+
+
+

Details

+
+

struct GSignondStorageManager

+
struct GSignondStorageManager;
+

+Opaque GSignondStorageManager data structure. +

+
+
+
+

struct GSignondStorageManagerClass

+
struct GSignondStorageManagerClass {
+    GObjectClass parent_class;
+
+    gboolean (*initialize_storage) (GSignondStorageManager *self);
+    gboolean (*delete_storage) (GSignondStorageManager *self);
+    gboolean (*storage_is_initialized) (GSignondStorageManager *self);
+    const gchar * (*mount_filesystem) (GSignondStorageManager *self);
+    gboolean (*unmount_filesystem) (GSignondStorageManager *self);
+    gboolean (*filesystem_is_mounted) (GSignondStorageManager *self);
+};
+
+

+GSignondStorageManagerClass class containing pointers to class methods. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GObjectClass parent_class;

parent class.

initialize_storage ()

an implementation of gsignond_storage_manager_initialize_storage() +

delete_storage ()

an implementation of gsignond_storage_manager_delete_storage() +

storage_is_initialized ()

an implementation of gsignond_storage_manager_storage_is_initialized() +

mount_filesystem ()

an implementation of gsignond_storage_manager_mount_filesystem() +

unmount_filesystem ()

an implementation of gsignond_storage_manager_unmount_filesystem() +

filesystem_is_mounted ()

an implementation of gsignond_storage_manager_filesystem_is_mounted() +
+
+
+
+

gsignond_storage_manager_delete_storage ()

+
gboolean            gsignond_storage_manager_delete_storage
+                                                        (GSignondStorageManager *self);
+

+Destroys all the encryption keys and wipes the storage. gsignond_wipe_directory() +is typically used for the latter. +

+
++ + + + + + + + + + +

self :

object instance.

Returns :

success?
+
+
+
+

gsignond_storage_manager_filesystem_is_mounted ()

+
gboolean            gsignond_storage_manager_filesystem_is_mounted
+                                                        (GSignondStorageManager *self);
+

+Checks if the encrypted storage filesystem is currently mounted. +

+
++ + + + + + + + + + +

self :

object instance.

Returns :

filesystem is currently mounted?
+
+
+
+

gsignond_storage_manager_initialize_storage ()

+
gboolean            gsignond_storage_manager_initialize_storage
+                                                        (GSignondStorageManager *self);
+

+Initialize encryption storage. This means making sure that the +necessary directories exist and are accessible. +

+
++ + + + + + + + + + +

self :

object instance.

Returns :

success?
+
+
+
+

gsignond_storage_manager_mount_filesystem ()

+
const gchar *       gsignond_storage_manager_mount_filesystem
+                                                        (GSignondStorageManager *self);
+

+Mounts an encrypted storage and returns the filesystem path of the storage +mount point. This path will be used to access the secret database via +GSignondSecretStorage. +

+

+The default implemenation does nothing, and immediately returns the path for the +secret database. +

+
++ + + + + + + + + + +

self :

object instance.

Returns :

path of the storage mount point. [transfer none] +
+
+
+
+

gsignond_storage_manager_storage_is_initialized ()

+
gboolean            gsignond_storage_manager_storage_is_initialized
+                                                        (GSignondStorageManager *self);
+

+Checks if the storage has been initialized. +

+
++ + + + + + + + + + +

self :

object instance.

Returns :

storage has been initialized?
+
+
+
+

gsignond_storage_manager_unmount_filesystem ()

+
gboolean            gsignond_storage_manager_unmount_filesystem
+                                                        (GSignondStorageManager *self);
+

+Unmounts a previously mounted encrypted storage filesystem. +

+
++ + + + + + + + + + +

self :

object instance.

Returns :

success?
+
+
+
+

Property Details

+
+

The "config" property

+
  "config"                   GSignondConfig*       : Read / Write / Construct Only
+

Configuration object.

+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/annotation-glossary.html b/docs/html/annotation-glossary.html new file mode 100644 index 0000000..f4b18b3 --- /dev/null +++ b/docs/html/annotation-glossary.html @@ -0,0 +1,36 @@ + + + + +Annotation Glossary + + + + + + + + + + + + + + + +
+

+Annotation Glossary

+

T

+
+transfer full
+

Free data after the code is done.

+
+transfer none
+

Don't free data after the code is done.

+
+ + + \ No newline at end of file diff --git a/docs/html/api-index-full.html b/docs/html/api-index-full.html new file mode 100644 index 0000000..226ebd4 --- /dev/null +++ b/docs/html/api-index-full.html @@ -0,0 +1,891 @@ + + + + +API Index + + + + + + + + + + + + + + + + +
+

+API Index

+

A

+
+GSignondAccessControlManager, struct in GSignondAccessControlManager +
+
+
+GSignondAccessControlManager:config, object property in GSignondAccessControlManager +
+
+
+GSignondAccessControlManagerClass, struct in GSignondAccessControlManager +
+
+
+gsignond_access_control_manager_acl_is_valid, function in GSignondAccessControlManager +
+
+
+gsignond_access_control_manager_peer_is_allowed_to_use_identity, function in GSignondAccessControlManager +
+
+
+gsignond_access_control_manager_peer_is_owner_of_identity, function in GSignondAccessControlManager +
+
+
+gsignond_access_control_manager_security_context_of_keychain, function in GSignondAccessControlManager +
+
+
+gsignond_access_control_manager_security_context_of_peer, function in GSignondAccessControlManager +
+
+

C

+
+GSignondConfig, struct in GSignondConfig +
+
+
+GSignondConfigClass, struct in GSignondConfig +
+
+
+GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT, macro in DBus configuration +
+
+
+GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT, macro in DBus configuration +
+
+
+GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT, macro in DBus configuration +
+
+
+GSIGNOND_CONFIG_DBUS_TIMEOUTS, macro in DBus configuration +
+
+
+GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME, macro in Database configuration +
+
+
+GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME, macro in Database configuration +
+
+
+GSIGNOND_CONFIG_DB_SSO, macro in Database configuration +
+
+
+GSIGNOND_CONFIG_GENERAL, macro in General configuration +
+
+
+GSIGNOND_CONFIG_GENERAL_BIN_DIR, macro in General configuration +
+
+
+GSIGNOND_CONFIG_GENERAL_EXTENSION, macro in General configuration +
+
+
+GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR, macro in General configuration +
+
+
+GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR, macro in General configuration +
+
+
+GSIGNOND_CONFIG_GENERAL_SECURE_DIR, macro in General configuration +
+
+
+GSIGNOND_CONFIG_GENERAL_STORAGE_PATH, macro in General configuration +
+
+
+gsignond_config_get_integer, function in GSignondConfig +
+
+
+gsignond_config_get_string, function in GSignondConfig +
+
+
+gsignond_config_new, function in GSignondConfig +
+
+
+GSIGNOND_CONFIG_PLUGIN_TIMEOUT, macro in General configuration +
+
+
+gsignond_config_set_integer, function in GSignondConfig +
+
+
+gsignond_config_set_string, function in GSignondConfig +
+
+
+GSignondCredentials, struct in GSignondCredentials +
+
+
+GSignondCredentialsClass, struct in GSignondCredentials +
+
+
+gsignond_credentials_equal, function in GSignondCredentials +
+
+
+gsignond_credentials_get_id, function in GSignondCredentials +
+
+
+gsignond_credentials_get_password, function in GSignondCredentials +
+
+
+gsignond_credentials_get_username, function in GSignondCredentials +
+
+
+gsignond_credentials_new, function in GSignondCredentials +
+
+
+gsignond_credentials_set_data, function in GSignondCredentials +
+
+
+gsignond_credentials_set_id, function in GSignondCredentials +
+
+
+gsignond_credentials_set_password, function in GSignondCredentials +
+
+
+gsignond_credentials_set_username, function in GSignondCredentials +
+
+

D

+
+DBG, macro in Logging +
+
+
+GSignondDictionary, typedef in GSignondDictionary +
+
+
+gsignond_dictionary_copy, function in GSignondDictionary +
+
+
+gsignond_dictionary_get, function in GSignondDictionary +
+
+
+gsignond_dictionary_get_boolean, function in GSignondDictionary +
+
+
+gsignond_dictionary_get_int32, function in GSignondDictionary +
+
+
+gsignond_dictionary_get_int64, function in GSignondDictionary +
+
+
+gsignond_dictionary_get_string, function in GSignondDictionary +
+
+
+gsignond_dictionary_get_uint32, function in GSignondDictionary +
+
+
+gsignond_dictionary_get_uint64, function in GSignondDictionary +
+
+
+gsignond_dictionary_new, function in GSignondDictionary +
+
+
+gsignond_dictionary_new_from_variant, function in GSignondDictionary +
+
+
+gsignond_dictionary_ref, function in GSignondDictionary +
+
+
+gsignond_dictionary_remove, function in GSignondDictionary +
+
+
+gsignond_dictionary_set, function in GSignondDictionary +
+
+
+gsignond_dictionary_set_boolean, function in GSignondDictionary +
+
+
+gsignond_dictionary_set_int32, function in GSignondDictionary +
+
+
+gsignond_dictionary_set_int64, function in GSignondDictionary +
+
+
+gsignond_dictionary_set_string, function in GSignondDictionary +
+
+
+gsignond_dictionary_set_uint32, function in GSignondDictionary +
+
+
+gsignond_dictionary_set_uint64, function in GSignondDictionary +
+
+
+gsignond_dictionary_to_variant, function in GSignondDictionary +
+
+
+gsignond_dictionary_unref, function in GSignondDictionary +
+
+
+GSignondDigestPlugin, struct in GSignondDigestPlugin +
+
+
+GSignondDigestPluginClass, struct in GSignondDigestPlugin +
+
+

E

+
+ERR, macro in Logging +
+
+
+GSignondError, enum in Errors +
+
+
+GSIGNOND_ERROR, macro in Errors +
+
+
+gsignond_error_new_from_variant, function in Errors +
+
+
+gsignond_error_quark, function in Errors +
+
+
+gsignond_error_to_variant, function in Errors +
+
+
+GSignondExtension, struct in GSignondExtension +
+
+
+GSignondExtensionClass, struct in GSignondExtension +
+
+
+gsignond_extension_get_access_control_manager, function in GSignondExtension +
+
+
+gsignond_extension_get_name, function in GSignondExtension +
+
+
+gsignond_extension_get_secret_storage, function in GSignondExtension +
+
+
+gsignond_extension_get_storage_manager, function in GSignondExtension +
+
+
+gsignond_extension_get_version, function in GSignondExtension +
+
+

G

+
+gsignond_generate_nonce, function in Utility functions +
+
+
+gsignond_get_gerror_for_id, macro in Errors +
+
+

I

+
+INFO, macro in Logging +
+
+

P

+
+GSignondPasswordPlugin, struct in GSignondPasswordPlugin +
+
+
+GSignondPasswordPluginClass, struct in GSignondPasswordPlugin +
+
+
+GSignondPluginInterface, struct in GSignondPlugin +
+
+
+GSignondPluginState, enum in GSignondPlugin +
+
+
+gsignond_plugin_cancel, function in GSignondPlugin +
+
+
+gsignond_plugin_error, function in GSignondPlugin +
+
+
+gsignond_plugin_refresh, function in GSignondPlugin +
+
+
+gsignond_plugin_refreshed, function in GSignondPlugin +
+
+
+gsignond_plugin_request, function in GSignondPlugin +
+
+
+gsignond_plugin_request_initial, function in GSignondPlugin +
+
+
+gsignond_plugin_response, function in GSignondPlugin +
+
+
+gsignond_plugin_response_final, function in GSignondPlugin +
+
+
+gsignond_plugin_status_changed, function in GSignondPlugin +
+
+
+gsignond_plugin_store, function in GSignondPlugin +
+
+
+gsignond_plugin_user_action_finished, function in GSignondPlugin +
+
+
+gsignond_plugin_user_action_required, function in GSignondPlugin +
+
+

S

+
+GSignondSecretStorage, struct in GSignondSecretStorage +
+
+
+GSignondSecretStorage:config, object property in GSignondSecretStorage +
+
+
+GSignondSecretStorageClass, struct in GSignondSecretStorage +
+
+
+gsignond_secret_storage_check_credentials, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_clear_db, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_close_db, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_get_last_error, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_is_open_db, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_load_credentials, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_load_data, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_open_db, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_remove_credentials, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_remove_data, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_update_credentials, function in GSignondSecretStorage +
+
+
+gsignond_secret_storage_update_data, function in GSignondSecretStorage +
+
+
+GSignondSecurityContext, struct in GSignondSecurityContext +
+
+
+GSignondSecurityContextList, typedef in GSignondSecurityContext +
+
+
+gsignond_security_context_check, function in GSignondSecurityContext +
+
+
+gsignond_security_context_compare, function in GSignondSecurityContext +
+
+
+gsignond_security_context_copy, function in GSignondSecurityContext +
+
+
+gsignond_security_context_free, function in GSignondSecurityContext +
+
+
+gsignond_security_context_from_variant, function in GSignondSecurityContext +
+
+
+gsignond_security_context_get_application_context, function in GSignondSecurityContext +
+
+
+gsignond_security_context_get_system_context, function in GSignondSecurityContext +
+
+
+gsignond_security_context_list_copy, function in GSignondSecurityContext +
+
+
+gsignond_security_context_list_free, function in GSignondSecurityContext +
+
+
+gsignond_security_context_list_from_variant, function in GSignondSecurityContext +
+
+
+gsignond_security_context_list_to_variant, function in GSignondSecurityContext +
+
+
+gsignond_security_context_match, function in GSignondSecurityContext +
+
+
+gsignond_security_context_new, function in GSignondSecurityContext +
+
+
+gsignond_security_context_new_from_values, function in GSignondSecurityContext +
+
+
+gsignond_security_context_set_application_context, function in GSignondSecurityContext +
+
+
+gsignond_security_context_set_system_context, function in GSignondSecurityContext +
+
+
+gsignond_security_context_to_variant, function in GSignondSecurityContext +
+
+
+GSignondSessionData, typedef in GSignondSessionData +
+
+
+gsignond_session_data_get_caption, function in GSignondSessionData +
+
+
+gsignond_session_data_get_network_proxy, function in GSignondSessionData +
+
+
+gsignond_session_data_get_network_timeout, function in GSignondSessionData +
+
+
+gsignond_session_data_get_realm, function in GSignondSessionData +
+
+
+gsignond_session_data_get_renew_token, function in GSignondSessionData +
+
+
+gsignond_session_data_get_secret, function in GSignondSessionData +
+
+
+gsignond_session_data_get_ui_policy, function in GSignondSessionData +
+
+
+gsignond_session_data_get_username, function in GSignondSessionData +
+
+
+gsignond_session_data_get_window_id, function in GSignondSessionData +
+
+
+gsignond_session_data_set_caption, function in GSignondSessionData +
+
+
+gsignond_session_data_set_network_proxy, function in GSignondSessionData +
+
+
+gsignond_session_data_set_network_timeout, function in GSignondSessionData +
+
+
+gsignond_session_data_set_realm, function in GSignondSessionData +
+
+
+gsignond_session_data_set_renew_token, function in GSignondSessionData +
+
+
+gsignond_session_data_set_secret, function in GSignondSessionData +
+
+
+gsignond_session_data_set_ui_policy, function in GSignondSessionData +
+
+
+gsignond_session_data_set_username, function in GSignondSessionData +
+
+
+gsignond_session_data_set_window_id, function in GSignondSessionData +
+
+
+GSignondSignonuiData, typedef in GSignondSignonuiData +
+
+
+GSignondSignonuiError, enum in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_captcha_response, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_captcha_url, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_caption, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_confirm, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_final_url, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_forgot_password, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_forgot_password_url, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_message, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_open_url, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_password, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_query_error, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_query_password, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_query_username, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_remember_password, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_request_id, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_test_reply, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_title, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_url_response, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_username, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_captcha_response, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_captcha_url, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_caption, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_confirm, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_final_url, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_forgot_password, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_forgot_password_url, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_message, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_open_url, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_password, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_query_error, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_query_password, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_query_username, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_remember_password, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_request_id, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_test_reply, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_title, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_url_response, function in GSignondSignonuiData +
+
+
+gsignond_signonui_data_set_username, function in GSignondSignonuiData +
+
+
+GSignondSsoTestPlugin, struct in GSignondSsoTestPlugin +
+
+
+GSignondSsoTestPluginClass, struct in GSignondSsoTestPlugin +
+
+
+GSignondStorageManager, struct in GSignondStorageManager +
+
+
+GSignondStorageManager:config, object property in GSignondStorageManager +
+
+
+GSignondStorageManagerClass, struct in GSignondStorageManager +
+
+
+gsignond_storage_manager_delete_storage, function in GSignondStorageManager +
+
+
+gsignond_storage_manager_filesystem_is_mounted, function in GSignondStorageManager +
+
+
+gsignond_storage_manager_initialize_storage, function in GSignondStorageManager +
+
+
+gsignond_storage_manager_mount_filesystem, function in GSignondStorageManager +
+
+
+gsignond_storage_manager_storage_is_initialized, function in GSignondStorageManager +
+
+
+gsignond_storage_manager_unmount_filesystem, function in GSignondStorageManager +
+
+

T

+
+TRACEBACK, macro in Logging +
+
+

U

+
+GSignondUiPolicy, enum in GSignondSessionData +
+
+

W

+
+WARN, macro in Logging +
+
+
+gsignond_wipe_directory, function in Utility functions +
+
+
+gsignond_wipe_file, function in Utility functions +
+
+
+ + + \ No newline at end of file diff --git a/docs/html/ch01.html b/docs/html/ch01.html new file mode 100644 index 0000000..106fb9d --- /dev/null +++ b/docs/html/ch01.html @@ -0,0 +1,33 @@ + + + + +GSignond building and installation + + + + + + + + + + + + + + + + +
+

+GSignond building and installation

+ +
+ + + \ No newline at end of file diff --git a/docs/html/ch02.html b/docs/html/ch02.html new file mode 100644 index 0000000..e81db75 --- /dev/null +++ b/docs/html/ch02.html @@ -0,0 +1,44 @@ + + + + +GSignond configuration + + + + + + + + + + + + + + + + +
+

+GSignond configuration

+
+
+GSignondConfig — gSSO configuration information +
+
+General configuration — gSSO general configuration keys +
+
+Database configuration — gSSO database configuration keys +
+
+DBus configuration — gSSO dbus configuration keys +
+
+
+ + + \ No newline at end of file diff --git a/docs/html/ch03.html b/docs/html/ch03.html new file mode 100644 index 0000000..f978c66 --- /dev/null +++ b/docs/html/ch03.html @@ -0,0 +1,44 @@ + + + + +GSignond API for writing authentication plugins + + + + + + + + + + + + + + + + +
+

+GSignond API for writing authentication plugins

+
+
+GSignondPlugin — an interface for implementing authentication plugins +
+
+GSignondDictionary — a dictionary container holding string keys and variant values +
+
+GSignondSessionData — definitions for authentication session parameters +
+
+GSignondSignonuiData — definitions for user interaction parameters +
+
+
+ + + \ No newline at end of file diff --git a/docs/html/ch04.html b/docs/html/ch04.html new file mode 100644 index 0000000..35f1d17 --- /dev/null +++ b/docs/html/ch04.html @@ -0,0 +1,41 @@ + + + + +Standard in-tree authentication plugins + + + + + + + + + + + + + + + + +
+

+Standard in-tree authentication plugins

+
+
+GSignondDigestPlugin — a plugin that performs HTTP Digest authentication +
+
+GSignondSsoTestPlugin — a plugin that is used internally in gsignond unit test +
+
+GSignondPasswordPlugin — a plugin for retrieving the username/password +
+
+
+ + + \ No newline at end of file diff --git a/docs/html/ch05.html b/docs/html/ch05.html new file mode 100644 index 0000000..3b4a82a --- /dev/null +++ b/docs/html/ch05.html @@ -0,0 +1,50 @@ + + + + +GSignond API for writing platform adaptation extensions + + + + + + + + + + + + + + + + +
+

+GSignond API for writing platform adaptation extensions

+
+
+GSignondExtension — provides platform adaptation functionality +
+
+GSignondAccessControlManager — an object that performs access control checks +
+
+GSignondSecurityContext — security context descriptor used in access control checks +
+
+GSignondStorageManager — manages encrypted disk storage for storing the secret database +
+
+GSignondSecretStorage — provides access to the database that stores user credentials and identity/method cache +
+
+GSignondCredentials — credentials (username, password) associated with an identity +
+
+
+ + + \ No newline at end of file diff --git a/docs/html/ch06.html b/docs/html/ch06.html new file mode 100644 index 0000000..9c984a2 --- /dev/null +++ b/docs/html/ch06.html @@ -0,0 +1,41 @@ + + + + +Miscellaneous + + + + + + + + + + + + + + + + +
+

+Miscellaneous

+
+
+Errors — error definitions and utilities +
+
+Logging — logging facilities +
+
+Utility functions — miscellaneous utility functions +
+
+
+ + + \ No newline at end of file diff --git a/docs/html/deprecated-api-index.html b/docs/html/deprecated-api-index.html new file mode 100644 index 0000000..47eb706 --- /dev/null +++ b/docs/html/deprecated-api-index.html @@ -0,0 +1,31 @@ + + + + +Index of deprecated API + + + + + + + + + + + + + + + + +
+

+Index of deprecated API

+ +
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-DBus-configuration.html b/docs/html/gsignond-DBus-configuration.html new file mode 100644 index 0000000..d466a79 --- /dev/null +++ b/docs/html/gsignond-DBus-configuration.html @@ -0,0 +1,107 @@ + + + + +DBus configuration + + + + + + + + + + + + + + + + +
+
+
+ + +
+

DBus configuration

+

DBus configuration — gSSO dbus configuration keys

+
+
+

Synopsis

+
+#include <gsignond/gsignond-config.h>
+
+#define             GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT
+#define             GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT
+#define             GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT
+#define             GSIGNOND_CONFIG_DBUS_TIMEOUTS
+
+
+
+

Description

+

+DBus configuration keys are defined below. See GSignondConfig for how to use them. +

+
+
+

Details

+
+

GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT

+
#define             GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT
+

+A timeout in seconds, after which inactive authentication session dbus objects will be removed. +If not set, the dbus objects will persist. +

+

+Can be overriden in debug +builds by setting SSO_AUTH_SESSION_TIMEOUT environment variable. +

+
+
+
+

GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT

+
#define             GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT
+

+A timeout in seconds, after which the gSSO daemon will exit. If not set, +the daemon will not exit. Has no effect if P2P DBus is in use. +

+

+Can be overriden in debug +builds by setting SSO_DAEMON_TIMEOUT environment variable. +

+
+
+
+

GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT

+
#define             GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT
+

+A timeout in seconds, after which inactive identity dbus objects will be removed. +If not set, the dbus objects will persist. +

+

+Can be overriden in debug +builds by setting SSO_IDENTITY_TIMEOUT environment variable. +

+
+
+
+

GSIGNOND_CONFIG_DBUS_TIMEOUTS

+
#define GSIGNOND_CONFIG_DBUS_TIMEOUTS  "ObjectTimeouts"
+
+

+A prefix for dbus timeout keys. Should be used only when defining new keys. +

+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-Database-configuration.html b/docs/html/gsignond-Database-configuration.html new file mode 100644 index 0000000..f60a27d --- /dev/null +++ b/docs/html/gsignond-Database-configuration.html @@ -0,0 +1,89 @@ + + + + +Database configuration + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Database configuration

+

Database configuration — gSSO database configuration keys

+
+
+

Synopsis

+
+#include <gsignond/gsignond-config.h>
+
+#define             GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME
+#define             GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME
+#define             GSIGNOND_CONFIG_DB_SSO
+
+
+
+

Description

+

+Database configuration keys are defined below. See GSignondConfig for how to use them. +

+
+
+

Details

+
+

GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME

+
#define             GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME
+

+The filename of the metadata database. +

+

+Default value: "metadata.db". +

+
+
+
+

GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME

+
#define             GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME
+

+The filename of the credentials database. +

+

+Default value: "secret.db". +

+
+
+
+

GSIGNOND_CONFIG_DB_SSO

+
#define GSIGNOND_CONFIG_DB_SSO                  "Storage"
+
+

+A prefix for database keys. Should be used only when defining new keys. +

+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-Errors.html b/docs/html/gsignond-Errors.html new file mode 100644 index 0000000..75e5ddd --- /dev/null +++ b/docs/html/gsignond-Errors.html @@ -0,0 +1,433 @@ + + + + +Errors + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Errors

+

Errors — error definitions and utilities

+
+
+

Synopsis

+
+#include <gsignond/gsignond-error.h>
+
+#define             GSIGNOND_ERROR
+enum                GSignondError;
+GError *            gsignond_error_new_from_variant     (GVariant *var);
+GQuark              gsignond_error_quark                (void);
+GVariant *          gsignond_error_to_variant           (GError *error);
+#define             gsignond_get_gerror_for_id          (err,
+                                                         message,
+                                                         ...)
+
+
+
+

Description

+

+This file provides GSignond error definitions and utilities. +When creating an error, use GSIGNOND_ERROR for the error domain and errors +from GSignondError for the error code. +

+

+

+
+ + + + + + + +
1
+2
GError* err = g_error_new(GSIGNOND_ERROR, GSIGNOND_ERROR_MISSING_DATA,
+    "Not enough data");
+
+ +

+

+
+
+

Details

+
+

GSIGNOND_ERROR

+
#define GSIGNOND_ERROR   (gsignond_error_quark())
+
+

+This macro should be used when creating a GError in GSignond plugins and extensions. +(for example with g_error_new() ) +

+
+
+
+

enum GSignondError

+
typedef enum {
+    GSIGNOND_ERROR_NONE,
+
+    GSIGNOND_ERROR_UNKNOWN = 1,
+    GSIGNOND_ERROR_INTERNAL_SERVER = 2,
+    GSIGNOND_ERROR_INTERNAL_COMMUNICATION = 3,
+    GSIGNOND_ERROR_PERMISSION_DENIED = 4,
+    GSIGNOND_ERROR_ENCRYPTION_FAILURE,
+
+    GSIGNOND_ERROR_AUTH_SERVICE_ERR = 100,      /* Placeholder to rearrange enumeration - AuthService specific */
+    GSIGNOND_ERROR_METHOD_NOT_KNOWN,
+    GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE,
+    GSIGNOND_ERROR_INVALID_QUERY,
+
+    GSIGNOND_ERROR_IDENTITY_ERR = 200,          /* Placeholder to rearrange enumeration - Identity specific */
+    GSIGNOND_ERROR_METHOD_NOT_AVAILABLE,
+    GSIGNOND_ERROR_IDENTITY_NOT_FOUND,
+    GSIGNOND_ERROR_STORE_FAILED,
+    GSIGNOND_ERROR_REMOVE_FAILED,
+    GSIGNOND_ERROR_SIGN_OUT_FAILED,
+    GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED,
+    GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE,
+    GSIGNOND_ERROR_REFERENCE_NOT_FOUND,
+
+    GSIGNOND_ERROR_AUTH_SESSION_ERR = 300,     /* Placeholder to rearrange enumeration - AuthSession/PluginInterface specific */
+    GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE,
+    GSIGNOND_ERROR_MISSING_DATA,
+    GSIGNOND_ERROR_INVALID_CREDENTIALS,
+    GSIGNOND_ERROR_NOT_AUTHORIZED,
+    GSIGNOND_ERROR_WRONG_STATE,
+    GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED,
+    GSIGNOND_ERROR_NO_CONNECTION,
+    GSIGNOND_ERROR_NETWORK,
+    GSIGNOND_ERROR_SSL,
+    GSIGNOND_ERROR_RUNTIME,
+    GSIGNOND_ERROR_SESSION_CANCELED,
+    GSIGNOND_ERROR_TIMED_OUT,
+    GSIGNOND_ERROR_USER_INTERACTION,
+    GSIGNOND_ERROR_OPERATION_FAILED,
+    GSIGNOND_ERROR_ENCRYPTION_FAILED,
+    GSIGNOND_ERROR_TOS_NOT_ACCEPTED,
+    GSIGNOND_ERROR_FORGOT_PASSWORD,
+    GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED,
+    GSIGNOND_ERROR_INCORRECT_DATE,
+
+    GSIGNOND_ERROR_USER_ERR = 400
+} GSignondError;
+
+

+This enum provides a list of errors that plugins and extensions can use. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GSIGNOND_ERROR_NONE

No error +

GSIGNOND_ERROR_UNKNOWN

Catch-all for errors not distinguished by another code. +

GSIGNOND_ERROR_INTERNAL_SERVER

Signon Daemon internal error. +

GSIGNOND_ERROR_INTERNAL_COMMUNICATION

Communication with Signon Daemon error. +

GSIGNOND_ERROR_PERMISSION_DENIED

The operation cannot be performed due to insufficient client permissions. +

GSIGNOND_ERROR_ENCRYPTION_FAILURE

Failure during data encryption/decryption. +

GSIGNOND_ERROR_AUTH_SERVICE_ERR

Placeholder to rearrange enumeration - AuthService specific +

GSIGNOND_ERROR_METHOD_NOT_KNOWN

The method with this name is not found. +

GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE

The service is temporarily unavailable. +

GSIGNOND_ERROR_INVALID_QUERY

Parameters for the query are invalid. +

GSIGNOND_ERROR_IDENTITY_ERR

Placeholder to rearrange enumeration - Identity specific +

GSIGNOND_ERROR_METHOD_NOT_AVAILABLE

The requested method is not available. +

GSIGNOND_ERROR_IDENTITY_NOT_FOUND

The identity matching this Identity object was not found on the service. +

GSIGNOND_ERROR_STORE_FAILED

Storing credentials failed. +

GSIGNOND_ERROR_REMOVE_FAILED

Removing credentials failed. +

GSIGNOND_ERROR_SIGN_OUT_FAILED

SignOut failed. +

GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED

Identity operation was canceled by user. +

GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE

Query failed. +

GSIGNOND_ERROR_REFERENCE_NOT_FOUND

Trying to remove nonexistent reference. +

GSIGNOND_ERROR_AUTH_SESSION_ERR

Placeholder to rearrange enumeration - AuthSession/PluginInterface specific +

GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE

The requested mechanism is not available. +

GSIGNOND_ERROR_MISSING_DATA

The SessionData object does not contain necessary information. +

GSIGNOND_ERROR_INVALID_CREDENTIALS

The supplied credentials are invalid for the mechanism implementation. +

GSIGNOND_ERROR_NOT_AUTHORIZED

Authorization failed. +

GSIGNOND_ERROR_WRONG_STATE

An operation method has been called in a wrong state. +

GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED

The operation is not supported by the mechanism implementation. +

GSIGNOND_ERROR_NO_CONNECTION

No Network connetion. +

GSIGNOND_ERROR_NETWORK

Network connetion failed. +

GSIGNOND_ERROR_SSL

Ssl connection failed. +

GSIGNOND_ERROR_RUNTIME

Casting SessionData into subclass failed +

GSIGNOND_ERROR_SESSION_CANCELED

Challenge was cancelled. +

GSIGNOND_ERROR_TIMED_OUT

Challenge was timed out. +

GSIGNOND_ERROR_USER_INTERACTION

User interaction dialog failed +

GSIGNOND_ERROR_OPERATION_FAILED

Temporary failure in authentication. +

GSIGNOND_ERROR_ENCRYPTION_FAILED

Failure during data encryption/decryption. +

GSIGNOND_ERROR_TOS_NOT_ACCEPTED

User declined Terms of Service. +

GSIGNOND_ERROR_FORGOT_PASSWORD

User requested reset password sequence. +

GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED

Method or mechanism not allowed for this identity. +

GSIGNOND_ERROR_INCORRECT_DATE

Date time incorrect on device. +

GSIGNOND_ERROR_USER_ERR

Placeholder to rearrange enumeration - User space specific +
+
+
+
+

gsignond_error_new_from_variant ()

+
GError *            gsignond_error_new_from_variant     (GVariant *var);
+

+Converts the GVariant to GError. +

+
++ + + + + + + + + + +

var :

instance of GVariant +

Returns :

+GError object if successful, NULL otherwise. [transfer full] +
+
+
+
+

gsignond_error_quark ()

+
GQuark              gsignond_error_quark                (void);
+

+Creates and returns a domain for GSignond errors. +

+
+
+
+

gsignond_error_to_variant ()

+
GVariant *          gsignond_error_to_variant           (GError *error);
+

+Converts the GError to GVariant. +

+
++ + + + + + + + + + +

error :

instance of GError +

Returns :

+GVariant object if successful, NULL otherwise. [transfer full] +
+
+
+
+

gsignond_get_gerror_for_id()

+
#define             gsignond_get_gerror_for_id(err, message, args...)
+

+A helper macro that creates a GError with the proper gsignond domain +

+
++ + + + + + + + + + + + + + +

err :

A GSignondError specifying the error

message :

Format string for the error message

... :

parameters for the error string
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-GSignondDictionary.html b/docs/html/gsignond-GSignondDictionary.html new file mode 100644 index 0000000..8c7f6e2 --- /dev/null +++ b/docs/html/gsignond-GSignondDictionary.html @@ -0,0 +1,771 @@ + + + + +GSignondDictionary + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondDictionary

+

GSignondDictionary — a dictionary container holding string keys and variant values

+
+
+

Synopsis

+
+#include <gsignond/gsignond-dictionary.h>
+
+typedef             GSignondDictionary;
+GSignondDictionary * gsignond_dictionary_copy           (GSignondDictionary *other);
+GVariant *          gsignond_dictionary_get             (GSignondDictionary *dict,
+                                                         const gchar *key);
+gboolean            gsignond_dictionary_get_boolean     (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gboolean *value);
+gboolean            gsignond_dictionary_get_int32       (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gint *value);
+gboolean            gsignond_dictionary_get_int64       (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gint64 *value);
+const gchar *       gsignond_dictionary_get_string      (GSignondDictionary *dict,
+                                                         const gchar *key);
+gboolean            gsignond_dictionary_get_uint32      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         guint *value);
+gboolean            gsignond_dictionary_get_uint64      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         guint64 *value);
+GSignondDictionary * gsignond_dictionary_new            (void);
+GSignondDictionary * gsignond_dictionary_new_from_variant
+                                                        (GVariant *variant);
+GSignondDictionary * gsignond_dictionary_ref            (GSignondDictionary *dict);
+gboolean            gsignond_dictionary_remove          (GSignondDictionary *dict,
+                                                         const gchar *key);
+gboolean            gsignond_dictionary_set             (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         GVariant *value);
+gboolean            gsignond_dictionary_set_boolean     (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gboolean value);
+gboolean            gsignond_dictionary_set_int32       (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gint value);
+gboolean            gsignond_dictionary_set_int64       (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gint64 value);
+gboolean            gsignond_dictionary_set_string      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         const gchar *value);
+gboolean            gsignond_dictionary_set_uint32      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         guint32 value);
+gboolean            gsignond_dictionary_set_uint64      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         guint64 value);
+GVariant *          gsignond_dictionary_to_variant      (GSignondDictionary *dict);
+void                gsignond_dictionary_unref           (GSignondDictionary *dict);
+
+
+
+

Description

+

+A GSignondDictionary is a dictionary data structure that maps string keys to GVariant values. +It's used in multiple places in gsignond and its public API to pass key-value +data sets. +

+

+

+
+ + + + + + + +
1
+2
+3
+4
+5
+6
+7
+8
GSignondDictionary* dict = gsignond_dictionary_new();
+    gsignond_dictionary_set_string(dict, "name", "John Smith");
+    gsignond_dictionary_set_uint32(dict, "age", 32);
+
+    guint32 age;
+    gboolean success = gsignond_dictionary_get_uint32(dict, "age", &age);
+    const gchar* name = gsignond_dictionary_get_string(dict, "name");
+    gsignond_dictionary_unref(dict);
+
+ +

+

+
+
+

Details

+
+

GSignondDictionary

+
typedef GHashTable GSignondDictionary;
+
+

+GSignondDictionary is a typedef for GHashTable, which +means the developers may also use methods associated with that structure. +

+
+
+
+

gsignond_dictionary_copy ()

+
GSignondDictionary * gsignond_dictionary_copy           (GSignondDictionary *other);
+

+Creates a copy of the dictionary. +

+
++ + + + + + + + + + +

other :

instance of GSignondDictionary +

Returns :

+GSignondDictionary object if the copy was successful, +NULL otherwise. [transfer full] +
+
+
+
+

gsignond_dictionary_get ()

+
GVariant *          gsignond_dictionary_get             (GSignondDictionary *dict,
+                                                         const gchar *key);
+

+Retrieves a GVariant value from the dictionary. This can be used to retrieve +a value of an arbitrary type, and then convert it manually to a specific type +using GVariant methods. For most commonly used types, also getters that +return the specific type directly are provided (gsignond_dictionary_get_string() +and similar). +

+
++ + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

the key to look up in the dictionary

Returns :

the value; NULL is returned in case of failure (for +example if the entry corresponding to the supplied key doesn't exist). [transfer none] +
+
+
+
+

gsignond_dictionary_get_boolean ()

+
gboolean            gsignond_dictionary_get_boolean     (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gboolean *value);
+

+Retrieves a gboolean value. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to look up. [transfer none] +

value :

points to the location where the value should be set

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_get_int32 ()

+
gboolean            gsignond_dictionary_get_int32       (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gint *value);
+

+Retrieves a int32 value. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to look up. [transfer none] +

value :

points to the location where the value should be set

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_get_int64 ()

+
gboolean            gsignond_dictionary_get_int64       (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gint64 *value);
+

+Retrieves a int64 value. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to look up. [transfer none] +

value :

points to the location where the value should be set

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_get_string ()

+
const gchar *       gsignond_dictionary_get_string      (GSignondDictionary *dict,
+                                                         const gchar *key);
+

+Retrieves a string value. +

+
++ + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to look up. [transfer none] +

Returns :

the value if it was retrieved successfully, NULL otherwise. [transfer none] +
+
+
+
+

gsignond_dictionary_get_uint32 ()

+
gboolean            gsignond_dictionary_get_uint32      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         guint *value);
+

+Retrieves a uint32 value. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to look up. [transfer none] +

value :

points to the location where the value should be set

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_get_uint64 ()

+
gboolean            gsignond_dictionary_get_uint64      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         guint64 *value);
+

+Retrieves a uint64 value. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to look up. [transfer none] +

value :

points to the location where the value should be set

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_new ()

+
GSignondDictionary * gsignond_dictionary_new            (void);
+

+Creates a new instance of GSignondDictionary. +

+
++ + + + +

Returns :

+GSignondDictionary object if successful, +NULL otherwise. [transfer full] +
+
+
+
+

gsignond_dictionary_new_from_variant ()

+
GSignondDictionary * gsignond_dictionary_new_from_variant
+                                                        (GVariant *variant);
+

+Converts the GVariant to GSignondDictionary. This is useful for example if +the dictionary needs to be deserialized, or if it's contained in another +GSignondDictionary and has been retrieved using gsignond_dictionary_get(). +

+
++ + + + + + + + + + +

variant :

instance of GVariant +

Returns :

+GSignondDictionary if successful, NULL otherwise. [transfer full] +
+
+
+
+

gsignond_dictionary_ref ()

+
GSignondDictionary * gsignond_dictionary_ref            (GSignondDictionary *dict);
+

+Increments the reference count of the dictionary structure. +

+
++ + + + + + + + + + +

dict :

instance of GSignondDictionary +

Returns :

the pointer to the passed in GSignondDictionary +
+
+
+
+

gsignond_dictionary_remove ()

+
gboolean            gsignond_dictionary_remove          (GSignondDictionary *dict,
+                                                         const gchar *key);
+

+Removes key-value pair in the dictionary as per key. +

+
++ + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key which needs to be removed from the dictionary. [transfer none] +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_dictionary_set ()

+
gboolean            gsignond_dictionary_set             (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         GVariant *value);
+

+Adds or replaces key-value pair in the dictionary. This allows to set a value +of an arbitrary type: it first needs to be converted to a GVariant. For most +commonly used types also type-specific setters are provided. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to be set. [transfer none] +

value :

value to be set. [transfer full] +

Returns :

TRUE if successful, FALSE otherwise.
+
+
+
+

gsignond_dictionary_set_boolean ()

+
gboolean            gsignond_dictionary_set_boolean     (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gboolean value);
+

+Sets or replaces a gboolean value in the dictionary. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to set. [transfer none] +

value :

value to set

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_set_int32 ()

+
gboolean            gsignond_dictionary_set_int32       (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gint value);
+

+Sets or replaces a int32 value in the dictionary. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to set. [transfer none] +

value :

value to set

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_set_int64 ()

+
gboolean            gsignond_dictionary_set_int64       (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         gint64 value);
+

+Sets or replaces a int64 value in the dictionary. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to set. [transfer none] +

value :

value to set

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_set_string ()

+
gboolean            gsignond_dictionary_set_string      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         const gchar *value);
+

+Sets or replaces a string value in the dictionary. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to set. [transfer none] +

value :

value to set. [transfer none] +

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_set_uint32 ()

+
gboolean            gsignond_dictionary_set_uint32      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         guint32 value);
+

+Sets or replaces a uint32 value in the dictionary. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to set. [transfer none] +

value :

value to set

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_set_uint64 ()

+
gboolean            gsignond_dictionary_set_uint64      (GSignondDictionary *dict,
+                                                         const gchar *key,
+                                                         guint64 value);
+

+Sets or replaces a uint64 value in the dictionary. +

+
++ + + + + + + + + + + + + + + + + + +

dict :

instance of GSignondDictionary +

key :

key to set. [transfer none] +

value :

value to set

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.
+
+
+
+

gsignond_dictionary_to_variant ()

+
GVariant *          gsignond_dictionary_to_variant      (GSignondDictionary *dict);
+

+Converts the GSignondDictionary to a GVariant. The result can be serialized +or put into another GSignondDictionary using gsignond_dictionary_set(). +

+
++ + + + + + + + + + +

dict :

instance of GSignondDictionary +

Returns :

+GVariant object if successful, NULL otherwise. [transfer full] +
+
+
+
+

gsignond_dictionary_unref ()

+
void                gsignond_dictionary_unref           (GSignondDictionary *dict);
+

+Decrements the reference count of the dictionary structure. If the reference +count reaches zero, the structure is deallocated and shouldn't be used. +

+
++ + + + +

dict :

instance of GSignondDictionary +
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-GSignondPlugin.html b/docs/html/gsignond-GSignondPlugin.html new file mode 100644 index 0000000..d77d3f1 --- /dev/null +++ b/docs/html/gsignond-GSignondPlugin.html @@ -0,0 +1,694 @@ + + + + +GSignondPlugin + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondPlugin

+

GSignondPlugin — an interface for implementing authentication plugins

+
+
+

Synopsis

+
+#include <gsignond/gsignond-plugin-interface.h>
+
+struct              GSignondPluginInterface;
+enum                GSignondPluginState;
+void                gsignond_plugin_cancel              (GSignondPlugin *self);
+void                gsignond_plugin_error               (GSignondPlugin *self,
+                                                         GError *error);
+void                gsignond_plugin_refresh             (GSignondPlugin *self,
+                                                         GSignondSignonuiData *ui_data);
+void                gsignond_plugin_refreshed           (GSignondPlugin *self,
+                                                         GSignondSignonuiData *ui_data);
+void                gsignond_plugin_request             (GSignondPlugin *self,
+                                                         GSignondSessionData *session_data);
+void                gsignond_plugin_request_initial     (GSignondPlugin *self,
+                                                         GSignondSessionData *session_data,
+                                                         GSignondDictionary *identity_method_cache,
+                                                         const gchar *mechanism);
+void                gsignond_plugin_response            (GSignondPlugin *self,
+                                                         GSignondSessionData *session_data);
+void                gsignond_plugin_response_final      (GSignondPlugin *self,
+                                                         GSignondSessionData *session_data);
+void                gsignond_plugin_status_changed      (GSignondPlugin *self,
+                                                         GSignondPluginState state,
+                                                         const gchar *message);
+void                gsignond_plugin_store               (GSignondPlugin *self,
+                                                         GSignondDictionary *identity_method_cache);
+void                gsignond_plugin_user_action_finished
+                                                        (GSignondPlugin *self,
+                                                         GSignondSignonuiData *ui_data);
+void                gsignond_plugin_user_action_required
+                                                        (GSignondPlugin *self,
+                                                         GSignondSignonuiData *ui_data);
+
+
+
+

Description

+

+GSignondPlugin is an interface for implementing authentication plugins. +

+

+When creating a plugin, write the GObject boilerplate code as usual, but +

+

+a) declare the type as follows: +

+

+

+
+ + + + + + + +
1
+2
+3
+4
G_DEFINE_TYPE_WITH_CODE (GSignondPasswordPlugin, gsignond_password_plugin,
+                        G_TYPE_OBJECT,
+                        G_IMPLEMENT_INTERFACE (GSIGNOND_TYPE_PLUGIN,
+                                               gsignond_plugin_interface_init));
+
+ +

+

+

+b) implement gsignond_plugin_interface_init as follows: +

+

+

+
+ + + + + + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
static void
+gsignond_plugin_interface_init (GSignondPluginInterface *iface)
+{
+    iface->cancel = gsignond_password_plugin_cancel;
+    iface->request_initial = gsignond_password_plugin_request_initial;
+    iface->request = gsignond_password_plugin_request;
+    iface->user_action_finished = gsignond_password_plugin_user_action_finished;
+    iface->refresh = gsignond_password_plugin_refresh;
+}
+
+ +

+

+

+where the gsignond_password_plugin_cancel etc. are specific implementations of +plugin interface methods that every plugin must provide (see below for when +and how they're used by the daemon). +

+

+c) override "type" and "mechanisms" property +implementations in the plugin class constructor like this: +

+

+

+
+ + + + + + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
static void
+gsignond_password_plugin_class_init (GSignondPasswordPluginClass *klass)
+{
+    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+    gobject_class->set_property = gsignond_password_plugin_set_property;
+    gobject_class->get_property = gsignond_password_plugin_get_property;
+
+    g_object_class_override_property (gobject_class, PROP_TYPE, "type");
+    g_object_class_override_property (gobject_class, PROP_MECHANISMS,
+                                      "mechanisms");
+}
+
+ +

+(naturally, plugin's property setter should ignore attempts to set these properties, +and plugin's property getter should provide their values when asked) +

+

+

+
+

The plugin API

+
+

+

+

+Plugins implement authentication sessions which are controlled through the +plugin API. Authentication sessions follow one another so there is only one active +session at a time. +

+

+The plugin API is a set of methods and signals that should be used in a specific +sequence: +

+

+

+
    +
  • successful authentication session begins with gsignond_plugin_request_initial() and ends +with the plugin issuing a "response-final" signal

  • +
  • at any point the application can cancel an active session with +gsignond_plugin_cancel()

  • +
  • at any point the plugin can cancel an active session by issuing "error" +signal, which also provides some details about the cancellation reason.

  • +
  • if a session is active, and the plugin has an intermediate response or needs +additional information, it issues "response" signal, which the +application should respond to with gsignond_plugin_request() method. This can +happen more than once.

  • +
  • if the plugin needs to launch UI interaction with the user, it's issuing +"user-action-required" signal, which the application should +follow up with gsignond_plugin_user_action_finished() method. This can happen +more than once as well.

  • +
  • if, during an active UI session, the application needs a UI refresh +(for example, to fetch a new captcha image), it's +requested from the plugin with gsignond_plugin_refresh() method, followed +by the plugin's response via "refreshed" signal. This can happen +more than once.

  • +
  • changes in plugin state are reported through "status-changed" signal.

  • +
  • if the plugin needs to store information in persistent storage, it issues +"store" signal. Later, that same information is provided as a +parameter to gsignond_plugin_request_initial().

  • +
+

+

+

+

+
+

Example plugins

+
+

+

+

+See example plugin implementation here: + +https://code.google.com/p/accounts-sso/source/browse/?repo=gsignond#git%2Fsrc%2Fplugins. +

+

+For examples of out of tree plugins, you can have a look at SASL or OAuth plugin +implementations: + +http://code.google.com/p/accounts-sso/source/browse?repo=gsignond-plugin-sasl. +

+

+ +http://code.google.com/p/accounts-sso/source/browse?repo=gsignond-plugin-oa. +

+
+
+

Details

+
+

struct GSignondPluginInterface

+
struct GSignondPluginInterface {
+    GTypeInterface parent;
+
+    void (*cancel) (GSignondPlugin *self);
+    void (*request_initial) (GSignondPlugin *self, 
+                     GSignondSessionData *session_data,
+                     GSignondDictionary *identity_method_cache, 
+                     const gchar *mechanism);
+    void (*request) (GSignondPlugin *self, 
+                     GSignondSessionData *session_data);
+    void (*user_action_finished) (GSignondPlugin *self, 
+                                  GSignondSignonuiData *session_data);
+    void (*refresh) (GSignondPlugin *self, 
+                     GSignondSignonuiData *session_data);
+};
+
+

+GSignondPluginInterface interface containing pointers to methods that all +plugin implementations should provide. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

GTypeInterface parent;

parent interface type.

cancel ()

implementation of gsignond_plugin_cancel() +

request_initial ()

implementation of gsignond_plugin_request_initial() +

request ()

implementation of gsignond_plugin_request() +

user_action_finished ()

implementation of gsignond_plugin_user_action_finished() +

refresh ()

implementation of gsignond_plugin_refresh() +
+
+
+
+

enum GSignondPluginState

+
typedef enum {
+    GSIGNOND_PLUGIN_STATE_NONE = 0,
+    GSIGNOND_PLUGIN_STATE_RESOLVING,
+    GSIGNOND_PLUGIN_STATE_CONNECTING,
+    GSIGNOND_PLUGIN_STATE_SENDING_DATA,
+    GSIGNOND_PLUGIN_STATE_WAITING,
+    GSIGNOND_PLUGIN_STATE_USER_PENDING,
+    GSIGNOND_PLUGIN_STATE_REFRESHING,
+    GSIGNOND_PLUGIN_STATE_PROCESS_PENDING,
+    GSIGNOND_PLUGIN_STATE_STARTED,
+    GSIGNOND_PLUGIN_STATE_CANCELING,
+    GSIGNOND_PLUGIN_STATE_DONE,
+    GSIGNOND_PLUGIN_STATE_HOLDING,
+} GSignondPluginState;
+
+

+The plugin provides state updates by emitting "status-changed" +signal with this enum and a string describing what happened. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GSIGNOND_PLUGIN_STATE_NONE

State unknown +

GSIGNOND_PLUGIN_STATE_RESOLVING

Resolving remote server host name +

GSIGNOND_PLUGIN_STATE_CONNECTING

Connecting to remote server +

GSIGNOND_PLUGIN_STATE_SENDING_DATA

Sending data to remote server +

GSIGNOND_PLUGIN_STATE_WAITING

Waiting for reply from remote server +

GSIGNOND_PLUGIN_STATE_USER_PENDING

Waiting for response from user +

GSIGNOND_PLUGIN_STATE_REFRESHING

Refreshing ui request +

GSIGNOND_PLUGIN_STATE_PROCESS_PENDING

Request has been queued +

GSIGNOND_PLUGIN_STATE_STARTED

Request has been dequeued +

GSIGNOND_PLUGIN_STATE_CANCELING

Canceling current process +

GSIGNOND_PLUGIN_STATE_DONE

Process is finished +

GSIGNOND_PLUGIN_STATE_HOLDING

Holding long non-expired token +
+
+
+
+

gsignond_plugin_cancel ()

+
void                gsignond_plugin_cancel              (GSignondPlugin *self);
+

+This method cancels an ongoing authentication session. The plugin implementations +should issue a "error" signal with GSIGNOND_ERROR_SESSION_CANCELED +error, and prepare for a new authentication session. +

+
++ + + + +

self :

plugin instance
+
+
+
+

gsignond_plugin_error ()

+
void                gsignond_plugin_error               (GSignondPlugin *self,
+                                                         GError *error);
+

+Plugin implementations should use this to issue "error" +signal. This method should not be used otherwise. +

+
++ + + + + + + + + + +

self :

plugin instance

error :

the error
+
+
+
+

gsignond_plugin_refresh ()

+
void                gsignond_plugin_refresh             (GSignondPlugin *self,
+                                                         GSignondSignonuiData *ui_data);
+

+This method asks the plugin to refresh the UI. The plugin responds with +"refreshed" signal. +

+
++ + + + + + + + + + +

self :

plugin instance

ui_data :

UI refresh parameters
+
+
+
+

gsignond_plugin_refreshed ()

+
void                gsignond_plugin_refreshed           (GSignondPlugin *self,
+                                                         GSignondSignonuiData *ui_data);
+

+Plugin implementations should use this to issue "refreshed" +signal. This method should not be used otherwise. +

+
++ + + + + + + + + + +

self :

plugin instance

ui_data :

UI data
+
+
+
+

gsignond_plugin_request ()

+
void                gsignond_plugin_request             (GSignondPlugin *self,
+                                                         GSignondSessionData *session_data);
+

+This method provides the plugin with additional parameters for the session +after the plugin has asked for it via "response" signal. +

+
++ + + + + + + + + + +

self :

plugin instance

session_data :

additional parameters for the session
+
+
+
+

gsignond_plugin_request_initial ()

+
void                gsignond_plugin_request_initial     (GSignondPlugin *self,
+                                                         GSignondSessionData *session_data,
+                                                         GSignondDictionary *identity_method_cache,
+                                                         const gchar *mechanism);
+

+This method starts a new authentication session. +

+
++ + + + + + + + + + + + + + + + + + +

self :

plugin instance

session_data :

parameters for the session

identity_method_cache :

data from persistent storage, saved previously via +"store" signal

mechanism :

mechanism to use for the authentication
+
+
+
+

gsignond_plugin_response ()

+
void                gsignond_plugin_response            (GSignondPlugin *self,
+                                                         GSignondSessionData *session_data);
+

+Plugin implementations should use this to issue "response" +signal. This method should not be used otherwise. +

+
++ + + + + + + + + + +

self :

plugin instance

session_data :

session data
+
+
+
+

gsignond_plugin_response_final ()

+
void                gsignond_plugin_response_final      (GSignondPlugin *self,
+                                                         GSignondSessionData *session_data);
+

+Plugin implementations should use this to issue "response-final" +signal. This method should not be used otherwise. +

+
++ + + + + + + + + + +

self :

plugin instance

session_data :

session data
+
+
+
+

gsignond_plugin_status_changed ()

+
void                gsignond_plugin_status_changed      (GSignondPlugin *self,
+                                                         GSignondPluginState state,
+                                                         const gchar *message);
+

+Plugin implementations should use this to issue "status-changed" +signal. This method should not be used otherwise. +

+
++ + + + + + + + + + + + + + +

self :

plugin instance

state :

the new state

message :

the message
+
+
+
+

gsignond_plugin_store ()

+
void                gsignond_plugin_store               (GSignondPlugin *self,
+                                                         GSignondDictionary *identity_method_cache);
+

+Plugin implementations should use this to issue "store" +signal. This method should not be used otherwise. +

+
++ + + + + + + + + + +

self :

plugin instance

identity_method_cache :

data to store
+
+
+
+

gsignond_plugin_user_action_finished ()

+
void                gsignond_plugin_user_action_finished
+                                                        (GSignondPlugin *self,
+                                                         GSignondSignonuiData *ui_data);
+

+This method provides the plugin with the results of UI interaction +after the plugin has asked for it via "user-action-required" signal. +

+
++ + + + + + + + + + +

self :

plugin instance

ui_data :

results of UI interaction
+
+
+
+

gsignond_plugin_user_action_required ()

+
void                gsignond_plugin_user_action_required
+                                                        (GSignondPlugin *self,
+                                                         GSignondSignonuiData *ui_data);
+

+Plugin implementations should use this to issue "user-action-required" +signal. This method should not be used otherwise. +

+
++ + + + + + + + + + +

self :

plugin instance

ui_data :

UI data
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-GSignondSecurityContext.html b/docs/html/gsignond-GSignondSecurityContext.html new file mode 100644 index 0000000..3fffcef --- /dev/null +++ b/docs/html/gsignond-GSignondSecurityContext.html @@ -0,0 +1,550 @@ + + + + +GSignondSecurityContext + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondSecurityContext

+

GSignondSecurityContext — security context descriptor used in access control checks

+
+
+

Synopsis

+
+#include <gsignond/gsignond-security-context.h>
+
+                    GSignondSecurityContext;
+typedef             GSignondSecurityContextList;
+gboolean            gsignond_security_context_check     (const GSignondSecurityContext *reference,
+                                                         const GSignondSecurityContext *test);
+int                 gsignond_security_context_compare   (const GSignondSecurityContext *ctx1,
+                                                         const GSignondSecurityContext *ctx2);
+GSignondSecurityContext * gsignond_security_context_copy
+                                                        (const GSignondSecurityContext *src_ctx);
+void                gsignond_security_context_free      (GSignondSecurityContext *ctx);
+GSignondSecurityContext * gsignond_security_context_from_variant
+                                                        (GVariant *variant);
+const gchar *       gsignond_security_context_get_application_context
+                                                        (const GSignondSecurityContext *ctx);
+const gchar *       gsignond_security_context_get_system_context
+                                                        (const GSignondSecurityContext *ctx);
+GSignondSecurityContextList * gsignond_security_context_list_copy
+                                                        (const GSignondSecurityContextList *src_list);
+void                gsignond_security_context_list_free (GSignondSecurityContextList *seclist);
+GSignondSecurityContextList * gsignond_security_context_list_from_variant
+                                                        (GVariant *variant);
+GVariant *          gsignond_security_context_list_to_variant
+                                                        (const GSignondSecurityContextList *list);
+gboolean            gsignond_security_context_match     (const GSignondSecurityContext *ctx1,
+                                                         const GSignondSecurityContext *ctx2);
+GSignondSecurityContext * gsignond_security_context_new ();
+GSignondSecurityContext * gsignond_security_context_new_from_values
+                                                        (const gchar *system_context,
+                                                         const gchar *application_context);
+void                gsignond_security_context_set_application_context
+                                                        (GSignondSecurityContext *ctx,
+                                                         const gchar *application_context);
+void                gsignond_security_context_set_system_context
+                                                        (GSignondSecurityContext *ctx,
+                                                         const gchar *system_context);
+GVariant *          gsignond_security_context_to_variant
+                                                        (const GSignondSecurityContext *ctx);
+
+
+
+

Description

+

+Security context is a string tuple of system context and application context. +

+

+System context can be a binary path, SMACK-label, or MSSF token. +

+

+Application context identifies a script or a webpage within an application, +and it's used for providing access control to runtime environments (when making an access +control decision requires not only a binary identifier, but also information +about what the binary is doing). +

+

+When an application is trying to access the gSSO service, the system context +is determined by a specific GSignondAccessControlManager instance using +system services of a specific platform. Application context is set by the +application itself. Then both contexts are used by GSignondAccessControlManager +to perform an access control check. +

+
+
+

Details

+
+

GSignondSecurityContext

+
typedef struct {
+    gchar *sys_ctx;
+    gchar *app_ctx;
+} GSignondSecurityContext;
+
+

+Security context descriptor used for access control checks. System context +and application context can contain a wildcard match "*" which has special +meaning in gsignond_security_context_match() and +gsignond_security_context_check(). +

+
++ + + + + + + + + + +

gchar *sys_ctx;

system context

gchar *app_ctx;

application context
+
+
+
+

GSignondSecurityContextList

+
typedef GList GSignondSecurityContextList;
+
+

+GList of GSignondSecurityContext items. +

+
+
+
+

gsignond_security_context_check ()

+
gboolean            gsignond_security_context_check     (const GSignondSecurityContext *reference,
+                                                         const GSignondSecurityContext *test);
+

+Check if test is covered by reference. +

+
++ + + + + + + + + + + + + + +

reference :

reference security context item to check against.

test :

security context item to be checked.

Returns :

TRUE if contexts are equal or the reference has a wildcard +system context, or if system contexts are equal and reference has a wildcard +application context, otherwise FALSE. If either or both contexts are NULL, +FALSE is returned.
+
+
+
+

gsignond_security_context_compare ()

+
int                 gsignond_security_context_compare   (const GSignondSecurityContext *ctx1,
+                                                         const GSignondSecurityContext *ctx2);
+

+Compare two GSignondSecurityContext items in a similar way to strcmp(). +

+
++ + + + + + + + + + + + + + +

ctx1 :

first item to compare.

ctx2 :

second item to compare.

Returns :

negative if ctx1 < ctx2, 0 if ctx1 == ctx2 and positive if ctx1 > ctx2.
+
+
+
+

gsignond_security_context_copy ()

+
GSignondSecurityContext * gsignond_security_context_copy
+                                                        (const GSignondSecurityContext *src_ctx);
+

+Copies a security context item. +

+
++ + + + + + + + + + +

src_ctx :

source security context to copy.

Returns :

a copy of the GSignondSecurityContext item. [transfer full] +
+
+
+
+

gsignond_security_context_free ()

+
void                gsignond_security_context_free      (GSignondSecurityContext *ctx);
+

+Frees a security context item. +

+
++ + + + +

ctx :

+GSignondSecurityContext to be freed.
+
+
+
+

gsignond_security_context_from_variant ()

+
GSignondSecurityContext * gsignond_security_context_from_variant
+                                                        (GVariant *variant);
+

+Builds a GSignondSecurityContext item from a GVariant of type "(ss)". +

+
++ + + + + + + + + + +

variant :

GVariant item with a GSignondSecurityContext construct.

Returns :

+GSignondSecurityContext item. [transfer full] +
+
+
+
+

gsignond_security_context_get_application_context ()

+
const gchar *       gsignond_security_context_get_application_context
+                                                        (const GSignondSecurityContext *ctx);
+

+Get the application context part of +the GSignondSecurityContext. +

+
++ + + + + + + + + + +

ctx :

+GSignondSecurityContext item.

Returns :

application context. [transfer none] +
+
+
+
+

gsignond_security_context_get_system_context ()

+
const gchar *       gsignond_security_context_get_system_context
+                                                        (const GSignondSecurityContext *ctx);
+

+Get the system context partof the +GSignondSecurityContext. +

+
++ + + + + + + + + + +

ctx :

+GSignondSecurityContext item.

Returns :

system context. [transfer none] +
+
+
+
+

gsignond_security_context_list_copy ()

+
GSignondSecurityContextList * gsignond_security_context_list_copy
+                                                        (const GSignondSecurityContextList *src_list);
+

+Copies a GList of GSignondSecurityContext items. +

+
++ + + + + + + + + + +

src_list :

source GSignondSecurityContextList.

Returns :

+GSignondSecurityContextList item. [transfer full] +
+
+
+
+

gsignond_security_context_list_free ()

+
void                gsignond_security_context_list_free (GSignondSecurityContextList *seclist);
+

+Frees all items and the GList of GSignondSecurityContext. +

+
++ + + + +

seclist :

+GSignondSecurityContextList item. [transfer full] +
+
+
+
+

gsignond_security_context_list_from_variant ()

+
GSignondSecurityContextList * gsignond_security_context_list_from_variant
+                                                        (GVariant *variant);
+

+Builds a GList of GSignondSecurityContext items from a GVariant of type +"a(ss)". +

+
++ + + + + + + + + + +

variant :

GVariant item with a list of security context tuples.

Returns :

+GSignondSecurityContextList item. [transfer full] +
+
+
+
+

gsignond_security_context_list_to_variant ()

+
GVariant *          gsignond_security_context_list_to_variant
+                                                        (const GSignondSecurityContextList *list);
+

+Builds a GVariant of type "a(ss)" from a GList of GSignondSecurityContext +items. +

+
++ + + + + + + + + + +

list :

+GSignondSecurityContextList item.

Returns :

GVariant construct of a GSignondSecurityContextList. [transfer full] +
+
+
+
+

gsignond_security_context_match ()

+
gboolean            gsignond_security_context_match     (const GSignondSecurityContext *ctx1,
+                                                         const GSignondSecurityContext *ctx2);
+

+Compare two GSignondSecurityContext items match. +

+
++ + + + + + + + + + + + + + +

ctx1 :

first item to compare.

ctx2 :

second item to compare.

Returns :

TRUE if contexts are equal or if either side has a wildcard match for +system context, or if system contexts are equal and either side has a wildcard +match for the app context, +otherwise FALSE. Two NULL contexts match.
+
+
+
+

gsignond_security_context_new ()

+
GSignondSecurityContext * gsignond_security_context_new ();
+

+Allocates a new security context item. System and app context are empty strings. +

+
++ + + + +

Returns :

allocated GSignondSecurityContext. [transfer full] +
+
+
+
+

gsignond_security_context_new_from_values ()

+
GSignondSecurityContext * gsignond_security_context_new_from_values
+                                                        (const gchar *system_context,
+                                                         const gchar *application_context);
+

+Allocates and initializes a new security context item. +

+
++ + + + + + + + + + + + + + +

system_context :

system security context

application_context :

application security context

Returns :

allocated GSignondSecurityContext. [transfer full] +
+
+
+
+

gsignond_security_context_set_application_context ()

+
void                gsignond_security_context_set_application_context
+                                                        (GSignondSecurityContext *ctx,
+                                                         const gchar *application_context);
+

+Sets the application context part of +the GSignondSecurityContext. +

+
++ + + + + + + + + + +

ctx :

+GSignondSecurityContext item.

application_context :

application security context.
+
+
+
+

gsignond_security_context_set_system_context ()

+
void                gsignond_security_context_set_system_context
+                                                        (GSignondSecurityContext *ctx,
+                                                         const gchar *system_context);
+

+Sets the system context part of the +GSignondSecurityContext. +

+
++ + + + + + + + + + +

ctx :

+GSignondSecurityContext item.

system_context :

system security context.
+
+
+
+

gsignond_security_context_to_variant ()

+
GVariant *          gsignond_security_context_to_variant
+                                                        (const GSignondSecurityContext *ctx);
+

+Build a GVariant of type "(ss)" from a GSignondSecurityContext item. +

+
++ + + + + + + + + + +

ctx :

+GSignondSecurityContext item.

Returns :

GVariant construct of a GSignondSecurityContext. [transfer full] +
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-GSignondSessionData.html b/docs/html/gsignond-GSignondSessionData.html new file mode 100644 index 0000000..5682ef3 --- /dev/null +++ b/docs/html/gsignond-GSignondSessionData.html @@ -0,0 +1,582 @@ + + + + +GSignondSessionData + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondSessionData

+

GSignondSessionData — definitions for authentication session parameters

+
+
+

Synopsis

+
+#include <gsignond/gsignond-session-data.h>
+
+typedef             GSignondSessionData;
+enum                GSignondUiPolicy;
+const gchar *       gsignond_session_data_get_caption   (GSignondSessionData *data);
+const gchar *       gsignond_session_data_get_network_proxy
+                                                        (GSignondSessionData *data);
+gboolean            gsignond_session_data_get_network_timeout
+                                                        (GSignondSessionData *data,
+                                                         guint32 *network_timeout);
+const gchar *       gsignond_session_data_get_realm     (GSignondSessionData *data);
+gboolean            gsignond_session_data_get_renew_token
+                                                        (GSignondSessionData *data,
+                                                         gboolean *renew_token);
+const gchar *       gsignond_session_data_get_secret    (GSignondSessionData *data);
+gboolean            gsignond_session_data_get_ui_policy (GSignondSessionData *data,
+                                                         GSignondUiPolicy *ui_policy);
+const gchar *       gsignond_session_data_get_username  (GSignondSessionData *data);
+gboolean            gsignond_session_data_get_window_id (GSignondSessionData *data,
+                                                         guint32 *window_id);
+void                gsignond_session_data_set_caption   (GSignondSessionData *data,
+                                                         const gchar *caption);
+void                gsignond_session_data_set_network_proxy
+                                                        (GSignondSessionData *data,
+                                                         const gchar *network_proxy);
+void                gsignond_session_data_set_network_timeout
+                                                        (GSignondSessionData *data,
+                                                         guint32 network_timeout);
+void                gsignond_session_data_set_realm     (GSignondSessionData *data,
+                                                         const gchar *realm);
+void                gsignond_session_data_set_renew_token
+                                                        (GSignondSessionData *data,
+                                                         gboolean renew_token);
+void                gsignond_session_data_set_secret    (GSignondSessionData *data,
+                                                         const gchar *secret);
+void                gsignond_session_data_set_ui_policy (GSignondSessionData *data,
+                                                         GSignondUiPolicy ui_policy);
+void                gsignond_session_data_set_username  (GSignondSessionData *data,
+                                                         const gchar *username);
+void                gsignond_session_data_set_window_id (GSignondSessionData *data,
+                                                         guint32 window_id);
+
+
+
+

Description

+

+This file provides commonly used parameters for authentication sessions. +For each of those a getter and setter is defined, on GSignondSessionData +container. The plugins may not use all of these parameters, and they commonly +require additional, custom parameters which are set using GSignondDictionary +setters with explicit key string. +

+
+
+

Details

+
+

GSignondSessionData

+
typedef GSignondDictionary GSignondSessionData;
+
+

+GSignondSessionData is simply a typedef for GSignondDictionary, which +means the developers may also freely use methods associated with that structure, +in particular for creating a GSignondSessionData object with +gsignond_dictionary_new(). +

+
+
+
+

enum GSignondUiPolicy

+
typedef enum {
+    GSIGNOND_UI_POLICY_DEFAULT = 0,
+    GSIGNOND_UI_POLICY_REQUEST_PASSWORD,
+    GSIGNOND_UI_POLICY_NO_USER_INTERACTION,
+    GSIGNOND_UI_POLICY_VALIDATION
+} GSignondUiPolicy;
+
+

+Policy setting to define how plugins should handle interaction with the user. +

+
++ + + + + + + + + + + + + + + + + + +

GSIGNOND_UI_POLICY_DEFAULT

use a default user interaction scenario +

GSIGNOND_UI_POLICY_REQUEST_PASSWORD

force an authorization request from the user; +any cached access tokens should be discarded by the plugin. +

GSIGNOND_UI_POLICY_NO_USER_INTERACTION

force no interaction with the user +

GSIGNOND_UI_POLICY_VALIDATION

interaction with the user is only allowed +for validation captchas and similar security measures +
+
+
+
+

gsignond_session_data_get_caption ()

+
const gchar *       gsignond_session_data_get_caption   (GSignondSessionData *data);
+

+A getter for a caption associated with the authentication session. +Caption tells the user which application/credentials/provider is requestion +authentication. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_session_data_get_network_proxy ()

+
const gchar *       gsignond_session_data_get_network_proxy
+                                                        (GSignondSessionData *data);
+

+A getter for a network proxy setting associated with the authentication session. +If this property is not set, the default system proxy settings should be used. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_session_data_get_network_timeout ()

+
gboolean            gsignond_session_data_get_network_timeout
+                                                        (GSignondSessionData *data,
+                                                         guint32 *network_timeout);
+

+A getter for a network timeout setting associated with the authentication session. +This can be used to change the default timeout in case of unresponsive servers. +

+
++ + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

network_timeout :

the value for the parameter is written here

Returns :

whether the key-value pair exists in the data dictionary or not.
+
+
+
+

gsignond_session_data_get_realm ()

+
const gchar *       gsignond_session_data_get_realm     (GSignondSessionData *data);
+

+A getter for a realm associated with the authentication session. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_session_data_get_renew_token ()

+
gboolean            gsignond_session_data_get_renew_token
+                                                        (GSignondSessionData *data,
+                                                         gboolean *renew_token);
+

+A getter for a renew token property associated with the authentication session. +This property tells the plugin to discard any cached tokens and start +the authentication process anew. +

+
++ + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

renew_token :

the value for the parameter is written here

Returns :

whether the key-value pair exists in the data dictionary or not.
+
+
+
+

gsignond_session_data_get_secret ()

+
const gchar *       gsignond_session_data_get_secret    (GSignondSessionData *data);
+

+A getter for a secret (e.g. a password) associated with the authentication session. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_session_data_get_ui_policy ()

+
gboolean            gsignond_session_data_get_ui_policy (GSignondSessionData *data,
+                                                         GSignondUiPolicy *ui_policy);
+

+A getter for UI policy setting associated with the authentication session. +The UI policy indicates how the authentication plugin should interact with the user. +

+
++ + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

ui_policy :

the value for the parameter is written here

Returns :

whether the key-value pair exists in the data dictionary or not.
+
+
+
+

gsignond_session_data_get_username ()

+
const gchar *       gsignond_session_data_get_username  (GSignondSessionData *data);
+

+A getter for a username associated with the authentication session. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_session_data_get_window_id ()

+
gboolean            gsignond_session_data_get_window_id (GSignondSessionData *data,
+                                                         guint32 *window_id);
+

+A getter for a window id setting associated with the authentication session. +This can be used to embed the user interaction window produced by the authentication +session into an application window. +

+
++ + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

window_id :

the value for the parameter is written here

Returns :

whether the key-value pair exists in the data dictionary or not.
+
+
+
+

gsignond_session_data_set_caption ()

+
void                gsignond_session_data_set_caption   (GSignondSessionData *data,
+                                                         const gchar *caption);
+

+A setter for a caption associated with the authentication session. +Caption tells the user which application/credentials/provider is requestion +authentication. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

caption :

a caption to set
+
+
+
+

gsignond_session_data_set_network_proxy ()

+
void                gsignond_session_data_set_network_proxy
+                                                        (GSignondSessionData *data,
+                                                         const gchar *network_proxy);
+

+A setter for a network proxy setting associated with the authentication session. +If this property is not set, the default system proxy settings should be used. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

network_proxy :

network proxy to use
+
+
+
+

gsignond_session_data_set_network_timeout ()

+
void                gsignond_session_data_set_network_timeout
+                                                        (GSignondSessionData *data,
+                                                         guint32 network_timeout);
+

+A setter for a network timeout setting associated with the authentication session. +This can be used to change the default timeout in case of unresponsive servers. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

network_timeout :

network timeout to use
+
+
+
+

gsignond_session_data_set_realm ()

+
void                gsignond_session_data_set_realm     (GSignondSessionData *data,
+                                                         const gchar *realm);
+

+A setter for a realm associated with the authentication session. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

realm :

a realm to set
+
+
+
+

gsignond_session_data_set_renew_token ()

+
void                gsignond_session_data_set_renew_token
+                                                        (GSignondSessionData *data,
+                                                         gboolean renew_token);
+

+A setter for a renew token property associated with the authentication session. +This property tells the plugin to discard any cached tokens and start +the authentication process anew. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

renew_token :

whether to renew the token set
+
+
+
+

gsignond_session_data_set_secret ()

+
void                gsignond_session_data_set_secret    (GSignondSessionData *data,
+                                                         const gchar *secret);
+

+A setter for a secret (e.g. a password) associated with the authentication session. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

secret :

a secret to set
+
+
+
+

gsignond_session_data_set_ui_policy ()

+
void                gsignond_session_data_set_ui_policy (GSignondSessionData *data,
+                                                         GSignondUiPolicy ui_policy);
+

+A getter for UI policy setting associated with the authentication session. +The UI policy indicates how the authentication plugin should interact with the user. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

ui_policy :

ui policy to set
+
+
+
+

gsignond_session_data_set_username ()

+
void                gsignond_session_data_set_username  (GSignondSessionData *data,
+                                                         const gchar *username);
+

+A setter for a username associated with the authentication session. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

username :

username to set
+
+
+
+

gsignond_session_data_set_window_id ()

+
void                gsignond_session_data_set_window_id (GSignondSessionData *data,
+                                                         guint32 window_id);
+

+A setter for a window id setting associated with the authentication session. +This can be used to embed the user interaction window produced by the authentication +session into an application window. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

window_id :

window id to use
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-GSignondSignonuiData.html b/docs/html/gsignond-GSignondSignonuiData.html new file mode 100644 index 0000000..75053f5 --- /dev/null +++ b/docs/html/gsignond-GSignondSignonuiData.html @@ -0,0 +1,1160 @@ + + + + +GSignondSignonuiData + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondSignonuiData

+

GSignondSignonuiData — definitions for user interaction parameters

+
+
+

Synopsis

+
+#include <gsignond/gsignond-signonui-data.h>
+
+typedef             GSignondSignonuiData;
+enum                GSignondSignonuiError;
+const gchar *       gsignond_signonui_data_get_captcha_response
+                                                        (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_captcha_url
+                                                        (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_caption  (GSignondSignonuiData *data);
+gboolean            gsignond_signonui_data_get_confirm  (GSignondSignonuiData *data,
+                                                         gboolean *confirm);
+const gchar *       gsignond_signonui_data_get_final_url
+                                                        (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_forgot_password
+                                                        (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_forgot_password_url
+                                                        (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_message  (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_open_url (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_password (GSignondSignonuiData *data);
+gboolean            gsignond_signonui_data_get_query_error
+                                                        (GSignondSignonuiData *data,
+                                                         GSignondSignonuiError *error);
+gboolean            gsignond_signonui_data_get_query_password
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean *query_password);
+gboolean            gsignond_signonui_data_get_query_username
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean *query_username);
+gboolean            gsignond_signonui_data_get_remember_password
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean *remember_password);
+const gchar *       gsignond_signonui_data_get_request_id
+                                                        (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_test_reply
+                                                        (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_title    (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_url_response
+                                                        (GSignondSignonuiData *data);
+const gchar *       gsignond_signonui_data_get_username (GSignondSignonuiData *data);
+void                gsignond_signonui_data_set_captcha_response
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *response);
+void                gsignond_signonui_data_set_captcha_url
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *url);
+void                gsignond_signonui_data_set_caption  (GSignondSignonuiData *data,
+                                                         const gchar *caption);
+void                gsignond_signonui_data_set_confirm  (GSignondSignonuiData *data,
+                                                         gboolean confirm);
+void                gsignond_signonui_data_set_final_url
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *url);
+void                gsignond_signonui_data_set_forgot_password
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *forgot);
+void                gsignond_signonui_data_set_forgot_password_url
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *url);
+void                gsignond_signonui_data_set_message  (GSignondSignonuiData *data,
+                                                         const gchar *message);
+void                gsignond_signonui_data_set_open_url (GSignondSignonuiData *data,
+                                                         const gchar *url);
+void                gsignond_signonui_data_set_password (GSignondSignonuiData *data,
+                                                         const gchar *password);
+void                gsignond_signonui_data_set_query_error
+                                                        (GSignondSignonuiData *data,
+                                                         GSignondSignonuiError error);
+void                gsignond_signonui_data_set_query_password
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean query);
+void                gsignond_signonui_data_set_query_username
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean query);
+void                gsignond_signonui_data_set_remember_password
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean remember);
+void                gsignond_signonui_data_set_request_id
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *id);
+void                gsignond_signonui_data_set_test_reply
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *reply);
+void                gsignond_signonui_data_set_title    (GSignondSignonuiData *data,
+                                                         const gchar *title);
+void                gsignond_signonui_data_set_url_response
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *response);
+void                gsignond_signonui_data_set_username (GSignondSignonuiData *data,
+                                                         const gchar *username);
+
+
+
+

Description

+

+This file provides commonly used parameters for user interaction during +authentication sessions. +For each of those a getter and setter is defined, on GSignondSessionData +container. +

+

+This container is used in two directions: by plugins to specify the parameters +for user interaction that is then performed by SignonUI component, and by SignonUI +to return the results of that interaction to the plugins. See GSignondPlugin +for the user interaction API from the plugins' perspective. +

+

+The parameters that are set by the plugin and read by signon UI are captcha url, +caption, confirm, final url, forgot password, forgot password url, message, +open url, password, query password, query username, remember +password, request id, test reply values, title, username. +

+

+The parameters that are returned by signon UI to the plugin are captcha response, +password, query error code, remember password, url response. +

+
+
+

Details

+
+

GSignondSignonuiData

+
typedef GSignondDictionary GSignondSignonuiData;
+
+

+GSignondSignonuiData is simply a typedef for GSignondDictionary, which +means the developers may also freely use methods associated with that structure, +in particular for creating a GSignondSignonuiData object with +gsignond_dictionary_new(). +

+
+
+
+

enum GSignondSignonuiError

+
typedef enum {
+    SIGNONUI_ERROR_NONE = 0, 
+    SIGNONUI_ERROR_GENERAL,
+    SIGNONUI_ERROR_NO_SIGNONUI,
+    SIGNONUI_ERROR_BAD_PARAMETERS,
+    SIGNONUI_ERROR_CANCELED,
+    SIGNONUI_ERROR_NOT_AVAILABLE, 
+    SIGNONUI_ERROR_BAD_URL, 
+    SIGNONUI_ERROR_BAD_CAPTCHA,
+    SIGNONUI_ERROR_BAD_CAPTCHA_URL,
+    SIGNONUI_ERROR_REFRESH_FAILED, 
+    SIGNONUI_ERROR_FORBIDDEN,
+    SIGNONUI_ERROR_FORGOT_PASSWORD
+} GSignondSignonuiError;
+
+

+This enum defines errors that may happen during user interaction. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

SIGNONUI_ERROR_NONE

No errors +

SIGNONUI_ERROR_GENERAL

Generic error during interaction +

SIGNONUI_ERROR_NO_SIGNONUI

Cannot send request to signon-ui +

SIGNONUI_ERROR_BAD_PARAMETERS

Signon-Ui cannot create dialog based on the given UiSessionData +

SIGNONUI_ERROR_CANCELED

User canceled action. Plugin should not retry automatically after this +

SIGNONUI_ERROR_NOT_AVAILABLE

Requested ui is not available. For example browser cannot be started +

SIGNONUI_ERROR_BAD_URL

Given url was not valid +

SIGNONUI_ERROR_BAD_CAPTCHA

Given captcha image was not valid +

SIGNONUI_ERROR_BAD_CAPTCHA_URL

Given url for capctha loading was not valid +

SIGNONUI_ERROR_REFRESH_FAILED

Refresh failed +

SIGNONUI_ERROR_FORBIDDEN

Showing ui forbidden by ui policy +

SIGNONUI_ERROR_FORGOT_PASSWORD

User pressed forgot password +
+
+
+
+

gsignond_signonui_data_get_captcha_response ()

+
const gchar *       gsignond_signonui_data_get_captcha_response
+                                                        (GSignondSignonuiData *data);
+

+A getter for the user's response to a captcha query. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

the string entered by the user in response to a captcha query. [transfer none] +
+
+
+
+

gsignond_signonui_data_get_captcha_url ()

+
const gchar *       gsignond_signonui_data_get_captcha_url
+                                                        (GSignondSignonuiData *data);
+

+A getter for the captcha URL. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

the URL to the captcha image to be verified by user. [transfer none] +
+
+
+
+

gsignond_signonui_data_get_caption ()

+
const gchar *       gsignond_signonui_data_get_caption  (GSignondSignonuiData *data);
+

+A getter for the caption string. Caption tells the user which +application/credentials/provider is requestion authentication. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_confirm ()

+
gboolean            gsignond_signonui_data_get_confirm  (GSignondSignonuiData *data,
+                                                         gboolean *confirm);
+

+A getter for the confirm mode. In confirm mode the user is asked to enter +an old password (which is compared to the supplied password), and a new password twice +(which is returned). +

+
++ + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

confirm :

the value for the property is written here

Returns :

whether this property exists in the data dictionary or not.
+
+
+
+

gsignond_signonui_data_get_final_url ()

+
const gchar *       gsignond_signonui_data_get_final_url
+                                                        (GSignondSignonuiData *data);
+

+A getter for the final URL. When the signon UI detects that the user is at +the final URL (possibly with additional query or fragment parameters), it +will close the window and return the full URL via url response property. +This is used by redirection-based authentication, such as OAuth. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_forgot_password ()

+
const gchar *       gsignond_signonui_data_get_forgot_password
+                                                        (GSignondSignonuiData *data);
+

+A getter for the forgot password string which is shown to the user as a link to +reset the password or remind him of the password. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_forgot_password_url ()

+
const gchar *       gsignond_signonui_data_get_forgot_password_url
+                                                        (GSignondSignonuiData *data);
+

+A getter for the forgot password URL, where the user can reset or request a +reminder of the password. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_message ()

+
const gchar *       gsignond_signonui_data_get_message  (GSignondSignonuiData *data);
+

+A getter for the message which is show to the user in the signon UI dialog. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_open_url ()

+
const gchar *       gsignond_signonui_data_get_open_url (GSignondSignonuiData *data);
+

+A getter for the URL that should be opened by signon UI. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_password ()

+
const gchar *       gsignond_signonui_data_get_password (GSignondSignonuiData *data);
+

+A getter for the password string. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_query_error ()

+
gboolean            gsignond_signonui_data_get_query_error
+                                                        (GSignondSignonuiData *data,
+                                                         GSignondSignonuiError *error);
+

+A getter for the UI interaction error. Signon UI sets this to SIGNONUI_ERROR_NONE if +there were no errors. +

+
++ + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

error :

the error is written here

Returns :

whether this property exists in the data dictionary or not.
+
+
+
+

gsignond_signonui_data_get_query_password ()

+
gboolean            gsignond_signonui_data_get_query_password
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean *query_password);
+

+A getter for the query password property. It indicates whether the signon UI +should ask the user for a password (and return it in the password property). +

+
++ + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

query_password :

the property is written here

Returns :

whether this property exists in the data dictionary or not.
+
+
+
+

gsignond_signonui_data_get_query_username ()

+
gboolean            gsignond_signonui_data_get_query_username
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean *query_username);
+

+A getter for the query username property. It indicates whether the signon UI +should ask the user for a username (and return it in the username property). +

+
++ + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

query_username :

the property is written here

Returns :

whether this property exists in the data dictionary or not.
+
+
+
+

gsignond_signonui_data_get_remember_password ()

+
gboolean            gsignond_signonui_data_get_remember_password
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean *remember_password);
+

+A getter for whether the password should be remembered. +

+
++ + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

remember_password :

the property is written here

Returns :

whether this property exists in the data dictionary or not.
+
+
+
+

gsignond_signonui_data_get_request_id ()

+
const gchar *       gsignond_signonui_data_get_request_id
+                                                        (GSignondSignonuiData *data);
+

+A getter for the dialog request id. The id identifies the dialog so that it +can be refreshed or updated. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_test_reply ()

+
const gchar *       gsignond_signonui_data_get_test_reply
+                                                        (GSignondSignonuiData *data);
+

+A getter for the test reply values. It's used only by the signon ui +implementations to test themselves. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_title ()

+
const gchar *       gsignond_signonui_data_get_title    (GSignondSignonuiData *data);
+

+A getter for the UI dialog title. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_url_response ()

+
const gchar *       gsignond_signonui_data_get_url_response
+                                                        (GSignondSignonuiData *data);
+

+A getter for the response URL. If the final URL was set in the request to the signon UI, and the signon UI +detects that it has been reached, then the full final URL is returned using +this property. This is used by redirection-based authentication such as OAauth. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_get_username ()

+
const gchar *       gsignond_signonui_data_get_username (GSignondSignonuiData *data);
+

+A getter for the username string. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

Returns :

(transfer none)
+
+
+
+

gsignond_signonui_data_set_captcha_response ()

+
void                gsignond_signonui_data_set_captcha_response
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *response);
+

+A setter for the user's response to a captcha query. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

response :

the string entered by the user in response to a captcha query.
+
+
+
+

gsignond_signonui_data_set_captcha_url ()

+
void                gsignond_signonui_data_set_captcha_url
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *url);
+

+A setter for the captcha URL. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

url :

the URL to the captcha image to be verified by user
+
+
+
+

gsignond_signonui_data_set_caption ()

+
void                gsignond_signonui_data_set_caption  (GSignondSignonuiData *data,
+                                                         const gchar *caption);
+

+A setter for the caption string. Caption tells the user which +application/credentials/provider is requestion authentication. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

caption :

the caption string
+
+
+
+

gsignond_signonui_data_set_confirm ()

+
void                gsignond_signonui_data_set_confirm  (GSignondSignonuiData *data,
+                                                         gboolean confirm);
+

+A setter for the confirm mode. In confirm mode the user is asked to enter +an old password (which is compared to the supplied password), and a new password twice +(which is returned). +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

confirm :

the value for the property
+
+
+
+

gsignond_signonui_data_set_final_url ()

+
void                gsignond_signonui_data_set_final_url
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *url);
+

+A setter for the final URL. When the signon UI detects that the user is at +the final URL (possibly with additional query or fragment parameters), it +will close the window and return the full URL via url response property. +This is used by redirection-based authentication, such as OAuth. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

url :

the final url
+
+
+
+

gsignond_signonui_data_set_forgot_password ()

+
void                gsignond_signonui_data_set_forgot_password
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *forgot);
+

+A setter for the forgot password string, which is shown to the user as a link to +reset the password or remind him of the password. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

forgot :

the forgot password string
+
+
+
+

gsignond_signonui_data_set_forgot_password_url ()

+
void                gsignond_signonui_data_set_forgot_password_url
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *url);
+

+A setter for the forgot password URL, where the user can reset or request a +reminder of the password. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

url :

the forgot password URL
+
+
+
+

gsignond_signonui_data_set_message ()

+
void                gsignond_signonui_data_set_message  (GSignondSignonuiData *data,
+                                                         const gchar *message);
+

+A setter for the message which is show to the user in the signon UI dialog. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

message :

the message
+
+
+
+

gsignond_signonui_data_set_open_url ()

+
void                gsignond_signonui_data_set_open_url (GSignondSignonuiData *data,
+                                                         const gchar *url);
+

+A setter for the URL that should be opened by signon UI. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

url :

the url to open
+
+
+
+

gsignond_signonui_data_set_password ()

+
void                gsignond_signonui_data_set_password (GSignondSignonuiData *data,
+                                                         const gchar *password);
+

+A setter for the password string. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

password :

the password string
+
+
+
+

gsignond_signonui_data_set_query_error ()

+
void                gsignond_signonui_data_set_query_error
+                                                        (GSignondSignonuiData *data,
+                                                         GSignondSignonuiError error);
+

+A setter for the UI interaction error. Signon UI sets this to SIGNONUI_ERROR_NONE if +there were no errors. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

error :

the error
+
+
+
+

gsignond_signonui_data_set_query_password ()

+
void                gsignond_signonui_data_set_query_password
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean query);
+

+A setter for the query password property. It indicates whether the signon UI +should ask the user for a password (and return it in the password property). +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

query :

the property value
+
+
+
+

gsignond_signonui_data_set_query_username ()

+
void                gsignond_signonui_data_set_query_username
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean query);
+

+A setter for the query username property. It indicates whether the signon UI +should ask the user for a username (and return it in the username property). +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

query :

the property value
+
+
+
+

gsignond_signonui_data_set_remember_password ()

+
void                gsignond_signonui_data_set_remember_password
+                                                        (GSignondSignonuiData *data,
+                                                         gboolean remember);
+

+A setter for whether the password should be remembered. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

remember :

the property value
+
+
+
+

gsignond_signonui_data_set_request_id ()

+
void                gsignond_signonui_data_set_request_id
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *id);
+

+A setter for the dialog request id. The id identifies the dialog so that it +can be refreshed or updated. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

id :

request id
+
+
+
+

gsignond_signonui_data_set_test_reply ()

+
void                gsignond_signonui_data_set_test_reply
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *reply);
+

+A setter for the test reply values. It's used only by the signon ui +implementations to test themselves. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

reply :

test reply values
+
+
+
+

gsignond_signonui_data_set_title ()

+
void                gsignond_signonui_data_set_title    (GSignondSignonuiData *data,
+                                                         const gchar *title);
+

+A setter for the UI dialog title. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

title :

the title
+
+
+
+

gsignond_signonui_data_set_url_response ()

+
void                gsignond_signonui_data_set_url_response
+                                                        (GSignondSignonuiData *data,
+                                                         const gchar *response);
+

+A getter for the response URL. If the final URL was set in the request to the +signon UI, and the signon UI +detects that it has been reached, then the full final URL is returned using +this property. This is used by redirection-based authentication such as OAauth. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

response :

the response URL
+
+
+
+

gsignond_signonui_data_set_username ()

+
void                gsignond_signonui_data_set_username (GSignondSignonuiData *data,
+                                                         const gchar *username);
+

+A setter for the username string. +

+
++ + + + + + + + + + +

data :

a GSignondDictionary structure

username :

the username string
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-General-configuration.html b/docs/html/gsignond-General-configuration.html new file mode 100644 index 0000000..90875dd --- /dev/null +++ b/docs/html/gsignond-General-configuration.html @@ -0,0 +1,161 @@ + + + + +General configuration + + + + + + + + + + + + + + + + +
+
+
+ + +
+

General configuration

+

General configuration — gSSO general configuration keys

+
+ +
+

Description

+

+General configuration keys are defined below. See GSignondConfig for how to use them. +

+
+
+

Details

+
+

GSIGNOND_CONFIG_GENERAL

+
#define GSIGNOND_CONFIG_GENERAL                 "General"
+
+

+A prefix for general keys. Should be used only when defining new keys. +

+
+
+
+

GSIGNOND_CONFIG_GENERAL_BIN_DIR

+
#define             GSIGNOND_CONFIG_GENERAL_BIN_DIR
+

+The path where gSSO is looking for the gsignond-plugind binary when it needs +to start a plugin process. Can be used for finding other supplementary binaries in +the future. +

+

+Default value: $(bindir), can be overriden in debug +builds by setting SSO_BIN_DIR environment variable. +

+
+
+
+

GSIGNOND_CONFIG_GENERAL_EXTENSION

+
#define             GSIGNOND_CONFIG_GENERAL_EXTENSION
+

+The name of the gSSO extension to use. If not specified, the default +implementation is used (see GSignondExtension). +

+

+Can be overriden in debug +builds by setting SSO_EXTENSION environment variable. +

+
+
+
+

GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR

+
#define             GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR
+

+The path where gSSO is looking for available extension modules. +

+

+Default value: $(pkglibdir)/extensions, can be overriden in debug +builds by setting SSO_EXTENSIONS_DIR environment variable. +

+
+
+
+

GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR

+
#define             GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR
+

+The path where gSSO is looking for available plugins. +

+

+Default value: $(pkglibdir)/plugins, can be overriden in debug +builds by setting SSO_PLUGINS_DIR environment variable. +

+
+
+
+

GSIGNOND_CONFIG_GENERAL_SECURE_DIR

+
#define             GSIGNOND_CONFIG_GENERAL_SECURE_DIR
+

+Path provided by GSignondStorageManager for storing user-specific +information, including secret and metadata databases. +

+

+Value provided by the default implementation: +GSIGNOND_CONFIG_GENERAL_STORAGE_PATH + "/gsignond." + g_get_user_name(). +

+
+
+
+

GSIGNOND_CONFIG_GENERAL_STORAGE_PATH

+
#define             GSIGNOND_CONFIG_GENERAL_STORAGE_PATH
+

+Base path for GSignondStorageManager to operate in. +

+

+Default value: "/var/db", can be overriden in debug +builds by setting SSO_STORAGE_PATH environment variable. +

+
+
+
+

GSIGNOND_CONFIG_PLUGIN_TIMEOUT

+
#define             GSIGNOND_CONFIG_PLUGIN_TIMEOUT
+

+A timeout in seconds, after which inactive plugin objects and processes are removed. +If not set, the plugin objects will persist for possible reuse. +

+

+Can be overriden in debug +builds by setting SSO_PLUGIN_TIMEOUT environment variable. +

+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-Logging.html b/docs/html/gsignond-Logging.html new file mode 100644 index 0000000..074a419 --- /dev/null +++ b/docs/html/gsignond-Logging.html @@ -0,0 +1,177 @@ + + + + +Logging + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Logging

+

Logging — logging facilities

+
+
+

Synopsis

+
+#include <gsignond/gsignond-log.h>
+
+#define             DBG                                 (frmt,
+                                                         ...)
+#define             ERR                                 (frmt,
+                                                         ...)
+#define             INFO                                (frmt,
+                                                         ...)
+#define             TRACEBACK
+#define             WARN                                (frmt,
+                                                         ...)
+
+
+
+

Description

+

+gsignond/gsignond-log.h file contains logging macros +that plugins and extensions should use for debugging and tracing. +

+

+For example: +

+
+ + + + + + + +
1
INFO("Plugin %s initialized", plugin_mechanism);
+
+ +

+

+
+
+

Details

+
+

DBG()

+
#define             DBG(frmt, args...)
+

+Use this macro to log debug messages. GSignond will take care of +correctly saving them. +

+
++ + + + + + + + + + +

frmt :

format string for the message

... :

arguments for the format string
+
+
+
+

ERR()

+
#define             ERR(frmt, args...)
+

+Use this macro to log error messages. GSignond will take care of +correctly saving them. +

+
++ + + + + + + + + + +

frmt :

format string for the message

... :

arguments for the format string
+
+
+
+

INFO()

+
#define             INFO(frmt, args...)
+

+Use this macro to log informational messages. GSignond will take care of +correctly saving them. +

+
++ + + + + + + + + + +

frmt :

format string for the message

... :

arguments for the format string
+
+
+
+

TRACEBACK

+
#define             TRACEBACK()
+

+This macro prints the current function call stack to stderr. +

+
+
+
+

WARN()

+
#define             WARN(frmt, args...)
+

+Use this macro to log warning messages. GSignond will take care of +correctly saving them. +

+
++ + + + + + + + + + +

frmt :

format string for the message

... :

arguments for the format string
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-Utility-functions.html b/docs/html/gsignond-Utility-functions.html new file mode 100644 index 0000000..26fcca1 --- /dev/null +++ b/docs/html/gsignond-Utility-functions.html @@ -0,0 +1,119 @@ + + + + +Utility functions + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Utility functions

+

Utility functions — miscellaneous utility functions

+
+
+

Synopsis

+
+#include <gsignond/gsignond-utils.h>
+
+gchar *             gsignond_generate_nonce             ();
+gboolean            gsignond_wipe_directory             (const gchar *dirname);
+gboolean            gsignond_wipe_file                  (const gchar *filename);
+
+
+
+

Description

+

+Miscellaneous utility functions are described below. +

+
+
+

Details

+
+

gsignond_generate_nonce ()

+
gchar *             gsignond_generate_nonce             ();
+

+This function generates a random secure nonce using SHA1 HMAC. +

+
++ + + + +

Returns :

the nonce in lowercase hexadecimal format, 40 bytes long. [transfer full] +
+
+
+
+

gsignond_wipe_directory ()

+
gboolean            gsignond_wipe_directory             (const gchar *dirname);
+

+This function securely wipes the contents of the directory by calling +gsignond_wipe_file() on each file. It also removes links and empty directories but +does not recursively wipe them. +

+
++ + + + + + + + + + +

dirname :

directory to wipe

Returns :

TRUE if wiping and removal was successful.
+
+
+
+

gsignond_wipe_file ()

+
gboolean            gsignond_wipe_file                  (const gchar *filename);
+

+This function securely wipes the contents of the file, by overwriting it with +0's, then 1's, then random data. The file is then removed. +

+
++ + + + + + + + + + +

filename :

filename to wipe

Returns :

TRUE if wiping and removal was successful.
+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond-building.html b/docs/html/gsignond-building.html new file mode 100644 index 0000000..d92d299 --- /dev/null +++ b/docs/html/gsignond-building.html @@ -0,0 +1,161 @@ + + + + +Building and installing the gsignond daemon + + + + + + + + + + + + + + + + +
+
+
+

Building gsignond

+

+ GSignond uses the standard GNU build system, + using autoconf for package + configuration and resolving portability issues, + automake for building makefiles + that comply with the GNU Coding Standards, and + libtool for building shared + libraries on multiple platforms. The normal sequence for + compiling and installing gsignond from distribution tarballs is thus: + +

+


+        ./configure
+        make
+        make install
+      

+

+ + If you have obtained the source code directly from git repository, + execute the ./autogen.sh script + before the steps above. +

+

+ The standard options provided by GNU + autoconf may be passed to the + configure script. Please see the + autoconf documentation or run + ./configure --help for information about + the standard options. +

+
+
+

Dependencies

+

+ Before you can compile GSignond, you need to have + various other tools and libraries installed on your + system. The two tools needed during the build process + are pkg-config and + GNU make. +

+
  • + pkg-config + is a tool for tracking the compilation flags needed for + libraries that are used by the GSignond. (For each + library, a small .pc text file is + installed in a standard location that contains the compilation + flags needed for that library along with version number + information.) +

+

+ GSignond depends on a number of other libraries. +

+
    +
  • + The GLib + library is the development framework that GSignond is built on. +

  • +
  • + The SQLite library + provides a database implementation that GSignond is using for + storing data. +

  • +
  • + The check library + provides a unit testing framework. It is needed only if you would + like to run unit tests with make check. +

  • +
  • + For building Tizen extension module that integrates gsignond into + the Tizen platform, the + libsmack and + ecryptfs are required. + They are not needed otherwise. +

  • +
+
+
+

Extra Configuration Options

+

+ In addition to the normal options, the + configure script supports these additional arguments: +

+

--enable-debug.  + Turns on debugging support. This enables unit tests and allows setting + environment variables to influence the runtime behaviour of GSignond + (see GSignondConfig and + GSignondAccessControlManager). + Also, the daemon will exit in case of critical errors. +

+

--enable-sql-log.  + Turns on SQL statement logging. For this, also + --enable-debug must be used. +

+

--enable-dbus-type=dbus-type.  + Sets the way in which GSignond is using DBus to communicate with + the client library. dbus-type can be one of +

+
    +
  • + 'p2p' which is the default and recommended + value. GSignond will use direct connection over a UNIX domain socket + with the client library without involving the DBus daemon. +

  • +
  • + 'session' which will use the session bus. + This is not recommended to use because session bus isn't secure + against eavesdropping, but it can be used for debugging purposes, + as it allows the use of standard tools such as + dbus-monitor, d-feet and + so on. +

  • +
  • + 'system' which will use the system bus. + Can be used on a single-user systems, but 'p2p' is preferred. +

  • +
+

+

+
+
+

Building distribution packages

+

+ Instead of running make install to install gsignond + into a system location it is possible to build distribution-specific + packages. dists/ directory in the source tree + contains a number of package confuguration files, and to use them also + a distribution tarball is needed. If you are building from a git tree, + use make dist to create such a tarball. +

+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond.devhelp2 b/docs/html/gsignond.devhelp2 new file mode 100644 index 0000000..107f848 --- /dev/null +++ b/docs/html/gsignond.devhelp2 @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/html/home.png b/docs/html/home.png new file mode 100644 index 0000000..9346b33 Binary files /dev/null and b/docs/html/home.png differ diff --git a/docs/html/index.html b/docs/html/index.html new file mode 100644 index 0000000..7f2313d --- /dev/null +++ b/docs/html/index.html @@ -0,0 +1,116 @@ + + + + +gsignond API Reference Manual + + + + + + + +
+
+
+
+

+ for gsignond daemon. + The latest version of this documentation can be found on-line at + + http://gsignon-docs.accounts-sso.googlecode.com/git/gsignond/index.html. +

+
+
+
+
+
GSignond building and installation
+
+Building and installing the gsignond daemon +
+
GSignond configuration
+
+
+GSignondConfig — gSSO configuration information +
+
+General configuration — gSSO general configuration keys +
+
+Database configuration — gSSO database configuration keys +
+
+DBus configuration — gSSO dbus configuration keys +
+
+
GSignond API for writing authentication plugins
+
+
+GSignondPlugin — an interface for implementing authentication plugins +
+
+GSignondDictionary — a dictionary container holding string keys and variant values +
+
+GSignondSessionData — definitions for authentication session parameters +
+
+GSignondSignonuiData — definitions for user interaction parameters +
+
+
Standard in-tree authentication plugins
+
+
+GSignondDigestPlugin — a plugin that performs HTTP Digest authentication +
+
+GSignondSsoTestPlugin — a plugin that is used internally in gsignond unit test +
+
+GSignondPasswordPlugin — a plugin for retrieving the username/password +
+
+
GSignond API for writing platform adaptation extensions
+
+
+GSignondExtension — provides platform adaptation functionality +
+
+GSignondAccessControlManager — an object that performs access control checks +
+
+GSignondSecurityContext — security context descriptor used in access control checks +
+
+GSignondStorageManager — manages encrypted disk storage for storing the secret database +
+
+GSignondSecretStorage — provides access to the database that stores user credentials and identity/method cache +
+
+GSignondCredentials — credentials (username, password) associated with an identity +
+
+
Miscellaneous
+
+
+Errors — error definitions and utilities +
+
+Logging — logging facilities +
+
+Utility functions — miscellaneous utility functions +
+
+
Object Hierarchy
+
API Index
+
Index of deprecated API
+
Annotation Glossary
+
+
+ + + \ No newline at end of file diff --git a/docs/html/index.sgml b/docs/html/index.sgml new file mode 100644 index 0000000..0a1fd7c --- /dev/null +++ b/docs/html/index.sgml @@ -0,0 +1,381 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/html/left-insensitive.png b/docs/html/left-insensitive.png new file mode 100644 index 0000000..3269393 Binary files /dev/null and b/docs/html/left-insensitive.png differ diff --git a/docs/html/left.png b/docs/html/left.png new file mode 100644 index 0000000..2abde03 Binary files /dev/null and b/docs/html/left.png differ diff --git a/docs/html/object-tree.html b/docs/html/object-tree.html new file mode 100644 index 0000000..78b42ff --- /dev/null +++ b/docs/html/object-tree.html @@ -0,0 +1,42 @@ + + + + +Object Hierarchy + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/right-insensitive.png b/docs/html/right-insensitive.png new file mode 100644 index 0000000..4c95785 Binary files /dev/null and b/docs/html/right-insensitive.png differ diff --git a/docs/html/right.png b/docs/html/right.png new file mode 100644 index 0000000..76260ec Binary files /dev/null and b/docs/html/right.png differ diff --git a/docs/html/style.css b/docs/html/style.css new file mode 100644 index 0000000..221d1bc --- /dev/null +++ b/docs/html/style.css @@ -0,0 +1,321 @@ +body +{ + font-family: cantarell, sans-serif; +} +.synopsis, .classsynopsis +{ + /* tango:aluminium 1/2 */ + background: #eeeeec; + border: solid 1px #d3d7cf; + padding: 0.5em; +} +.programlisting +{ + /* tango:sky blue 0/1 */ + background: #e6f3ff; + border: solid 1px #729fcf; + padding: 0.5em; +} +.variablelist +{ + padding: 4px; + margin-left: 3em; +} +.variablelist td:first-child +{ + vertical-align: top; +} + +@media screen { + sup a.footnote + { + position: relative; + top: 0em ! important; + + } + /* this is needed so that the local anchors are displayed below the naviagtion */ + div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] + { + display: inline-block; + position: relative; + top:-5em; + } + /* this seems to be a bug in the xsl style sheets when generating indexes */ + div.index div.index + { + top: 0em; + } + /* make space for the fixed navigation bar and add space at the bottom so that + * link targets appear somewhat close to top + */ + body + { + padding-top: 3.2em; + padding-bottom: 20em; + } + /* style and size the navigation bar */ + table.navigation#top + { + position: fixed; + /* tango:aluminum 2 */ + background: #d3d7cf; + border: solid 1px #babdb6; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + z-index: 10; + } + .navigation a, .navigation a:visited + { + /* tango:sky blue 3 */ + color: #204a87; + } + .navigation a:hover + { + /* tango:sky blue 2 */ + color: #3465a4; + } + td.shortcuts + { + /* tango:sky blue 2 */ + color: #3465a4; + font-size: 80%; + white-space: nowrap; + } +} +@media print { + table.navigation { + visibility: collapse; + display: none; + } + div.titlepage table.navigation { + visibility: visible; + display: table; + /* tango:aluminum 2 */ + background: #d3d7cf; + border: solid 1px #babdb6; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + } +} + +.navigation .title +{ + font-size: 120%; +} + +div.gallery-float +{ + float: left; + padding: 10px; +} +div.gallery-float img +{ + border-style: none; +} +div.gallery-spacer +{ + clear: both; +} + +a, a:visited +{ + text-decoration: none; + /* tango:sky blue 2 */ + color: #3465a4; +} +a:hover +{ + text-decoration: underline; + /* tango:sky blue 1 */ + color: #729fcf; +} + +div.table table +{ + border-collapse: collapse; + border-spacing: 0px; + /* tango:aluminium 3 */ + border: solid 1px #babdb6; +} + +div.table table td, div.table table th +{ + /* tango:aluminium 3 */ + border: solid 1px #babdb6; + padding: 3px; + vertical-align: top; +} + +div.table table th +{ + /* tango:aluminium 2 */ + background-color: #d3d7cf; +} + +hr +{ + /* tango:aluminium 1 */ + color: #d3d7cf; + background: #d3d7cf; + border: none 0px; + height: 1px; + clear: both; +} + +dl.toc dt +{ + padding-bottom: 0.25em; +} + +dl.toc > dd > dl > dt +{ + padding-top: 0.25em; + padding-bottom: 0.25em; +} + +dl.toc > dt +{ + padding-top: 1em; + padding-bottom: 0.5em; + font-weight: bold; +} + +.parameter +{ + font-style: normal; +} + +.footer +{ + padding-top: 3.5em; + /* tango:aluminium 3 */ + color: #babdb6; + text-align: center; + font-size: 80%; +} + +.informalfigure, +.figure +{ + margin: 2em; +} + +.informalexample, +.example +{ + margin: 2em; +} + +.warning +{ + /* tango:orange 0/1 */ + background: #ffeed9; + border-color: #ffb04f; +} +.note +{ + /* tango:chameleon 0/0.5 */ + background: #d8ffb2; + border-color: #abf562; +} +.note, .warning +{ + padding: 0.5em; + border-width: 1px; + border-style: solid; + margin: 2em; +} +.note h3, .warning h3 +{ + margin-top: 0.0em +} +.note p, .warning p +{ + margin-bottom: 0.0em +} + +p + div.section +{ + margin-top: 2.5em; +} + +div.refnamediv, +div.refsynopsisdiv, +div.refsect1, +div.refsect2, +div.toc, +div.section +{ + margin-bottom: 2.5em; +} + +/* blob links */ +h2 .extralinks, h3 .extralinks +{ + float: right; + /* tango:aluminium 3 */ + color: #babdb6; + font-size: 80%; + font-weight: normal; +} + +.annotation +{ + /* tango:aluminium 5 */ + color: #555753; + font-size: 80%; + font-weight: normal; +} + +/* code listings */ + +.listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ +.listing_code .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ +.listing_code .programlisting .function { color: #000000; font-weight: bold; } +.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ +.listing_code .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ +.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ +.listing_code .programlisting .normal { color: #000000; } +.listing_code .programlisting .number { color: #75507b; } /* tango: plum 2 */ +.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ +.listing_code .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ +.listing_code .programlisting .type { color: #000000; } +.listing_code .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ +.listing_code .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ + +.listing_frame { + /* tango:sky blue 1 */ + border: solid 1px #729fcf; + padding: 0px; +} + +.listing_lines, .listing_code { + margin-top: 0px; + margin-bottom: 0px; + padding: 0.5em; +} +.listing_lines { + /* tango:sky blue 0.5 */ + background: #a6c5e3; + /* tango:aluminium 6 */ + color: #2e3436; +} +.listing_code { + /* tango:sky blue 0 */ + background: #e6f3ff; +} +.listing_code .programlisting { + /* override from previous */ + border: none 0px; + padding: 0px; +} +.listing_lines pre, .listing_code pre { + margin: 0px; +} + diff --git a/docs/html/up-insensitive.png b/docs/html/up-insensitive.png new file mode 100644 index 0000000..f404986 Binary files /dev/null and b/docs/html/up-insensitive.png differ diff --git a/docs/html/up.png b/docs/html/up.png new file mode 100644 index 0000000..80b4b37 Binary files /dev/null and b/docs/html/up.png differ diff --git a/docs/tmpl/gsignond-access-control-manager.sgml b/docs/tmpl/gsignond-access-control-manager.sgml new file mode 100644 index 0000000..bfa562a --- /dev/null +++ b/docs/tmpl/gsignond-access-control-manager.sgml @@ -0,0 +1,102 @@ + +GSignondAccessControlManager + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@parent_class: +@security_context_of_peer: +@peer_is_allowed_to_use_identity: +@peer_is_owner_of_identity: +@acl_is_valid: +@security_context_of_keychain: + + + + + + +@self: +@peer_ctx: +@identity_acl: +@Returns: + + + + + + + +@self: +@peer_ctx: +@owner_ctx: +@identity_acl: +@Returns: + + + + + + + +@self: +@peer_ctx: +@owner_ctx: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@peer_ctx: +@peer_fd: +@peer_service: +@peer_app_ctx: + + diff --git a/docs/tmpl/gsignond-config-db.sgml b/docs/tmpl/gsignond-config-db.sgml new file mode 100644 index 0000000..7d280e2 --- /dev/null +++ b/docs/tmpl/gsignond-config-db.sgml @@ -0,0 +1,45 @@ + +gsignond-config-db + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/tmpl/gsignond-config-dbus.sgml b/docs/tmpl/gsignond-config-dbus.sgml new file mode 100644 index 0000000..acadcf1 --- /dev/null +++ b/docs/tmpl/gsignond-config-dbus.sgml @@ -0,0 +1,52 @@ + +gsignond-config-dbus + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/tmpl/gsignond-config-general.sgml b/docs/tmpl/gsignond-config-general.sgml new file mode 100644 index 0000000..0f4bc08 --- /dev/null +++ b/docs/tmpl/gsignond-config-general.sgml @@ -0,0 +1,80 @@ + +gsignond-config-general + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/tmpl/gsignond-config.sgml b/docs/tmpl/gsignond-config.sgml new file mode 100644 index 0000000..8699ceb --- /dev/null +++ b/docs/tmpl/gsignond-config.sgml @@ -0,0 +1,84 @@ + +GSignondConfig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@self: +@key: +@Returns: + + + + + + + +@self: +@key: +@Returns: + + + + + + + +@Returns: + + + + + + + +@self: +@key: +@value: + + + + + + + +@self: +@key: +@value: + + diff --git a/docs/tmpl/gsignond-credentials.sgml b/docs/tmpl/gsignond-credentials.sgml new file mode 100644 index 0000000..ea69e95 --- /dev/null +++ b/docs/tmpl/gsignond-credentials.sgml @@ -0,0 +1,123 @@ + +GSignondCredentials + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@one: +@two: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@Returns: + + + + + + + +@self: +@id: +@username: +@password: +@Returns: + + + + + + + +@self: +@id: +@Returns: + + + + + + + +@self: +@password: +@Returns: + + + + + + + +@self: +@username: +@Returns: + + diff --git a/docs/tmpl/gsignond-dictionary.sgml b/docs/tmpl/gsignond-dictionary.sgml new file mode 100644 index 0000000..14dc8b7 --- /dev/null +++ b/docs/tmpl/gsignond-dictionary.sgml @@ -0,0 +1,245 @@ + +gsignond-dictionary + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@other: +@Returns: + + + + + + + +@dict: +@key: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@void: +@Returns: + + + + + + + +@variant: +@Returns: + + + + + + + +@dict: +@Returns: + + + + + + + +@dict: +@key: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@key: +@value: +@Returns: + + + + + + + +@dict: +@Returns: + + + + + + + +@dict: + + diff --git a/docs/tmpl/gsignond-digest-plugin.sgml b/docs/tmpl/gsignond-digest-plugin.sgml new file mode 100644 index 0000000..c8d0d76 --- /dev/null +++ b/docs/tmpl/gsignond-digest-plugin.sgml @@ -0,0 +1,37 @@ + +GSignondDigestPlugin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@parent_class: + diff --git a/docs/tmpl/gsignond-error.sgml b/docs/tmpl/gsignond-error.sgml new file mode 100644 index 0000000..2c5f232 --- /dev/null +++ b/docs/tmpl/gsignond-error.sgml @@ -0,0 +1,114 @@ + +gsignond-error + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@GSIGNOND_ERROR_NONE: +@GSIGNOND_ERROR_UNKNOWN: +@GSIGNOND_ERROR_INTERNAL_SERVER: +@GSIGNOND_ERROR_INTERNAL_COMMUNICATION: +@GSIGNOND_ERROR_PERMISSION_DENIED: +@GSIGNOND_ERROR_ENCRYPTION_FAILURE: +@GSIGNOND_ERROR_AUTH_SERVICE_ERR: +@GSIGNOND_ERROR_METHOD_NOT_KNOWN: +@GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE: +@GSIGNOND_ERROR_INVALID_QUERY: +@GSIGNOND_ERROR_IDENTITY_ERR: +@GSIGNOND_ERROR_METHOD_NOT_AVAILABLE: +@GSIGNOND_ERROR_IDENTITY_NOT_FOUND: +@GSIGNOND_ERROR_STORE_FAILED: +@GSIGNOND_ERROR_REMOVE_FAILED: +@GSIGNOND_ERROR_SIGN_OUT_FAILED: +@GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED: +@GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE: +@GSIGNOND_ERROR_REFERENCE_NOT_FOUND: +@GSIGNOND_ERROR_AUTH_SESSION_ERR: +@GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE: +@GSIGNOND_ERROR_MISSING_DATA: +@GSIGNOND_ERROR_INVALID_CREDENTIALS: +@GSIGNOND_ERROR_NOT_AUTHORIZED: +@GSIGNOND_ERROR_WRONG_STATE: +@GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED: +@GSIGNOND_ERROR_NO_CONNECTION: +@GSIGNOND_ERROR_NETWORK: +@GSIGNOND_ERROR_SSL: +@GSIGNOND_ERROR_RUNTIME: +@GSIGNOND_ERROR_SESSION_CANCELED: +@GSIGNOND_ERROR_TIMED_OUT: +@GSIGNOND_ERROR_USER_INTERACTION: +@GSIGNOND_ERROR_OPERATION_FAILED: +@GSIGNOND_ERROR_ENCRYPTION_FAILED: +@GSIGNOND_ERROR_TOS_NOT_ACCEPTED: +@GSIGNOND_ERROR_FORGOT_PASSWORD: +@GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED: +@GSIGNOND_ERROR_INCORRECT_DATE: +@GSIGNOND_ERROR_USER_ERR: + + + + + + +@var: +@Returns: + + + + + + + +@void: +@Returns: + + + + + + + +@error: +@Returns: + + + + + + + +@err: +@message: +@...: + + diff --git a/docs/tmpl/gsignond-extension-interface.sgml b/docs/tmpl/gsignond-extension-interface.sgml new file mode 100644 index 0000000..215d44f --- /dev/null +++ b/docs/tmpl/gsignond-extension-interface.sgml @@ -0,0 +1,90 @@ + +GSignondExtension + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@parent_class: +@get_extension_name: +@get_extension_version: +@get_storage_manager: +@get_secret_storage: +@get_access_control_manager: + + + + + + +@self: +@config: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@config: +@Returns: + + + + + + + +@self: +@config: +@Returns: + + + + + + + +@self: +@Returns: + + diff --git a/docs/tmpl/gsignond-log.sgml b/docs/tmpl/gsignond-log.sgml new file mode 100644 index 0000000..a31bbc6 --- /dev/null +++ b/docs/tmpl/gsignond-log.sgml @@ -0,0 +1,67 @@ + +gsignond-log + + + + + + + + + + + + + + + + + + + + + + + + + + + +@frmt: +@...: + + + + + + + +@frmt: +@...: + + + + + + + +@frmt: +@...: + + + + + + + + + + + + + + +@frmt: +@...: + + diff --git a/docs/tmpl/gsignond-password-plugin.sgml b/docs/tmpl/gsignond-password-plugin.sgml new file mode 100644 index 0000000..edf3bd9 --- /dev/null +++ b/docs/tmpl/gsignond-password-plugin.sgml @@ -0,0 +1,37 @@ + +GSignondPasswordPlugin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@parent_class: + diff --git a/docs/tmpl/gsignond-plugin-interface.sgml b/docs/tmpl/gsignond-plugin-interface.sgml new file mode 100644 index 0000000..1cfbef6 --- /dev/null +++ b/docs/tmpl/gsignond-plugin-interface.sgml @@ -0,0 +1,164 @@ + +GSignondPlugin + + + + + + + + + + + + + + + + + + + + + + + + + + + +@parent: +@cancel: +@request_initial: +@request: +@user_action_finished: +@refresh: + + + + + + +@GSIGNOND_PLUGIN_STATE_NONE: +@GSIGNOND_PLUGIN_STATE_RESOLVING: +@GSIGNOND_PLUGIN_STATE_CONNECTING: +@GSIGNOND_PLUGIN_STATE_SENDING_DATA: +@GSIGNOND_PLUGIN_STATE_WAITING: +@GSIGNOND_PLUGIN_STATE_USER_PENDING: +@GSIGNOND_PLUGIN_STATE_REFRESHING: +@GSIGNOND_PLUGIN_STATE_PROCESS_PENDING: +@GSIGNOND_PLUGIN_STATE_STARTED: +@GSIGNOND_PLUGIN_STATE_CANCELING: +@GSIGNOND_PLUGIN_STATE_DONE: +@GSIGNOND_PLUGIN_STATE_HOLDING: + + + + + + +@self: + + + + + + + +@self: +@error: + + + + + + + +@self: +@ui_data: + + + + + + + +@self: +@ui_data: + + + + + + + +@self: +@session_data: + + + + + + + +@self: +@session_data: +@identity_method_cache: +@mechanism: + + + + + + + +@self: +@session_data: + + + + + + + +@self: +@session_data: + + + + + + + +@self: +@state: +@message: + + + + + + + +@self: +@identity_method_cache: + + + + + + + +@self: +@ui_data: + + + + + + + +@self: +@ui_data: + + diff --git a/docs/tmpl/gsignond-secret-storage.sgml b/docs/tmpl/gsignond-secret-storage.sgml new file mode 100644 index 0000000..d33c891 --- /dev/null +++ b/docs/tmpl/gsignond-secret-storage.sgml @@ -0,0 +1,173 @@ + +GSignondSecretStorage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@parent_class: +@open_db: +@close_db: +@clear_db: +@is_open_db: +@load_credentials: +@update_credentials: +@remove_credentials: +@check_credentials: +@load_data: +@update_data: +@remove_data: +@get_last_error: + + + + + + +@self: +@creds: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@id: +@Returns: + + + + + + + +@self: +@id: +@method: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@id: +@Returns: + + + + + + + +@self: +@id: +@method: +@Returns: + + + + + + + +@self: +@creds: +@Returns: + + + + + + + +@self: +@id: +@method: +@data: +@Returns: + + diff --git a/docs/tmpl/gsignond-security-context.sgml b/docs/tmpl/gsignond-security-context.sgml new file mode 100644 index 0000000..717b7d2 --- /dev/null +++ b/docs/tmpl/gsignond-security-context.sgml @@ -0,0 +1,192 @@ + +gsignond-security-context + + + + + + + + + + + + + + + + + + + + + + + + + + + +@sys_ctx: +@app_ctx: + + + + + + + + + + + + +@reference: +@test: +@Returns: + + + + + + + +@ctx1: +@ctx2: +@Returns: + + + + + + + +@src_ctx: +@Returns: + + + + + + + +@ctx: + + + + + + + +@variant: +@Returns: + + + + + + + +@ctx: +@Returns: + + + + + + + +@ctx: +@Returns: + + + + + + + +@src_list: +@Returns: + + + + + + + +@seclist: + + + + + + + +@variant: +@Returns: + + + + + + + +@list: +@Returns: + + + + + + + +@ctx1: +@ctx2: +@Returns: + + + + + + + +@Returns: + + + + + + + +@system_context: +@application_context: +@Returns: + + + + + + + +@ctx: +@application_context: + + + + + + + +@ctx: +@system_context: + + + + + + + +@ctx: +@Returns: + + diff --git a/docs/tmpl/gsignond-session-data.sgml b/docs/tmpl/gsignond-session-data.sgml new file mode 100644 index 0000000..d37ccb7 --- /dev/null +++ b/docs/tmpl/gsignond-session-data.sgml @@ -0,0 +1,206 @@ + +gsignond-session-data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@GSIGNOND_UI_POLICY_DEFAULT: +@GSIGNOND_UI_POLICY_REQUEST_PASSWORD: +@GSIGNOND_UI_POLICY_NO_USER_INTERACTION: +@GSIGNOND_UI_POLICY_VALIDATION: + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@network_timeout: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@renew_token: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@ui_policy: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@window_id: +@Returns: + + + + + + + +@data: +@caption: + + + + + + + +@data: +@network_proxy: + + + + + + + +@data: +@network_timeout: + + + + + + + +@data: +@realm: + + + + + + + +@data: +@renew_token: + + + + + + + +@data: +@secret: + + + + + + + +@data: +@ui_policy: + + + + + + + +@data: +@username: + + + + + + + +@data: +@window_id: + + diff --git a/docs/tmpl/gsignond-signonui-data.sgml b/docs/tmpl/gsignond-signonui-data.sgml new file mode 100644 index 0000000..9c8f234 --- /dev/null +++ b/docs/tmpl/gsignond-signonui-data.sgml @@ -0,0 +1,395 @@ + +gsignond-signonui-data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@SIGNONUI_ERROR_NONE: +@SIGNONUI_ERROR_GENERAL: +@SIGNONUI_ERROR_NO_SIGNONUI: +@SIGNONUI_ERROR_BAD_PARAMETERS: +@SIGNONUI_ERROR_CANCELED: +@SIGNONUI_ERROR_NOT_AVAILABLE: +@SIGNONUI_ERROR_BAD_URL: +@SIGNONUI_ERROR_BAD_CAPTCHA: +@SIGNONUI_ERROR_BAD_CAPTCHA_URL: +@SIGNONUI_ERROR_REFRESH_FAILED: +@SIGNONUI_ERROR_FORBIDDEN: +@SIGNONUI_ERROR_FORGOT_PASSWORD: + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@confirm: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@error: +@Returns: + + + + + + + +@data: +@query_password: +@Returns: + + + + + + + +@data: +@query_username: +@Returns: + + + + + + + +@data: +@remember_password: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@data: +@response: + + + + + + + +@data: +@url: + + + + + + + +@data: +@caption: + + + + + + + +@data: +@confirm: + + + + + + + +@data: +@url: + + + + + + + +@data: +@forgot: + + + + + + + +@data: +@url: + + + + + + + +@data: +@message: + + + + + + + +@data: +@url: + + + + + + + +@data: +@password: + + + + + + + +@data: +@error: + + + + + + + +@data: +@query: + + + + + + + +@data: +@query: + + + + + + + +@data: +@remember: + + + + + + + +@data: +@id: + + + + + + + +@data: +@reply: + + + + + + + +@data: +@title: + + + + + + + +@data: +@response: + + + + + + + +@data: +@username: + + diff --git a/docs/tmpl/gsignond-ssotest-plugin.sgml b/docs/tmpl/gsignond-ssotest-plugin.sgml new file mode 100644 index 0000000..814f309 --- /dev/null +++ b/docs/tmpl/gsignond-ssotest-plugin.sgml @@ -0,0 +1,37 @@ + +GSignondSsoTestPlugin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@parent_class: + diff --git a/docs/tmpl/gsignond-storage-manager.sgml b/docs/tmpl/gsignond-storage-manager.sgml new file mode 100644 index 0000000..0592e59 --- /dev/null +++ b/docs/tmpl/gsignond-storage-manager.sgml @@ -0,0 +1,102 @@ + +GSignondStorageManager + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@parent_class: +@initialize_storage: +@delete_storage: +@storage_is_initialized: +@mount_filesystem: +@unmount_filesystem: +@filesystem_is_mounted: + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + + + + + + +@self: +@Returns: + + diff --git a/docs/tmpl/gsignond-unused.sgml b/docs/tmpl/gsignond-unused.sgml new file mode 100644 index 0000000..e69de29 diff --git a/docs/tmpl/gsignond-utils.sgml b/docs/tmpl/gsignond-utils.sgml new file mode 100644 index 0000000..ef2226d --- /dev/null +++ b/docs/tmpl/gsignond-utils.sgml @@ -0,0 +1,50 @@ + +gsignond-utils + + + + + + + + + + + + + + + + + + + + + + + + + + + +@Returns: + + + + + + + +@dirname: +@Returns: + + + + + + + +@filename: +@Returns: + + diff --git a/gsignond.conf b/gsignond.conf new file mode 100644 index 0000000..dd56fe4 --- /dev/null +++ b/gsignond.conf @@ -0,0 +1,55 @@ +# +# Example configuration for gsignond. +# + +# +# This group contains top-level settings. +# +[General] + +# Directory for binary executables. +#BinDir = +# +# Define extension / platform adaptation module to use. +# 'default' is a dummy one with no encrypted storage, but with basic Unix +# discretionary access control. +#Extension = default +# +# Extension directory where extension modules are located. +#ExtensionsDir = +# +# Base path where user specific database directories will be located. +# Default: /var/db +#StoragePath = +# +# Location for authentication plugins. +#PluginDir = +# +# Timeout for unloading cached plugin instances. +#PluginTimeout = 0 + +# +# Database related settings. +# +[Storage] + +# File name for the metadata database. (excluding path) +#MetadataDBFilename = metadata.db +# +# File name for the credential database. (excluding path) +#SecretDBFilename = secret.db + +# +# D-Bus related settings. +# +[ObjectTimeouts] + +# Timeout for the daemon. Daemon will exit after specified idle time. +#DaemonTimeout = 0 +# +# Timeout for the identity objects. +IdentityTimeout = 5 +# +# Timeout for the authentication session objects. +AuthSessionTimeout = 5 + diff --git a/gtk-doc.make b/gtk-doc.make new file mode 100644 index 0000000..ac30c4c --- /dev/null +++ b/gtk-doc.make @@ -0,0 +1,302 @@ +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### + +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = $(LIBTOOL) --mode=execute +else +GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = +endif + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) + +SETUP_FILES = \ + $(content_files) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + +EXTRA_DIST = \ + $(HTML_IMAGES) \ + $(SETUP_FILES) + +DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ + html-build.stamp pdf-build.stamp \ + tmpl.stamp sgml.stamp html.stamp pdf.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +REPORT_FILES = \ + $(DOC_MODULE)-undocumented.txt \ + $(DOC_MODULE)-undeclared.txt \ + $(DOC_MODULE)-unused.txt + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) + +if ENABLE_GTK_DOC +if GTK_DOC_BUILD_HTML +HTML_BUILD_STAMP=html-build.stamp +else +HTML_BUILD_STAMP= +endif +if GTK_DOC_BUILD_PDF +PDF_BUILD_STAMP=pdf-build.stamp +else +PDF_BUILD_STAMP= +endif + +all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +else +all-local: +endif + +docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) + +$(REPORT_FILES): sgml-build.stamp + +#### setup #### + +GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) +GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; + +setup-build.stamp: + -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + test -f $(abs_srcdir)/$$file && \ + cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + done; \ + fi; \ + test -d $(abs_srcdir)/tmpl && \ + { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ + chmod -R u+w $(abs_builddir)/tmpl; } \ + fi + $(AM_V_at)touch setup-build.stamp + +#### scan #### + +GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) +GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; + +GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) +GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; + +scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) + $(GTK_DOC_V_SCAN)_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) + $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ + fi; \ + fi; \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ + gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ + else \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + $(AM_V_at)touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp + @true + +#### templates #### + +GTK_DOC_V_TMPL=$(GTK_DOC_V_TMPL_$(V)) +GTK_DOC_V_TMPL_=$(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_TMPL_0=@echo " DOC Rebuilding template files"; + +tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + if test -w $(abs_srcdir) ; then \ + cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ + fi \ + fi + $(AM_V_at)touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +$(srcdir)/tmpl/*.sgml: + @true + +#### xml #### + +GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) +GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XML_0=@echo " DOC Building XML"; + +sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) + -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) + $(AM_V_at)touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +#### html #### + +GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) +GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; + +GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) +GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ + mkhtml_options=""; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkhtml_options="$$mkhtml_options --verbose"; \ + fi; \ + fi; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ + if test "$(?)" = "0"; then \ + mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ + fi; \ + cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + -@test "x$(HTML_IMAGES)" = "x" || \ + for file in $(HTML_IMAGES) ; do \ + if test -f $(abs_srcdir)/$$file ; then \ + cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + fi; \ + if test -f $(abs_builddir)/$$file ; then \ + cp $(abs_builddir)/$$file $(abs_builddir)/html; \ + fi; \ + done; + $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + $(AM_V_at)touch html-build.stamp + +#### pdf #### + +GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) +GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; + +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ + mkpdf_options=""; \ + gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkpdf_options="$$mkpdf_options --verbose"; \ + fi; \ + fi; \ + if test "x$(HTML_IMAGES)" != "x"; then \ + for img in $(HTML_IMAGES); do \ + part=`dirname $$img`; \ + echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ + if test $$? != 0; then \ + mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ + fi; \ + done; \ + fi; \ + gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + $(AM_V_at)touch pdf-build.stamp + +############## + +clean-local: + @rm -f *~ *.bak + @rm -rf .libs + +distclean-local: + @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ + rm -rf tmpl; \ + fi + +maintainer-clean-local: + @rm -rf xml html + +install-data-local: + @installfiles=`echo $(builddir)/html/*`; \ + if test "$$installfiles" = '$(builddir)/html/*'; \ + then echo 1>&2 'Nothing to install' ; \ + else \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + $(mkinstalldirs) $${installdir} ; \ + for i in $$installfiles; do \ + echo ' $(INSTALL_DATA) '$$i ; \ + $(INSTALL_DATA) $$i $${installdir}; \ + done; \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ + fi; \ + $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ + fi + +uninstall-local: + @if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + rm -rf $${installdir} + +# +# Require gtk-doc when making dist +# +if ENABLE_GTK_DOC +dist-check-gtkdoc: docs +else +dist-check-gtkdoc: + @echo "*** gtk-doc must be installed and enabled in order to make dist" + @false +endif + +dist-hook: dist-check-gtkdoc dist-hook-local + @mkdir $(distdir)/tmpl + @mkdir $(distdir)/html + @-cp ./tmpl/*.sgml $(distdir)/tmpl + @cp ./html/* $(distdir)/html + @-cp ./$(DOC_MODULE).pdf $(distdir)/ + @-cp ./$(DOC_MODULE).types $(distdir)/ + @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ + @cd $(distdir) && rm -f $(DISTCLEANFILES) + @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + +.PHONY : dist-hook-local docs diff --git a/include/gsignond/gsignond-access-control-manager.h b/include/gsignond/gsignond-access-control-manager.h index 54116b3..c79a0f2 100644 --- a/include/gsignond/gsignond-access-control-manager.h +++ b/include/gsignond/gsignond-access-control-manager.h @@ -69,49 +69,24 @@ struct _GSignondAccessControlManagerClass { GObjectClass parent_class; - /** - * security_context_of_peer: - * - * See #gsignond_access_control_manager_security_context_of_peer. - */ void (*security_context_of_peer) ( GSignondAccessControlManager *self, GSignondSecurityContext *peer_ctx, int peer_fd, const gchar *peer_service, const gchar *peer_app_ctx); - /** - * peer_is_allowed_to_use_identity: - * - * See #gsignond_access_control_manager_peer_is_allowed_to_use_identity. - */ gboolean (*peer_is_allowed_to_use_identity) ( GSignondAccessControlManager *self, const GSignondSecurityContext *peer_ctx, const GSignondSecurityContext *owner_ctx, const GSignondSecurityContextList *identity_acl); - /** - * peer_is_owner_of_identity: - * - * See #gsignond_access_control_manager_peer_is_owner_of_identity. - */ gboolean (*peer_is_owner_of_identity) ( GSignondAccessControlManager *self, const GSignondSecurityContext *peer_ctx, const GSignondSecurityContext *owner_ctx); - /** - * acl_is_valid: - * - * See #gsignond_access_control_manager_acl_is_valid. - */ gboolean (*acl_is_valid) ( GSignondAccessControlManager *self, const GSignondSecurityContext *peer_ctx, const GSignondSecurityContextList *identity_acl); - /** - * security_context_of_keychain: - * - * See #gsignond_access_control_manager_security_context_of_keychain. - */ GSignondSecurityContext * (*security_context_of_keychain) ( GSignondAccessControlManager *self); }; diff --git a/include/gsignond/gsignond-config-db.h b/include/gsignond/gsignond-config-db.h index 28ae6b9..555a711 100644 --- a/include/gsignond/gsignond-config-db.h +++ b/include/gsignond/gsignond-config-db.h @@ -26,9 +26,37 @@ #ifndef __GSIGNOND_CONFIG_DB_H_ #define __GSIGNOND_CONFIG_DB_H_ +/** + * SECTION:gsignond-config-db + * @title: Database configuration + * @short_description: gSSO database configuration keys + * @include: gsignond/gsignond-config.h + * + * Database configuration keys are defined below. See #GSignondConfig for how to use them. + */ + +/** + * GSIGNOND_CONFIG_DB_SSO: + * + * A prefix for database keys. Should be used only when defining new keys. + */ #define GSIGNOND_CONFIG_DB_SSO "Storage" +/** + * GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME: + * + * The filename of the credentials database. + * + * Default value: "secret.db". + */ #define GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME GSIGNOND_CONFIG_DB_SSO \ "/SecretDBFilename" +/** + * GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME: + * + * The filename of the metadata database. + * + * Default value: "metadata.db". + */ #define GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME GSIGNOND_CONFIG_DB_SSO \ "/MetadataDBFilename" diff --git a/include/gsignond/gsignond-config-dbus.h b/include/gsignond/gsignond-config-dbus.h index 2423b4d..a9cc13c 100644 --- a/include/gsignond/gsignond-config-dbus.h +++ b/include/gsignond/gsignond-config-dbus.h @@ -26,12 +26,52 @@ #ifndef __GSIGNOND_CONFIG_DBUS_H_ #define __GSIGNOND_CONFIG_DBUS_H_ -#define GSIGNOND_CONFIG_DBUS_TIMEOUTS "ObjectTimeouts" +/** + * SECTION:gsignond-config-dbus + * @title: DBus configuration + * @short_description: gSSO dbus configuration keys + * @include: gsignond/gsignond-config.h + * + * DBus configuration keys are defined below. See #GSignondConfig for how to use them. + */ +/** + * GSIGNOND_CONFIG_DBUS_TIMEOUTS: + * + * A prefix for dbus timeout keys. Should be used only when defining new keys. + */ +#define GSIGNOND_CONFIG_DBUS_TIMEOUTS "ObjectTimeouts" +/** + * GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT: + * + * A timeout in seconds, after which the gSSO daemon will exit. If not set, + * the daemon will not exit. Has no effect if P2P DBus is in use. + * + * Can be overriden in debug + * builds by setting SSO_DAEMON_TIMEOUT environment variable. + */ #define GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT GSIGNOND_CONFIG_DBUS_TIMEOUTS \ "/DaemonTimeout" +/** + * GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT: + * + * A timeout in seconds, after which inactive identity dbus objects will be removed. + * If not set, the dbus objects will persist. + * + * Can be overriden in debug + * builds by setting SSO_IDENTITY_TIMEOUT environment variable. + */ #define GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT GSIGNOND_CONFIG_DBUS_TIMEOUTS \ "/IdentityTimeout" +/** + * GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT: + * + * A timeout in seconds, after which inactive authentication session dbus objects will be removed. + * If not set, the dbus objects will persist. + * + * Can be overriden in debug + * builds by setting SSO_AUTH_SESSION_TIMEOUT environment variable. + */ #define GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT GSIGNOND_CONFIG_DBUS_TIMEOUTS \ "/AuthSessionTimeout" #endif /* __GSIGNOND_CONFIG_DBUS_H_ */ diff --git a/include/gsignond/gsignond-config-general.h b/include/gsignond/gsignond-config-general.h index 31419cd..7538c6a 100644 --- a/include/gsignond/gsignond-config-general.h +++ b/include/gsignond/gsignond-config-general.h @@ -26,19 +26,94 @@ #ifndef __GSIGNOND_CONFIG_GENERAL_H_ #define __GSIGNOND_CONFIG_GENERAL_H_ +/** + * SECTION:gsignond-config-general + * @title: General configuration + * @short_description: gSSO general configuration keys + * @include: gsignond/gsignond-config.h + * + * General configuration keys are defined below. See #GSignondConfig for how to use them. + */ + +/** + * GSIGNOND_CONFIG_GENERAL: + * + * A prefix for general keys. Should be used only when defining new keys. + */ #define GSIGNOND_CONFIG_GENERAL "General" +/** + * GSIGNOND_CONFIG_GENERAL_STORAGE_PATH: + * + * Base path for #GSignondStorageManager to operate in. + * + * Default value: "/var/db", can be overriden in debug + * builds by setting SSO_STORAGE_PATH environment variable. + */ #define GSIGNOND_CONFIG_GENERAL_STORAGE_PATH GSIGNOND_CONFIG_GENERAL \ "/StoragePath" +/** + * GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR: + * + * The path where gSSO is looking for available extension modules. + * + * Default value: $(pkglibdir)/extensions, can be overriden in debug + * builds by setting SSO_EXTENSIONS_DIR environment variable. + */ #define GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR GSIGNOND_CONFIG_GENERAL \ "/ExtensionsDir" +/** + * GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR: + * + * The path where gSSO is looking for available plugins. + * + * Default value: $(pkglibdir)/plugins, can be overriden in debug + * builds by setting SSO_PLUGINS_DIR environment variable. + */ #define GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR GSIGNOND_CONFIG_GENERAL \ "/PluginsDir" +/** + * GSIGNOND_CONFIG_GENERAL_BIN_DIR: + * + * The path where gSSO is looking for the gsignond-plugind binary when it needs + * to start a plugin process. Can be used for finding other supplementary binaries in + * the future. + * + * Default value: $(bindir), can be overriden in debug + * builds by setting SSO_BIN_DIR environment variable. + */ #define GSIGNOND_CONFIG_GENERAL_BIN_DIR GSIGNOND_CONFIG_GENERAL \ "/BinDir" +/** + * GSIGNOND_CONFIG_GENERAL_EXTENSION: + * + * The name of the gSSO extension to use. If not specified, the default + * implementation is used (see #GSignondExtension). + * + * Can be overriden in debug + * builds by setting SSO_EXTENSION environment variable. + */ #define GSIGNOND_CONFIG_GENERAL_EXTENSION GSIGNOND_CONFIG_GENERAL \ "/Extension" +/** + * GSIGNOND_CONFIG_GENERAL_SECURE_DIR: + * + * Path provided by #GSignondStorageManager for storing user-specific + * information, including secret and metadata databases. + * + * Value provided by the default implementation: + * #GSIGNOND_CONFIG_GENERAL_STORAGE_PATH + "/gsignond." + g_get_user_name(). + */ #define GSIGNOND_CONFIG_GENERAL_SECURE_DIR GSIGNOND_CONFIG_GENERAL \ "/SecureDir" +/** + * GSIGNOND_CONFIG_PLUGIN_TIMEOUT: + * + * A timeout in seconds, after which inactive plugin objects and processes are removed. + * If not set, the plugin objects will persist for possible reuse. + * + * Can be overriden in debug + * builds by setting SSO_PLUGIN_TIMEOUT environment variable. + */ #define GSIGNOND_CONFIG_PLUGIN_TIMEOUT GSIGNOND_CONFIG_GENERAL \ "/PluginTimeout" diff --git a/include/gsignond/gsignond-config.h b/include/gsignond/gsignond-config.h index 2b779f6..edcdaa4 100644 --- a/include/gsignond/gsignond-config.h +++ b/include/gsignond/gsignond-config.h @@ -56,6 +56,7 @@ struct _GSignondConfig struct _GSignondConfigClass { + /*< private >*/ GObjectClass parent_class; }; @@ -64,16 +65,16 @@ GType gsignond_config_get_type (void) G_GNUC_CONST; GSignondConfig * gsignond_config_new (); gint -gsignond_config_get_integer (GSignondConfig *config, const gchar *key); +gsignond_config_get_integer (GSignondConfig *self, const gchar *key); void -gsignond_config_set_integer (GSignondConfig *config, const gchar *key, +gsignond_config_set_integer (GSignondConfig *self, const gchar *key, gint value) ; const gchar* -gsignond_config_get_string (GSignondConfig *config, const gchar *key); +gsignond_config_get_string (GSignondConfig *self, const gchar *key); void -gsignond_config_set_string (GSignondConfig *config, const gchar *key, +gsignond_config_set_string (GSignondConfig *self, const gchar *key, const gchar *value); G_END_DECLS diff --git a/include/gsignond/gsignond-credentials.h b/include/gsignond/gsignond-credentials.h index 1bd009e..634845c 100644 --- a/include/gsignond/gsignond-credentials.h +++ b/include/gsignond/gsignond-credentials.h @@ -60,6 +60,7 @@ typedef struct { } GSignondCredentials; typedef struct { + /*< private >*/ GObjectClass parent_class; } GSignondCredentialsClass; diff --git a/include/gsignond/gsignond-dictionary.h b/include/gsignond/gsignond-dictionary.h index e5f951b..d34944f 100644 --- a/include/gsignond/gsignond-dictionary.h +++ b/include/gsignond/gsignond-dictionary.h @@ -41,13 +41,10 @@ G_BEGIN_DECLS typedef GHashTable GSignondDictionary; -GType -gsignond_dictionary_get_type (void); - GSignondDictionary * gsignond_dictionary_new (void); -void +GSignondDictionary * gsignond_dictionary_ref (GSignondDictionary *dict); void @@ -60,7 +57,7 @@ GSignondDictionary * gsignond_dictionary_new_from_variant (GVariant *variant); GVariant * -gsignond_dictionary_to_variant (GSignondDictionary *self); +gsignond_dictionary_to_variant (GSignondDictionary *dict); GVariant * gsignond_dictionary_get (GSignondDictionary *dict, const gchar *key); diff --git a/include/gsignond/gsignond-error.h b/include/gsignond/gsignond-error.h index aa94b29..41f0f61 100644 --- a/include/gsignond/gsignond-error.h +++ b/include/gsignond/gsignond-error.h @@ -31,92 +31,60 @@ G_BEGIN_DECLS -#define GSIGNOND_ERROR_DOMAIN "gsignond" - -/** - * GSIGNOND_ERROR: - * - */ #define GSIGNOND_ERROR (gsignond_error_quark()) typedef enum { GSIGNOND_ERROR_NONE, - GSIGNOND_ERROR_UNKNOWN = 1, /**< Catch-all for errors not distinguished by another code. */ - GSIGNOND_ERROR_INTERNAL_SERVER = 2, /**< Signon Daemon internal error. */ - GSIGNOND_ERROR_INTERNAL_COMMUNICATION = 3, /**< Communication with Signon Daemon error. */ - GSIGNOND_ERROR_PERMISSION_DENIED = 4, /**< The operation cannot be performed due to insufficient client permissions. */ - GSIGNOND_ERROR_ENCRYPTION_FAILURE, /**< Failure during data encryption/decryption. */ + GSIGNOND_ERROR_UNKNOWN = 1, + GSIGNOND_ERROR_INTERNAL_SERVER = 2, + GSIGNOND_ERROR_INTERNAL_COMMUNICATION = 3, + GSIGNOND_ERROR_PERMISSION_DENIED = 4, + GSIGNOND_ERROR_ENCRYPTION_FAILURE, GSIGNOND_ERROR_AUTH_SERVICE_ERR = 100, /* Placeholder to rearrange enumeration - AuthService specific */ - GSIGNOND_ERROR_METHOD_NOT_KNOWN, /**< The method with this name is not found. */ - GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE, /**< The service is temporarily unavailable. */ - GSIGNOND_ERROR_INVALID_QUERY, /**< Parameters for the query are invalid. */ + GSIGNOND_ERROR_METHOD_NOT_KNOWN, + GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE, + GSIGNOND_ERROR_INVALID_QUERY, GSIGNOND_ERROR_IDENTITY_ERR = 200, /* Placeholder to rearrange enumeration - Identity specific */ - GSIGNOND_ERROR_METHOD_NOT_AVAILABLE, /**< The requested method is not available. */ - GSIGNOND_ERROR_IDENTITY_NOT_FOUND, /**< The identity matching this Identity object was not found on the service. */ - GSIGNOND_ERROR_STORE_FAILED, /**< Storing credentials failed. */ - GSIGNOND_ERROR_REMOVE_FAILED, /**< Removing credentials failed. */ - GSIGNOND_ERROR_SIGN_OUT_FAILED, /**< SignOut failed. */ - GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, /**< Identity operation was canceled by user. */ - GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE, /**< Query failed. */ - GSIGNOND_ERROR_REFERENCE_NOT_FOUND, /**< Trying to remove nonexistent reference. */ + GSIGNOND_ERROR_METHOD_NOT_AVAILABLE, + GSIGNOND_ERROR_IDENTITY_NOT_FOUND, + GSIGNOND_ERROR_STORE_FAILED, + GSIGNOND_ERROR_REMOVE_FAILED, + GSIGNOND_ERROR_SIGN_OUT_FAILED, + GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, + GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE, + GSIGNOND_ERROR_REFERENCE_NOT_FOUND, GSIGNOND_ERROR_AUTH_SESSION_ERR = 300, /* Placeholder to rearrange enumeration - AuthSession/PluginInterface specific */ - GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE, /**< The requested mechanism is not available. */ - GSIGNOND_ERROR_MISSING_DATA, /**< The SessionData object does not contain necessary information. */ - GSIGNOND_ERROR_INVALID_CREDENTIALS, /**< The supplied credentials are invalid for the mechanism implementation. */ - GSIGNOND_ERROR_NOT_AUTHORIZED, /**< Authorization failed. */ - GSIGNOND_ERROR_WRONG_STATE, /**< An operation method has been called in a wrong state. */ - GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED, /**< The operation is not supported by the mechanism implementation. */ - GSIGNOND_ERROR_NO_CONNECTION, /**< No Network connetion. */ - GSIGNOND_ERROR_NETWORK, /**< Network connetion failed. */ - GSIGNOND_ERROR_SSL, /**< Ssl connection failed. */ - GSIGNOND_ERROR_RUNTIME, /**< Casting SessionData into subclass failed */ - GSIGNOND_ERROR_SESSION_CANCELED, /**< Challenge was cancelled. */ - GSIGNOND_ERROR_TIMED_OUT, /**< Challenge was timed out. */ - GSIGNOND_ERROR_USER_INTERACTION, /**< User interaction dialog failed */ - GSIGNOND_ERROR_OPERATION_FAILED, /**< Temporary failure in authentication. */ - GSIGNOND_ERROR_ENCRYPTION_FAILED, /**< @deprecated Failure during data encryption/decryption. */ - GSIGNOND_ERROR_TOS_NOT_ACCEPTED, /**< User declined Terms of Service. */ - GSIGNOND_ERROR_FORGOT_PASSWORD, /**< User requested reset password sequence. */ - GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED, /**< Method or mechanism not allowed for this identity. */ - GSIGNOND_ERROR_INCORRECT_DATE, /**< Date time incorrect on device. */ - - GSIGNOND_ERROR_USER_ERR = 400 /* Placeholder to rearrange enumeration - User space specific */ + GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE, + GSIGNOND_ERROR_MISSING_DATA, + GSIGNOND_ERROR_INVALID_CREDENTIALS, + GSIGNOND_ERROR_NOT_AUTHORIZED, + GSIGNOND_ERROR_WRONG_STATE, + GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED, + GSIGNOND_ERROR_NO_CONNECTION, + GSIGNOND_ERROR_NETWORK, + GSIGNOND_ERROR_SSL, + GSIGNOND_ERROR_RUNTIME, + GSIGNOND_ERROR_SESSION_CANCELED, + GSIGNOND_ERROR_TIMED_OUT, + GSIGNOND_ERROR_USER_INTERACTION, + GSIGNOND_ERROR_OPERATION_FAILED, + GSIGNOND_ERROR_ENCRYPTION_FAILED, + GSIGNOND_ERROR_TOS_NOT_ACCEPTED, + GSIGNOND_ERROR_FORGOT_PASSWORD, + GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED, + GSIGNOND_ERROR_INCORRECT_DATE, + + GSIGNOND_ERROR_USER_ERR = 400 } GSignondError; -#define gsignond_gerr(error, handler) \ - G_STMT_START { \ - GString* msg = gsignond_prepend_domain_to_error_msg(error); \ - handler(msg->str); \ - g_string_free(msg, TRUE); \ - } G_STMT_END\ - -#define gsignond_error_gerr(err) gsignond_gerr(err, g_error) - -#define gsignond_critical_gerr(err) gsignond_gerr(err, g_critical) - -#define gsignond_warning_gerr(err) gsignond_gerr(err, g_warning) - -#define gsignond_message_gerr(err) gsignond_gerr(err, g_message) - -#define gsignond_debug_gerr(err) gsignond_gerr(err, g_debug) - GQuark gsignond_error_quark (void); -GString* -gsignond_concat_domain_and_error ( - const gchar *str1, - const gchar *str2); - -GString* -gsignond_prepend_domain_to_error_msg ( - const GError *err); - GError * gsignond_error_new_from_variant ( GVariant *var); diff --git a/include/gsignond/gsignond-extension-interface.h b/include/gsignond/gsignond-extension-interface.h index 1299093..07a0279 100644 --- a/include/gsignond/gsignond-extension-interface.h +++ b/include/gsignond/gsignond-extension-interface.h @@ -54,7 +54,6 @@ G_BEGIN_DECLS typedef struct _GSignondExtension GSignondExtension; typedef struct _GSignondExtensionClass GSignondExtensionClass; typedef struct _GSignondExtensionPrivate GSignondExtensionPrivate; -typedef GSignondExtension * (*GSignondExtensionInit) (void); struct _GSignondExtension { @@ -66,54 +65,16 @@ struct _GSignondExtensionClass { GObjectClass parent_class; - /** - * get_extension_name: - * @self: object instance. - * - * Get human readable name of the extension. - * - * Returns: (transfer none) name of the extension. - */ const gchar * (*get_extension_name) (GSignondExtension *self); - /** - * get_extension_version: - * @self: object instance. - * - * Get version of the extension, split into four bytes in order from MSB - * to LSB; major, minor, patchlevel, build. - */ + guint32 (*get_extension_version) (GSignondExtension *self); - /** - * get_storage_manager: - * @self: object instance. - * @config: configuration object instance. - * - * Factory method to get a singleton storage manager object. - * - * Returns: storage manager object instance. - */ + GSignondStorageManager * (*get_storage_manager) (GSignondExtension *self, GSignondConfig *config); - /** - * get_secret_storage: - * @self: object instance. - * @config: configuration object instance. - * - * Factory method to get a singleton secret storage object. - * - * Returns: secret storage object instance. - */ + GSignondSecretStorage * (*get_secret_storage) (GSignondExtension *self, GSignondConfig *config); - /** - * get_access_control_manager: - * @self: object instance. - * @config: configuration object instance. - * - * Factory method to get a singleton access control manager object. - * - * Returns: access control manager object instance. - */ + GSignondAccessControlManager * (*get_access_control_manager) ( GSignondExtension *self, GSignondConfig *config); @@ -139,9 +100,6 @@ GSignondAccessControlManager * gsignond_extension_get_access_control_manager (GSignondExtension *self, GSignondConfig *config); -GSignondExtension * -default_extension_init (); - G_END_DECLS #endif /* _GSIGNOND_EXTENSION_INTERFACE_H_ */ diff --git a/include/gsignond/gsignond-log.h b/include/gsignond/gsignond-log.h index f1bac1f..65af19f 100644 --- a/include/gsignond/gsignond-log.h +++ b/include/gsignond/gsignond-log.h @@ -31,6 +31,24 @@ #include #include +/** + * SECTION:gsignond-log + * @short_description: logging facilities + * @title: Logging + * @include: gsignond/gsignond-log.h + * + * gsignond/gsignond-log.h file contains logging macros + * that plugins and extensions should use for debugging and tracing. + * + * For example: + * |[ INFO("Plugin %s initialized", plugin_mechanism); ]| + */ + +/** + * TRACEBACK: + * + * This macro prints the current function call stack to stderr. + */ #define TRACEBACK() \ { \ void *array[256];\ @@ -46,15 +64,49 @@ }\ } +/** + * INFO: + * @frmt: format string for the message + * @...: arguments for the format string + * + * Use this macro to log informational messages. GSignond will take care of + * correctly saving them. + */ #define INFO(frmt, args...) g_message("%f %s:%d %s " frmt , \ g_get_monotonic_time()*1.0e-6, __FILE__, __LINE__, \ __PRETTY_FUNCTION__, ##args) + +/** + * ERR: + * @frmt: format string for the message + * @...: arguments for the format string + * + * Use this macro to log error messages. GSignond will take care of + * correctly saving them. + */ #define ERR(frmt, args...) g_critical("%f %s:%d %s " frmt , \ g_get_monotonic_time()*1.0e-6, __FILE__, __LINE__, \ __PRETTY_FUNCTION__, ##args) + +/** + * WARN: + * @frmt: format string for the message + * @...: arguments for the format string + * + * Use this macro to log warning messages. GSignond will take care of + * correctly saving them. + */ #define WARN(frmt, args...) g_warning("%f %s:%d %s " frmt , \ g_get_monotonic_time()*1.0e-6, __FILE__, __LINE__, \ __PRETTY_FUNCTION__, ##args) +/** + * DBG: + * @frmt: format string for the message + * @...: arguments for the format string + * + * Use this macro to log debug messages. GSignond will take care of + * correctly saving them. + */ #define DBG(frmt, args...) g_debug("%f %s:%d %s " frmt , \ g_get_monotonic_time()*1.0e-6, __FILE__, __LINE__, \ __PRETTY_FUNCTION__, ##args) diff --git a/include/gsignond/gsignond-plugin-interface.h b/include/gsignond/gsignond-plugin-interface.h index 29bcdf2..82c7762 100644 --- a/include/gsignond/gsignond-plugin-interface.h +++ b/include/gsignond/gsignond-plugin-interface.h @@ -41,22 +41,6 @@ G_BEGIN_DECLS typedef struct _GSignondPlugin GSignondPlugin; /* dummy object */ typedef struct _GSignondPluginInterface GSignondPluginInterface; -/** - * GSignondPluginState: - * @GSIGNOND_PLUGIN_STATE_NONE: State unknown - * @SIGNOND_PLUGIN_STATE_RESOLVING: Resolving remote server host name - * @GSIGNOND_PLUGIN_STATE_CONNECTING: Connecting to remote server - * @GSIGNOND_PLUGIN_STATE_SENDING_DATA: Sending data to remote server - * @GSIGNOND_PLUGIN_STATE_WAITING: Waiting for reply from remote server - * @GSIGNOND_PLUGIN_STATE_USER_PENDING: Waiting for response from user - * @GSIGNOND_PLUGIN_STATE_REFRESHING: Refreshing ui request - * @GSIGNOND_PLUGIN_STATE_PROCESS_PENDING: Request has been queued - * @GSIGNOND_PLUGIN_STATE_STARTED: Request has been dequeued - * @GSIGNOND_PLUGIN_STATE_CANCELING: Canceling current process - * @GSIGNOND_PLUGIN_STATE_DONE: Process is finished - * @GSIGNOND_PLUGIN_STATE_HOLDING: Holding long non-expired token - * @GSIGNOND_PLUGIN_STATE_CUSTOM: Custom message - */ typedef enum { GSIGNOND_PLUGIN_STATE_NONE = 0, GSIGNOND_PLUGIN_STATE_RESOLVING, @@ -70,15 +54,15 @@ typedef enum { GSIGNOND_PLUGIN_STATE_CANCELING, GSIGNOND_PLUGIN_STATE_DONE, GSIGNOND_PLUGIN_STATE_HOLDING, -} PluginState; -typedef PluginState GSignondPluginState; +} GSignondPluginState; struct _GSignondPluginInterface { GTypeInterface parent; void (*cancel) (GSignondPlugin *self); void (*request_initial) (GSignondPlugin *self, - GSignondSessionData *session_data, + GSignondSessionData *session_data, + GSignondDictionary *identity_method_cache, const gchar *mechanism); void (*request) (GSignondPlugin *self, GSignondSessionData *session_data); @@ -96,6 +80,7 @@ gsignond_plugin_cancel (GSignondPlugin *self); void gsignond_plugin_request_initial (GSignondPlugin *self, GSignondSessionData *session_data, + GSignondDictionary *identity_method_cache, const gchar *mechanism); void gsignond_plugin_request (GSignondPlugin *self, @@ -116,7 +101,7 @@ gsignond_plugin_response_final (GSignondPlugin *self, GSignondSessionData *session_data); void gsignond_plugin_store (GSignondPlugin *self, - GSignondDictionary *token_data); + GSignondDictionary *identity_method_cache); void gsignond_plugin_error (GSignondPlugin *self, GError *error); void diff --git a/include/gsignond/gsignond-secret-storage.h b/include/gsignond/gsignond-secret-storage.h index f424b8f..dc9cbab 100644 --- a/include/gsignond/gsignond-secret-storage.h +++ b/include/gsignond/gsignond-secret-storage.h @@ -31,6 +31,7 @@ #include #include +#include G_BEGIN_DECLS @@ -69,113 +70,59 @@ typedef struct { typedef struct { GObjectClass parent_class; - /** - * open_db: - * - * See #gsignond_secret_storage_open_db. - */ gboolean (*open_db) (GSignondSecretStorage *self); - /** - * close_db: - * - * See #gsignond_secret_storage_close_db. - */ gboolean (*close_db) (GSignondSecretStorage *self); - /** - * clear_db: - * - * See #gsignond_secret_storage_clear_db. - */ gboolean (*clear_db) (GSignondSecretStorage *self); - /** - * is_open_db: - * - * See #gsignond_secret_storage_is_open_db. - */ gboolean (*is_open_db) (GSignondSecretStorage *self); - /** - * load_credentials: - * - * See #gsignond_secret_storage_load_credentials. - */ GSignondCredentials* (*load_credentials) ( GSignondSecretStorage *self, const guint32 id); - /** - * update_credentials: - * - * See #gsignond_secret_storage_update_credentials. - */ gboolean (*update_credentials) ( GSignondSecretStorage *self, GSignondCredentials* creds); - /** - * remove_credentials: - * - * See #gsignond_secret_storage_remove_credentials. - */ gboolean (*remove_credentials) ( GSignondSecretStorage *self, const guint32 id); - /** - * check_credentials: - * - * See #gsignond_secret_storage_check_credentials. - */ gboolean (*check_credentials) ( GSignondSecretStorage *self, GSignondCredentials* creds); - /** - * load_data: - * - * See #gsignond_secret_storage_load_data. - * - */ - GHashTable* + GSignondDictionary* (*load_data) ( GSignondSecretStorage *self, const guint32 id, const guint32 method); - /** - * update_data: - * - * See #gsignond_secret_storage_update_data. - */ gboolean (*update_data) ( GSignondSecretStorage *self, const guint32 id, const guint32 method, - GHashTable *data); + GSignondDictionary *data); - /** - * remove_data: - * - * See #gsignond_secret_storage_remove_data. - */ gboolean (*remove_data) ( GSignondSecretStorage *self, const guint32 id, const guint32 method); + const GError* + (*get_last_error) (GSignondSecretStorage *self); } GSignondSecretStorageClass; /* used by GSIGNOND_TYPE_SECRET_STORAGE */ @@ -233,17 +180,9 @@ gsignond_secret_storage_remove_data ( const guint32 id, const guint32 method); -void -gsignond_secret_storage_set_last_error (GSignondSecretStorage *self, - GError *error); - const GError* gsignond_secret_storage_get_last_error (GSignondSecretStorage *self); -void -gsignond_secret_storage_clear_last_error (GSignondSecretStorage *self); - - G_END_DECLS #endif /* __GSIGNOND_SECRET_STORAGE_H__ */ diff --git a/include/gsignond/gsignond-security-context.h b/include/gsignond/gsignond-security-context.h index 828082f..c5db7bb 100644 --- a/include/gsignond/gsignond-security-context.h +++ b/include/gsignond/gsignond-security-context.h @@ -30,24 +30,12 @@ G_BEGIN_DECLS -/** - * Security context descriptor. - * - * Practically a string tuple. - * - * @sys_ctx: system context, such as SMACK-label, MSSF token or just a - * binary path. - * @app_ctx: application context, such as a script or a web page. - */ -typedef struct _GSignondSecurityContext -{ +typedef struct _GSignondSecurityContext { gchar *sys_ctx; gchar *app_ctx; } GSignondSecurityContext; -/** - * GList of #GSignondSecurityContext items. - */ + typedef GList GSignondSecurityContextList; GSignondSecurityContext * diff --git a/include/gsignond/gsignond-session-data.h b/include/gsignond/gsignond-session-data.h index 846df47..4ca4865 100644 --- a/include/gsignond/gsignond-session-data.h +++ b/include/gsignond/gsignond-session-data.h @@ -88,11 +88,11 @@ gsignond_session_data_set_renew_token (GSignondSessionData *data, gboolean gsignond_session_data_get_ui_policy (GSignondSessionData *data, - guint32 *ui_policy); + GSignondUiPolicy *ui_policy); void gsignond_session_data_set_ui_policy (GSignondSessionData *data, - guint32 ui_policy); + GSignondUiPolicy ui_policy); const gchar * gsignond_session_data_get_network_proxy (GSignondSessionData *data); diff --git a/include/gsignond/gsignond-signonui-data.h b/include/gsignond/gsignond-signonui-data.h index e6fc74d..5846914 100644 --- a/include/gsignond/gsignond-signonui-data.h +++ b/include/gsignond/gsignond-signonui-data.h @@ -27,7 +27,6 @@ #define __GSIGNOND_SIGNONUI_DATA_H__ #include -#include G_BEGIN_DECLS @@ -41,15 +40,20 @@ G_BEGIN_DECLS typedef GSignondDictionary GSignondSignonuiData; -#define gsignond_signonui_data_new() gsignond_dictionary_new() - -#define gsignond_signonui_data_new_from_variant(variantmap) gsignond_dictionary_new_from_variant(variantmap) - -#define gsignond_signonui_data_to_variant(data) gsignond_dictionary_to_variant (data) - -#define gsignond_signonui_data_ref(data) /*gsignond_dictionary_ref*/g_hash_table_ref (data) - -#define gsignond_signonui_data_unref(data) /*gsignond_dictionary_unref*/g_hash_table_unref (data); +typedef enum { + SIGNONUI_ERROR_NONE = 0, + SIGNONUI_ERROR_GENERAL, + SIGNONUI_ERROR_NO_SIGNONUI, + SIGNONUI_ERROR_BAD_PARAMETERS, + SIGNONUI_ERROR_CANCELED, + SIGNONUI_ERROR_NOT_AVAILABLE, + SIGNONUI_ERROR_BAD_URL, + SIGNONUI_ERROR_BAD_CAPTCHA, + SIGNONUI_ERROR_BAD_CAPTCHA_URL, + SIGNONUI_ERROR_REFRESH_FAILED, + SIGNONUI_ERROR_FORBIDDEN, + SIGNONUI_ERROR_FORGOT_PASSWORD +} GSignondSignonuiError; const gchar* gsignond_signonui_data_get_captcha_response (GSignondSignonuiData *data); @@ -77,12 +81,11 @@ gsignond_signonui_data_get_final_url (GSignondSignonuiData *data); void gsignond_signonui_data_set_final_url (GSignondSignonuiData *data, const gchar *url); -gboolean -gsignond_signonui_data_get_forgot_password (GSignondSignonuiData *data, - gboolean *forgot_password); +const gchar* +gsignond_signonui_data_get_forgot_password (GSignondSignonuiData *data); void gsignond_signonui_data_set_forgot_password (GSignondSignonuiData *data, - gboolean forgot); + const gchar *forgot); const gchar* gsignond_signonui_data_get_forgot_password_url (GSignondSignonuiData *data); void @@ -123,7 +126,7 @@ gsignond_signonui_data_set_query_username (GSignondSignonuiData *data, gboolean query); gboolean gsignond_signonui_data_get_remember_password (GSignondSignonuiData *data, - gboolean *query_password); + gboolean *remember_password); void gsignond_signonui_data_set_remember_password (GSignondSignonuiData *data, gboolean remember); diff --git a/include/gsignond/gsignond-storage-manager.h b/include/gsignond/gsignond-storage-manager.h index a5b7eba..0b0d42e 100644 --- a/include/gsignond/gsignond-storage-manager.h +++ b/include/gsignond/gsignond-storage-manager.h @@ -65,41 +65,11 @@ struct _GSignondStorageManagerClass { GObjectClass parent_class; - /** - * initialize_storage: - * - * See #gsignond_storage_manager_initialize_storage. - */ gboolean (*initialize_storage) (GSignondStorageManager *self); - /** - * delete_storage: - * - * See #gsignond_storage_manager_delete_storage. - */ gboolean (*delete_storage) (GSignondStorageManager *self); - /** - * storage_is_initialized: - * - * See #gsignond_storage_manager_storage_is_initialized. - */ gboolean (*storage_is_initialized) (GSignondStorageManager *self); - /** - * mount_filesystem: - * - * See #gsignond_storage_manager_mount_filesystem. - */ const gchar * (*mount_filesystem) (GSignondStorageManager *self); - /** - * unmount_filesystem: - * - * See #gsignond_storage_manager_unmount_filesystem. - */ gboolean (*unmount_filesystem) (GSignondStorageManager *self); - /** - * filesystem_is_mounted: - * - * See #gsignond_storage_manager_filesystem_is_mounted. - */ gboolean (*filesystem_is_mounted) (GSignondStorageManager *self); }; diff --git a/include/gsignond/gsignond-utils.h b/include/gsignond/gsignond-utils.h index 5334732..66c0202 100644 --- a/include/gsignond/gsignond-utils.h +++ b/include/gsignond/gsignond-utils.h @@ -31,10 +31,13 @@ G_BEGIN_DECLS gboolean -gsignond_wipe_file (const gchar *); +gsignond_wipe_file (const gchar *filename); gboolean -gsignond_wipe_directory (const gchar *); +gsignond_wipe_directory (const gchar *dirname); + +gchar * +gsignond_generate_nonce (); G_END_DECLS diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4 new file mode 100644 index 0000000..ac2eccb --- /dev/null +++ b/m4/gtk-doc.m4 @@ -0,0 +1,71 @@ +dnl -*- mode: autoconf -*- + +# serial 1 + +dnl Usage: +dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) +AC_DEFUN([GTK_DOC_CHECK], +[ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + + dnl check for tools we added during development + AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) + AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) + AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) + + dnl for overriding the documentation installation directory + AC_ARG_WITH([html-dir], + AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, + [with_html_dir='${datadir}/gtk-doc/html']) + HTML_DIR="$with_html_dir" + AC_SUBST([HTML_DIR]) + + dnl enable/disable documentation building + AC_ARG_ENABLE([gtk-doc], + AS_HELP_STRING([--enable-gtk-doc], + [use gtk-doc to build documentation [[default=no]]]),, + [enable_gtk_doc=no]) + + if test x$enable_gtk_doc = xyes; then + ifelse([$1],[], + [PKG_CHECK_EXISTS([gtk-doc],, + AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], + [PKG_CHECK_EXISTS([gtk-doc >= $1],, + AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) + fi + fi + + AC_MSG_CHECKING([whether to build gtk-doc documentation]) + AC_MSG_RESULT($enable_gtk_doc) + + dnl enable/disable output formats + AC_ARG_ENABLE([gtk-doc-html], + AS_HELP_STRING([--enable-gtk-doc-html], + [build documentation in html format [[default=yes]]]),, + [enable_gtk_doc_html=yes]) + AC_ARG_ENABLE([gtk-doc-pdf], + AS_HELP_STRING([--enable-gtk-doc-pdf], + [build documentation in pdf format [[default=no]]]),, + [enable_gtk_doc_pdf=no]) + + if test -z "$GTKDOC_MKPDF"; then + enable_gtk_doc_pdf=no + fi + + if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 + fi + AC_SUBST([AM_DEFAULT_VERBOSITY]) + + AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) + AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) + AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) +]) diff --git a/packaging/gsignond.changes b/packaging/gsignond.changes index 422e3d1..0fc9fd8 100644 --- a/packaging/gsignond.changes +++ b/packaging/gsignond.changes @@ -1,3 +1,8 @@ +* Thu Aug 22 2013 Amarnath Valluri +- Release 0.0.3 +- Bug fixes in UI interaction +- Documentation support + * Mon Jun 24 2013 Imran Zaman - Release 0.0.2 that comprises of bug fixes diff --git a/packaging/gsignond.spec b/packaging/gsignond.spec index f5fa51d..8ee6300 100644 --- a/packaging/gsignond.spec +++ b/packaging/gsignond.spec @@ -6,11 +6,12 @@ Name: gsignond Summary: GLib based Single Sign-On daemon -Version: 0.0.2 -Release: 9 +Version: 0.0.3 +Release: 1 Group: System/Daemons -License: LGPL +License: LGPL-2.1+ Source: %{name}-%{version}.tar.gz +Provides: gsignon %if %{dbus_type} != "p2p" Requires: dbus-1 %endif @@ -38,6 +39,15 @@ Requires: %{name} = %{version}-%{release} %{summary}. +%package doc +Summary: Documentation files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description doc +%{summary}. + + %prep %setup -q -n %{name}-%{version} if [ -f = "gtk-doc.make" ] @@ -66,6 +76,7 @@ rm -rf %{buildroot} %post /sbin/ldconfig chmod u+s %{_bindir}/%{name} +groupadd -f -r gsignond %postun -p /sbin/ldconfig @@ -82,6 +93,7 @@ chmod u+s %{_bindir}/%{name} %if %{dbus_type} != "p2p" %{_datadir}/dbus-1/services/*SingleSignOn*.service %endif +%config(noreplace) %{_sysconfdir}/gsignond.conf %files devel @@ -93,3 +105,8 @@ chmod u+s %{_bindir}/%{name} %{_datadir}/dbus-1/interfaces/*SSO*.xml %endif + +%files doc +%defattr(-,root,root,-) +%{_datadir}/gtk-doc/html/gsignond/* + diff --git a/src/Makefile.in b/src/Makefile.in index ea93f09..270afdc 100644 --- a/src/Makefile.in +++ b/src/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, @@ -15,6 +15,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@ @@ -37,9 +54,10 @@ subdir = src 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 @@ -61,6 +79,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=) \ @@ -441,13 +464,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; \ diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 38ac909..b89d47e 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -13,16 +13,16 @@ BUILT_SOURCES = \ GSIGNOND_INCLUDE_DIR=$(top_srcdir)/include/gsignond gsignond-plugin-enum-types.h: gsignond-enum.h.template $(GSIGNOND_INCLUDE_DIR)/gsignond-plugin-interface.h - $(GLIB_MKENUMS) --template gsignond-enum.h.template \ - --fhead "#ifndef GSIGNOND_PLUGIN_ENUM_TYPES_H_\n#define GSIGNOND_PLUGIND_ENUM_TYPES_H_\n\n#include \n\nG_BEGIN_DECLS" \ - --identifier-prefix gsignond \ + $(GLIB_MKENUMS) --template $(srcdir)/gsignond-enum.h.template \ + --fhead "#ifndef GSIGNOND_PLUGIN_ENUM_TYPES_H_\n#define GSIGNOND_PLUGIN_ENUM_TYPES_H_\n\n#include \n\nG_BEGIN_DECLS" \ + --identifier-prefix GSignond \ --ftail "\nG_END_DECLS\n\n#endif\n" \ $(GSIGNOND_INCLUDE_DIR)/gsignond-plugin-interface.h > $@ gsignond-plugin-enum-types.c: gsignond-enum.c.template $(GSIGNOND_INCLUDE_DIR)/gsignond-plugin-interface.h - $(GLIB_MKENUMS) --template gsignond-enum.c.template \ + $(GLIB_MKENUMS) --template $(srcdir)/gsignond-enum.c.template \ --fhead "#include \"gsignond-plugin-enum-types.h\"\n" \ - --identifier-prefix gsignond \ + --identifier-prefix GSignond \ $(GSIGNOND_INCLUDE_DIR)/gsignond-plugin-interface.h > $@ @@ -30,6 +30,7 @@ libgsignond_common_la_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include \ + -I. \ $(GSIGNOND_CFLAGS) \ -DGSIGNOND_PLUGINS_DIR='"$(pluginsdir)"' \ -DGSIGNOND_EXTENSIONS_DIR='"$(extensionsdir)"' \ @@ -51,6 +52,7 @@ libgsignond_common_la_SOURCES = \ gsignond-access-control-manager.c \ gsignond-extension-interface.c \ gsignond-storage-manager.c \ + gsignond-identity-info.h \ gsignond-identity-info-internal.h \ gsignond-identity-info.c \ gsignond-credentials.c \ @@ -75,5 +77,7 @@ dist_libgsignond_common_la_SOURCES = \ gsignond-enum.h.template \ $(NULL) -CLEANFILES = - +CLEANFILES = \ + gsignond-plugin-enum-types.h \ + gsignond-plugin-enum-types.c \ + $(NULL) diff --git a/src/common/Makefile.in b/src/common/Makefile.in index a166acb..ddf1481 100644 --- a/src/common/Makefile.in +++ b/src/common/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@ @@ -39,9 +56,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = src/common 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 @@ -142,6 +160,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=) \ @@ -329,6 +352,7 @@ libgsignond_common_la_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include \ + -I. \ $(GSIGNOND_CFLAGS) \ -DGSIGNOND_PLUGINS_DIR='"$(pluginsdir)"' \ -DGSIGNOND_EXTENSIONS_DIR='"$(extensionsdir)"' \ @@ -350,6 +374,7 @@ libgsignond_common_la_SOURCES = \ gsignond-access-control-manager.c \ gsignond-extension-interface.c \ gsignond-storage-manager.c \ + gsignond-identity-info.h \ gsignond-identity-info-internal.h \ gsignond-identity-info.c \ gsignond-credentials.c \ @@ -374,7 +399,11 @@ dist_libgsignond_common_la_SOURCES = \ gsignond-enum.h.template \ $(NULL) -CLEANFILES = +CLEANFILES = \ + gsignond-plugin-enum-types.h \ + gsignond-plugin-enum-types.c \ + $(NULL) + all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -413,7 +442,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(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 \ @@ -421,6 +449,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ 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)"; \ } @@ -785,13 +815,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; \ @@ -946,16 +973,16 @@ uninstall-am: uninstall-libLTLIBRARIES gsignond-plugin-enum-types.h: gsignond-enum.h.template $(GSIGNOND_INCLUDE_DIR)/gsignond-plugin-interface.h - $(GLIB_MKENUMS) --template gsignond-enum.h.template \ - --fhead "#ifndef GSIGNOND_PLUGIN_ENUM_TYPES_H_\n#define GSIGNOND_PLUGIND_ENUM_TYPES_H_\n\n#include \n\nG_BEGIN_DECLS" \ - --identifier-prefix gsignond \ + $(GLIB_MKENUMS) --template $(srcdir)/gsignond-enum.h.template \ + --fhead "#ifndef GSIGNOND_PLUGIN_ENUM_TYPES_H_\n#define GSIGNOND_PLUGIN_ENUM_TYPES_H_\n\n#include \n\nG_BEGIN_DECLS" \ + --identifier-prefix GSignond \ --ftail "\nG_END_DECLS\n\n#endif\n" \ $(GSIGNOND_INCLUDE_DIR)/gsignond-plugin-interface.h > $@ gsignond-plugin-enum-types.c: gsignond-enum.c.template $(GSIGNOND_INCLUDE_DIR)/gsignond-plugin-interface.h - $(GLIB_MKENUMS) --template gsignond-enum.c.template \ + $(GLIB_MKENUMS) --template $(srcdir)/gsignond-enum.c.template \ --fhead "#include \"gsignond-plugin-enum-types.h\"\n" \ - --identifier-prefix gsignond \ + --identifier-prefix GSignond \ $(GSIGNOND_INCLUDE_DIR)/gsignond-plugin-interface.h > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/common/db/Makefile.in b/src/common/db/Makefile.in index fca2c67..6faf597 100644 --- a/src/common/db/Makefile.in +++ b/src/common/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,9 +55,10 @@ subdir = src/common/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 @@ -89,6 +107,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgsignond_common_db_la_SOURCES) DIST_SOURCES = $(libgsignond_common_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) diff --git a/src/common/db/gsignond-db-error.h b/src/common/db/gsignond-db-error.h index 13a1b83..bd4bf11 100644 --- a/src/common/db/gsignond-db-error.h +++ b/src/common/db/gsignond-db-error.h @@ -31,10 +31,6 @@ G_BEGIN_DECLS -/** - * GSIGNOND_DB_ERROR: - * - */ #define GSIGNOND_DB_ERROR (gsignond_db_error_quark()) typedef enum { diff --git a/src/common/db/gsignond-db-secret-database.c b/src/common/db/gsignond-db-secret-database.c index 51fa0da..b723539 100644 --- a/src/common/db/gsignond-db-secret-database.c +++ b/src/common/db/gsignond-db-secret-database.c @@ -81,11 +81,23 @@ _gsignond_db_read_key_value ( GSignondDictionary* data) { const gchar *key = NULL; + gpointer v_data = 0; GVariant *value = NULL; + const GVariantType *type; + gsize type_len ; + gsize size = (gsize) sqlite3_column_bytes(stmt, 1); + + type = (const GVariantType *)sqlite3_column_blob(stmt, 1) ; + type_len = g_variant_type_get_string_length (type) + 1; + + size -= type_len; + v_data = g_new0(gconstpointer, size); + mempcpy(v_data, sqlite3_column_blob(stmt, 1) + type_len, size); + key = (const gchar *)sqlite3_column_text (stmt, 0); - value = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, - (gconstpointer) sqlite3_column_blob(stmt, 1), - (gsize) sqlite3_column_bytes(stmt, 1), sizeof(guchar)); + value = g_variant_new_from_data (type, + (gconstpointer)v_data, size, + TRUE, (GDestroyNotify)g_free, v_data); gsignond_dictionary_set (data, key, value); return TRUE; @@ -125,8 +137,8 @@ gsignond_db_secret_database_init (GSignondDbSecretDatabase *self) * gsignond_db_secret_database_new: * * Creates new #GSignondDbSecretDatabase object - * Returns : (transfer full) the #GSignondDbSecretDatabase object * + * Returns: (transfer full): the #GSignondDbSecretDatabase object */ GSignondDbSecretDatabase * gsignond_db_secret_database_new () @@ -350,7 +362,9 @@ gsignond_db_secret_database_update_data ( g_hash_table_iter_init (&iter, data); while (g_hash_table_iter_next (&iter,(gpointer *) &key, (gpointer *) &value)) { - data_counter = data_counter + strlen (key) + g_variant_get_size(value); + data_counter = data_counter + strlen (key) + + g_variant_type_get_string_length (g_variant_get_type (value)) + 1 + + g_variant_get_size(value); if (data_counter >= GSIGNOND_DB_MAX_DATA_STORAGE) { gsignond_db_sql_database_rollback_transaction (parent); DBG ("size limit is exceeded"); @@ -366,7 +380,9 @@ gsignond_db_secret_database_update_data ( while (g_hash_table_iter_next (&iter, (gpointer *)&key, (gpointer *) &value )) { gsize val_size; - gconstpointer value_data; + const gchar *val_type; + gsize val_type_length; + gpointer value_data; sqlite3_stmt *sql_stmt; ret = sqlite3_prepare_v2 (parent->priv->db, statement, -1, @@ -377,13 +393,19 @@ gsignond_db_secret_database_update_data ( gsignond_db_sql_database_rollback_transaction (parent); return FALSE; } - value_data = g_variant_get_data (value); + val_type = g_variant_get_type_string(value); + val_type_length = g_variant_type_get_string_length ( + (const GVariantType *)val_type) + 1; val_size = g_variant_get_size (value); + value_data = g_new0(gconstpointer, val_size + val_type_length); + sprintf ((gchar*)value_data, "%s", val_type); + memcpy(value_data + val_type_length, g_variant_get_data (value), val_size); + sqlite3_bind_int(sql_stmt, 1, (int)id); sqlite3_bind_int(sql_stmt, 2, (int)method); sqlite3_bind_text(sql_stmt, 3, key, -1, SQLITE_STATIC); - sqlite3_bind_blob(sql_stmt, 4, value_data, (int)val_size, SQLITE_STATIC); + sqlite3_bind_blob(sql_stmt, 4, value_data, (int)val_size + val_type_length, g_free); ret = sqlite3_step (sql_stmt); if (G_UNLIKELY (ret != SQLITE_DONE)) { diff --git a/src/common/db/gsignond-db-sql-database.c b/src/common/db/gsignond-db-sql-database.c index caddd98..0ba63be 100644 --- a/src/common/db/gsignond-db-sql-database.c +++ b/src/common/db/gsignond-db-sql-database.c @@ -356,7 +356,7 @@ gsignond_db_sql_database_clear (GSignondDbSqlDatabase *self) * * Prepares the statement from the query. * - * Returns: (transfer full) NULL if fails, valid sql statement otherwise. + * Returns: (transfer full): NULL if fails, valid sql statement otherwise. */ sqlite3_stmt * gsignond_db_sql_database_prepare_statement ( @@ -382,7 +382,7 @@ gsignond_db_sql_database_prepare_statement ( /** * gsignond_db_sql_database_exec: * @self: instance of #GSignondDbSqlDatabase - * @stmts: sql statements to be executed on the database + * @statements: sql statements to be executed on the database * * Executes SQL statements. transaction begin and commit statements should be * explicitly called if needed. @@ -462,7 +462,7 @@ _gsignond_db_read_string ( * * Executes an SQL statement, and returns the fetched integer from the result. * - * Returns: (transfer full) string if rows fetched are greater than 0, + * Returns: (transfer full): string if rows fetched are greater than 0, * NULL otherwise. */ gchar * @@ -507,7 +507,7 @@ _gsignond_db_read_strings ( * Executes an SQL statement, and returns the fetched strings from the results * in the list. * - * Returns: (transfer full) list if rows fetched are greater than 0, + * Returns: (transfer full): list if rows fetched are greater than 0, * NULL otherwise. When done with list, it must be freed using * g_list_free_full (list, g_free) */ @@ -554,7 +554,7 @@ _gsignond_db_read_string_tuple ( * Executes an SQL statement, and returns the fetched string tuples from * the results into the hash table. * - * Returns: (transfer full) string tuples if rows fetched are greater than 0, + * Returns: (transfer full): string tuples if rows fetched are greater than 0, * NULL otherwise. When done with tuples, it must be freed using * g_hash_table_unref (tuples) */ @@ -609,7 +609,7 @@ _gsignond_db_read_int_string_tuple ( * Executes an SQL statement, and returns the fetched int-string tuples from * the results into the hash table. * - * Returns: (transfer full) string tuples if rows fetched are greater than 0, + * Returns: (transfer full): string tuples if rows fetched are greater than 0, * NULL otherwise. */ GHashTable * @@ -702,7 +702,7 @@ _gsignond_db_read_array ( * Executes an SQL statement, and returns the fetched integers from the results * in the array. * - * Returns: (transfer full) list if rows fetched are greater than 0, NULL otherwise. + * Returns: (transfer full): list if rows fetched are greater than 0, NULL otherwise. */ GArray * gsignond_db_sql_database_query_exec_int_array ( @@ -732,7 +732,7 @@ gsignond_db_sql_database_query_exec_int_array ( /** * gsignond_db_sql_database_query_exec_stmt: * @self: instance of #GSignondDbSqlDatabase - * @sql_stmt: (transfer full) sql statement executed on the database + * @sql_stmt: (transfer full): sql statement executed on the database * @callback: callback to be invoked if not NULL for the result of each row * @userdata: user_data to be relayed back through the callback * @@ -947,7 +947,7 @@ gsignond_db_sql_database_get_db_version ( /** * gsignond_db_sql_database_set_last_error: * @self: instance of #GSignondDbDefaultStorage - * @error: (transfer full) last occurred #GError + * @error: (transfer full): last occurred #GError * * sets the last occurred error * diff --git a/src/common/db/gsignond-secret-storage.c b/src/common/db/gsignond-secret-storage.c index 90209fa..97e021d 100644 --- a/src/common/db/gsignond-secret-storage.c +++ b/src/common/db/gsignond-secret-storage.c @@ -29,6 +29,26 @@ #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-secret-storage.h" +/** + * SECTION:gsignond-secret-storage + * @short_description: provides access to the database that stores user credentials and identity/method cache + * @include: gsignond/gsignond-secret-storage.h + * + * #GSignondSecretStorage provides access to the database where sensitive identity + * data (#GSignondCredentials) and identity/method cache are stored. It's preferred + * that this database is protected against access by processes other than gSSO. + * + * gSSO can be configured to use a custom extension + * that provides a subclassed implementation of #GSignondSecretStorage + * (see #GSignondExtension), otherwise a default implementation is used. + * + */ +/** + * GSignondSecretStorage: + * + * Opaque #GSignondSecretStorage data structure. + */ + #define GSIGNOND_SECRET_STORAGE_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ GSIGNOND_TYPE_SECRET_STORAGE, \ @@ -105,62 +125,8 @@ _gsignond_secret_storage_dispose (GObject *gobject) gobject); } -static void -gsignond_secret_storage_class_init (GSignondSecretStorageClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - - gobject_class->set_property = _set_property; - gobject_class->get_property = _get_property; - gobject_class->dispose = _gsignond_secret_storage_dispose; - - properties[PROP_CONFIG] = g_param_spec_object ("config", - "config", - "Configuration object", - GSIGNOND_TYPE_CONFIG, - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS); - g_object_class_install_properties (gobject_class, N_PROPERTIES, properties); - - /* virtual methods */ - klass->open_db = gsignond_secret_storage_open_db; - klass->close_db = gsignond_secret_storage_close_db; - klass->clear_db = gsignond_secret_storage_clear_db; - klass->is_open_db = gsignond_secret_storage_is_open_db; - klass->load_credentials = - gsignond_secret_storage_load_credentials; - klass->update_credentials = - gsignond_secret_storage_update_credentials; - klass->remove_credentials = - gsignond_secret_storage_remove_credentials; - klass->load_data = gsignond_secret_storage_load_data; - klass->update_data = gsignond_secret_storage_update_data; - klass->remove_data = gsignond_secret_storage_remove_data; - - g_type_class_add_private (klass, sizeof (GSignondSecretStoragePrivate)); -} - -static void -gsignond_secret_storage_init (GSignondSecretStorage *self) -{ - self->priv = GSIGNOND_SECRET_STORAGE_GET_PRIVATE (self); - self->priv->database = gsignond_db_secret_database_new (); - self->config = NULL; -} - -/** - * gsignond_secret_storage_open_db: - * - * @self: instance of #GSignondSecretStorage - * - * Opens (and initializes) DB. The implementation should take - * care of creating the DB, if it doesn't exist. - * - * Returns: TRUE if successful, FALSE otherwise. - */ -gboolean -gsignond_secret_storage_open_db (GSignondSecretStorage *self) +static gboolean +_open_db (GSignondSecretStorage *self) { const gchar *dir = NULL; const gchar *filename = NULL; @@ -211,71 +177,268 @@ gsignond_secret_storage_open_db (GSignondSecretStorage *self) return TRUE; } +static gboolean +_close_db (GSignondSecretStorage *self) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); + + if (self->priv->database != NULL) { + gsignond_db_sql_database_close (GSIGNOND_DB_SQL_DATABASE ( + self->priv->database)); + } + return TRUE; +} + +static gboolean +_clear_db (GSignondSecretStorage *self) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); + return gsignond_db_sql_database_clear (GSIGNOND_DB_SQL_DATABASE ( + self->priv->database)); +} + +static gboolean +_is_open_db (GSignondSecretStorage *self) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); + return ((self->priv->database != NULL) && + gsignond_db_sql_database_is_open (GSIGNOND_DB_SQL_DATABASE ( + self->priv->database))); +} + +static GSignondCredentials* +_load_credentials ( + GSignondSecretStorage *self, + const guint32 id) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); + return gsignond_db_secret_database_load_credentials (self->priv->database, + id); +} + +static gboolean +_update_credentials ( + GSignondSecretStorage *self, + GSignondCredentials *creds) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); + return gsignond_db_secret_database_update_credentials (self->priv->database, + creds); +} + +static gboolean +_remove_credentials ( + GSignondSecretStorage *self, + const guint32 id) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); + return gsignond_db_secret_database_remove_credentials (self->priv->database, + id); +} + +static gboolean +_check_credentials ( + GSignondSecretStorage *self, + GSignondCredentials *creds) +{ + gboolean equal = FALSE; + GSignondCredentials *stored_creds = NULL; + + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); + g_return_val_if_fail (creds != NULL, FALSE); + + GSignondSecretStorageClass *klass = + GSIGNOND_SECRET_STORAGE_GET_CLASS (self); + + stored_creds = klass->load_credentials (self, + gsignond_credentials_get_id(creds)); + + if (stored_creds) { + DBG ("Credentials from DB found"); + equal = gsignond_credentials_equal(creds, stored_creds); + g_object_unref (stored_creds); + } + + return equal; +} + +static GHashTable* +_load_data ( + GSignondSecretStorage *self, + const guint32 id, + const guint32 method) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), NULL); + return gsignond_db_secret_database_load_data (self->priv->database, + id, method); +} + +static gboolean +_update_data ( + GSignondSecretStorage *self, + const guint32 id, + const guint32 method, + GHashTable *data) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); + return gsignond_db_secret_database_update_data (self->priv->database, + id, method, data); +} + +static gboolean +_remove_data ( + GSignondSecretStorage *self, + const guint32 id, + const guint32 method) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); + return gsignond_db_secret_database_remove_data (self->priv->database, + id, method); +} + +static const GError * +_get_last_error (GSignondSecretStorage *self) +{ + g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), NULL); + if (self->priv->database != NULL) { + return gsignond_db_sql_database_get_last_error ( + GSIGNOND_DB_SQL_DATABASE (self->priv->database)); + } + return NULL; +} + + + /** - * gsignond_secret_storage_close_db: + * GSignondSecretStorageClass: + * @parent_class: parent class. + * @open_db: an implementation of gsignond_secret_storage_open_db() + * @close_db: an implementation of gsignond_secret_storage_close_db() + * @clear_db: an implementation of gsignond_secret_storage_clear_db() + * @is_open_db: an implementation of gsignond_secret_storage_is_open_db() + * @load_credentials: an implementation of gsignond_secret_storage_load_credentials() + * @update_credentials: an implementation of gsignond_secret_storage_update_credentials() + * @remove_credentials: an implementation of gsignond_secret_storage_remove_credentials() + * @check_credentials: an implementation of gsignond_secret_storage_check_credentials() + * @load_data: an implementation of gsignond_secret_storage_load_data() + * @update_data: an implementation of gsignond_secret_storage_update_data() + * @remove_data: an implementation of gsignond_secret_storage_remove_data() + * @get_last_error: an implementation of gsignond_secret_storage_get_last_error() + * + * #GSignondSecretStorageClass class containing pointers to class methods. + */ +static void +gsignond_secret_storage_class_init (GSignondSecretStorageClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + + gobject_class->set_property = _set_property; + gobject_class->get_property = _get_property; + gobject_class->dispose = _gsignond_secret_storage_dispose; + + properties[PROP_CONFIG] = g_param_spec_object ("config", + "config", + "Configuration object", + GSIGNOND_TYPE_CONFIG, + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS); + g_object_class_install_properties (gobject_class, N_PROPERTIES, properties); + + /* virtual methods */ + klass->open_db = _open_db; + klass->close_db = _close_db; + klass->clear_db = _clear_db; + klass->is_open_db = _is_open_db; + klass->load_credentials = _load_credentials; + klass->update_credentials = _update_credentials; + klass->remove_credentials = _remove_credentials; + klass->check_credentials = _check_credentials; + klass->load_data = _load_data; + klass->update_data = _update_data; + klass->remove_data = _remove_data; + klass->get_last_error = _get_last_error; + + g_type_class_add_private (klass, sizeof (GSignondSecretStoragePrivate)); +} + +static void +gsignond_secret_storage_init (GSignondSecretStorage *self) +{ + self->priv = GSIGNOND_SECRET_STORAGE_GET_PRIVATE (self); + self->priv->database = gsignond_db_secret_database_new (); + self->config = NULL; +} + +/** + * gsignond_secret_storage_open_db: + * @self: instance of #GSignondSecretStorage * + * Opens (and initializes) the database. The implementation should take + * care of creating the DB, if it doesn't exist, and it should use + * #GSIGNOND_CONFIG_GENERAL_SECURE_DIR and #GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME + * to determine database location in the filesystem. + * + * The default implementation is using SQLite for the storage. + * + * Returns: TRUE if successful, FALSE otherwise. + */ +gboolean +gsignond_secret_storage_open_db (GSignondSecretStorage *self) +{ + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->open_db (self); +} + +/** + * gsignond_secret_storage_close_db: * @self: instance of #GSignondSecretStorage * - * Closes the secrets DB. To reopen it, call open_db(). + * Closes the database. To reopen it, call gsignond_secret_storage_open_db(). * * Returns: TRUE if successful, FALSE otherwise. */ gboolean gsignond_secret_storage_close_db (GSignondSecretStorage *self) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); - - if (self->priv->database != NULL) { - gsignond_db_sql_database_close (GSIGNOND_DB_SQL_DATABASE ( - self->priv->database)); - } - return TRUE; + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->close_db (self); } /** * gsignond_secret_storage_clear_db: - * * @self: instance of #GSignondSecretStorage * - * Removes all stored secrets. + * Removes all stored secrets from the database. * * Returns: TRUE if successful, FALSE otherwise. */ gboolean gsignond_secret_storage_clear_db (GSignondSecretStorage *self) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); - return gsignond_db_sql_database_clear (GSIGNOND_DB_SQL_DATABASE ( - self->priv->database)); + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->clear_db (self); } /** * gsignond_secret_storage_is_open_db: - * * @self: instance of #GSignondSecretStorage * - * Checks if the db is open or not. + * Checks if the database is open or not. * * Returns: TRUE if successful, FALSE otherwise. */ gboolean gsignond_secret_storage_is_open_db (GSignondSecretStorage *self) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); - return ((self->priv->database != NULL) && - gsignond_db_sql_database_is_open (GSIGNOND_DB_SQL_DATABASE ( - self->priv->database))); + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->is_open_db (self); } /** * gsignond_secret_storage_load_credentials: - * * @self: instance of #GSignondSecretStorage - * @id: the identity whose credentials are being loaded. + * @id: the identity id whose credentials are being loaded. * - * Loads the credentials. + * Loads the credentials from the database. * - * Returns: (transfer full) #GSignondCredentials if successful, + * Returns: (transfer full): #GSignondCredentials if successful, * NULL otherwise. */ GSignondCredentials* @@ -283,16 +446,13 @@ gsignond_secret_storage_load_credentials ( GSignondSecretStorage *self, const guint32 id) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); - return gsignond_db_secret_database_load_credentials (self->priv->database, - id); + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->load_credentials (self, id); } /** * gsignond_secret_storage_update_credentials: - * * @self: instance of #GSignondSecretStorage - * @creds: (transfer none) the credentials that are being updated. + * @creds: (transfer none): the credentials that are being updated. * * Stores/updates the credentials for the given identity. * @@ -303,14 +463,11 @@ gsignond_secret_storage_update_credentials ( GSignondSecretStorage *self, GSignondCredentials *creds) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); - return gsignond_db_secret_database_update_credentials (self->priv->database, - creds); + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->update_credentials (self, creds); } /** * gsignond_secret_storage_remove_credentials: - * * @self: instance of #GSignondSecretStorage * @id: the identity whose credentials are being updated. * @@ -323,19 +480,15 @@ gsignond_secret_storage_remove_credentials ( GSignondSecretStorage *self, const guint32 id) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); - return gsignond_db_secret_database_remove_credentials (self->priv->database, - id); + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->remove_credentials (self, id); } /** * gsignond_secret_storage_check_credentials: - * * @self: instance of #GSignondSecretStorage - * @creds: (transfer none) the credentials that are being checked. + * @creds: (transfer none): the credentials that are being checked. * - * Checks whether the given credentials are correct for the - * given identity. + * Checks whether the given credentials match what is stored in the database. * * Returns: TRUE if successful, FALSE otherwise. */ @@ -344,60 +497,37 @@ gsignond_secret_storage_check_credentials ( GSignondSecretStorage *self, GSignondCredentials *creds) { - gboolean equal = FALSE; - GSignondCredentials *stored_creds = NULL; - - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); - g_return_val_if_fail (creds != NULL, FALSE); - - GSignondSecretStorageClass *klass = - GSIGNOND_SECRET_STORAGE_GET_CLASS (self); - - stored_creds = klass->load_credentials (self, - gsignond_credentials_get_id(creds)); - - if (stored_creds) { - DBG ("Credentials from DB found"); - equal = gsignond_credentials_equal(creds, stored_creds); - g_object_unref (stored_creds); - } - - return equal; + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->check_credentials (self, creds); } /** * gsignond_secret_storage_load_data: - * * @self: instance of #GSignondSecretStorage - * @id: the identity whose credentials are being fetched. + * @id: the identity id whose data are fetched * @method: the authentication method the data is used for. * - * Loads secret data. + * Loads the secret data associated with a given identity and method. * - * Returns: (transfer full) #GHashTable (gchar*, GBytes*) data. When done data - * should be freed with g_hash_table_unref (data) + * Returns: (transfer full): the secret data */ -GHashTable* +GSignondDictionary* gsignond_secret_storage_load_data ( GSignondSecretStorage *self, const guint32 id, const guint32 method) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), NULL); - return gsignond_db_secret_database_load_data (self->priv->database, - id, method); + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->load_data (self, id, method); } /** * gsignond_secret_storage_update_data: - * * @self: instance of #GSignondSecretStorage - * @id: the identity whose credentials are being fetched. + * @id: the identity whose data are fetched. * @method: the authentication method the data is used for. - * @data: (transfer none) the data as #GHashTable (gchar*, GBytes*) + * @data: (transfer none): the data to update * - * Stores/replaces secret data. Calling this method replaces any data - * which was previously stored for the given id/method. + * Calling this method updates the secret data + * associated with the given id/method. * * Returns: TRUE if successful, FALSE otherwise. */ @@ -406,21 +536,18 @@ gsignond_secret_storage_update_data ( GSignondSecretStorage *self, const guint32 id, const guint32 method, - GHashTable *data) + GSignondDictionary *data) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); - return gsignond_db_secret_database_update_data (self->priv->database, - id, method, data); + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->update_data (self, id, method, data); } /** * gsignond_secret_storage_remove_data: - * * @self: instance of #GSignondSecretStorage - * @id: the identity whose credentials are being checked. + * @id: the identity whose data are fetched. * @method: the authentication method the data is used for. * - * Removes secret data. + * Removes secret data associated with a given id/method. * * Returns: TRUE if successful, FALSE otherwise. */ @@ -430,67 +557,20 @@ gsignond_secret_storage_remove_data ( const guint32 id, const guint32 method) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), FALSE); - return gsignond_db_secret_database_remove_data (self->priv->database, - id, method); -} - -/** - * gsignond_secret_storage_set_last_error: - * @self: instance of #GSignondDbDefaultStorage - * @error : (transfer full) last occurred #GError - * - * sets the last occurred error - * - */ -void -gsignond_secret_storage_set_last_error ( - GSignondSecretStorage *self, - GError* error) -{ - g_return_if_fail (GSIGNOND_IS_SECRET_STORAGE (self)); - g_return_if_fail (self->priv->database != NULL); - gsignond_db_sql_database_set_last_error ( - GSIGNOND_DB_SQL_DATABASE (self->priv->database), error); + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->remove_data (self, id, method); } /** * gsignond_secret_storage_get_last_error: - * * @self: instance of #GSignondSecretStorage * - * retrieves the last occurred error + * Retrieves the last occurred error that has occured * - * Returns: (transfer none) last occurred #GError + * Returns: (transfer none): last occurred #GError */ const GError * gsignond_secret_storage_get_last_error (GSignondSecretStorage *self) { - g_return_val_if_fail (GSIGNOND_IS_SECRET_STORAGE (self), NULL); - if (self->priv->database != NULL) { - return gsignond_db_sql_database_get_last_error ( - GSIGNOND_DB_SQL_DATABASE (self->priv->database)); - } - return NULL; -} - -/** - * gsignond_secret_storage_clear_last_error: - * - * @self: instance of #GSignondSecretStorage - * - * clears the last occurred error - */ -void -gsignond_secret_storage_clear_last_error (GSignondSecretStorage *self) -{ - g_return_if_fail (GSIGNOND_IS_SECRET_STORAGE (self)); - if (self->priv->database != NULL) { - gsignond_db_sql_database_clear_last_error ( - GSIGNOND_DB_SQL_DATABASE (self->priv->database)); - } + return GSIGNOND_SECRET_STORAGE_GET_CLASS (self)->get_last_error (self); } - - - diff --git a/src/common/gsignond-access-control-manager.c b/src/common/gsignond-access-control-manager.c index 438b0f0..ef5d8f8 100644 --- a/src/common/gsignond-access-control-manager.c +++ b/src/common/gsignond-access-control-manager.c @@ -35,6 +35,22 @@ #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-access-control-manager.h" +/** + * SECTION:gsignond-access-control-manager + * @short_description: an object that performs access control checks + * @include: gsignond/gsignond-access-control-manager.h + * + * #GSignondAccessControlManager performs access control checks using + * available system services. gSSO can be configured to use a custom extension + * that provides a subclassed implementation of #GSignondAccessControlManager + * (see #GSignondExtension), otherwise a default implementation is used. + */ +/** + * GSignondAccessControlManager: + * + * Opaque #GSignondAccessControlManager data structure. + */ + #define GSIGNOND_ACCESS_CONTROL_MANAGER_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ GSIGNOND_TYPE_ACCESS_CONTROL_MANAGER, \ @@ -265,14 +281,27 @@ _security_context_of_keychain (GSignondAccessControlManager *self) (void) self; -# ifdef ENABLE_DEBUG +# if defined(ENABLE_DEBUG) keychain_sysctx = g_getenv ("SSO_KEYCHAIN_SYSCTX"); +# elif defined(KEYCHAIN_SYSCTX) + keychain_sysctx = KEYCHAIN_SYSCTX; # endif if (!keychain_sysctx) keychain_sysctx = ""; return gsignond_security_context_new_from_values (keychain_sysctx, ""); } +/** + * GSignondAccessControlManagerClass: + * @parent_class: parent class. + * @security_context_of_peer: an implementation of gsignond_access_control_manager_security_context_of_peer() + * @peer_is_allowed_to_use_identity: an implementation of gsignond_access_control_manager_peer_is_allowed_to_use_identity() + * @peer_is_owner_of_identity: an implementation of gsignond_access_control_manager_peer_is_owner_of_identity() + * @acl_is_valid: an implementation of gsignond_access_control_manager_acl_is_valid() + * @security_context_of_keychain: an implementation of gsignond_access_control_manager_security_context_of_keychain() + * + * #GSignondAccessControlManagerClass class containing pointers to class methods. + */ static void gsignond_access_control_manager_class_init ( GSignondAccessControlManagerClass *klass) @@ -313,10 +342,15 @@ gsignond_access_control_manager_init (GSignondAccessControlManager *self) * gsignond_access_control_manager_security_context_of_peer: * @self: object instance. * @peer_ctx: instance of security context to be set. - * @peer_fd: file descriptor of the peer connection. + * @peer_fd: file descriptor of the peer connection if using peer-to-peer dbus, -1 otherwise. + * @peer_service: g_dbus_method_invocation_get_sender() of the peer connection, if not using peer-to-peer dbus, NULL otherwise * @peer_app_ctx: application context of the peer connection. * - * Retrieves #GSignondSecurityContext of the specified peer. + * Retrieves and sets #GSignondSecurityContext of the specified peer. + * + * The default implementation sets the app context as it was passed, and sets + * the system context to the binary path of the process that is determined from + * @peer_fd and @peer_service parameters. */ void gsignond_access_control_manager_security_context_of_peer ( @@ -335,9 +369,12 @@ gsignond_access_control_manager_security_context_of_peer ( * @self: object instance. * @peer_ctx: security context of the peer connection. * @owner_ctx: security context of the identity owner. - * @identity_acl: access control list for the identity in question. + * @identity_acl: access control list for the identity in question. Includes the @owner_ctx as well. * * Checks if specified peer is allowed to access the specified identity. + * + * The default implementation goes over items in @identity_acl, using + * gsignond_security_context_check() to check them against @peer_ctx. * * Returns: access is allowed? */ @@ -358,7 +395,10 @@ gsignond_access_control_manager_peer_is_allowed_to_use_identity ( * @peer_ctx: security context of the peer connection. * @owner_ctx: security context of the identity owner. * - * Checks if the specified peer is owner of the identity. + * Checks if the peer specified in @peer_ctx is the owner of the identity. + * + * The default implementation is using gsignond_security_context_check() + * to check @peer_ctx against @owner_ctx directly. * * Returns: is owner? */ @@ -379,7 +419,10 @@ gsignond_access_control_manager_peer_is_owner_of_identity ( * @identity_acl: access control list for the identity. * * Checks if the specified peer is allowed to set the specified access - * control list. + * control list. gsignond_access_control_manager_peer_is_owner_of_identity() + * is used before calling this method to verify identity ownership. + * + * The default implementation always returns TRUE. * * Returns: access control list is OK? */ @@ -398,7 +441,12 @@ gsignond_access_control_manager_acl_is_valid ( * @self: object instance. * * Retrieves security context of the keychain application. Keychain application - * has a special management access to all stored identities. + * has a special management access to all stored identities and is able to + * perform deletion of all identities from storage. + * + * The default implementation returns an empty context. If gSSO was compiled + * with --enable-debug and SSO_KEYCHAIN_SYSCTX environment variable is set, then + * the value of that variable is used to set the returned system context instead. * * Returns: security context of the keychain application. */ diff --git a/src/common/gsignond-config.c b/src/common/gsignond-config.c index 714622d..855777d 100644 --- a/src/common/gsignond-config.c +++ b/src/common/gsignond-config.c @@ -37,6 +37,54 @@ #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-dictionary.h" +/** + * SECTION:gsignond-config + * @short_description: gSSO configuration information + * @include: gsignond/gsignond-config.h + * + * #GSignondConfig holds configuration information as a set of keys and values + * (integer or strings). The key names are defined in + * general config keys, + * database config keys, and + * DBus config keys. + * + * The configuration is discovered from these sources, in decreasing order of + * priority: + * - environment variables, if gSSO has been compiled with --enable-debug switch. + * See the specific keys documentation for the variable names. + * - gSSO configuration file. See below for where the file is searched for. + * - default values. See the documentation for specific keys for those. + * + * Where the configuration file is searched for + * + * If gSSO has been compiled with --enable-debug, then these locations are used, + * in decreasing order of priority: + * - GSIGNOND_CONFIG environment variable + * - g_get_user_config_dir() + "gsignond/gsignond.conf" + * - each of g_get_system_config_dirs() + "gsignond/gsignond.conf" + * + * Otherwise, the config file location is determined at compilation time as + * $(sysconfdir) + "gsignond/gsignond.conf" + * + * Example configuration file + * + * See example configuration file here: + * + * http://code.google.com/p/accounts-sso/source/browse/gsignond.conf?repo=gsignond + */ + +/** + * GSignondConfig: + * + * Opaque structure for the object. + */ +/** + * GSignondConfigClass: + * + * Opaque structure for the class. + */ + + #define GSIGNOND_DB_METADATA_DEFAULT_DB_FILENAME "metadata.db" #define GSIGNOND_DB_SECRET_DEFAULT_DB_FILENAME "secret.db" @@ -195,7 +243,7 @@ _load_environment (GSignondConfig *self) GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT, e_val); - e_val = g_getenv ("SSO_AUTHSESSION_TIMEOUT"); + e_val = g_getenv ("SSO_AUTH_SESSION_TIMEOUT"); if (e_val && (timeout = atoi(e_val))) gsignond_config_set_string (self, GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT, @@ -234,15 +282,19 @@ _load_environment (GSignondConfig *self) e_val = g_getenv ("SSO_STORAGE_PATH"); if (e_val) _set_storage_path (self, e_val); - - e_val = g_getenv ("SSO_SECRET_PATH"); - if (e_val) - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_SECURE_DIR, - e_val); } #endif /* ENABLE_DEBUG */ +/** + * gsignond_config_get_integer: + * @self: an instance of #GSignondConfig + * @key: the key name + * + * Get an integer configuration value. + * + * Returns: the value corresponding to the key as an integer. If the key does not + * exist or cannot be converted to the integer, 0 is returned. + */ gint gsignond_config_get_integer (GSignondConfig *self, const gchar *key) { @@ -250,6 +302,14 @@ gsignond_config_get_integer (GSignondConfig *self, const gchar *key) return (gint) (str_value ? atoi (str_value) : 0); } +/** + * gsignond_config_set_integer: + * @self: an instance of #GSignondConfig + * @key: the key name + * @value: the value + * + * Sets the configuration value to the provided integer. + */ void gsignond_config_set_integer (GSignondConfig *self, const gchar *key, gint value) @@ -266,6 +326,16 @@ gsignond_config_set_integer (GSignondConfig *self, const gchar *key, } +/** + * gsignond_config_get_string: + * @self: an instance of #GSignondConfig + * @key: the key name + * + * Get a string configuration value. + * + * Returns: (transfer none): the value corresponding to the key as string. If the key does not + * exist, NULL is returned. + */ const gchar * gsignond_config_get_string (GSignondConfig *self, const gchar *key) { @@ -278,6 +348,14 @@ gsignond_config_get_string (GSignondConfig *self, const gchar *key) return g_variant_get_string (value, NULL); } +/** + * gsignond_config_set_string: + * @self: an instance of #GSignondConfig + * @key: the key name + * @value: (transfer none): the value + * + * Sets the configuration value to the provided string. + */ void gsignond_config_set_string (GSignondConfig *self, const gchar *key, const gchar *value) @@ -340,15 +418,9 @@ gsignond_config_init (GSignondConfig *self) (GSIGNOND_CONFIG_GENERAL_BIN_DIR), (GSIGNOND_BIN_DIR)); - gchar *default_data_path = - g_build_filename (g_get_user_data_dir (), "gsignond", NULL); gsignond_config_set_string (self, GSIGNOND_CONFIG_GENERAL_STORAGE_PATH, - default_data_path); - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_SECURE_DIR, - default_data_path); - g_free (default_data_path); + "/var/db"); gsignond_config_set_string (self, GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME, @@ -376,6 +448,14 @@ gsignond_config_class_init (GSignondConfigClass *klass) } +/** + * gsignond_config_new: + * + * Create a #GSignondConfig object. + * + * Returns: an instance of #GSignondConfig. gSSO extensions should not use this + * as they're already provided with a config object when they're created. + */ GSignondConfig * gsignond_config_new () { diff --git a/src/common/gsignond-credentials.c b/src/common/gsignond-credentials.c index 397f88e..3697b8f 100644 --- a/src/common/gsignond-credentials.c +++ b/src/common/gsignond-credentials.c @@ -26,6 +26,26 @@ #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-credentials.h" +/** + * SECTION:gsignond-credentials + * @short_description: credentials (username, password) associated with an identity + * @include: gsignond/gsignond-credentials.h + * + * #GSignondCredentials hold a username, password, and identity id, associated + * with an identity. This information in stored in secret storage using + * #GSignondSecretStorage. + */ +/** + * GSignondCredentials: + * + * Opaque #GSignondCredentials data structure. + */ +/** + * GSignondCredentialsClass: + * + * Opaque #GSignondCredentialsClass data structure. + */ + #define GSIGNOND_CREDENTIALS_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ GSIGNOND_TYPE_CREDENTIALS, \ @@ -82,9 +102,9 @@ gsignond_credentials_init (GSignondCredentials *self) /** * gsignond_credentials_new: * - * Creates new #GSignondCredentials object - * Returns : (transfer full) the #GSignondCredentials object - * + * Creates a new empty #GSignondCredentials object + * + * Returns: (transfer full): the #GSignondCredentials object */ GSignondCredentials * gsignond_credentials_new () @@ -95,13 +115,12 @@ gsignond_credentials_new () /** * gsignond_credentials_set_data: - * * @self: the object whose data is to be set. - * @id: the identity associated with the credentials. - * @username: the username. - * @password: the password. + * @id: the identity id associated with the credentials. + * @username: (transfer none): the username. + * @password: (transfer none):the password. * - * Sets the data of the object. + * Sets the data of the #GSignondCredentials. * * Returns: TRUE if successful, FALSE otherwise. */ @@ -121,11 +140,10 @@ gsignond_credentials_set_data( /** * gsignond_credentials_set_id: - * * @self: the object whose id is to be set. * @id: the id. * - * Sets the id of the GSignondCredentials object + * Sets the identity id of the #GSignondCredentials object * * Returns: TRUE if successful, FALSE otherwise. */ @@ -141,12 +159,11 @@ gsignond_credentials_set_id( /** * gsignond_credentials_get_id: - * * @self: the object whose id is to be set. * - * Returns the id from the #GSignondCredentials object + * Gets the identity id * - * Returns: the id if the object is valid, NULL otherwise. + * Returns: the id */ guint32 gsignond_credentials_get_id(GSignondCredentials *self) @@ -158,12 +175,10 @@ gsignond_credentials_get_id(GSignondCredentials *self) /** * gsignond_credentials_set_username: - * * @self: the object whose username is to be set. - * @username: the username. + * @username: (transfer none): the username. * - * Sets the username of the GSignondCredentials object; old username is - * freed if it exits + * Sets the username of the GSignondCredentials object * * Returns: TRUE if successful, FALSE otherwise. */ @@ -186,12 +201,11 @@ gsignond_credentials_set_username( /** * gsignond_credentials_get_username: - * * @self: the object whose username is to be set. * - * Returns the username from the #GSignondCredentials object + * Gets the username of the #GSignondCredentials object * - * Returns: the username if the object is valid, NULL otherwise. + * Returns: (transfer none): the username if the object is valid, NULL otherwise. */ const gchar* gsignond_credentials_get_username(GSignondCredentials *self) @@ -202,12 +216,10 @@ gsignond_credentials_get_username(GSignondCredentials *self) /** * gsignond_credentials_set_password: - * * @self: the object whose password is to be set. - * @password: the password. + * @password: (transfer none): the password. * - * Sets the password of the GSignondCredentials object; old password is - * freed if it exits + * Sets the password of the GSignondCredentials object * * Returns: TRUE if successful, FALSE otherwise. */ @@ -230,12 +242,11 @@ gsignond_credentials_set_password( /** * gsignond_credentials_get_password: - * * @self: the object whose password is to be set. * - * Returns the password from the #GSignondCredentials object + * Gets the password from the #GSignondCredentials object * - * Returns: the password if the object is valid, NULL otherwise. + * Returns: (transfer none): the password if the object is valid, NULL otherwise. */ const gchar* gsignond_credentials_get_password(GSignondCredentials *self) @@ -246,7 +257,6 @@ gsignond_credentials_get_password(GSignondCredentials *self) /** * gsignond_credentials_equal: - * * @one: the first credential to be compared. * @two: the second credential to be compared. * diff --git a/src/common/gsignond-dictionary.c b/src/common/gsignond-dictionary.c index 7d2c0c2..8ec88c3 100644 --- a/src/common/gsignond-dictionary.c +++ b/src/common/gsignond-dictionary.c @@ -26,13 +26,43 @@ #include #include +/** + * SECTION:gsignond-dictionary + * @short_description: a dictionary container holding string keys and variant values + * @title: GSignondDictionary + * @include: gsignond/gsignond-dictionary.h + * + * A #GSignondDictionary is a dictionary data structure that maps string keys to #GVariant values. + * It's used in multiple places in gsignond and its public API to pass key-value + * data sets. + * + * |[ GSignondDictionary* dict = gsignond_dictionary_new(); + * gsignond_dictionary_set_string(dict, "name", "John Smith"); + * gsignond_dictionary_set_uint32(dict, "age", 32); + * + * guint32 age; + * gboolean success = gsignond_dictionary_get_uint32(dict, "age", &age); + * const gchar* name = gsignond_dictionary_get_string(dict, "name"); + * gsignond_dictionary_unref(dict); + * ]| + */ + +/** + * GSignondDictionary: + * + * #GSignondDictionary is a typedef for #GHashTable, which + * means the developers may also use methods associated with that structure. + */ + /** * gsignond_dictionary_new_from_variant: * @variant: instance of #GVariant * - * Converts the variant to GSignondDictionary. + * Converts the #GVariant to #GSignondDictionary. This is useful for example if + * the dictionary needs to be deserialized, or if it's contained in another + * #GSignondDictionary and has been retrieved using gsignond_dictionary_get(). * - * Returns: (transfer full) object if successful, NULL otherwise. + * Returns: (transfer full): #GSignondDictionary if successful, NULL otherwise. */ GSignondDictionary * gsignond_dictionary_new_from_variant (GVariant *variant) @@ -58,9 +88,10 @@ gsignond_dictionary_new_from_variant (GVariant *variant) * gsignond_dictionary_to_variant: * @dict: instance of #GSignondDictionary * - * Converts the GSignondDictionary to variant. + * Converts the #GSignondDictionary to a #GVariant. The result can be serialized + * or put into another #GSignondDictionary using gsignond_dictionary_set(). * - * Returns: (transfer full) #GVariant object if successful, NULL otherwise. + * Returns: (transfer full): #GVariant object if successful, NULL otherwise. */ GVariant * gsignond_dictionary_to_variant (GSignondDictionary *dict) @@ -90,9 +121,9 @@ gsignond_dictionary_to_variant (GSignondDictionary *dict) /** * gsignond_dictionary_new: * - * Creates new instance of GSignondDictionary. + * Creates a new instance of #GSignondDictionary. * - * Returns: (transfer full) #GSignondDictionary object if successful, + * Returns: (transfer full): #GSignondDictionary object if successful, * NULL otherwise. */ GSignondDictionary * @@ -108,21 +139,24 @@ gsignond_dictionary_new (void) * gsignond_dictionary_ref: * @dict: instance of #GSignondDictionary * - * Increment reference count of the dictionary structure. + * Increments the reference count of the dictionary structure. + * + * Returns: the pointer to the passed in #GSignondDictionary */ -void +GSignondDictionary* gsignond_dictionary_ref (GSignondDictionary *dict) { - g_return_if_fail (dict != NULL); + g_return_val_if_fail (dict != NULL, NULL); - g_hash_table_ref (dict); + return (GSignondDictionary*)g_hash_table_ref (dict); } /** * gsignond_dictionary_unref: * @dict: instance of #GSignondDictionary * - * Decrement reference count of the dictionary structure. + * Decrements the reference count of the dictionary structure. If the reference + * count reaches zero, the structure is deallocated and shouldn't be used. * */ void @@ -137,10 +171,16 @@ gsignond_dictionary_unref (GSignondDictionary *dict) /** * gsignond_dictionary_get: * @dict: instance of #GSignondDictionary + * @key: the key to look up in the dictionary * - * Retrieves a value from the dictionary. + * Retrieves a #GVariant value from the dictionary. This can be used to retrieve + * a value of an arbitrary type, and then convert it manually to a specific type + * using #GVariant methods. For most commonly used types, also getters that + * return the specific type directly are provided (gsignond_dictionary_get_string() + * and similar). * - * Returns: (transfer none) the value; NULL is returned in case of failure. + * Returns: (transfer none): the value; NULL is returned in case of failure (for + * example if the entry corresponding to the supplied key doesn't exist). */ GVariant * gsignond_dictionary_get (GSignondDictionary *dict, const gchar *key) @@ -154,11 +194,12 @@ gsignond_dictionary_get (GSignondDictionary *dict, const gchar *key) /** * gsignond_dictionary_set: * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to be set + * @value: (transfer full): value to be set * - * @key: key to be set - * @value: value to be set - * - * Adds or replaces key-value pair in the dictionary. + * Adds or replaces key-value pair in the dictionary. This allows to set a value + * of an arbitrary type: it first needs to be converted to a #GVariant. For most + * commonly used types also type-specific setters are provided. * * Returns: TRUE if successful, FALSE otherwise. */ @@ -181,8 +222,13 @@ gsignond_dictionary_set (GSignondDictionary *dict, /** * gsignond_dictionary_get_boolean: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to look up + * @value: points to the location where the value should be set + * + * Retrieves a gboolean value. * - * Overload, see #gsignond_dictionary_get for details. + * Returns: TRUE if the value was retrieved successfully, FALSE otherwise. */ gboolean gsignond_dictionary_get_boolean (GSignondDictionary *dict, const gchar *key, @@ -199,9 +245,14 @@ gsignond_dictionary_get_boolean (GSignondDictionary *dict, const gchar *key, } /** - * gsignon_dictionary_set_boolean: + * gsignond_dictionary_set_boolean: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to set + * @value: value to set * - * Overload, see #gsignond_dictionary_set for details. + * Sets or replaces a gboolean value in the dictionary. + * + * Returns: TRUE if the value was set or replaced successfully, FALSE otherwise. */ gboolean gsignond_dictionary_set_boolean (GSignondDictionary *dict, const gchar *key, @@ -212,8 +263,13 @@ gsignond_dictionary_set_boolean (GSignondDictionary *dict, const gchar *key, /** * gsignond_dictionary_get_int32: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to look up + * @value: points to the location where the value should be set * - * Overload, see #gsignond_dictionary_get for details. + * Retrieves a int32 value. + * + * Returns: TRUE if the value was retrieved successfully, FALSE otherwise. */ gboolean gsignond_dictionary_get_int32 (GSignondDictionary *dict, const gchar *key, @@ -230,9 +286,14 @@ gsignond_dictionary_get_int32 (GSignondDictionary *dict, const gchar *key, } /** - * gsignon_dictionary_set_int32: + * gsignond_dictionary_set_int32: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to set + * @value: value to set * - * Overload, see #gsignond_dictionary_set for details. + * Sets or replaces a int32 value in the dictionary. + * + * Returns: TRUE if the value was set or replaced successfully, FALSE otherwise. */ gboolean gsignond_dictionary_set_int32 (GSignondDictionary *dict, const gchar *key, @@ -242,9 +303,14 @@ gsignond_dictionary_set_int32 (GSignondDictionary *dict, const gchar *key, } /** - * gsignond_dictionary_get_guint32: + * gsignond_dictionary_get_uint32: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to look up + * @value: points to the location where the value should be set * - * Overload, see #gsignond_dictionary_get for details. + * Retrieves a uint32 value. + * + * Returns: TRUE if the value was retrieved successfully, FALSE otherwise. */ gboolean gsignond_dictionary_get_uint32 (GSignondDictionary *dict, const gchar *key, @@ -261,9 +327,14 @@ gsignond_dictionary_get_uint32 (GSignondDictionary *dict, const gchar *key, } /** - * gsignon_dictionary_set_guint32: + * gsignond_dictionary_set_uint32: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to set + * @value: value to set * - * Overload, see #gsignond_dictionary_set for details. + * Sets or replaces a uint32 value in the dictionary. + * + * Returns: TRUE if the value was set or replaced successfully, FALSE otherwise. */ gboolean gsignond_dictionary_set_uint32 (GSignondDictionary *dict, const gchar *key, @@ -274,8 +345,13 @@ gsignond_dictionary_set_uint32 (GSignondDictionary *dict, const gchar *key, /** * gsignond_dictionary_get_int64: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to look up + * @value: points to the location where the value should be set * - * Overload, see #gsignond_dictionary_get for details. + * Retrieves a int64 value. + * + * Returns: TRUE if the value was retrieved successfully, FALSE otherwise. */ gboolean gsignond_dictionary_get_int64 (GSignondDictionary *dict, const gchar *key, @@ -292,9 +368,14 @@ gsignond_dictionary_get_int64 (GSignondDictionary *dict, const gchar *key, } /** - * gsignon_dictionary_set_int32: + * gsignond_dictionary_set_int64: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to set + * @value: value to set * - * Overload, see #gsignond_dictionary_set for details. + * Sets or replaces a int64 value in the dictionary. + * + * Returns: TRUE if the value was set or replaced successfully, FALSE otherwise. */ gboolean gsignond_dictionary_set_int64 (GSignondDictionary *dict, const gchar *key, @@ -304,9 +385,14 @@ gsignond_dictionary_set_int64 (GSignondDictionary *dict, const gchar *key, } /** - * gsignond_dictionary_get_guint32: + * gsignond_dictionary_get_uint64: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to look up + * @value: points to the location where the value should be set * - * Overload, see #gsignond_dictionary_get for details. + * Retrieves a uint64 value. + * + * Returns: TRUE if the value was retrieved successfully, FALSE otherwise. */ gboolean gsignond_dictionary_get_uint64 (GSignondDictionary *dict, const gchar *key, @@ -323,9 +409,14 @@ gsignond_dictionary_get_uint64 (GSignondDictionary *dict, const gchar *key, } /** - * gsignon_dictionary_set_guint32: + * gsignond_dictionary_set_uint64: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to set + * @value: value to set * - * Overload, see #gsignond_dictionary_set for details. + * Sets or replaces a uint64 value in the dictionary. + * + * Returns: TRUE if the value was set or replaced successfully, FALSE otherwise. */ gboolean gsignond_dictionary_set_uint64 (GSignondDictionary *dict, const gchar *key, @@ -337,8 +428,12 @@ gsignond_dictionary_set_uint64 (GSignondDictionary *dict, const gchar *key, /** * gsignond_dictionary_get_string: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to look up * - * Overload, see #gsignond_dictionary_get for details. + * Retrieves a string value. + * + * Returns: (transfer none): the value if it was retrieved successfully, NULL otherwise. */ const gchar * gsignond_dictionary_get_string (GSignondDictionary *dict, const gchar *key) @@ -352,9 +447,14 @@ gsignond_dictionary_get_string (GSignondDictionary *dict, const gchar *key) } /** - * gsignon_dictionary_set_string: + * gsignond_dictionary_set_string: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to set + * @value: (transfer none): value to set * - * Overload, see #gsignond_dictionary_set for details. + * Sets or replaces a string value in the dictionary. + * + * Returns: TRUE if the value was set or replaced successfully, FALSE otherwise. */ gboolean gsignond_dictionary_set_string (GSignondDictionary *dict, const gchar *key, @@ -366,9 +466,7 @@ gsignond_dictionary_set_string (GSignondDictionary *dict, const gchar *key, /** * gsignond_dictionary_remove: * @dict: instance of #GSignondDictionary - * - * @key: key which needs to be removed from the dictionary - * @value: value to be set + * @key: (transfer none): key which needs to be removed from the dictionary * * Removes key-value pair in the dictionary as per key. * @@ -391,7 +489,7 @@ gsignond_dictionary_remove (GSignondDictionary *dict, const gchar *key) * * Creates a copy of the dictionary. * - * Returns: (transfer full) #GSignondDictionary object if successful, + * Returns: (transfer full): #GSignondDictionary object if the copy was successful, * NULL otherwise. */ GSignondDictionary * diff --git a/src/common/gsignond-enum.c.template b/src/common/gsignond-enum.c.template index 6391b95..d8ce58a 100644 --- a/src/common/gsignond-enum.c.template +++ b/src/common/gsignond-enum.c.template @@ -23,7 +23,7 @@ GType }; the_type = g_@type@_register_static ( - g_intern_static_string ("GSignond@EnumName@"), + g_intern_static_string ("@EnumName@"), values); } diff --git a/src/common/gsignond-error.c b/src/common/gsignond-error.c index 462b43c..7a5dd90 100644 --- a/src/common/gsignond-error.c +++ b/src/common/gsignond-error.c @@ -27,6 +27,85 @@ #include #include +/** + * SECTION:gsignond-error + * @short_description: error definitions and utilities + * @title: Errors + * @include: gsignond/gsignond-error.h + * + * This file provides GSignond error definitions and utilities. + * When creating an error, use #GSIGNOND_ERROR for the error domain and errors + * from #GSignondError for the error code. + * + * |[ GError* err = g_error_new(GSIGNOND_ERROR, GSIGNOND_ERROR_MISSING_DATA, + * "Not enough data"); + * ]| + */ + +/** + * GSIGNOND_ERROR: + * + * This macro should be used when creating a #GError in GSignond plugins and extensions. + * (for example with g_error_new() ) + */ + +/** + * GSignondError: + * @GSIGNOND_ERROR_NONE: No error + * @GSIGNOND_ERROR_UNKNOWN: Catch-all for errors not distinguished by another code. + * @GSIGNOND_ERROR_INTERNAL_SERVER: Signon Daemon internal error. + * @GSIGNOND_ERROR_INTERNAL_COMMUNICATION: Communication with Signon Daemon error. + * @GSIGNOND_ERROR_PERMISSION_DENIED: The operation cannot be performed due to insufficient client permissions. + * @GSIGNOND_ERROR_ENCRYPTION_FAILURE: Failure during data encryption/decryption. + * @GSIGNOND_ERROR_AUTH_SERVICE_ERR: Placeholder to rearrange enumeration - AuthService specific + * @GSIGNOND_ERROR_METHOD_NOT_KNOWN: The method with this name is not found. + * @GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE: The service is temporarily unavailable. + * @GSIGNOND_ERROR_INVALID_QUERY: Parameters for the query are invalid. + * @GSIGNOND_ERROR_IDENTITY_ERR: Placeholder to rearrange enumeration - Identity specific + * @GSIGNOND_ERROR_METHOD_NOT_AVAILABLE: The requested method is not available. + * @GSIGNOND_ERROR_IDENTITY_NOT_FOUND: The identity matching this Identity object was not found on the service. + * @GSIGNOND_ERROR_STORE_FAILED: Storing credentials failed. + * @GSIGNOND_ERROR_REMOVE_FAILED: Removing credentials failed. + * @GSIGNOND_ERROR_SIGN_OUT_FAILED: SignOut failed. + * @GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED: Identity operation was canceled by user. + * @GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE: Query failed. + * @GSIGNOND_ERROR_REFERENCE_NOT_FOUND: Trying to remove nonexistent reference. + * @GSIGNOND_ERROR_AUTH_SESSION_ERR: Placeholder to rearrange enumeration - AuthSession/PluginInterface specific + * @GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE: The requested mechanism is not available. + * @GSIGNOND_ERROR_MISSING_DATA: The SessionData object does not contain necessary information. + * @GSIGNOND_ERROR_INVALID_CREDENTIALS: The supplied credentials are invalid for the mechanism implementation. + * @GSIGNOND_ERROR_NOT_AUTHORIZED: Authorization failed. + * @GSIGNOND_ERROR_WRONG_STATE: An operation method has been called in a wrong state. + * @GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED: The operation is not supported by the mechanism implementation. + * @GSIGNOND_ERROR_NO_CONNECTION: No Network connetion. + * @GSIGNOND_ERROR_NETWORK: Network connetion failed. + * @GSIGNOND_ERROR_SSL: Ssl connection failed. + * @GSIGNOND_ERROR_RUNTIME: Casting SessionData into subclass failed + * @GSIGNOND_ERROR_SESSION_CANCELED: Challenge was cancelled. + * @GSIGNOND_ERROR_TIMED_OUT: Challenge was timed out. + * @GSIGNOND_ERROR_USER_INTERACTION: User interaction dialog failed + * @GSIGNOND_ERROR_OPERATION_FAILED: Temporary failure in authentication. + * @GSIGNOND_ERROR_ENCRYPTION_FAILED: Failure during data encryption/decryption. + * @GSIGNOND_ERROR_TOS_NOT_ACCEPTED: User declined Terms of Service. + * @GSIGNOND_ERROR_FORGOT_PASSWORD: User requested reset password sequence. + * @GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED: Method or mechanism not allowed for this identity. + * @GSIGNOND_ERROR_INCORRECT_DATE: Date time incorrect on device. + * @GSIGNOND_ERROR_USER_ERR: Placeholder to rearrange enumeration - User space specific + * + * This enum provides a list of errors that plugins and extensions can use. + * + */ + +/** + * gsignond_get_gerror_for_id: + * @err: A #GSignondError specifying the error + * @message: Format string for the error message + * @...: parameters for the error string + * + * A helper macro that creates a #GError with the proper gsignond domain + */ + +#define GSIGNOND_ERROR_DOMAIN "gsignond" #define _ERROR_PREFIX "com.google.code.AccountsSSO.gSingleSignOn.Error" GDBusErrorEntry _gsignond_errors[] = @@ -53,7 +132,7 @@ GDBusErrorEntry _gsignond_errors[] = {GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE, _ERROR_PREFIX".MechanismNotAvailable"}, {GSIGNOND_ERROR_MISSING_DATA, _ERROR_PREFIX".MissingData"}, {GSIGNOND_ERROR_INVALID_CREDENTIALS, _ERROR_PREFIX".InvalidCredentials"}, - {GSIGNOND_ERROR_NOT_AUTHORIZED, _ERROR_PREFIX".NotAutherized"}, + {GSIGNOND_ERROR_NOT_AUTHORIZED, _ERROR_PREFIX".NotAuthorized"}, {GSIGNOND_ERROR_WRONG_STATE, _ERROR_PREFIX".WrongState"}, {GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED, _ERROR_PREFIX".OperationNotSupported"}, {GSIGNOND_ERROR_NO_CONNECTION, _ERROR_PREFIX".NoConnection"}, @@ -72,6 +151,11 @@ GDBusErrorEntry _gsignond_errors[] = {GSIGNOND_ERROR_INCORRECT_DATE, _ERROR_PREFIX".IncorrectDate"}, } ; +/** + * gsignond_error_quark: + * + * Creates and returns a domain for GSignond errors. + */ GQuark gsignond_error_quark (void) { @@ -85,38 +169,13 @@ gsignond_error_quark (void) return (GQuark) quark_volatile; } -GString* -gsignond_concat_domain_and_error ( - const gchar *str1, - const gchar *str2) -{ - GString *str = NULL; - g_return_val_if_fail (str1 != NULL && str2 != NULL, NULL); - str = g_string_sized_new (strlen(str1)+strlen(str2)-1); - g_string_printf (str,"[%s].%s\n",str1,str2); - return str; -} - -GString* -gsignond_prepend_domain_to_error_msg (const GError *err) -{ - GString *msg = NULL; - const gchar *domain = NULL; - g_return_val_if_fail (err != NULL, NULL); - if (err->message != NULL) { - domain = g_quark_to_string(err->domain); - msg = gsignond_concat_domain_and_error(domain, err->message); - } - return msg; -} - /** * gsignond_error_new_from_variant: * @var: instance of #GVariant * * Converts the GVariant to GError. * - * Returns: (transfer full) #GError object if successful, NULL otherwise. + * Returns: (transfer full): #GError object if successful, NULL otherwise. */ GError * gsignond_error_new_from_variant ( @@ -143,7 +202,7 @@ gsignond_error_new_from_variant ( * * Converts the GError to GVariant. * - * Returns: (transfer full) #GVariant object if successful, NULL otherwise. + * Returns: (transfer full): #GVariant object if successful, NULL otherwise. */ GVariant * gsignond_error_to_variant ( diff --git a/src/common/gsignond-extension-interface.c b/src/common/gsignond-extension-interface.c index 45362b4..96510d7 100644 --- a/src/common/gsignond-extension-interface.c +++ b/src/common/gsignond-extension-interface.c @@ -25,6 +25,41 @@ #include "gsignond/gsignond-extension-interface.h" +/** + * SECTION:gsignond-extension-interface + * @short_description: provides platform adaptation functionality + * @include: gsignond/gsignond-plugin-interface.h + * + * #GSignondExtension provides access to platform adaptation functionality. It + * contains getter methods for default implementations of #GSignondAccessControlManager, + * #GSignondSecretStorage and #GSignondStorageManager. + * + * gSSO can be adapted to a specific platform environment by implementing a + * custom extension module. The following steps need to be taken: + * + * a) subclass and re-implement some (or all) of the functionality of the above + * three classes. + * + * b) subclass #GSignondExtension and provide implementations of its getter methods for those + * of the adaptation classes that have been changed. + * + * d) provide a function GSignondExtension * extensionname_extension_init(void) + * that returns an instance of the #GSignondExtension subclass. + * + * c) build and install these implementations as a gSSO extension module and + * configure gSSO to use it. + * + * Examples of custom extensions can be seen here: + * + * https://code.google.com/p/accounts-sso/source/browse/?repo=gsignond#git%2Fsrc%2Fextensions + * and gSSO configuration is described in #GSignondConfig. + */ +/** + * GSignondExtension: + * + * Opaque #GSignondExtension data structure. + */ + G_DEFINE_TYPE (GSignondExtension, gsignond_extension, G_TYPE_OBJECT); #define GSIGNOND_EXTENSION_PRIV(obj) G_TYPE_INSTANCE_GET_PRIVATE ((obj), GSIGNOND_TYPE_EXTENSION, GSignondExtensionPrivate) @@ -112,6 +147,17 @@ _get_access_control_manager (GSignondExtension *self, GSignondConfig *config) return priv->access_control_manager; } +/** + * GSignondExtensionClass: + * @parent_class: the parent class + * @get_extension_name: implementation of gsignond_extension_get_name() + * @get_extension_version: implementation of gsignond_extension_get_version() + * @get_storage_manager: implementation of gsignond_extension_get_storage_manager() + * @get_secret_storage: implementation of gsignond_extension_get_secret_storage() + * @get_access_control_manager: implementation of gsignond_extension_get_access_control_manager() + * + * #GSignondExtensionClass class containing pointers to class methods. + */ static void gsignond_extension_class_init (GSignondExtensionClass *klass) { @@ -137,35 +183,14 @@ gsignond_extension_init (GSignondExtension *self) self->priv->secret_storage = NULL; } -static void -_on_extension_dispose (gpointer data, GObject *object) -{ - if (data) *(GSignondExtension **)data = NULL; -} - -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; -} - /** * gsignond_extension_get_name: * @self: object instance. * - * Get human readable name of the extension. + * Get a human readable name of the extension. Default implementation + * returns "default". * - * Returns: (transfer none) name of the extension. + * Returns: (transfer none): name of the extension. */ const gchar * gsignond_extension_get_name (GSignondExtension *self) @@ -178,7 +203,7 @@ gsignond_extension_get_name (GSignondExtension *self) * @self: object instance. * * Get version of the extension, split into four bytes in order from MSB to LSB; - * major, minor, patchlevel, build. + * major, minor, patchlevel, build. Default implementation returns 0. */ guint32 gsignond_extension_get_version (GSignondExtension *self) @@ -191,9 +216,10 @@ gsignond_extension_get_version (GSignondExtension *self) * @self: object instance. * @config: configuration object instance. * - * Factory method to get a singleton storage manager object. + * Factory method to get a singleton storage manager object. See + * #GSignondStorageManager for the description of the default implementation. * - * Returns: (transfer none) storage manager object instance. + * Returns: (transfer none): storage manager object instance. */ GSignondStorageManager * gsignond_extension_get_storage_manager (GSignondExtension *self, @@ -208,9 +234,10 @@ gsignond_extension_get_storage_manager (GSignondExtension *self, * @self: object instance. * @config: configuration object instance. * - * Factory method to get a singleton secret storage object. + * Factory method to get a singleton secret storage object. See + * #GSignondSecretStorage for the description of the default implementation. * - * Returns: (transfer none) secret storage object instance. + * Returns: (transfer none): secret storage object instance. */ GSignondSecretStorage * gsignond_extension_get_secret_storage (GSignondExtension *self, @@ -225,9 +252,10 @@ gsignond_extension_get_secret_storage (GSignondExtension *self, * @self: object instance. * @config: configuration object instance. * - * Factory method to get a singleton access control manager object. + * Factory method to get a singleton access control manager object. See + * #GSignondAccessControlManager for the description of the default implementation. * - * Returns: (transfer none) access control manager object instance. + * Returns: (transfer none): access control manager object instance. */ GSignondAccessControlManager * gsignond_extension_get_access_control_manager (GSignondExtension *self, diff --git a/src/common/gsignond-identity-info-internal.h b/src/common/gsignond-identity-info-internal.h index 2375cbe..60ce7a1 100644 --- a/src/common/gsignond-identity-info-internal.h +++ b/src/common/gsignond-identity-info-internal.h @@ -27,7 +27,7 @@ #define __GSIGNOND_IDENTITY_INFO_INTERNAL_H__ #include -#include +#include "gsignond-identity-info.h" G_BEGIN_DECLS diff --git a/src/common/gsignond-identity-info.c b/src/common/gsignond-identity-info.c index 9e41a41..02af6c3 100644 --- a/src/common/gsignond-identity-info.c +++ b/src/common/gsignond-identity-info.c @@ -23,7 +23,7 @@ * 02110-1301 USA */ -#include +#include "gsignond-identity-info.h" #include "gsignond-identity-info-internal.h" @@ -35,16 +35,25 @@ _gsignond_identity_info_seq_cmp ( GSequenceIter *iter1 = NULL, *iter2 = NULL; gboolean equal = TRUE; - if (one == NULL && two == NULL) + if (one == two) return TRUE; - if ((one != NULL && two == NULL) || - (one == NULL && two != NULL) || - (g_sequence_get_length (one) != g_sequence_get_length (two))) - return FALSE; + if (one == NULL) { + if (g_sequence_get_length (two) == 0) + return TRUE; + else + return FALSE; + } + + if (two == NULL) { + if (g_sequence_get_length (one) == 0) + return TRUE; + else + return FALSE; + } - if (one == two) - return TRUE; + if (g_sequence_get_length (one) != g_sequence_get_length (two)) + return FALSE; iter1 = g_sequence_get_begin_iter (one); while (!g_sequence_iter_is_end (iter1)) { @@ -222,7 +231,7 @@ _gsignond_identity_info_methods_cmp ( * * Creates new instance of GSignondIdentityInfo. * - * Returns: (transfer full) #GSignondIdentityInfo object if successful, + * Returns: (transfer full): #GSignondIdentityInfo object if successful, * NULL otherwise. */ GSignondIdentityInfo * @@ -629,7 +638,7 @@ gsignond_identity_info_set_caption ( * * Retrieves the realms from the info. * - * Returns: (transfer full) the realms if successful, NULL Otherwise. + * Returns: (transfer full): the realms if successful, NULL Otherwise. * when done realms should be freed using g_sequence_free. */ GSequence * @@ -649,7 +658,7 @@ gsignond_identity_info_get_realms (GSignondIdentityInfo *info) * gsignond_identity_info_set_realms: * @info: instance of #GSignondIdentityInfo * - * @realms: (transfer none) realms to be set + * @realms: (transfer none): realms to be set * * Sets the realms of the info. * @@ -674,9 +683,9 @@ gsignond_identity_info_set_realms ( * @info: instance of #GSignondIdentityInfo * * Retrieves the methods from the info whereas #GHashTable consists of - * and #GSequence is a sequence of gchar *. + * (gchar*,GSequence*) and #GSequence is a sequence of gchar *. * - * Returns: (transfer full) the methods if successful, NULL otherwise. + * Returns: (transfer full): the methods if successful, NULL otherwise. * when done, methods should be freed using g_hash_table_unref. */ GHashTable * @@ -714,8 +723,8 @@ gsignond_identity_info_get_methods (GSignondIdentityInfo *info) * gsignond_identity_info_set_methods: * @info: instance of #GSignondIdentityInfo * - * @methods: (transfer none) methods to be set whereas #GHashTable consists of - * and #GSequence is a sequence of gchar *. + * @methods: (transfer none): methods to be set whereas #GHashTable consists of + * (gchar*,#GSequence*) and #GSequence is a sequence of gchar *. * * Sets the methods of the info. * @@ -762,7 +771,7 @@ gsignond_identity_info_set_methods ( * * Retrieves the mechanisms from the info. * - * Returns: (transfer full) the mechanisms if successful, NULL otherwise. + * Returns: (transfer full): the mechanisms if successful, NULL otherwise. * when done, mechanisms should be freed using g_sequence_free; #GSequence is a * sequence of gchar *. */ @@ -837,7 +846,7 @@ gsignond_identity_info_remove_method ( * * Retrieves the access control list from the info. * - * Returns: (transfer full) the list if successful, NULL otherwise. + * Returns: (transfer full): the list if successful, NULL otherwise. * when done, list should be freed using gsignond_security_context_list_free. */ GSignondSecurityContextList * @@ -857,7 +866,7 @@ gsignond_identity_info_get_access_control_list (GSignondIdentityInfo *info) * gsignond_identity_info_set_access_control_list: * @info: instance of #GSignondIdentityInfo * - * @acl: (transfer none) access control list to be set + * @acl: (transfer none): access control list to be set * * Sets the access control list of the info. * @@ -883,7 +892,7 @@ gsignond_identity_info_set_access_control_list ( * * Retrieves the id from the info. * - * Returns: (transfer full) the owner if successful, NULL otherwise. + * Returns: (transfer full): the owner if successful, NULL otherwise. * when done, owner list should be freed using * gsignond_security_context_free. */ @@ -904,7 +913,7 @@ gsignond_identity_info_get_owner (GSignondIdentityInfo *info) * gsignond_identity_info_set_owner: * @info: instance of #GSignondIdentityInfo * - * @owners: (transfer none) owner to be set + * @owners: (transfer none): owner to be set * * Sets the owner of the info. * diff --git a/src/common/gsignond-identity-info.h b/src/common/gsignond-identity-info.h new file mode 100644 index 0000000..be6d318 --- /dev/null +++ b/src/common/gsignond-identity-info.h @@ -0,0 +1,187 @@ +/* vi: set et sw=4 ts=4 cino=t0,(0: */ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of gsignond + * + * Copyright (C) 2012-2013 Intel Corporation. + * + * Contact: Imran Zaman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#ifndef __GSIGNOND_IDENTITY_INFO_H__ +#define __GSIGNOND_IDENTITY_INFO_H__ + +#include +#include +#include +#include + +G_BEGIN_DECLS + +#define GSIGNOND_TYPE_IDENTITY_INFO (GSIGNOND_TYPE_DICTIONARY) + +#define GSIGNOND_IDENTITY_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + GSIGNOND_TYPE_IDENTITY_INFO, \ + GSignondIdentityInfo)) +#define GSIGNOND_IS_IDENTITY_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + GSIGNOND_TYPE_IDENTITY_INFO)) + +typedef GSignondDictionary GSignondIdentityInfo; +typedef GList GSignondIdentityInfoList; + +GSignondIdentityInfo * +gsignond_identity_info_new (void); + +GSignondIdentityInfo * +gsignond_identity_info_copy (GSignondIdentityInfo *info); + +void +gsignond_identity_info_ref (GSignondIdentityInfo *info); + +void +gsignond_identity_info_unref (GSignondIdentityInfo *info); + +guint32 +gsignond_identity_info_get_id (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_id ( + GSignondIdentityInfo *info, + guint32 id); + +gboolean +gsignond_identity_info_get_is_identity_new (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_identity_new (GSignondIdentityInfo *info); + +const gchar * +gsignond_identity_info_get_username (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_username ( + GSignondIdentityInfo *info, + const gchar *username); + +void +gsignond_identity_info_remove_username (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_get_is_username_secret (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_username_secret ( + GSignondIdentityInfo *info, + gboolean username_secret); + +const gchar * +gsignond_identity_info_get_secret (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_secret ( + GSignondIdentityInfo *info, + const gchar *secret); + +void +gsignond_identity_info_remove_secret (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_get_store_secret (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_store_secret ( + GSignondIdentityInfo *info, + gboolean store_secret); + +const gchar * +gsignond_identity_info_get_caption (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_caption ( + GSignondIdentityInfo *info, + const gchar *caption); + +GSequence * +gsignond_identity_info_get_realms (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_realms ( + GSignondIdentityInfo *info, + GSequence *realms); + +GHashTable * +gsignond_identity_info_get_methods (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_methods ( + GSignondIdentityInfo *info, + GHashTable *methods); + +GSequence * +gsignond_identity_info_get_mechanisms ( + GSignondIdentityInfo *info, + const gchar *method); + +gboolean +gsignond_identity_info_remove_method ( + GSignondIdentityInfo *info, + const gchar *method); + +GSignondSecurityContextList * +gsignond_identity_info_get_access_control_list (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_access_control_list ( + GSignondIdentityInfo *info, + const GSignondSecurityContextList *acl); + +GSignondSecurityContext * +gsignond_identity_info_get_owner (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_owner ( + GSignondIdentityInfo *info, + const GSignondSecurityContext *owner); + +gboolean +gsignond_identity_info_get_validated (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_validated ( + GSignondIdentityInfo *info, + gboolean validated); + +guint32 +gsignond_identity_info_get_identity_type (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_identity_type ( + GSignondIdentityInfo *info, + guint32 type); + +gboolean +gsignond_identity_info_compare ( + GSignondIdentityInfo *info, + GSignondIdentityInfo *other); + +void +gsignond_identity_info_list_free (GSignondIdentityInfoList *list); + +G_END_DECLS + +#endif /* __GSIGNOND_IDENTITY_INFO_H__ */ diff --git a/src/common/gsignond-plugin-enum-types.h b/src/common/gsignond-plugin-enum-types.h index a301213..a894461 100644 --- a/src/common/gsignond-plugin-enum-types.h +++ b/src/common/gsignond-plugin-enum-types.h @@ -2,7 +2,7 @@ /* Generated data (by glib-mkenums) */ #ifndef GSIGNOND_PLUGIN_ENUM_TYPES_H_ -#define GSIGNOND_PLUGIND_ENUM_TYPES_H_ +#define GSIGNOND_PLUGIN_ENUM_TYPES_H_ #include diff --git a/src/common/gsignond-plugin-interface.c b/src/common/gsignond-plugin-interface.c index fa9d131..be98631 100644 --- a/src/common/gsignond-plugin-interface.c +++ b/src/common/gsignond-plugin-interface.c @@ -27,8 +27,148 @@ #include "gsignond/gsignond-plugin-interface.h" #include "gsignond-plugin-enum-types.h" +/** + * SECTION:gsignond-plugin-interface + * @short_description: an interface for implementing authentication plugins + * @include: gsignond/gsignond-plugin-interface.h + * + * #GSignondPlugin is an interface for implementing authentication plugins. + * + * When creating a plugin, write the #GObject boilerplate code as usual, but + * + * a) declare the type as follows: + * + * |[ G_DEFINE_TYPE_WITH_CODE (GSignondPasswordPlugin, gsignond_password_plugin, + * G_TYPE_OBJECT, + * G_IMPLEMENT_INTERFACE (GSIGNOND_TYPE_PLUGIN, + * gsignond_plugin_interface_init)); + * ]| + * + * b) implement gsignond_plugin_interface_init as follows: + * + * |[ static void + * gsignond_plugin_interface_init (GSignondPluginInterface *iface) + * { + * iface->cancel = gsignond_password_plugin_cancel; + * iface->request_initial = gsignond_password_plugin_request_initial; + * iface->request = gsignond_password_plugin_request; + * iface->user_action_finished = gsignond_password_plugin_user_action_finished; + * iface->refresh = gsignond_password_plugin_refresh; + * } + * ]| + * + * where the gsignond_password_plugin_cancel etc. are specific implementations of + * plugin interface methods that every plugin must provide (see below for when + * and how they're used by the daemon). + * + * c) override #GSignondPlugin:type and #GSignondPlugin:mechanisms property + * implementations in the plugin class constructor like this: + * + * |[static void + * gsignond_password_plugin_class_init (GSignondPasswordPluginClass *klass) + * { + * GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + * + * gobject_class->set_property = gsignond_password_plugin_set_property; + * gobject_class->get_property = gsignond_password_plugin_get_property; + * + * g_object_class_override_property (gobject_class, PROP_TYPE, "type"); + * g_object_class_override_property (gobject_class, PROP_MECHANISMS, + * "mechanisms"); + * } + * ]| + * (naturally, plugin's property setter should ignore attempts to set these properties, + * and plugin's property getter should provide their values when asked) + * + * The plugin API + * + * Plugins implement authentication sessions which are controlled through the + * plugin API. Authentication sessions follow one another so there is only one active + * session at a time. + * + * The plugin API is a set of methods and signals that should be used in a specific + * sequence: + * + * - successful authentication session begins with gsignond_plugin_request_initial() and ends + * with the plugin issuing a #GSignondPlugin::response-final signal + * - at any point the application can cancel an active session with + * gsignond_plugin_cancel() + * - at any point the plugin can cancel an active session by issuing #GSignondPlugin::error + * signal, which also provides some details about the cancellation reason. + * - if a session is active, and the plugin has an intermediate response or needs + * additional information, it issues #GSignondPlugin::response signal, which the + * application should respond to with gsignond_plugin_request() method. This can + * happen more than once. + * - if the plugin needs to launch UI interaction with the user, it's issuing + * #GSignondPlugin::user-action-required signal, which the application should + * follow up with gsignond_plugin_user_action_finished() method. This can happen + * more than once as well. + * - if, during an active UI session, the application needs a UI refresh + * (for example, to fetch a new captcha image), it's + * requested from the plugin with gsignond_plugin_refresh() method, followed + * by the plugin's response via #GSignondPlugin::refreshed signal. This can happen + * more than once. + * - changes in plugin state are reported through #GSignondPlugin::status-changed signal. + * - if the plugin needs to store information in persistent storage, it issues + * #GSignondPlugin::store signal. Later, that same information is provided as a + * parameter to gsignond_plugin_request_initial(). + * + * Example plugins + * + * See example plugin implementation here: + * + * https://code.google.com/p/accounts-sso/source/browse/?repo=gsignond#git%2Fsrc%2Fplugins. + * + * For examples of out of tree plugins, you can have a look at SASL or OAuth plugin + * implementations: + * + * http://code.google.com/p/accounts-sso/source/browse?repo=gsignond-plugin-sasl. + * + * + * http://code.google.com/p/accounts-sso/source/browse?repo=gsignond-plugin-oa. + * + */ + + +/** + * GSignondPluginState: + * @GSIGNOND_PLUGIN_STATE_NONE: State unknown + * @GSIGNOND_PLUGIN_STATE_RESOLVING: Resolving remote server host name + * @GSIGNOND_PLUGIN_STATE_CONNECTING: Connecting to remote server + * @GSIGNOND_PLUGIN_STATE_SENDING_DATA: Sending data to remote server + * @GSIGNOND_PLUGIN_STATE_WAITING: Waiting for reply from remote server + * @GSIGNOND_PLUGIN_STATE_USER_PENDING: Waiting for response from user + * @GSIGNOND_PLUGIN_STATE_REFRESHING: Refreshing ui request + * @GSIGNOND_PLUGIN_STATE_PROCESS_PENDING: Request has been queued + * @GSIGNOND_PLUGIN_STATE_STARTED: Request has been dequeued + * @GSIGNOND_PLUGIN_STATE_CANCELING: Canceling current process + * @GSIGNOND_PLUGIN_STATE_DONE: Process is finished + * @GSIGNOND_PLUGIN_STATE_HOLDING: Holding long non-expired token + * + * The plugin provides state updates by emitting #GSignondPlugin::status-changed + * signal with this enum and a string describing what happened. + */ + +/** + * GSignondPlugin: + * + * Opaque #GSignondPlugin data structure. + */ G_DEFINE_INTERFACE (GSignondPlugin, gsignond_plugin, 0) +/** + * GSignondPluginInterface: + * @parent: parent interface type. + * @cancel: implementation of gsignond_plugin_cancel() + * @request_initial: implementation of gsignond_plugin_request_initial() + * @request: implementation of gsignond_plugin_request() + * @user_action_finished: implementation of gsignond_plugin_user_action_finished() + * @refresh: implementation of gsignond_plugin_refresh() + * + * #GSignondPluginInterface interface containing pointers to methods that all + * plugin implementations should provide. + */ + /* signals */ enum { @@ -46,46 +186,135 @@ static guint signals[LAST_SIGNAL] = { 0 }; static void gsignond_plugin_default_init (GSignondPluginInterface *g_class) { + /** + * GSignondPlugin::response: + * @plugin: the plugin which emitted the signal + * @session_data: a #GSignondSessionData containing signal parameters + * + * This signal is issued by the plugin when it wants to provide an intermediate + * response to the application or needs additional information from the application. + * + * After issuing this signal the plugin expects a gsignond_plugin_response() call. + */ signals[RESPONSE] = g_signal_new ("response", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, GSIGNOND_TYPE_SESSION_DATA); + /** + * GSignondPlugin::response-final: + * @plugin: the plugin which emitted the signal + * @session_data: a #GSignondSessionData containing signal parameters + * + * This signal is issued by the plugin when it has completed the authentication + * sequence and is used to provide the final response to the application. + * + * After issuing this signal the plugin is idle and is ready for a new + * authentication session. + */ signals[RESPONSE_FINAL] = g_signal_new ("response-final", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, GSIGNOND_TYPE_SESSION_DATA); + /** + * GSignondPlugin::store: + * @plugin: the plugin which emitted the signal + * @data: a #GSignondDictionary containing data to place in persistent storage + * + * This signal is issued by the plugin when it has data to store in persistant + * storage. The same data would later be provided to plugin via + * gsignond_plugin_request_initial @identity_method_cache parameter. + */ signals[STORE] = g_signal_new ("store", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, GSIGNOND_TYPE_DICTIONARY); + /** + * GSignondPlugin::error: + * @plugin: the plugin which emitted the signal + * @error: the details of the error + * + * This signal is issued by the plugin when an error has occured, or the + * plugin otherwise has a reason to cancel the authentication session. The + * @error should be specified according to + * GSignond errors. + * + */ signals[ERROR] = g_signal_new ("error", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_ERROR); + /** + * GSignondPlugin::user-action-required: + * @plugin: the plugin which emitted the signal + * @ui_data: parameters for UI interaction + * + * This signal is issued by the plugin when it needs a UI interaction with + * the user to happen. When the interaction is complete, gsignond_plugin_user_action_finished() + * should be issued. + */ signals[USER_ACTION_REQUIRED] = g_signal_new ("user-action-required", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, GSIGNOND_TYPE_SIGNONUI_DATA); + /** + * GSignondPlugin::refreshed: + * @plugin: the plugin which emitted the signal + * @ui_data: parameters for UI refresh + * + * This signal is issued by the plugin when the UI interaction is ongoing + * and the UI needs to be refreshed. This can be used for example to update + * captcha image in the UI. + */ signals[REFRESHED] = g_signal_new ("refreshed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, GSIGNOND_TYPE_SIGNONUI_DATA); + /** + * GSignondPlugin::status-changed: + * @plugin: the plugin which emitted the signal + * @state: the plugin state + * @message: the message that accompanies the state change + * + * This signal is issued by the plugin when plugin state has changed. This + * can be used by applications to report authentication progress. + */ signals[STATUS_CHANGED] = g_signal_new ("status-changed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, GSIGNOND_TYPE_PLUGIN_STATE, G_TYPE_STRING); + /** + * GSignondPlugin:type: + * + * This property holds a plugin type, or authentication method it implements + * (for example "oauth" or "sasl"). + */ g_object_interface_install_property (g_class, g_param_spec_string ("type", "Type", "Plugin type", "none", G_PARAM_READABLE|G_PARAM_STATIC_STRINGS)); + /** + * GSignondPlugin:mechanisms: + * + * This property holds a list of authentication mechanisms that the plugin + * implements, all specified within the authentication method. For example, + * OAuth plugin could implement "oauth1" and "oauth2" mechanisms. + */ g_object_interface_install_property (g_class, g_param_spec_boxed ( "mechanisms", "Mechanisms", "List of plugin mechanisms", G_TYPE_STRV, G_PARAM_READABLE|G_PARAM_STATIC_STRINGS)); } +/** + * gsignond_plugin_cancel: + * @self: plugin instance + * + * This method cancels an ongoing authentication session. The plugin implementations + * should issue a #GSignondPlugin::error signal with #GSIGNOND_ERROR_SESSION_CANCELED + * error, and prepare for a new authentication session. + */ void gsignond_plugin_cancel (GSignondPlugin *self) { g_return_if_fail (GSIGNOND_IS_PLUGIN (self)); @@ -93,16 +322,36 @@ void gsignond_plugin_cancel (GSignondPlugin *self) GSIGNOND_PLUGIN_GET_INTERFACE (self)->cancel (self); } +/** + * gsignond_plugin_request_initial: + * @self: plugin instance + * @session_data: parameters for the session + * @identity_method_cache: data from persistent storage, saved previously via + * #GSignondPlugin::store signal + * @mechanism: mechanism to use for the authentication + * + * This method starts a new authentication session. + */ void gsignond_plugin_request_initial (GSignondPlugin *self, GSignondSessionData *session_data, + GSignondDictionary *identity_method_cache, const gchar *mechanism) { g_return_if_fail (GSIGNOND_IS_PLUGIN (self)); GSIGNOND_PLUGIN_GET_INTERFACE (self)->request_initial (self, session_data, + identity_method_cache, mechanism); } +/** + * gsignond_plugin_request: + * @self: plugin instance + * @session_data: additional parameters for the session + * + * This method provides the plugin with additional parameters for the session + * after the plugin has asked for it via #GSignondPlugin::response signal. + */ void gsignond_plugin_request (GSignondPlugin *self, GSignondSessionData *session_data) { @@ -111,6 +360,14 @@ void gsignond_plugin_request (GSignondPlugin *self, GSIGNOND_PLUGIN_GET_INTERFACE (self)->request (self, session_data); } +/** + * gsignond_plugin_user_action_finished: + * @self: plugin instance + * @ui_data: results of UI interaction + * + * This method provides the plugin with the results of UI interaction + * after the plugin has asked for it via #GSignondPlugin::user-action-required signal. + */ void gsignond_plugin_user_action_finished (GSignondPlugin *self, GSignondSignonuiData *ui_data) { @@ -120,6 +377,14 @@ void gsignond_plugin_user_action_finished (GSignondPlugin *self, ui_data); } +/** + * gsignond_plugin_refresh: + * @self: plugin instance + * @ui_data: UI refresh parameters + * + * This method asks the plugin to refresh the UI. The plugin responds with + * #GSignondPlugin::refreshed signal. + */ void gsignond_plugin_refresh (GSignondPlugin *self, GSignondSignonuiData *ui_data) { @@ -128,41 +393,98 @@ void gsignond_plugin_refresh (GSignondPlugin *self, GSIGNOND_PLUGIN_GET_INTERFACE (self)->refresh (self, ui_data); } +/** + * gsignond_plugin_response: + * @self: plugin instance + * @session_data: session data + * + * Plugin implementations should use this to issue #GSignondPlugin::response + * signal. This method should not be used otherwise. + */ void gsignond_plugin_response (GSignondPlugin *self, GSignondSessionData *session_data) { g_signal_emit (self, signals[RESPONSE], 0, session_data); } +/** + * gsignond_plugin_response_final: + * @self: plugin instance + * @session_data: session data + * + * Plugin implementations should use this to issue #GSignondPlugin::response-final + * signal. This method should not be used otherwise. + */ void gsignond_plugin_response_final (GSignondPlugin *self, GSignondSessionData *session_data) { g_signal_emit (self, signals[RESPONSE_FINAL], 0, session_data); } +/** + * gsignond_plugin_store: + * @self: plugin instance + * @identity_method_cache: data to store + * + * Plugin implementations should use this to issue #GSignondPlugin::store + * signal. This method should not be used otherwise. + */ void gsignond_plugin_store (GSignondPlugin *self, - GSignondDictionary *token_data) + GSignondDictionary *identity_method_cache) { - g_signal_emit (self, signals[STORE], 0, token_data); + g_signal_emit (self, signals[STORE], 0, identity_method_cache); } +/** + * gsignond_plugin_error: + * @self: plugin instance + * @error: the error + * + * Plugin implementations should use this to issue #GSignondPlugin::error + * signal. This method should not be used otherwise. + */ void gsignond_plugin_error (GSignondPlugin *self, GError *error) { g_signal_emit (self, signals[ERROR], 0, error); } +/** + * gsignond_plugin_user_action_required: + * @self: plugin instance + * @ui_data: UI data + * + * Plugin implementations should use this to issue #GSignondPlugin::user-action-required + * signal. This method should not be used otherwise. + */ void gsignond_plugin_user_action_required (GSignondPlugin *self, GSignondSignonuiData *ui_data) { g_signal_emit (self, signals[USER_ACTION_REQUIRED], 0, ui_data); } +/** + * gsignond_plugin_refreshed: + * @self: plugin instance + * @ui_data: UI data + * + * Plugin implementations should use this to issue #GSignondPlugin::refreshed + * signal. This method should not be used otherwise. + */ void gsignond_plugin_refreshed (GSignondPlugin *self, GSignondSignonuiData *ui_data) { g_signal_emit (self, signals[REFRESHED], 0, ui_data); } +/** + * gsignond_plugin_status_changed: + * @self: plugin instance + * @state: the new state + * @message: the message + * + * Plugin implementations should use this to issue #GSignondPlugin::status-changed + * signal. This method should not be used otherwise. + */ void gsignond_plugin_status_changed (GSignondPlugin *self, GSignondPluginState state, const gchar *message) { diff --git a/src/common/gsignond-security-context.c b/src/common/gsignond-security-context.c index 7b1c3f0..4de8461 100644 --- a/src/common/gsignond-security-context.c +++ b/src/common/gsignond-security-context.c @@ -25,6 +25,45 @@ #include "gsignond/gsignond-security-context.h" + +/** + * SECTION:gsignond-security-context + * @title: GSignondSecurityContext + * @short_description: security context descriptor used in access control checks + * @include: gsignond/gsignond-security-context.h + * + * Security context is a string tuple of system context and application context. + * + * System context can be a binary path, SMACK-label, or MSSF token. + * + * Application context identifies a script or a webpage within an application, + * and it's used for providing access control to runtime environments (when making an access + * control decision requires not only a binary identifier, but also information + * about what the binary is doing). + * + * When an application is trying to access the gSSO service, the system context + * is determined by a specific #GSignondAccessControlManager instance using + * system services of a specific platform. Application context is set by the + * application itself. Then both contexts are used by #GSignondAccessControlManager + * to perform an access control check. + */ + +/** + * GSignondSecurityContext: + * @sys_ctx: system context + * @app_ctx: application context + * + * Security context descriptor used for access control checks. System context + * and application context can contain a wildcard match "*" which has special + * meaning in gsignond_security_context_match() and + * gsignond_security_context_check(). + */ + +/** + * GSignondSecurityContextList: + * + * GList of #GSignondSecurityContext items. + */ static void _security_context_free (gpointer ptr) { @@ -36,9 +75,9 @@ _security_context_free (gpointer ptr) /** * gsignond_security_context_new: * - * Allocates a new security context item. + * Allocates a new security context item. System and app context are empty strings. * - * Returns: (transfer full) allocated #GSignondSecurityContext. + * Returns: (transfer full): allocated #GSignondSecurityContext. */ GSignondSecurityContext * gsignond_security_context_new () @@ -53,13 +92,13 @@ gsignond_security_context_new () } /** - * gsignond_security_context_new_from_vaues: - * @system_context: system security context (such as SMACK/MSSF label/token). - * @application_context: application security context (such as a script name). + * gsignond_security_context_new_from_values: + * @system_context: system security context + * @application_context: application security context * * Allocates and initializes a new security context item. * - * Returns: (transfer full) allocated #GSignondSecurityContext. + * Returns: (transfer full): allocated #GSignondSecurityContext. */ GSignondSecurityContext * gsignond_security_context_new_from_values (const gchar *system_context, @@ -83,9 +122,9 @@ gsignond_security_context_new_from_values (const gchar *system_context, * gsignond_security_context_copy: * @src_ctx: source security context to copy. * - * Copy a security context item. + * Copies a security context item. * - * Returns: (transfer full) a copy of the #GSignondSecurityContext item. + * Returns: (transfer full): a copy of the #GSignondSecurityContext item. */ GSignondSecurityContext * gsignond_security_context_copy (const GSignondSecurityContext *src_ctx) @@ -117,7 +156,7 @@ gsignond_security_context_free (GSignondSecurityContext *ctx) * @ctx: #GSignondSecurityContext item. * @system_context: system security context. * - * Sets the system context part (such as SMACK label or MSSF token) of the + * Sets the system context part of the * #GSignondSecurityContext. */ void @@ -135,10 +174,10 @@ gsignond_security_context_set_system_context (GSignondSecurityContext *ctx, * gsignond_security_context_get_system_context: * @ctx: #GSignondSecurityContext item. * - * Get the system context part (such as SMACK label or MSSF token) of the + * Get the system context partof the * #GSignondSecurityContext. * - * Returns: (transfer none) system context. + * Returns: (transfer none): system context. */ const gchar * gsignond_security_context_get_system_context ( @@ -154,7 +193,7 @@ gsignond_security_context_get_system_context ( * @ctx: #GSignondSecurityContext item. * @application_context: application security context. * - * Sets the application context part (such as a script name or a web page) of + * Sets the application context part of * the #GSignondSecurityContext. */ void @@ -173,10 +212,10 @@ gsignond_security_context_set_application_context ( * gsignond_security_context_get_application_context: * @ctx: #GSignondSecurityContext item. * - * Get the application context part (such as script name or a web page) of + * Get the application context part of * the #GSignondSecurityContext. * - * Returns: (transfer none) application context. + * Returns: (transfer none): application context. */ const gchar * gsignond_security_context_get_application_context ( @@ -188,12 +227,12 @@ gsignond_security_context_get_application_context ( } /** - * signon_security_conetxt_to_variant: + * gsignond_security_context_to_variant: * @ctx: #GSignondSecurityContext item. * * Build a GVariant of type "(ss)" from a #GSignondSecurityContext item. * - * Returns: (transfer full) GVariant construct of a #GSignondSecurityContext. + * Returns: (transfer full): GVariant construct of a #GSignondSecurityContext. */ GVariant * gsignond_security_context_to_variant (const GSignondSecurityContext *ctx) @@ -215,7 +254,7 @@ gsignond_security_context_to_variant (const GSignondSecurityContext *ctx) * * Builds a #GSignondSecurityContext item from a GVariant of type "(ss)". * - * Returns: (transfer full) #GSignondSecurityContext item. + * Returns: (transfer full): #GSignondSecurityContext item. */ GSignondSecurityContext * gsignond_security_context_from_variant (GVariant *variant) @@ -238,7 +277,7 @@ gsignond_security_context_from_variant (GVariant *variant) * @ctx1: first item to compare. * @ctx2: second item to compare. * - * Compare two #GSignondSecurityContext items similar in a way to strcmp(). + * Compare two #GSignondSecurityContext items in a similar way to strcmp(). * * Returns: negative if ctx1 < ctx2, 0 if ctx1 == ctx2 and positive if ctx1 > ctx2. */ @@ -250,8 +289,10 @@ gsignond_security_context_compare (const GSignondSecurityContext *ctx1, if (ctx1 == ctx2) return 0; - g_return_val_if_fail (ctx1 != NULL, -1); - g_return_val_if_fail (ctx2 != NULL, 1); + if (ctx1 == NULL) + return -1; + if (ctx2 == NULL) + return 1; res = g_strcmp0(ctx1->sys_ctx, ctx2->sys_ctx); if (res == 0) @@ -267,7 +308,10 @@ gsignond_security_context_compare (const GSignondSecurityContext *ctx1, * * Compare two #GSignondSecurityContext items match. * - * Returns: TRUE if contexts are equal or either side has wildcard match, otherwise FALSE. Two NULL contexts match. + * Returns: TRUE if contexts are equal or if either side has a wildcard match for + * system context, or if system contexts are equal and either side has a wildcard + * match for the app context, + * otherwise FALSE. Two NULL contexts match. */ gboolean gsignond_security_context_match (const GSignondSecurityContext *ctx1, @@ -275,7 +319,8 @@ gsignond_security_context_match (const GSignondSecurityContext *ctx1, { if (ctx1 == ctx2) return TRUE; - g_return_val_if_fail (ctx1 != NULL && ctx2 != NULL, FALSE); + if (ctx1 == NULL || ctx2 == NULL) + return FALSE; if (g_strcmp0(ctx1->sys_ctx, "*") == 0 || g_strcmp0(ctx2->sys_ctx, "*") == 0) return TRUE; @@ -294,15 +339,19 @@ gsignond_security_context_match (const GSignondSecurityContext *ctx1, * @reference: reference security context item to check against. * @test: security context item to be checked. * - * Check if item @test is covered by @reference. + * Check if @test is covered by @reference. * - * Returns: TRUE if contexts are equal or wildcards of the @reference arguments match, otherwise FALSE. If either or both contexts are NULL, FALSE is returned. + * Returns: TRUE if contexts are equal or the @reference has a wildcard + * system context, or if system contexts are equal and @reference has a wildcard + * application context, otherwise FALSE. If either or both contexts are NULL, + * FALSE is returned. */ gboolean gsignond_security_context_check (const GSignondSecurityContext *reference, const GSignondSecurityContext *test) { - g_return_val_if_fail (reference != NULL && test != NULL, FALSE); + if (reference == NULL || test == NULL) + return FALSE; if (g_strcmp0(reference->sys_ctx, "*") == 0) return TRUE; if (g_strcmp0(reference->sys_ctx, test->sys_ctx) == 0) { @@ -320,7 +369,7 @@ gsignond_security_context_check (const GSignondSecurityContext *reference, * Builds a GVariant of type "a(ss)" from a GList of #GSignondSecurityContext * items. * - * Returns: (transfer full) GVariant construct of a #GSignondSecurityContextList. + * Returns: (transfer full): GVariant construct of a #GSignondSecurityContextList. */ GVariant * gsignond_security_context_list_to_variant ( @@ -349,7 +398,7 @@ gsignond_security_context_list_to_variant ( * Builds a GList of #GSignondSecurityContext items from a GVariant of type * "a(ss)". * - * Returns: (transfer full) #GSignondSecurityContextList item. + * Returns: (transfer full): #GSignondSecurityContextList item. */ GSignondSecurityContextList * gsignond_security_context_list_from_variant (GVariant *variant) @@ -376,7 +425,7 @@ gsignond_security_context_list_from_variant (GVariant *variant) * * Copies a GList of #GSignondSecurityContext items. * - * Returns: (transfer full) #GSignondSecurityContextList item. + * Returns: (transfer full): #GSignondSecurityContextList item. */ GSignondSecurityContextList * gsignond_security_context_list_copy ( @@ -396,7 +445,7 @@ gsignond_security_context_list_copy ( /** * gsignond_security_context_list_free: - * @seclist: (transfer full) #GSignondSecurityContextList item. + * @seclist: (transfer full): #GSignondSecurityContextList item. * * Frees all items and the GList of #GSignondSecurityContext. */ diff --git a/src/common/gsignond-session-data.c b/src/common/gsignond-session-data.c index b07f23c..a8583f3 100644 --- a/src/common/gsignond-session-data.c +++ b/src/common/gsignond-session-data.c @@ -25,12 +25,63 @@ #include + +/** + * SECTION:gsignond-session-data + * @short_description: definitions for authentication session parameters + * @title: GSignondSessionData + * @include: gsignond/gsignond-session-data.h + * + * This file provides commonly used parameters for authentication sessions. + * For each of those a getter and setter is defined, on #GSignondSessionData + * container. The plugins may not use all of these parameters, and they commonly + * require additional, custom parameters which are set using #GSignondDictionary + * setters with explicit key string. + */ + + +/** + * GSignondSessionData: + * + * #GSignondSessionData is simply a typedef for #GSignondDictionary, which + * means the developers may also freely use methods associated with that structure, + * in particular for creating a #GSignondSessionData object with + * gsignond_dictionary_new(). + */ + +/** + * GSignondUiPolicy: + * @GSIGNOND_UI_POLICY_DEFAULT: use a default user interaction scenario + * @GSIGNOND_UI_POLICY_REQUEST_PASSWORD: force an authorization request from the user; + * any cached access tokens should be discarded by the plugin. + * @GSIGNOND_UI_POLICY_NO_USER_INTERACTION: force no interaction with the user + * @GSIGNOND_UI_POLICY_VALIDATION: interaction with the user is only allowed + * for validation captchas and similar security measures + * + * Policy setting to define how plugins should handle interaction with the user. + */ + +/** + * gsignond_session_data_get_username: + * @data: a #GSignondDictionary structure + * + * A getter for a username associated with the authentication session. + * + * Returns: (transfer none) + */ const gchar * gsignond_session_data_get_username (GSignondSessionData *data) { return gsignond_dictionary_get_string (data, "UserName"); } +/** + * gsignond_session_data_set_username: + * @data: a #GSignondDictionary structure + * @username: username to set + * + * A setter for a username associated with the authentication session. + */ void gsignond_session_data_set_username (GSignondSessionData *data, const gchar *username) @@ -38,12 +89,27 @@ gsignond_session_data_set_username (GSignondSessionData *data, gsignond_dictionary_set_string (data, "UserName", username); } +/** + * gsignond_session_data_get_secret: + * @data: a #GSignondDictionary structure + * + * A getter for a secret (e.g. a password) associated with the authentication session. + * + * Returns: (transfer none) + */ const gchar * gsignond_session_data_get_secret (GSignondSessionData *data) { return gsignond_dictionary_get_string (data, "Secret"); } +/** + * gsignond_session_data_set_secret: + * @data: a #GSignondDictionary structure + * @secret: a secret to set + * + * A setter for a secret (e.g. a password) associated with the authentication session. + */ void gsignond_session_data_set_secret (GSignondSessionData *data, const gchar *secret) @@ -51,12 +117,27 @@ gsignond_session_data_set_secret (GSignondSessionData *data, gsignond_dictionary_set_string (data, "Secret", secret); } +/** + * gsignond_session_data_get_realm: + * @data: a #GSignondDictionary structure + * + * A getter for a realm associated with the authentication session. + * + * Returns: (transfer none) + */ const gchar * gsignond_session_data_get_realm (GSignondSessionData *data) { return gsignond_dictionary_get_string (data, "Realm"); } +/** + * gsignond_session_data_set_realm: + * @data: a #GSignondDictionary structure + * @realm: a realm to set + * + * A setter for a realm associated with the authentication session. + */ void gsignond_session_data_set_realm (GSignondSessionData *data, const gchar *realm) @@ -64,12 +145,31 @@ gsignond_session_data_set_realm (GSignondSessionData *data, gsignond_dictionary_set_string (data, "Realm", realm); } +/** + * gsignond_session_data_get_caption: + * @data: a #GSignondDictionary structure + * + * A getter for a caption associated with the authentication session. + * Caption tells the user which application/credentials/provider is requestion + * authentication. + * + * Returns: (transfer none) + */ const gchar * gsignond_session_data_get_caption (GSignondSessionData *data) { return gsignond_dictionary_get_string (data, "Caption"); } +/** + * gsignond_session_data_set_caption: + * @data: a #GSignondDictionary structure + * @caption: a caption to set + * + * A setter for a caption associated with the authentication session. + * Caption tells the user which application/credentials/provider is requestion + * authentication. + */ void gsignond_session_data_set_caption (GSignondSessionData *data, const gchar *caption) @@ -77,6 +177,17 @@ gsignond_session_data_set_caption (GSignondSessionData *data, gsignond_dictionary_set_string (data, "Caption", caption); } +/** + * gsignond_session_data_get_renew_token: + * @data: a #GSignondDictionary structure + * @renew_token: the value for the parameter is written here + * + * A getter for a renew token property associated with the authentication session. + * This property tells the plugin to discard any cached tokens and start + * the authentication process anew. + * + * Returns: whether the key-value pair exists in the @data dictionary or not. + */ gboolean gsignond_session_data_get_renew_token (GSignondSessionData *data, gboolean *renew_token) @@ -84,6 +195,15 @@ gsignond_session_data_get_renew_token (GSignondSessionData *data, return gsignond_dictionary_get_boolean (data, "RenewToken", renew_token); } +/** + * gsignond_session_data_set_renew_token: + * @data: a #GSignondDictionary structure + * @renew_token: whether to renew the token set + * + * A setter for a renew token property associated with the authentication session. + * This property tells the plugin to discard any cached tokens and start + * the authentication process anew. + */ void gsignond_session_data_set_renew_token (GSignondSessionData *data, gboolean renew_token) @@ -91,26 +211,61 @@ gsignond_session_data_set_renew_token (GSignondSessionData *data, gsignond_dictionary_set_boolean (data, "RenewToken", renew_token); } +/** + * gsignond_session_data_get_ui_policy: + * @data: a #GSignondDictionary structure + * @ui_policy: the value for the parameter is written here + * + * A getter for UI policy setting associated with the authentication session. + * The UI policy indicates how the authentication plugin should interact with the user. + * + * Returns: whether the key-value pair exists in the @data dictionary or not. + */ gboolean gsignond_session_data_get_ui_policy (GSignondSessionData *data, - guint32 *ui_policy) + GSignondUiPolicy *ui_policy) { return gsignond_dictionary_get_uint32 (data, "UiPolicy", ui_policy); } +/** + * gsignond_session_data_set_ui_policy: + * @data: a #GSignondDictionary structure + * @ui_policy: ui policy to set + * + * A getter for UI policy setting associated with the authentication session. + * The UI policy indicates how the authentication plugin should interact with the user. + */ void gsignond_session_data_set_ui_policy (GSignondSessionData *data, - guint32 ui_policy) + GSignondUiPolicy ui_policy) { gsignond_dictionary_set_uint32 (data, "UiPolicy", ui_policy); } +/** + * gsignond_session_data_get_network_proxy: + * @data: a #GSignondDictionary structure + * + * A getter for a network proxy setting associated with the authentication session. + * If this property is not set, the default system proxy settings should be used. + * + * Returns: (transfer none) + */ const gchar * gsignond_session_data_get_network_proxy (GSignondSessionData *data) { return gsignond_dictionary_get_string (data, "NetworkProxy"); } +/** + * gsignond_session_data_set_network_proxy: + * @data: a #GSignondDictionary structure + * @network_proxy: network proxy to use + * + * A setter for a network proxy setting associated with the authentication session. + * If this property is not set, the default system proxy settings should be used. + */ void gsignond_session_data_set_network_proxy (GSignondSessionData *data, const gchar *network_proxy) @@ -118,6 +273,16 @@ gsignond_session_data_set_network_proxy (GSignondSessionData *data, gsignond_dictionary_set_string (data, "NetworkProxy", network_proxy); } +/** + * gsignond_session_data_get_network_timeout: + * @data: a #GSignondDictionary structure + * @network_timeout: the value for the parameter is written here + * + * A getter for a network timeout setting associated with the authentication session. + * This can be used to change the default timeout in case of unresponsive servers. + * + * Returns: whether the key-value pair exists in the @data dictionary or not. + */ gboolean gsignond_session_data_get_network_timeout (GSignondSessionData *data, guint32 *network_timeout) @@ -126,6 +291,14 @@ gsignond_session_data_get_network_timeout (GSignondSessionData *data, network_timeout); } +/** + * gsignond_session_data_set_network_timeout: + * @data: a #GSignondDictionary structure + * @network_timeout: network timeout to use + * + * A setter for a network timeout setting associated with the authentication session. + * This can be used to change the default timeout in case of unresponsive servers. + */ void gsignond_session_data_set_network_timeout (GSignondSessionData *data, guint32 network_timeout) @@ -134,6 +307,17 @@ gsignond_session_data_set_network_timeout (GSignondSessionData *data, network_timeout); } +/** + * gsignond_session_data_get_window_id: + * @data: a #GSignondDictionary structure + * @window_id: the value for the parameter is written here + * + * A getter for a window id setting associated with the authentication session. + * This can be used to embed the user interaction window produced by the authentication + * session into an application window. + * + * Returns: whether the key-value pair exists in the @data dictionary or not. + */ gboolean gsignond_session_data_get_window_id (GSignondSessionData *data, guint32 *window_id) @@ -141,6 +325,15 @@ gsignond_session_data_get_window_id (GSignondSessionData *data, return gsignond_dictionary_get_uint32 (data, "WindowId", window_id); } +/** + * gsignond_session_data_set_window_id: + * @data: a #GSignondDictionary structure + * @window_id: window id to use + * + * A setter for a window id setting associated with the authentication session. + * This can be used to embed the user interaction window produced by the authentication + * session into an application window. + */ void gsignond_session_data_set_window_id (GSignondSessionData *data, guint32 window_id) diff --git a/src/common/gsignond-signonui-data.c b/src/common/gsignond-signonui-data.c index c489b9b..af53312 100644 --- a/src/common/gsignond-signonui-data.c +++ b/src/common/gsignond-signonui-data.c @@ -25,6 +25,59 @@ #include +/** + * SECTION:gsignond-signonui-data + * @short_description: definitions for user interaction parameters + * @title: GSignondSignonuiData + * @include: gsignond/gsignond-signonui-data.h + * + * This file provides commonly used parameters for user interaction during + * authentication sessions. + * For each of those a getter and setter is defined, on #GSignondSessionData + * container. + * + * This container is used in two directions: by plugins to specify the parameters + * for user interaction that is then performed by SignonUI component, and by SignonUI + * to return the results of that interaction to the plugins. See #GSignondPlugin + * for the user interaction API from the plugins' perspective. + * + * The parameters that are set by the plugin and read by signon UI are captcha url, + * caption, confirm, final url, forgot password, forgot password url, message, + * open url, password, query password, query username, remember + * password, request id, test reply values, title, username. + * + * The parameters that are returned by signon UI to the plugin are captcha response, + * password, query error code, remember password, url response. + */ + +/** + * GSignondSignonuiData: + * + * #GSignondSignonuiData is simply a typedef for #GSignondDictionary, which + * means the developers may also freely use methods associated with that structure, + * in particular for creating a #GSignondSignonuiData object with + * gsignond_dictionary_new(). + */ + +/** + * GSignondSignonuiError: + * @SIGNONUI_ERROR_NONE: No errors + * @SIGNONUI_ERROR_GENERAL: Generic error during interaction + * @SIGNONUI_ERROR_NO_SIGNONUI: Cannot send request to signon-ui + * @SIGNONUI_ERROR_BAD_PARAMETERS: Signon-Ui cannot create dialog based on the given UiSessionData + * @SIGNONUI_ERROR_CANCELED: User canceled action. Plugin should not retry automatically after this + * @SIGNONUI_ERROR_NOT_AVAILABLE: Requested ui is not available. For example browser cannot be started + * @SIGNONUI_ERROR_BAD_URL: Given url was not valid + * @SIGNONUI_ERROR_BAD_CAPTCHA: Given captcha image was not valid + * @SIGNONUI_ERROR_BAD_CAPTCHA_URL: Given url for capctha loading was not valid + * @SIGNONUI_ERROR_REFRESH_FAILED: Refresh failed + * @SIGNONUI_ERROR_FORBIDDEN: Showing ui forbidden by ui policy + * @SIGNONUI_ERROR_FORGOT_PASSWORD: User pressed forgot password + * + * This enum defines errors that may happen during user interaction. + */ + + #define SIGNONUI_KEY_CAPTCHA_RESPONSE "CaptchaResponse" #define SIGNONUI_KEY_CAPTCHA_URL "CaptchaUrl" #define SIGNONUI_KEY_CAPTION "Caption" @@ -45,12 +98,27 @@ #define SIGNONUI_KEY_URL_RESPONSE "UrlResponse" #define SIGNONUI_KEY_USERNAME "UserName" +/** + * gsignond_signonui_data_get_captcha_response: + * @data: a #GSignondDictionary structure + * + * A getter for the user's response to a captcha query. + * + * Returns: (transfer none): the string entered by the user in response to a captcha query. + */ const gchar* gsignond_signonui_data_get_captcha_response (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_CAPTCHA_RESPONSE); } +/** + * gsignond_signonui_data_set_captcha_response: + * @data: a #GSignondDictionary structure + * @response: the string entered by the user in response to a captcha query. + * + * A setter for the user's response to a captcha query. + */ void gsignond_signonui_data_set_captcha_response (GSignondSignonuiData *data, const gchar *response) @@ -58,12 +126,27 @@ gsignond_signonui_data_set_captcha_response (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_CAPTCHA_RESPONSE, response); } +/** + * gsignond_signonui_data_get_captcha_url: + * @data: a #GSignondDictionary structure + * + * A getter for the captcha URL. + * + * Returns: (transfer none): the URL to the captcha image to be verified by user. + */ const gchar* gsignond_signonui_data_get_captcha_url (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_CAPTCHA_URL); } +/** + * gsignond_signonui_data_set_captcha_url: + * @data: a #GSignondDictionary structure + * @url: the URL to the captcha image to be verified by user + * + * A setter for the captcha URL. + */ void gsignond_signonui_data_set_captcha_url (GSignondSignonuiData *data, const gchar *url) @@ -71,12 +154,30 @@ gsignond_signonui_data_set_captcha_url (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_CAPTCHA_URL, url); } +/** + * gsignond_signonui_data_get_caption: + * @data: a #GSignondDictionary structure + * + * A getter for the caption string. Caption tells the user which + * application/credentials/provider is requestion authentication. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_caption (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_CAPTION); } +/** + * gsignond_signonui_data_set_caption: + * @data: a #GSignondDictionary structure + * @caption: the caption string + * + * A setter for the caption string. Caption tells the user which + * application/credentials/provider is requestion authentication. + * + */ void gsignond_signonui_data_set_caption (GSignondSignonuiData *data, const gchar *caption) @@ -84,6 +185,17 @@ gsignond_signonui_data_set_caption (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_CAPTION, caption); } +/** + * gsignond_signonui_data_get_confirm: + * @data: a #GSignondDictionary structure + * @confirm: the value for the property is written here + * + * A getter for the confirm mode. In confirm mode the user is asked to enter + * an old password (which is compared to the supplied password), and a new password twice + * (which is returned). + * + * Returns: whether this property exists in the @data dictionary or not. + */ gboolean gsignond_signonui_data_get_confirm (GSignondSignonuiData *data, gboolean *confirm) @@ -91,6 +203,16 @@ gsignond_signonui_data_get_confirm (GSignondSignonuiData *data, return gsignond_dictionary_get_boolean (data, SIGNONUI_KEY_CONFIRM, confirm); } +/** + * gsignond_signonui_data_set_confirm: + * @data: a #GSignondDictionary structure + * @confirm: the value for the property + * + * A setter for the confirm mode. In confirm mode the user is asked to enter + * an old password (which is compared to the supplied password), and a new password twice + * (which is returned). + * + */ void gsignond_signonui_data_set_confirm (GSignondSignonuiData *data, gboolean confirm) @@ -98,12 +220,34 @@ gsignond_signonui_data_set_confirm (GSignondSignonuiData *data, gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_CONFIRM, confirm); } +/** + * gsignond_signonui_data_get_final_url: + * @data: a #GSignondDictionary structure + * + * A getter for the final URL. When the signon UI detects that the user is at + * the final URL (possibly with additional query or fragment parameters), it + * will close the window and return the full URL via url response property. + * This is used by redirection-based authentication, such as OAuth. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_final_url (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_FINAL_URL); } +/** + * gsignond_signonui_data_set_final_url: + * @data: a #GSignondDictionary structure + * @url: the final url + * + * A setter for the final URL. When the signon UI detects that the user is at + * the final URL (possibly with additional query or fragment parameters), it + * will close the window and return the full URL via url response property. + * This is used by redirection-based authentication, such as OAuth. + * + */ void gsignond_signonui_data_set_final_url (GSignondSignonuiData *data, const gchar *url) @@ -111,28 +255,64 @@ gsignond_signonui_data_set_final_url (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_FINAL_URL, url); } -gboolean -gsignond_signonui_data_get_forgot_password (GSignondSignonuiData *data, - gboolean *forgot_password) +/** + * gsignond_signonui_data_get_forgot_password: + * @data: a #GSignondDictionary structure + * + * A getter for the forgot password string which is shown to the user as a link to + * reset the password or remind him of the password. + * + * Returns: (transfer none) + */ +const gchar* +gsignond_signonui_data_get_forgot_password (GSignondSignonuiData *data) { - return gsignond_dictionary_get_boolean (data, - SIGNONUI_KEY_FORGOT_PASSWORD, - forgot_password); + return gsignond_dictionary_get_string (data, + SIGNONUI_KEY_FORGOT_PASSWORD); } +/** + * gsignond_signonui_data_set_forgot_password: + * @data: a #GSignondDictionary structure + * @forgot: the forgot password string + * + * A setter for the forgot password string, which is shown to the user as a link to + * reset the password or remind him of the password. + * + * Returns: (transfer none): + */ void gsignond_signonui_data_set_forgot_password (GSignondSignonuiData *data, - gboolean forgot) + const gchar* forgot) { - gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_FORGOT_PASSWORD, forgot); + gsignond_dictionary_set_string (data, SIGNONUI_KEY_FORGOT_PASSWORD, forgot); } +/** + * gsignond_signonui_data_get_forgot_password_url: + * @data: a #GSignondDictionary structure + * + * A getter for the forgot password URL, where the user can reset or request a + * reminder of the password. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_forgot_password_url (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_FORGOT_PASSWORD_URL); } +/** + * gsignond_signonui_data_set_forgot_password_url: + * @data: a #GSignondDictionary structure + * @url: the forgot password URL + * + * A setter for the forgot password URL, where the user can reset or request a + * reminder of the password. + * + * Returns: (transfer none) + */ void gsignond_signonui_data_set_forgot_password_url (GSignondSignonuiData *data, const gchar *url) @@ -140,12 +320,28 @@ gsignond_signonui_data_set_forgot_password_url (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_FORGOT_PASSWORD_URL, url); } +/** + * gsignond_signonui_data_get_message: + * @data: a #GSignondDictionary structure + * + * A getter for the message which is show to the user in the signon UI dialog. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_message (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_MESSAGE); } +/** + * gsignond_signonui_data_set_message: + * @data: a #GSignondDictionary structure + * @message: the message + * + * A setter for the message which is show to the user in the signon UI dialog. + * + */ void gsignond_signonui_data_set_message (GSignondSignonuiData *data, const gchar *message) @@ -153,12 +349,28 @@ gsignond_signonui_data_set_message (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_MESSAGE, message); } +/** + * gsignond_signonui_data_get_open_url: + * @data: a #GSignondDictionary structure + * + * A getter for the URL that should be opened by signon UI. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_open_url (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_OPEN_URL); } +/** + * gsignond_signonui_data_set_open_url: + * @data: a #GSignondDictionary structure + * @url: the url to open + * + * A setter for the URL that should be opened by signon UI. + * + */ void gsignond_signonui_data_set_open_url (GSignondSignonuiData *data, const gchar *url) @@ -166,12 +378,28 @@ gsignond_signonui_data_set_open_url (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_OPEN_URL, url); } +/** + * gsignond_signonui_data_get_password: + * @data: a #GSignondDictionary structure + * + * A getter for the password string. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_password (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_PASSWORD); } +/** + * gsignond_signonui_data_set_password: + * @data: a #GSignondDictionary structure + * @password: the password string + * + * A setter for the password string. + * + */ void gsignond_signonui_data_set_password (GSignondSignonuiData *data, const gchar *password) @@ -179,6 +407,16 @@ gsignond_signonui_data_set_password (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_PASSWORD, password); } +/** + * gsignond_signonui_data_get_query_error: + * @data: a #GSignondDictionary structure + * @error: the error is written here + * + * A getter for the UI interaction error. Signon UI sets this to @SIGNONUI_ERROR_NONE if + * there were no errors. + * + * Returns: whether this property exists in the @data dictionary or not. + */ gboolean gsignond_signonui_data_get_query_error (GSignondSignonuiData *data, GSignondSignonuiError *error) @@ -188,6 +426,15 @@ gsignond_signonui_data_get_query_error (GSignondSignonuiData *data, error); } +/** + * gsignond_signonui_data_set_query_error: + * @data: a #GSignondDictionary structure + * @error: the error + * + * A setter for the UI interaction error. Signon UI sets this to @SIGNONUI_ERROR_NONE if + * there were no errors. + * + */ void gsignond_signonui_data_set_query_error (GSignondSignonuiData *data, GSignondSignonuiError error) @@ -195,6 +442,16 @@ gsignond_signonui_data_set_query_error (GSignondSignonuiData *data, gsignond_dictionary_set_uint32 (data, SIGNONUI_KEY_QUERY_ERROR_CODE, error); } +/** + * gsignond_signonui_data_get_query_password: + * @data: a #GSignondDictionary structure + * @query_password: the property is written here + * + * A getter for the query password property. It indicates whether the signon UI + * should ask the user for a password (and return it in the password property). + * + * Returns: whether this property exists in the @data dictionary or not. + */ gboolean gsignond_signonui_data_get_query_password (GSignondSignonuiData *data, gboolean *query_password) @@ -204,6 +461,15 @@ gsignond_signonui_data_get_query_password (GSignondSignonuiData *data, query_password); } +/** + * gsignond_signonui_data_set_query_password: + * @data: a #GSignondDictionary structure + * @query: the property value + * + * A setter for the query password property. It indicates whether the signon UI + * should ask the user for a password (and return it in the password property). + * + */ void gsignond_signonui_data_set_query_password (GSignondSignonuiData *data, gboolean query) @@ -211,6 +477,16 @@ gsignond_signonui_data_set_query_password (GSignondSignonuiData *data, gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_QUERY_PASSWORD, query); } +/** + * gsignond_signonui_data_get_query_username: + * @data: a #GSignondDictionary structure + * @query_username: the property is written here + * + * A getter for the query username property. It indicates whether the signon UI + * should ask the user for a username (and return it in the username property). + * + * Returns: whether this property exists in the @data dictionary or not. + */ gboolean gsignond_signonui_data_get_query_username (GSignondSignonuiData *data, gboolean *query_username) @@ -220,6 +496,15 @@ gsignond_signonui_data_get_query_username (GSignondSignonuiData *data, query_username); } +/** + * gsignond_signonui_data_set_query_username: + * @data: a #GSignondDictionary structure + * @query: the property value + * + * A setter for the query username property. It indicates whether the signon UI + * should ask the user for a username (and return it in the username property). + * + */ void gsignond_signonui_data_set_query_username (GSignondSignonuiData *data, gboolean query) @@ -227,6 +512,15 @@ gsignond_signonui_data_set_query_username (GSignondSignonuiData *data, gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_QUERY_USERNAME, query); } +/** + * gsignond_signonui_data_get_remember_password: + * @data: a #GSignondDictionary structure + * @remember_password: the property is written here + * + * A getter for whether the password should be remembered. + * + * Returns: whether this property exists in the @data dictionary or not. + */ gboolean gsignond_signonui_data_get_remember_password (GSignondSignonuiData *data, gboolean *remember_password) @@ -236,6 +530,14 @@ gsignond_signonui_data_get_remember_password (GSignondSignonuiData *data, remember_password); } +/** + * gsignond_signonui_data_set_remember_password: + * @data: a #GSignondDictionary structure + * @remember: the property value + * + * A setter for whether the password should be remembered. + * + */ void gsignond_signonui_data_set_remember_password (GSignondSignonuiData *data, gboolean remember) @@ -243,12 +545,30 @@ gsignond_signonui_data_set_remember_password (GSignondSignonuiData *data, gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_REMEMBER_PASSWORD, remember); } +/** + * gsignond_signonui_data_get_request_id: + * @data: a #GSignondDictionary structure + * + * A getter for the dialog request id. The id identifies the dialog so that it + * can be refreshed or updated. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_request_id (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_REQUEST_ID); } +/** + * gsignond_signonui_data_set_request_id: + * @data: a #GSignondDictionary structure + * @id: request id + * + * A setter for the dialog request id. The id identifies the dialog so that it + * can be refreshed or updated. + * + */ void gsignond_signonui_data_set_request_id (GSignondSignonuiData *data, const gchar *id) @@ -256,12 +576,30 @@ gsignond_signonui_data_set_request_id (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_REQUEST_ID, id); } +/** + * gsignond_signonui_data_get_test_reply: + * @data: a #GSignondDictionary structure + * + * A getter for the test reply values. It's used only by the signon ui + * implementations to test themselves. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_test_reply (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_TEST_REPLY_VALUES); } +/** + * gsignond_signonui_data_set_test_reply: + * @data: a #GSignondDictionary structure + * @reply: test reply values + * + * A setter for the test reply values. It's used only by the signon ui + * implementations to test themselves. + * + */ void gsignond_signonui_data_set_test_reply (GSignondSignonuiData *data, const gchar *reply) @@ -269,12 +607,28 @@ gsignond_signonui_data_set_test_reply (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_TEST_REPLY_VALUES, reply); } +/** + * gsignond_signonui_data_get_title: + * @data: a #GSignondDictionary structure + * + * A getter for the UI dialog title. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_title (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_TITLE); } +/** + * gsignond_signonui_data_set_title: + * @data: a #GSignondDictionary structure + * @title: the title + * + * A setter for the UI dialog title. + * + */ void gsignond_signonui_data_set_title (GSignondSignonuiData *data, const gchar* title) @@ -282,12 +636,34 @@ gsignond_signonui_data_set_title (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_TITLE, title); } +/** + * gsignond_signonui_data_get_url_response: + * @data: a #GSignondDictionary structure + * + * A getter for the response URL. If the final URL was set in the request to the signon UI, and the signon UI + * detects that it has been reached, then the full final URL is returned using + * this property. This is used by redirection-based authentication such as OAauth. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_url_response (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_URL_RESPONSE); } +/** + * gsignond_signonui_data_set_url_response: + * @data: a #GSignondDictionary structure + * @response: the response URL + * + * A getter for the response URL. If the final URL was set in the request to the + * signon UI, and the signon UI + * detects that it has been reached, then the full final URL is returned using + * this property. This is used by redirection-based authentication such as OAauth. + * + * Returns: (transfer none) + */ void gsignond_signonui_data_set_url_response (GSignondSignonuiData *data, const gchar *response) @@ -295,12 +671,28 @@ gsignond_signonui_data_set_url_response (GSignondSignonuiData *data, gsignond_dictionary_set_string (data, SIGNONUI_KEY_URL_RESPONSE, response); } +/** + * gsignond_signonui_data_get_username: + * @data: a #GSignondDictionary structure + * + * A getter for the username string. + * + * Returns: (transfer none) + */ const gchar* gsignond_signonui_data_get_username (GSignondSignonuiData *data) { return gsignond_dictionary_get_string (data, SIGNONUI_KEY_USERNAME); } +/** + * gsignond_signonui_data_set_username: + * @data: a #GSignondDictionary structure + * @username: the username string + * + * A setter for the username string. + * + */ void gsignond_signonui_data_set_username (GSignondSignonuiData *data, const gchar *username) diff --git a/src/common/gsignond-storage-manager.c b/src/common/gsignond-storage-manager.c index 64e7d72..7df6c27 100644 --- a/src/common/gsignond-storage-manager.c +++ b/src/common/gsignond-storage-manager.c @@ -23,6 +23,7 @@ * 02110-1301 USA */ +#include #include #include @@ -31,6 +32,25 @@ #include "gsignond/gsignond-storage-manager.h" #include "gsignond/gsignond-utils.h" +/** + * SECTION:gsignond-storage-manager + * @short_description: manages encrypted disk storage for storing the secret database + * @include: gsignond/gsignond-plugin-interface.h + * + * #GSignondStorageManager manages encrypted disk storage for storing the + * databases. The default implementation maintains a simple per-user + * directory accessible only to root and gsignond group, but gSSO can be + * configured to use a custom extension that provides a subclassed + * implementation of #GSignondStorageManager + * (see #GSignondExtension for instructions and pointers to examples). + */ +/** + * GSignondStorageManager: + * + * Opaque #GSignondStorageManager data structure. + */ + + #define GSIGNOND_STORAGE_MANAGER_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ GSIGNOND_TYPE_STORAGE_MANAGER, \ @@ -57,17 +77,19 @@ _set_config (GSignondStorageManager *self, GSignondConfig *config) g_assert (self->config == NULL); self->config = config; - const gchar *secure_dir = gsignond_config_get_string ( - self->config, - GSIGNOND_CONFIG_GENERAL_SECURE_DIR); - if (secure_dir) - self->location = g_build_filename (secure_dir, - "gsignond.secret", + gchar *user_dir = g_strdup_printf ("gsignond.%s", g_get_user_name ()); + const gchar *storage_path = gsignond_config_get_string ( + self->config, + GSIGNOND_CONFIG_GENERAL_STORAGE_PATH); + if (storage_path) + self->location = g_build_filename (storage_path, + user_dir, NULL); else - self->location = g_build_filename (g_get_user_data_dir (), - "gsignond.secret", + self->location = g_build_filename ("/var/db", + user_dir, NULL); + g_free (user_dir); DBG ("secure dir %s", self->location); } @@ -142,10 +164,28 @@ _initialize_storage (GSignondStorageManager *self) g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (self->location, FALSE); - if (g_mkdir_with_parents (self->location, S_IRWXU)) - return FALSE; + if (g_access (self->location, R_OK) == 0) + return TRUE; - return TRUE; + gboolean res = FALSE; + + uid_t uid = getuid (); + if (seteuid (0)) + WARN ("seteuid() failed"); + + if (g_mkdir_with_parents (self->location, S_IRWXU | S_IRWXG)) + goto init_exit; + if (chown (self->location, 0, getegid ())) + WARN ("chown() failed"); + if (chmod (self->location, S_IRWXU | S_IRWXG)) + WARN ("chmod() failed"); + res = TRUE; + +init_exit: + if (seteuid (uid)) + WARN ("seteuid failed"); + + return res; } static gboolean @@ -191,6 +231,18 @@ _filesystem_is_mounted (GSignondStorageManager *self) return _storage_is_initialized (self); } +/** + * GSignondStorageManagerClass: + * @parent_class: parent class. + * @initialize_storage: an implementation of gsignond_storage_manager_initialize_storage() + * @delete_storage: an implementation of gsignond_storage_manager_delete_storage() + * @storage_is_initialized: an implementation of gsignond_storage_manager_storage_is_initialized() + * @mount_filesystem: an implementation of gsignond_storage_manager_mount_filesystem() + * @unmount_filesystem: an implementation of gsignond_storage_manager_unmount_filesystem() + * @filesystem_is_mounted: an implementation of gsignond_storage_manager_filesystem_is_mounted() + * + * #GSignondStorageManagerClass class containing pointers to class methods. + */ static void gsignond_storage_manager_class_init (GSignondStorageManagerClass *klass) { @@ -232,8 +284,8 @@ gsignond_storage_manager_init (GSignondStorageManager *self) * gsignond_storage_manager_initialize_storage: * @self: object instance. * - * Initialize encryption storage. Initiali key should be set using - * #gsignond_storage_manager_set_encryption_key before calling this. + * Initialize encryption storage. This means making sure that the + * necessary directories exist and are accessible. * * Returns: success? */ @@ -248,7 +300,8 @@ gsignond_storage_manager_initialize_storage (GSignondStorageManager *self) * gsignond_storage_manager_delete_storage: * @self: object instance. * - * Destroys all the encryption keys and wipes the storage. + * Destroys all the encryption keys and wipes the storage. gsignond_wipe_directory() + * is typically used for the latter. * * Returns: success? */ @@ -263,7 +316,7 @@ gsignond_storage_manager_delete_storage (GSignondStorageManager *self) * gsignond_storage_manager_storage_is_initialized: * @self: object instance. * - * Checks if the storage exists, and if possible if it has been initialized. + * Checks if the storage has been initialized. * * Returns: storage has been initialized? */ @@ -278,10 +331,14 @@ gsignond_storage_manager_storage_is_initialized (GSignondStorageManager *self) * gsignond_storage_manager_mount_filesystem: * @self: object instance. * - * Mounts an encrypted storage and returns filesystem path of the storage - * mount point. + * Mounts an encrypted storage and returns the filesystem path of the storage + * mount point. This path will be used to access the secret database via + * #GSignondSecretStorage. + * + * The default implemenation does nothing, and immediately returns the path for the + * secret database. * - * Returns: (transfer none) path of the storage mount point. + * Returns: (transfer none): path of the storage mount point. */ const gchar * gsignond_storage_manager_mount_filesystem (GSignondStorageManager *self) @@ -294,7 +351,7 @@ gsignond_storage_manager_mount_filesystem (GSignondStorageManager *self) * gsignond_storage_manager_unmount_filesystem: * @self: object instance. * - * Unmounts a previously mounted storage filesystem. + * Unmounts a previously mounted encrypted storage filesystem. * * Returns: success? */ @@ -309,7 +366,7 @@ gsignond_storage_manager_unmount_filesystem (GSignondStorageManager *self) * gsignond_storage_manager_filesystem_is_mounted: * @self: object instance. * - * Checks if the filesystem is currently mounted. + * Checks if the encrypted storage filesystem is currently mounted. * * Returns: filesystem is currently mounted? */ diff --git a/src/common/gsignond-utils.c b/src/common/gsignond-utils.c index 98d4065..df84032 100644 --- a/src/common/gsignond-utils.c +++ b/src/common/gsignond-utils.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -32,10 +33,36 @@ #include "gsignond/gsignond-utils.h" #include "gsignond/gsignond-log.h" +/** + * SECTION:gsignond-utils + * @title: Utility functions + * @short_description: miscellaneous utility functions + * @include: gsignond/gsignond-utils.h + * + * Miscellaneous utility functions are described below. + */ -static size_t pagesize = 0; +typedef struct __nonce_ctx_t +{ + gboolean initialized; + guint32 serial; + guchar key[32]; + guchar entropy[16]; +} _nonce_ctx_t; +static size_t pagesize = 0; +static _nonce_ctx_t _nonce_ctx = { 0, }; +G_LOCK_DEFINE_STATIC (_nonce_lock); +/** + * gsignond_wipe_file: + * @filename: filename to wipe + * + * This function securely wipes the contents of the file, by overwriting it with + * 0's, then 1's, then random data. The file is then removed. + * + * Returns: TRUE if wiping and removal was successful. + */ gboolean gsignond_wipe_file (const gchar *filename) { @@ -123,7 +150,16 @@ _rng_exit: return retval; } - +/** + * gsignond_wipe_directory: + * @dirname: directory to wipe + * + * This function securely wipes the contents of the directory by calling + * gsignond_wipe_file() on each file. It also removes links and empty directories but + * does not recursively wipe them. + * + * Returns: TRUE if wiping and removal was successful. + */ gboolean gsignond_wipe_directory (const gchar *dirname) { @@ -161,3 +197,70 @@ _dir_exit: return retval; } +static gboolean +_init_nonce_gen () +{ + if (G_LIKELY(_nonce_ctx.initialized)) + return TRUE; + + int fd; + + fd = open ("/dev/urandom", O_RDONLY); + if (fd < 0) + goto init_exit; + if (read (fd, _nonce_ctx.key, sizeof (_nonce_ctx.key)) != + sizeof (_nonce_ctx.key)) + goto init_close; + if (read (fd, _nonce_ctx.entropy, sizeof(_nonce_ctx.entropy)) != + sizeof (_nonce_ctx.entropy)) + goto init_close; + + _nonce_ctx.serial = 0; + + _nonce_ctx.initialized = TRUE; + +init_close: + close (fd); + +init_exit: + return _nonce_ctx.initialized; +} + +/** + * gsignond_generate_nonce: + * + * This function generates a random secure nonce using SHA1 HMAC. + * + * Returns: (transfer full): the nonce in lowercase hexadecimal format, 40 bytes long. + */ +gchar * +gsignond_generate_nonce () +{ + GHmac *hmac; + gchar *nonce = NULL; + struct timespec ts; + + G_LOCK (_nonce_lock); + + if (G_UNLIKELY (!_init_nonce_gen())) + goto nonce_exit; + + hmac = g_hmac_new (G_CHECKSUM_SHA1, + _nonce_ctx.key, sizeof (_nonce_ctx.key)); + g_hmac_update (hmac, _nonce_ctx.entropy, sizeof (_nonce_ctx.entropy)); + _nonce_ctx.serial++; + g_hmac_update (hmac, + (const guchar *) &_nonce_ctx.serial, + sizeof (_nonce_ctx.serial)); + if (clock_gettime (CLOCK_MONOTONIC, &ts) == 0) + g_hmac_update (hmac, (const guchar *) &ts, sizeof (ts)); + memset (&ts, 0x00, sizeof(ts)); + nonce = g_strdup (g_hmac_get_string (hmac)); + g_hmac_unref (hmac); + +nonce_exit: + G_UNLOCK (_nonce_lock); + + return nonce; +} + 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 \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 \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 #include -#include +#include "common/gsignond-identity-info.h" #include #include 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 #include @@ -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 #include -#include +#include "common/gsignond-identity-info.h" #include #include 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 +#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 #ifdef G_OS_UNIX # include #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 * @@ -23,9 +23,11 @@ * 02110-1301 USA */ -#include -#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 #ifdef G_OS_UNIX # include #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 * @@ -23,8 +23,9 @@ * 02110-1301 USA */ -#include +#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 #ifdef G_OS_UNIX # include #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 #ifdef G_OS_UNIX # include #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 requestInitial() 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 @@ + 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 -#include +#include "common/gsignond-identity-info.h" #include #include #include 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 -#include +#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 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,11 +424,26 @@ _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) { @@ -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 #include "gsignond-types.h" -#include +#include "common/gsignond-identity-info.h" #include 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 -#include #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 #include #include +#include #include #include #include @@ -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); } diff --git a/src/extensions/Makefile.in b/src/extensions/Makefile.in index b776865..30929b4 100644 --- a/src/extensions/Makefile.in +++ b/src/extensions/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, @@ -15,6 +15,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,9 +55,10 @@ subdir = src/extensions 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 @@ -62,6 +80,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=) \ @@ -442,13 +465,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; \ diff --git a/src/extensions/test/Makefile.am b/src/extensions/test/Makefile.am index 16ac00d..99612aa 100644 --- a/src/extensions/test/Makefile.am +++ b/src/extensions/test/Makefile.am @@ -6,8 +6,10 @@ libextension_test_la_CPPFLAGS = \ -I$(top_srcdir)/include \ $(GSIGNOND_CFLAGS) -libextension_test_la_LIBS = \ - $(GSIGNOND_LIBS) +libextension_test_la_LIBADD = \ + $(top_builddir)/src/common/libgsignond-common.la \ + $(GSIGNOND_LIBS) \ + $(NULL) libextension_test_la_SOURCES = \ test-access-control-manager.h \ diff --git a/src/extensions/test/Makefile.in b/src/extensions/test/Makefile.in index 381134f..b8e93c5 100644 --- a/src/extensions/test/Makefile.in +++ b/src/extensions/test/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@ @@ -39,9 +56,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = src/extensions/test 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 @@ -77,7 +95,10 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(extensionsdir)" LTLIBRARIES = $(extensions_LTLIBRARIES) -libextension_test_la_LIBADD = +am__DEPENDENCIES_1 = +libextension_test_la_DEPENDENCIES = \ + $(top_builddir)/src/common/libgsignond-common.la \ + $(am__DEPENDENCIES_1) am_libextension_test_la_OBJECTS = \ libextension_test_la-test-access-control-manager.lo \ libextension_test_la-test-extension.lo \ @@ -115,6 +136,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libextension_test_la_SOURCES) DIST_SOURCES = $(libextension_test_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) @@ -264,8 +290,10 @@ libextension_test_la_CPPFLAGS = \ -I$(top_srcdir)/include \ $(GSIGNOND_CFLAGS) -libextension_test_la_LIBS = \ - $(GSIGNOND_LIBS) +libextension_test_la_LIBADD = \ + $(top_builddir)/src/common/libgsignond-common.la \ + $(GSIGNOND_LIBS) \ + $(NULL) libextension_test_la_SOURCES = \ test-access-control-manager.h \ @@ -314,7 +342,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-extensionsLTLIBRARIES: $(extensions_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(extensionsdir)" || $(MKDIR_P) "$(DESTDIR)$(extensionsdir)" @list='$(extensions_LTLIBRARIES)'; test -n "$(extensionsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -322,6 +349,8 @@ install-extensionsLTLIBRARIES: $(extensions_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(extensionsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(extensionsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(extensionsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(extensionsdir)"; \ } diff --git a/src/extensions/tizen/Makefile.am b/src/extensions/tizen/Makefile.am index bab7a13..b7301bf 100644 --- a/src/extensions/tizen/Makefile.am +++ b/src/extensions/tizen/Makefile.am @@ -9,6 +9,7 @@ libextension_tizen_la_CPPFLAGS = \ $(LIBECRYPTFS_CFLAGS) libextension_tizen_la_LIBADD = \ + $(top_builddir)/src/common/libgsignond-common.la \ $(GSIGNOND_LIBS) \ $(LIBSMACK_LIBS) \ $(LIBECRYPTFS_LIBS) diff --git a/src/extensions/tizen/Makefile.in b/src/extensions/tizen/Makefile.in index 82335fe..147fd88 100644 --- a/src/extensions/tizen/Makefile.in +++ b/src/extensions/tizen/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@ @@ -39,9 +56,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = src/extensions/tizen 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 @@ -78,8 +96,10 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(extensionsdir)" LTLIBRARIES = $(extensions_LTLIBRARIES) am__DEPENDENCIES_1 = -libextension_tizen_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +libextension_tizen_la_DEPENDENCIES = \ + $(top_builddir)/src/common/libgsignond-common.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_libextension_tizen_la_OBJECTS = \ libextension_tizen_la-tizen-access-control-manager.lo \ libextension_tizen_la-tizen-extension.lo \ @@ -117,6 +137,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libextension_tizen_la_SOURCES) DIST_SOURCES = $(libextension_tizen_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) @@ -269,6 +294,7 @@ libextension_tizen_la_CPPFLAGS = \ $(LIBECRYPTFS_CFLAGS) libextension_tizen_la_LIBADD = \ + $(top_builddir)/src/common/libgsignond-common.la \ $(GSIGNOND_LIBS) \ $(LIBSMACK_LIBS) \ $(LIBECRYPTFS_LIBS) @@ -320,7 +346,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-extensionsLTLIBRARIES: $(extensions_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(extensionsdir)" || $(MKDIR_P) "$(DESTDIR)$(extensionsdir)" @list='$(extensions_LTLIBRARIES)'; test -n "$(extensionsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -328,6 +353,8 @@ install-extensionsLTLIBRARIES: $(extensions_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(extensionsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(extensionsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(extensionsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(extensionsdir)"; \ } diff --git a/src/extensions/tizen/tizen-storage-manager.c b/src/extensions/tizen/tizen-storage-manager.c index 2ee01d4..d098e9e 100644 --- a/src/extensions/tizen/tizen-storage-manager.c +++ b/src/extensions/tizen/tizen-storage-manager.c @@ -77,12 +77,19 @@ _set_config (ExtensionTizenStorageManager *self, GSignondConfig *config) g_assert (self->priv->cdir == NULL); parent->config = config; - parent->location = g_strdup (gsignond_config_get_string (config, - GSIGNOND_CONFIG_GENERAL_SECURE_DIR)); - if (!parent->location) - parent->location = g_build_filename (g_get_user_data_dir (), - "gsignond", NULL); - + gchar *user_dir = g_strdup_printf ("gsignond.%s", g_get_user_name ()); + const gchar *storage_path = gsignond_config_get_string ( + config, + GSIGNOND_CONFIG_GENERAL_STORAGE_PATH); + if (storage_path) + parent->location = g_build_filename (storage_path, + user_dir, + NULL); + else + parent->location = g_build_filename ("/var/db", + user_dir, + NULL); + g_free (user_dir); self->priv->cdir = g_strdup_printf ("%s.efs", parent->location); DBG ("location %s encryption point %s", parent->location, self->priv->cdir); } @@ -165,16 +172,41 @@ _initialize_storage (GSignondStorageManager *parent) ExtensionTizenStorageManagerPrivate *priv = self->priv; g_return_val_if_fail (parent->location, FALSE); + g_return_val_if_fail (priv->cdir, FALSE); + + if (g_access (parent->location, R_OK) == 0 && + g_access (priv->cdir, R_OK) == 0) + return TRUE; + + gboolean res = FALSE; + + uid_t uid = getuid (); + if (seteuid (0)) + WARN ("seteuid() failed"); + DBG ("create mount point %s", parent->location); - if (g_mkdir_with_parents (parent->location, S_IRWXU)) - return FALSE; + if (g_mkdir_with_parents (parent->location, S_IRWXU | S_IRWXG)) + goto init_exit; - g_return_val_if_fail (priv->cdir, FALSE); DBG ("create storage point %s", priv->cdir); - if (g_mkdir_with_parents (priv->cdir, S_IRWXU)) - return FALSE; - - return TRUE; + if (g_mkdir_with_parents (priv->cdir, S_IRWXU | S_IRWXG)) + goto init_exit; + + if (chown (parent->location, 0, getegid ())) + WARN ("chown() failed"); + if (chmod (parent->location, S_IRWXU | S_IRWXG)) + WARN ("chmod() failed"); + if (chown (priv->cdir, 0, getegid ())) + WARN ("chown() failed"); + if (chmod (priv->cdir, S_IRWXU | S_IRWXG)) + WARN ("chmod() failed"); + res = TRUE; + +init_exit: + if (seteuid (uid)) + WARN ("seteuid() failed"); + + return res; } static gboolean @@ -216,11 +248,8 @@ _mount_filesystem (GSignondStorageManager *parent) priv->ksig); DBG ("mount options: %s", mntopts); uid_t uid = getuid (); - gid_t gid = getgid (); - if (setreuid (-1, 0)) - WARN ("setreuid() failed"); - if (setregid (-1, 0)) - WARN ("setregid() failed"); + if (seteuid (0)) + WARN ("seteuid() failed"); DBG ("perform mount %s -> %s", priv->cdir, parent->location); if (mount (priv->cdir, parent->location, "ecryptfs", MS_NOSUID | MS_NODEV, mntopts)) { @@ -233,10 +262,8 @@ _mount_filesystem (GSignondStorageManager *parent) _mount_exit: g_free (mntopts); - if (setreuid (-1, uid)) - WARN ("setreuid() failed"); - if (setregid (-1, gid)) - WARN ("setregid() failed"); + if (seteuid (uid)) + WARN ("seteuid() failed"); return retval; } @@ -247,12 +274,11 @@ _unmount_filesystem (GSignondStorageManager *parent) g_return_val_if_fail (parent != NULL, FALSE); uid_t uid = getuid (); - gid_t gid = getgid (); - setreuid (-1, 0); - setregid (-1, 0); + if (seteuid (0)) + WARN ("seteuid() failed"); umount (parent->location); - setreuid (-1, uid); - setregid (-1, gid); + if (seteuid (uid)) + WARN ("seteuid() failed"); return TRUE; } diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 4a1e118..375f050 100644 --- a/src/plugins/Makefile.in +++ b/src/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, @@ -15,6 +15,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@ @@ -37,9 +54,10 @@ subdir = src/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 @@ -61,6 +79,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=) \ @@ -441,13 +464,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; \ diff --git a/src/plugins/digest/Makefile.in b/src/plugins/digest/Makefile.in index e29047d..65ce0b7 100644 --- a/src/plugins/digest/Makefile.in +++ b/src/plugins/digest/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@ @@ -39,9 +56,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = src/plugins/digest 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 @@ -116,6 +134,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libdigest_la_SOURCES) DIST_SOURCES = $(libdigest_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) @@ -315,7 +338,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(pluginsdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginsdir)" @list='$(plugins_LTLIBRARIES)'; test -n "$(pluginsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -323,6 +345,8 @@ install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pluginsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pluginsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pluginsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pluginsdir)"; \ } diff --git a/src/plugins/digest/gsignond-digest-plugin.c b/src/plugins/digest/gsignond-digest-plugin.c index cd091ea..325f93b 100644 --- a/src/plugins/digest/gsignond-digest-plugin.c +++ b/src/plugins/digest/gsignond-digest-plugin.c @@ -30,6 +30,47 @@ #include "gsignond-digest-plugin.h" #include #include +#include + +/** + * SECTION:gsignond-digest-plugin + * @short_description: a plugin that performs HTTP Digest authentication + * @include: gsignond/gsignond-digest-plugin.h + * + * #GSignondDigestPlugin performs HTTP Digest authentication without exposing + * the password to the application. Digest authentication is described in + * RFC 2617. + * + * gsignond_plugin_request_initial() @session_data parameter should include + * the following string items, whose meaning is described in the RFC: + * - username and secret. If they are absent, they are requested from the user + * via gSSO UI. + * - realm, "Algo", "Nonce", "Method", "DigestUri" - mandatory items. + * - "NonceCount", "Qop", "HEntity". "NonceCount" must be present if "Qop" is + * present, "HEntity" must be present if "Qop" is present and set to "auth-int". + * + * If the plugin has all the data to calculate the digest, it issues + * #GSignondPlugin::response-final signal. @session_data in that signal contains + * the username, "CNonce" item and the digest value under the "Response" key. + * + * If some of the data is incorrect or not available, #GSignondPlugin::error + * signal is issued instead. + * + * #GSignondPlugin:type property is set to "digest", and #GSignondPlugin:mechanisms + * property contains a single entry "digest". + */ +/** + * GSignondDigestPlugin: + * + * Opaque #GSignondDigestPlugin data structure. + */ +/** + * GSignondDigestPluginClass: + * @parent_class: the parent class structure + * + * Opaque #GSignondDigestPluginClass data structure. + */ + static void gsignond_plugin_interface_init (GSignondPluginInterface *iface); @@ -51,12 +92,7 @@ G_DEFINE_TYPE_WITH_CODE (GSignondDigestPlugin, gsignond_digest_plugin, struct _GSignondDigestPluginPrivate { - gboolean initialized; GSignondSessionData *session_data; - GRand *rand; - guint32 serial; - guchar key[32]; - guchar entropy[16]; }; static gchar * @@ -130,29 +166,6 @@ _gsignond_digest_plugin_compute_md5_digest ( return hresponse; } -static gchar * -_gsignond_digest_plugin_generate_nonce (GSignondDigestPluginPrivate *priv) -{ - GHmac *hmac; - gchar *nonce = NULL; - guint32 randint; - struct timespec ts; - - hmac = g_hmac_new (G_CHECKSUM_SHA1, priv->key, sizeof (priv->key)); - g_hmac_update (hmac, priv->entropy, sizeof (priv->entropy)); - priv->serial++; - g_hmac_update (hmac, - (const guchar *) &priv->serial, sizeof (priv->serial)); - if (clock_gettime (CLOCK_MONOTONIC, &ts) == 0) - g_hmac_update (hmac, (const guchar *) &ts, sizeof (ts)); - memset (&ts, 0x00, sizeof(ts)); - randint = g_rand_int (priv->rand); - g_hmac_update (hmac, (const guchar *) &randint, sizeof (randint)); - nonce = g_strdup (g_hmac_get_string (hmac)); - g_hmac_unref (hmac); - return nonce; -} - static void gsignond_digest_plugin_cancel (GSignondPlugin *self) { @@ -171,66 +184,83 @@ gsignond_digest_plugin_request ( } static void -gsignond_digest_plugin_request_initial ( - GSignondPlugin *plugin, - GSignondSessionData *session_data, - const gchar *mechanism) +_gsignond_digest_plugin_return_digest(GSignondPlugin *plugin, + const gchar *username, + const gchar *secret, + GSignondDictionary *session_data) { g_return_if_fail (plugin != NULL); g_return_if_fail (GSIGNOND_IS_DIGEST_PLUGIN (plugin)); - GSignondDigestPlugin *self = GSIGNOND_DIGEST_PLUGIN (plugin); - GSignondDigestPluginPrivate *priv = self->priv; - - g_return_if_fail (priv != NULL); - - if (!priv->initialized) { - GError *error = g_error_new (GSIGNOND_ERROR, GSIGNOND_ERROR_OPERATION_FAILED, "Method initialization failed"); + GSignondSessionData *response = NULL; + const gchar* realm = gsignond_session_data_get_realm (session_data); + const gchar* algo = gsignond_dictionary_get_string (session_data, + "Algo"); + const gchar* nonce = gsignond_dictionary_get_string (session_data, + "Nonce"); + const gchar* nonce_count = gsignond_dictionary_get_string (session_data, + "NonceCount"); + const gchar* qop = gsignond_dictionary_get_string (session_data, + "Qop"); + const gchar* method = gsignond_dictionary_get_string (session_data, + "Method"); + const gchar* digest_uri = gsignond_dictionary_get_string (session_data, + "DigestUri"); + const gchar* hentity = gsignond_dictionary_get_string (session_data, + "HEntity"); + gchar *cnonce = gsignond_generate_nonce (); + if (!cnonce) { + GError* error = g_error_new (GSIGNOND_ERROR, + GSIGNOND_ERROR_MISSING_DATA, "Error in generating nonce"); gsignond_plugin_error (plugin, error); g_error_free (error); return; } - const gchar *username = gsignond_session_data_get_username(session_data); - const gchar *secret = gsignond_session_data_get_secret(session_data); - const gchar *realm = gsignond_session_data_get_realm (session_data); - const gchar *algo = gsignond_dictionary_get_string (session_data, "Algo"); - const gchar *nonce = gsignond_dictionary_get_string (session_data, - "Nonce"); - const gchar *nonce_count = gsignond_dictionary_get_string (session_data, - "NonceCount"); - const gchar *qop = gsignond_dictionary_get_string (session_data, - "Qop"); - const gchar *method = gsignond_dictionary_get_string (session_data, - "Method"); - const gchar *digest_uri = gsignond_dictionary_get_string (session_data, - "DigestUri"); - const gchar *hentity = gsignond_dictionary_get_string (session_data, - "HEntity"); - if ((!realm || !algo || !nonce || !method || !digest_uri) || (qop && g_strcmp0 (qop, "auth-int") == 0 && !hentity) || (qop && !nonce_count)) { - GError* error = g_error_new (GSIGNOND_ERROR, GSIGNOND_ERROR_MISSING_DATA, - "Missing Session Data"); + GError* error = g_error_new (GSIGNOND_ERROR, + GSIGNOND_ERROR_MISSING_DATA, "Missing Session Data"); gsignond_plugin_error (plugin, error); g_error_free (error); return; } + gchar *digest = _gsignond_digest_plugin_compute_md5_digest(algo, + username,realm, secret, nonce, nonce_count, cnonce, qop, method, + digest_uri, hentity); + + response = gsignond_dictionary_new(); + gsignond_session_data_set_username(response, username); + gsignond_dictionary_set_string(response, "CNonce", cnonce); + g_free (cnonce); + gsignond_dictionary_set_string(response, "Response", digest); + g_free(digest); + + gsignond_plugin_response_final(plugin, response); + gsignond_dictionary_unref(response); +} +static void +gsignond_digest_plugin_request_initial ( + GSignondPlugin *plugin, + GSignondSessionData *session_data, + GSignondDictionary *identity_method_cache, + const gchar *mechanism) +{ + g_return_if_fail (plugin != NULL); + g_return_if_fail (GSIGNOND_IS_DIGEST_PLUGIN (plugin)); + + GSignondDigestPlugin *self = GSIGNOND_DIGEST_PLUGIN (plugin); + GSignondDigestPluginPrivate *priv = self->priv; + + g_return_if_fail (priv != NULL); + + const gchar *username = gsignond_session_data_get_username(session_data); + const gchar *secret = gsignond_session_data_get_secret(session_data); + if (username != NULL && secret != NULL) { - gchar *cnonce = _gsignond_digest_plugin_generate_nonce (priv); - GSignondSessionData *response = gsignond_dictionary_new (); - gsignond_session_data_set_username (response, username); - gsignond_dictionary_set_string (response, "CNonce", cnonce); - gchar *digest = _gsignond_digest_plugin_compute_md5_digest (algo, - username,realm, secret, nonce, nonce_count, cnonce, qop, method, - digest_uri, hentity); - g_free (cnonce); - gsignond_dictionary_set_string (response, "Response", digest); - g_free (digest); - gsignond_plugin_response_final (plugin, response); - gsignond_dictionary_unref (response); + _gsignond_digest_plugin_return_digest(plugin, username, secret, session_data); return; } @@ -241,9 +271,11 @@ gsignond_digest_plugin_request_initial ( gsignond_dictionary_ref (session_data); priv->session_data = session_data; - GSignondSignonuiData *user_action_data = gsignond_signonui_data_new (); - DATA_SET_VALUE (user_action_data, "Realm", realm); - DATA_SET_VALUE (user_action_data, "DigestUri", digest_uri); + GSignondSignonuiData *user_action_data = gsignond_dictionary_new (); + DATA_SET_VALUE (user_action_data, "Realm", + gsignond_session_data_get_realm (session_data)); + DATA_SET_VALUE (user_action_data, "DigestUri", + gsignond_dictionary_get_string (session_data, "DigestUri")); gsignond_signonui_data_set_query_username (user_action_data, TRUE); gsignond_signonui_data_set_query_password (user_action_data, TRUE); gsignond_plugin_user_action_required (plugin, user_action_data); @@ -283,47 +315,7 @@ gsignond_digest_plugin_user_action_finished ( username != NULL && secret != NULL && session_data != NULL) { - GSignondSessionData *response = NULL; - const gchar* realm = gsignond_session_data_get_realm (session_data); - const gchar* algo = gsignond_dictionary_get_string (session_data, - "Algo"); - const gchar* nonce = gsignond_dictionary_get_string (session_data, - "Nonce"); - const gchar* nonce_count = gsignond_dictionary_get_string (session_data, - "NonceCount"); - const gchar* qop = gsignond_dictionary_get_string (session_data, - "Qop"); - const gchar* method = gsignond_dictionary_get_string (session_data, - "Method"); - const gchar* digest_uri = gsignond_dictionary_get_string (session_data, - "DigestUri"); - const gchar* hentity = gsignond_dictionary_get_string (session_data, - "HEntity"); - gchar *cnonce = _gsignond_digest_plugin_generate_nonce (priv); - - if ((!realm || !algo || !nonce || !method || !digest_uri) - || (qop && g_strcmp0 (qop, "auth-int") == 0 && !hentity) - || (qop && !nonce_count)) { - GError* error = g_error_new (GSIGNOND_ERROR, - GSIGNOND_ERROR_MISSING_DATA, "Missing Session Data"); - gsignond_plugin_error (plugin, error); - g_error_free (error); - return; - } - gchar *digest = _gsignond_digest_plugin_compute_md5_digest(algo, - username,realm, secret, nonce, nonce_count, cnonce, qop, method, - digest_uri, hentity); - - response = gsignond_dictionary_new(); - gsignond_session_data_set_username(response, username); - gsignond_dictionary_set_string(response, "CNonce", cnonce); - g_free (cnonce); - gsignond_dictionary_set_string(response, "Response", digest); - g_free(digest); - - gsignond_plugin_response_final(plugin, response); - gsignond_dictionary_unref(response); - return; + _gsignond_digest_plugin_return_digest(plugin, username, secret, session_data); } else if (query_error == SIGNONUI_ERROR_CANCELED) { gsignond_digest_plugin_cancel (plugin); } else { @@ -360,27 +352,8 @@ gsignond_digest_plugin_init (GSignondDigestPlugin *self) GSIGNOND_DIGEST_PLUGIN_GET_PRIVATE (self); self->priv = priv; - priv->initialized = FALSE; priv->session_data = NULL; - int fd; - - fd = open ("/dev/urandom", O_RDONLY); - if (fd < 0) - return; - if (read (fd, priv->key, sizeof (priv->key)) != sizeof (priv->key)) - goto init_exit; - if (read (fd, priv->entropy, sizeof(priv->entropy)) != - sizeof (priv->entropy)) - goto init_exit; - - priv->rand = g_rand_new (); - priv->serial = 0; - - priv->initialized = TRUE; - -init_exit: - close (fd); } enum @@ -442,15 +415,6 @@ gsignond_digest_plugin_dispose (GObject *gobject) self->priv->session_data = NULL; } - if (self->priv->rand) { - g_rand_free (self->priv->rand); - self->priv->rand = NULL; - } - - memset (self->priv->key, 0x00, sizeof (self->priv->key)); - memset (self->priv->entropy, 0x00, sizeof (self->priv->entropy)); - self->priv->serial = 0; - /* Chain up to the parent class */ G_OBJECT_CLASS (gsignond_digest_plugin_parent_class)->dispose ( gobject); diff --git a/src/plugins/password/Makefile.in b/src/plugins/password/Makefile.in index a5d5fba..74d6c6b 100644 --- a/src/plugins/password/Makefile.in +++ b/src/plugins/password/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@ @@ -39,9 +56,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = src/plugins/password 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 @@ -116,6 +134,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libpassword_la_SOURCES) DIST_SOURCES = $(libpassword_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) @@ -315,7 +338,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(pluginsdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginsdir)" @list='$(plugins_LTLIBRARIES)'; test -n "$(pluginsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -323,6 +345,8 @@ install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pluginsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pluginsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pluginsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pluginsdir)"; \ } diff --git a/src/plugins/password/gsignond-password-plugin.c b/src/plugins/password/gsignond-password-plugin.c index 90bf757..d00975c 100644 --- a/src/plugins/password/gsignond-password-plugin.c +++ b/src/plugins/password/gsignond-password-plugin.c @@ -27,6 +27,36 @@ #include "gsignond-password-plugin.h" #include +/** + * SECTION:gsignond-password-plugin + * @short_description: a plugin for retrieving the username/password + * @include: gsignond/gsignond-password-plugin.h + * + * #GSignondPasswordPlugin is used in login/password based authentication protocols. + * It returns to the applications the username and password associated with an + * identity. The plugin first checks if the daemon has placed them in + * gsignond_plugin_request_initial() @session_data parameter + * (that means they're already stored in gSSO secure database), and if not, + * the user is asked for the username and password via gSSO UI. + * + * The plugin returns the username and password via #GSignondPlugin::response-final + * if it was able to obtain them, and issues #GSignondPlugin::error otherwise. + * + * #GSignondPlugin:type property is set to "password", and #GSignondPlugin:mechanisms + * property contains a single entry "password". + */ +/** + * GSignondPasswordPlugin: + * + * Opaque #GSignondPasswordPlugin data structure. + */ +/** + * GSignondPasswordPluginClass: + * @parent_class: the parent class structure + * + * Opaque #GSignondPasswordPluginClass data structure. + */ + static void gsignond_plugin_interface_init (GSignondPluginInterface *iface); G_DEFINE_TYPE_WITH_CODE (GSignondPasswordPlugin, gsignond_password_plugin, @@ -51,14 +81,15 @@ static void gsignond_password_plugin_request ( static void gsignond_password_plugin_request_initial ( GSignondPlugin *self, GSignondSessionData *session_data, + GSignondDictionary* identity_method_cache, const gchar *mechanism) { const gchar* username = gsignond_session_data_get_username(session_data); const gchar* secret = gsignond_session_data_get_secret(session_data); - if (secret != NULL) { + if (secret && secret[0]) { GSignondSessionData *response = gsignond_dictionary_new(); - if (username != NULL) + if (username && username[0]) gsignond_session_data_set_username(response, username); gsignond_session_data_set_secret(response, secret); gsignond_plugin_response_final(self, response); @@ -66,8 +97,8 @@ static void gsignond_password_plugin_request_initial ( return; } - GSignondSignonuiData *user_action_data = gsignond_signonui_data_new(); - if (username == NULL) + GSignondSignonuiData *user_action_data = gsignond_dictionary_new(); + if (!username || !username[0]) gsignond_signonui_data_set_query_username(user_action_data, TRUE); else { gsignond_signonui_data_set_query_username(user_action_data, FALSE); diff --git a/src/plugins/ssotest/Makefile.in b/src/plugins/ssotest/Makefile.in index 8020ba7..8696001 100644 --- a/src/plugins/ssotest/Makefile.in +++ b/src/plugins/ssotest/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@ @@ -39,9 +56,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = src/plugins/ssotest 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 @@ -116,6 +134,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libssotest_la_SOURCES) DIST_SOURCES = $(libssotest_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) @@ -315,7 +338,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(pluginsdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginsdir)" @list='$(plugins_LTLIBRARIES)'; test -n "$(pluginsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -323,6 +345,8 @@ install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pluginsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pluginsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pluginsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pluginsdir)"; \ } diff --git a/src/plugins/ssotest/gsignond-ssotest-plugin.c b/src/plugins/ssotest/gsignond-ssotest-plugin.c index 32c6cad..f414577 100644 --- a/src/plugins/ssotest/gsignond-ssotest-plugin.c +++ b/src/plugins/ssotest/gsignond-ssotest-plugin.c @@ -29,6 +29,26 @@ #include "gsignond-ssotest-plugin.h" +/** + * SECTION:gsignond-ssotest-plugin + * @short_description: a plugin that is used internally in gsignond unit test + * @include: gsignond/gsignond-ssotest-plugin.h + * + * #GSignondSsoTestPlugin is used by gsignond unit tests. It should not be used + * by applications. + */ +/** + * GSignondSsoTestPlugin: + * + * Opaque #GSignondSsoTestPlugin data structure. + */ +/** + * GSignondSsoTestPluginClass: + * @parent_class: the parent class structure + * + * Opaque #GSignondSsoTestPluginClass data structure. + */ + #define GSIGNOND_SSOTEST_PLUGIN_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ GSIGNOND_TYPE_SSOTEST_PLUGIN, \ @@ -65,6 +85,7 @@ static void gsignond_ssotest_plugin_cancel (GSignondPlugin *plugin) static void gsignond_ssotest_plugin_request_initial ( GSignondPlugin *plugin, GSignondSessionData *session_data, + GSignondDictionary* identity_method_cache, const gchar *mechanism) { gint i; @@ -121,14 +142,14 @@ static void gsignond_ssotest_plugin_request_initial ( if (g_strcmp0 (mechanism, "mech2") == 0) { const gchar* username = gsignond_session_data_get_username (session_data); - GSignondSignonuiData *user_action_data = gsignond_signonui_data_new(); + GSignondSignonuiData *user_action_data = gsignond_dictionary_new(); if (username == NULL) gsignond_signonui_data_set_query_username (user_action_data, TRUE); else gsignond_signonui_data_set_username (user_action_data, username); gsignond_signonui_data_set_query_password (user_action_data, TRUE); gsignond_plugin_user_action_required (plugin, user_action_data); - gsignond_signonui_data_unref (user_action_data); + gsignond_dictionary_unref (user_action_data); gsignond_dictionary_unref (response); INFO ("mechanism 'mech2' responded'"); return; diff --git a/test/Makefile.am b/test/Makefile.am index efbc92a..7a4a95e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,4 +1,12 @@ +if HAVE_DEBUG SUBDIRS = common daemon db plugins +else +SUBDIRS = + +check-local: + @echo "ERROR: tests are enabled only if ./configure is run with --enable-debug" + @exit 1 +endif VALGRIND_TESTS_DISABLE = valgrind: $(SUBDIRS) @@ -8,4 +16,4 @@ valgrind: $(SUBDIRS) EXTRA_DIST = \ valgrind.supp \ - valgrind_common.mk \ No newline at end of file + valgrind_common.mk diff --git a/test/Makefile.in b/test/Makefile.in index 353ea0e..b61d289 100644 --- a/test/Makefile.in +++ b/test/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, @@ -15,6 +15,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@ @@ -37,9 +54,10 @@ subdir = test 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 @@ -61,6 +79,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=) \ @@ -68,7 +91,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ distdir ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = common daemon db plugins DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -233,7 +256,8 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = common daemon db plugins +@HAVE_DEBUG_FALSE@SUBDIRS = +@HAVE_DEBUG_TRUE@SUBDIRS = common daemon db plugins VALGRIND_TESTS_DISABLE = EXTRA_DIST = \ valgrind.supp \ @@ -446,13 +470,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; \ @@ -472,7 +493,9 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done +@HAVE_DEBUG_TRUE@check-local: check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive all-am: Makefile installdirs: installdirs-recursive @@ -573,23 +596,27 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ + 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-libtool \ - ctags ctags-recursive distclean 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-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - + all all-am check check-am check-local clean clean-generic \ + clean-libtool ctags ctags-recursive distclean \ + 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-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am + + +@HAVE_DEBUG_FALSE@check-local: +@HAVE_DEBUG_FALSE@ @echo "ERROR: tests are enabled only if ./configure is run with --enable-debug" +@HAVE_DEBUG_FALSE@ @exit 1 valgrind: $(SUBDIRS) for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(SUBDIRS)); do \ cd $$t; $(MAKE) valgrind; cd ..;\ diff --git a/test/common/Makefile.am b/test/common/Makefile.am index a6c6885..a43367c 100644 --- a/test/common/Makefile.am +++ b/test/common/Makefile.am @@ -2,7 +2,6 @@ TESTS = commontest TESTS_ENVIRONMENT= SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ SSO_STORAGE_PATH=/tmp/gsignond \ - SSO_SECRET_PATH=/tmp/gsignond \ LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE= diff --git a/test/common/Makefile.in b/test/common/Makefile.in index e0b10e0..296ce48 100644 --- a/test/common/Makefile.in +++ b/test/common/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, @@ -15,6 +15,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@ @@ -40,9 +57,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = test/common 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 @@ -89,6 +107,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(commontest_SOURCES) DIST_SOURCES = $(commontest_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 am__tty_colors = \ @@ -235,7 +258,6 @@ top_srcdir = @top_srcdir@ TESTS_ENVIRONMENT = SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ SSO_STORAGE_PATH=/tmp/gsignond \ - SSO_SECRET_PATH=/tmp/gsignond \ LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE = @@ -654,14 +676,15 @@ uninstall-am: %.valgrind: % @$(TESTS_ENVIRONMENT) \ + RUNNING_VALGRIND=yes \ CK_FORK=no \ - CK_DEFAULT_TIMEOUT=120 \ + CK_TIMEOUT_MULTIPLIER=10 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ valgrind -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ - --leak-resolution=high --num-callers=20 \ + --leak-resolution=high --num-callers=30 \ --error-exitcode=1 \ ./$* diff --git a/test/daemon/Makefile.in b/test/daemon/Makefile.in index 459c065..eae6ce5 100644 --- a/test/daemon/Makefile.in +++ b/test/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, @@ -15,6 +15,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@ @@ -44,9 +61,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = test/daemon 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 @@ -94,6 +112,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(daemontest_SOURCES) DIST_SOURCES = $(daemontest_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 am__tty_colors = \ @@ -656,14 +679,15 @@ uninstall-am: %.valgrind: % @$(TESTS_ENVIRONMENT) \ + RUNNING_VALGRIND=yes \ CK_FORK=no \ - CK_DEFAULT_TIMEOUT=120 \ + CK_TIMEOUT_MULTIPLIER=10 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ valgrind -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ - --leak-resolution=high --num-callers=20 \ + --leak-resolution=high --num-callers=30 \ --error-exitcode=1 \ ./$* diff --git a/test/daemon/daemon-test.c b/test/daemon/daemon-test.c index 51ae1f4..2f4e470 100644 --- a/test/daemon/daemon-test.c +++ b/test/daemon/daemon-test.c @@ -37,7 +37,7 @@ #include "daemon/dbus/gsignond-dbus-auth-service-gen.h" #include "daemon/dbus/gsignond-dbus-identity-gen.h" #include "daemon/dbus/gsignond-dbus-auth-session-gen.h" -#include "gsignond/gsignond-identity-info.h" +#include "common/gsignond-identity-info.h" #include "gsignond/gsignond-log.h" #ifdef USE_P2P @@ -57,7 +57,6 @@ struct IdentityData { { "Secret", "s", "test_pass" }, { "StoreSecret", "b", (void *)TRUE} }; -gchar *exe_name = 0; #if HAVE_GTESTDBUS GTestDBus *dbus = NULL; @@ -65,19 +64,44 @@ GTestDBus *dbus = NULL; GPid daemon_pid = 0; #endif +static gchar* _get_executable_name() +{ + gchar *procfname; + char *path; + ssize_t res; + pid_t pid = getpid(); + + //valgrind does some magic with tasks, so we read the executable name of + //the 'main' task, instead of the current task + procfname = g_strdup_printf ("/proc/%d/task/%d/exe", pid, pid); + path = g_malloc0 (PATH_MAX + 1); + res = readlink (procfname, path, PATH_MAX); + g_free (procfname); + + if (res <= 0) { + WARN ("failed to follow link for pid %d", pid); + g_free (path); + return NULL; + } + return path; +} + static void setup_daemon (void) { + gchar* exe_name = _get_executable_name(); + fail_if(exe_name == NULL); + fail_if (g_setenv ("G_MESSAGES_DEBUG", "all", TRUE) == FALSE); fail_if (g_setenv ("SSO_IDENTITY_TIMEOUT", "5", TRUE) == FALSE); fail_if (g_setenv ("SSO_DAEMON_TIMEOUT", "5", TRUE) == FALSE); fail_if (g_setenv ("SSO_AUTH_SESSION_TIMEOUT", "5", TRUE) == FALSE); fail_if (g_setenv ("SSO_STORAGE_PATH", "/tmp/gsignond", TRUE) == FALSE); - fail_if (g_setenv ("SSO_SECRET_PATH", "/tmp/gsignond", TRUE) == FALSE); fail_if (g_setenv ("SSO_KEYCHAIN_SYSCTX", exe_name, TRUE) == FALSE); fail_if (g_setenv ("SSO_PLUGIN_TIMEOUT", "5", TRUE) == FALSE); - DBG ("Programe name : %s\n", exe_name); + DBG ("Programe pid %d, name : %s\n", getpid(), exe_name); + free(exe_name); if (system("rm -rf /tmp/gsignond") != 0) { DBG("Failed to clean db path : %s\n", strerror(errno)); @@ -182,7 +206,6 @@ teardown_daemon (void) g_unsetenv ("SSO_DAEMON_TIMEOUT"); g_unsetenv ("SSO_AUTH_SESSION_TIMEOUT"); g_unsetenv ("SSO_STORAGE_PATH"); - g_unsetenv ("SSO_SECRET_PATH"); g_unsetenv ("SSO_KEYCHAIN_SYSCTX"); } @@ -768,8 +791,6 @@ int main (int argc, char *argv[]) g_type_init (); #endif - exe_name = argv[0]; - s = daemon_suite(); sr = srunner_create(s); diff --git a/test/db/Makefile.am b/test/db/Makefile.am index 94574f2..5301171 100644 --- a/test/db/Makefile.am +++ b/test/db/Makefile.am @@ -1,6 +1,5 @@ TESTS = dbtest -TESTS_ENVIRONMENT= SSO_STORAGE_PATH=/tmp/gsignond \ - SSO_SECRET_PATH=/tmp/gsignond +TESTS_ENVIRONMENT= SSO_STORAGE_PATH=/tmp/gsignond VALGRIND_TESTS_DISABLE= diff --git a/test/db/Makefile.in b/test/db/Makefile.in index 7eaa9eb..6805be4 100644 --- a/test/db/Makefile.in +++ b/test/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, @@ -15,6 +15,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@ @@ -40,9 +57,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = test/db 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 @@ -90,6 +108,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(dbtest_SOURCES) DIST_SOURCES = $(dbtest_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 am__tty_colors = \ @@ -233,9 +256,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -TESTS_ENVIRONMENT = SSO_STORAGE_PATH=/tmp/gsignond \ - SSO_SECRET_PATH=/tmp/gsignond - +TESTS_ENVIRONMENT = SSO_STORAGE_PATH=/tmp/gsignond VALGRIND_TESTS_DISABLE = SUPPRESSIONS = $(top_srcdir)/test/valgrind.supp dbtest_SOURCES = dbtest.c @@ -653,14 +674,15 @@ uninstall-am: %.valgrind: % @$(TESTS_ENVIRONMENT) \ + RUNNING_VALGRIND=yes \ CK_FORK=no \ - CK_DEFAULT_TIMEOUT=120 \ + CK_TIMEOUT_MULTIPLIER=10 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ valgrind -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ - --leak-resolution=high --num-callers=20 \ + --leak-resolution=high --num-callers=30 \ --error-exitcode=1 \ ./$* diff --git a/test/db/dbtest.c b/test/db/dbtest.c index c5156c9..72d830a 100644 --- a/test/db/dbtest.c +++ b/test/db/dbtest.c @@ -61,10 +61,11 @@ _compare_key_value( { GVariant *value2 = (GVariant *)g_hash_table_lookup (user_data->table, key); - if (value2 && g_variant_get_size (value2) == g_variant_get_size (value2) - && memcmp (g_variant_get_data (value2), + if (value2 && g_variant_get_size (value) == g_variant_get_size (value2) + && memcmp (g_variant_get_data(value2), g_variant_get_data(value), - g_variant_get_size(value2)) == 0) { + g_variant_get_size(value2)) == 0 + && g_variant_is_of_type(value2, g_variant_get_type (value))) { return; } user_data->status = 0; @@ -399,7 +400,6 @@ _gsignond_query_read_string ( START_TEST (test_sql_database) { GSignondDbSecretDatabase *database = NULL; - GSignondConfig *config = NULL; gchar *filename = NULL; const gchar *dir = NULL; GSignondCredentials *creds = NULL; @@ -435,12 +435,7 @@ START_TEST (test_sql_database) fail_unless (gsignond_db_secret_database_remove_data ( database, 1, 2) == FALSE); - config = gsignond_config_new (); - dir = gsignond_config_get_string (config, - GSIGNOND_CONFIG_GENERAL_STORAGE_PATH); - if (!dir) { - dir = g_get_user_data_dir (); - } + dir = "/tmp/gsignond"; g_mkdir_with_parents (dir, S_IRWXU); filename = g_build_filename (dir, "sql_db_test.db", NULL); fail_unless (gsignond_db_sql_database_open (sqldb, filename, @@ -449,7 +444,6 @@ START_TEST (test_sql_database) fail_unless (gsignond_db_sql_database_open (sqldb, filename, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) == TRUE); g_free (filename); - g_object_unref(config); creds = gsignond_credentials_new (); fail_if (creds == NULL); @@ -476,10 +470,15 @@ START_TEST (test_sql_database) (GDestroyNotify)g_variant_unref); fail_if (data == NULL); - g_hash_table_insert (data,"key1",g_variant_new_string ("string_value")); - g_hash_table_insert (data,"key2",g_variant_new_double (12223.4223)); - g_hash_table_insert (data,"key3",g_variant_new_uint16(20)); - g_hash_table_insert (data,"key4",g_variant_new("^ay", "byte_value")); + GVariantBuilder builder; + g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); + g_variant_builder_add (&builder, "{sv}", "key1", g_variant_new_string ("string_value")); + g_variant_builder_add (&builder, "{sv}", "key2",g_variant_new_double (12223.4223)); + g_variant_builder_add (&builder, "{sv}", "key3",g_variant_new_uint16(20)); + g_variant_builder_add (&builder, "{sv}", "key4",g_variant_new("^ay", "byte_value")); + + g_hash_table_insert (data, "dummy_client_id", g_variant_builder_end (&builder)); + fail_unless (gsignond_db_secret_database_update_data ( database, id, method, data) == TRUE); data2 = gsignond_db_secret_database_load_data (database, id, method); @@ -610,6 +609,8 @@ START_TEST (test_secret_storage) const gchar *dir = NULL; config = gsignond_config_new (); + gsignond_config_set_string (config, GSIGNOND_CONFIG_GENERAL_SECURE_DIR, "/tmp/gsignond"); + /* Secret Storage */ storage = g_object_new (GSIGNOND_TYPE_SECRET_STORAGE, "config", config, NULL); @@ -713,6 +714,7 @@ START_TEST (test_metadata_database) GSignondSecurityContext *owner = NULL; config = gsignond_config_new (); + gsignond_config_set_string (config, GSIGNOND_CONFIG_GENERAL_SECURE_DIR, "/tmp/gsignond"); GSignondDbMetadataDatabase* metadata_db = NULL; metadata_db = gsignond_db_metadata_database_new (config); g_object_unref(config); @@ -887,6 +889,7 @@ START_TEST (test_credentials_database) GSignondDictionary *no_cap_filter = NULL; config = gsignond_config_new (); + gsignond_config_set_string (config, GSIGNOND_CONFIG_GENERAL_SECURE_DIR, "/tmp/gsignond"); storage = g_object_new (GSIGNOND_TYPE_SECRET_STORAGE, "config", config, NULL); g_object_unref(config); diff --git a/test/plugins/Makefile.am b/test/plugins/Makefile.am index 90b02ea..4b77125 100644 --- a/test/plugins/Makefile.am +++ b/test/plugins/Makefile.am @@ -3,7 +3,6 @@ TESTS = digestplugintest passwordplugintest pluginproxytest pluginremotetest TESTS_ENVIRONMENT= SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ SSO_STORAGE_PATH=/tmp/gsignond \ - SSO_SECRET_PATH=/tmp/gsignond \ LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE = diff --git a/test/plugins/Makefile.in b/test/plugins/Makefile.in index e8a3604..f4bcbd8 100644 --- a/test/plugins/Makefile.in +++ b/test/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, @@ -15,6 +15,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@ @@ -42,9 +59,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = test/plugins 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 @@ -131,6 +149,11 @@ SOURCES = $(digestplugintest_SOURCES) $(passwordplugintest_SOURCES) \ DIST_SOURCES = $(digestplugintest_SOURCES) \ $(passwordplugintest_SOURCES) $(pluginproxytest_SOURCES) \ $(pluginremotetest_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 am__tty_colors = \ @@ -277,7 +300,6 @@ top_srcdir = @top_srcdir@ TESTS_ENVIRONMENT = SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ SSO_STORAGE_PATH=/tmp/gsignond \ - SSO_SECRET_PATH=/tmp/gsignond \ LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE = @@ -799,14 +821,15 @@ uninstall-am: %.valgrind: % @$(TESTS_ENVIRONMENT) \ + RUNNING_VALGRIND=yes \ CK_FORK=no \ - CK_DEFAULT_TIMEOUT=120 \ + CK_TIMEOUT_MULTIPLIER=10 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ valgrind -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ - --leak-resolution=high --num-callers=20 \ + --leak-resolution=high --num-callers=30 \ --error-exitcode=1 \ ./$* diff --git a/test/plugins/digestplugintest.c b/test/plugins/digestplugintest.c index 953eefd..4dfe3c6 100644 --- a/test/plugins/digestplugintest.c +++ b/test/plugins/digestplugintest.c @@ -117,7 +117,7 @@ START_TEST (test_digestplugin_request) gsignond_session_data_set_username(data, "user1"); gsignond_session_data_set_secret(data, "password1"); - gsignond_plugin_request_initial(plugin, data, "digest"); + gsignond_plugin_request_initial(plugin, data, NULL, "digest"); fail_if(result != NULL); fail_if(ui_action != NULL); fail_if(error == NULL); @@ -134,7 +134,7 @@ START_TEST (test_digestplugin_request) gsignond_dictionary_set_string(data, "Method", "GET"); gsignond_dictionary_set_string(data, "DigestUri", "/test/index.html"); - gsignond_plugin_request_initial(plugin, data, "digest"); + gsignond_plugin_request_initial(plugin, data, NULL, "digest"); fail_if(result == NULL); fail_if(ui_action != NULL); fail_if(error != NULL); @@ -147,7 +147,7 @@ START_TEST (test_digestplugin_request) //remove secret so that ui action is required gsignond_dictionary_remove (data, "Secret"); - gsignond_plugin_request_initial(plugin, data, "digest"); + gsignond_plugin_request_initial(plugin, data, NULL, "digest"); fail_if(result != NULL); fail_if(ui_action == NULL); fail_if(error != NULL); @@ -186,7 +186,7 @@ START_TEST (test_digestplugin_user_action_finished) G_CALLBACK(user_action_required_callback), &ui_action); g_signal_connect(plugin, "error", G_CALLBACK(error_callback), &error); - ui_data = gsignond_signonui_data_new(); + ui_data = gsignond_dictionary_new(); gsignond_signonui_data_set_query_error(ui_data, SIGNONUI_ERROR_NONE); //empty data @@ -243,7 +243,7 @@ START_TEST (test_digestplugin_user_action_finished) "abg10b1234ee1f0e8b11d0f600bfb0c093"); gsignond_dictionary_set_string (data, "Method", "GET"); gsignond_dictionary_set_string (data, "DigestUri", "/test/index.html"); - gsignond_plugin_request_initial (plugin, data, "digest"); + gsignond_plugin_request_initial (plugin, data, NULL, "digest"); gsignond_dictionary_unref (data); data = NULL; gsignond_plugin_user_action_finished (plugin, ui_data); diff --git a/test/plugins/passwordplugintest.c b/test/plugins/passwordplugintest.c index b7b3eab..5c7670a 100644 --- a/test/plugins/passwordplugintest.c +++ b/test/plugins/passwordplugintest.c @@ -105,7 +105,7 @@ START_TEST (test_passwordplugin_request) // username empty, password not empty gsignond_session_data_set_secret(data, "megapassword"); - gsignond_plugin_request_initial(plugin, data, "password"); + gsignond_plugin_request_initial(plugin, data, NULL, "password"); fail_if(result == NULL); fail_if(ui_action != NULL); fail_if(error != NULL); @@ -117,7 +117,7 @@ START_TEST (test_passwordplugin_request) // username and password not empty gsignond_session_data_set_username(data, "megauser"); - gsignond_plugin_request_initial(plugin, data, "password"); + gsignond_plugin_request_initial(plugin, data, NULL, "password"); fail_if(result == NULL); fail_if(ui_action != NULL); fail_if(error != NULL); @@ -131,7 +131,7 @@ START_TEST (test_passwordplugin_request) //username and password empty gsignond_dictionary_unref(data); data = gsignond_dictionary_new(); - gsignond_plugin_request_initial(plugin, data, "password"); + gsignond_plugin_request_initial(plugin, data, NULL, "password"); fail_if(result != NULL); fail_if(ui_action == NULL); fail_if(error != NULL); @@ -144,7 +144,7 @@ START_TEST (test_passwordplugin_request) //username not empty, password empty gsignond_session_data_set_username(data, "megauser"); - gsignond_plugin_request_initial(plugin, data, "password"); + gsignond_plugin_request_initial(plugin, data, NULL, "password"); fail_if(result != NULL); fail_if(ui_action == NULL); fail_if(error != NULL); diff --git a/test/plugins/pluginproxytest.c b/test/plugins/pluginproxytest.c index 998abfe..811b541 100644 --- a/test/plugins/pluginproxytest.c +++ b/test/plugins/pluginproxytest.c @@ -134,10 +134,10 @@ gsignond_auth_session_notify_process_result ( gsignond_session_data_set_username(data, "megauser"); gsignond_session_data_set_secret(data, "megapassword"); - gsignond_plugin_proxy_process(proxy, iface, data, "password", + gsignond_plugin_proxy_process(proxy, iface, data, NULL, "password", proxy); - gsignond_plugin_proxy_process(proxy, iface, data, "password", + gsignond_plugin_proxy_process(proxy, iface, data, NULL, "password", proxy); gsignond_dictionary_unref(data); @@ -154,7 +154,7 @@ gsignond_auth_session_notify_process_result ( fail_if(data == NULL); for (i = 0; i < 9; i++) { - gsignond_plugin_proxy_process(proxy, iface, data, "mech1", + gsignond_plugin_proxy_process(proxy, iface, data, NULL, "mech1", proxy); } gsignond_dictionary_unref(data); @@ -303,7 +303,7 @@ START_TEST (test_pluginproxy_process) testing_proxy_process = TRUE; - gsignond_plugin_proxy_process(proxy, test_auth_session, data, "password", + gsignond_plugin_proxy_process(proxy, test_auth_session, data, NULL, "password", proxy); _run_mainloop (); @@ -335,7 +335,7 @@ START_TEST (test_pluginproxy_process_cancel) testing_proxy_process_cancel = TRUE; - gsignond_plugin_proxy_process(proxy, test_auth_session, data, "mech1", + gsignond_plugin_proxy_process(proxy, test_auth_session, data, NULL, "mech1", proxy); _run_mainloop (); @@ -369,7 +369,7 @@ START_TEST (test_pluginproxy_process_queue) testing_proxy_process_queue = TRUE; - gsignond_plugin_proxy_process(proxy, test_auth_session, data, "password", + gsignond_plugin_proxy_process(proxy, test_auth_session, data, NULL, "password", proxy); _run_mainloop (); @@ -399,7 +399,7 @@ START_TEST (test_pluginproxy_process_queue_cancel) testing_proxy_process_queue_cancel = TRUE; - gsignond_plugin_proxy_process(proxy, test_auth_session, data, "mech1", + gsignond_plugin_proxy_process(proxy, test_auth_session, data, NULL, "mech1", proxy); _run_mainloop (); @@ -498,7 +498,8 @@ START_TEST (test_pluginproxyfactory_add) fail_if(gsignond_plugin_proxy_factory_add_plugin(factory, proxy) == TRUE); fail_if(gsignond_plugin_proxy_factory_get_plugin(factory, "password") != proxy); - + g_object_unref(proxy); + g_object_unref(proxy); g_object_unref(factory); g_object_unref(config); diff --git a/test/plugins/pluginremotetest.c b/test/plugins/pluginremotetest.c index 32fc2cb..18d1475 100644 --- a/test/plugins/pluginremotetest.c +++ b/test/plugins/pluginremotetest.c @@ -340,7 +340,7 @@ START_TEST (test_pluginremote_request) // username empty, password not empty gsignond_session_data_set_secret(data, "megapassword"); - gsignond_plugin_request_initial(plugin, data, "password"); + gsignond_plugin_request_initial(plugin, data, NULL, "password"); _run_mainloop (); fail_if(result == NULL); @@ -354,7 +354,7 @@ START_TEST (test_pluginremote_request) // username and password not empty gsignond_session_data_set_username(data, "megauser"); - gsignond_plugin_request_initial(plugin, data, "password"); + gsignond_plugin_request_initial(plugin, data, NULL, "password"); _run_mainloop (); fail_if(result == NULL); @@ -370,7 +370,7 @@ START_TEST (test_pluginremote_request) //username and password empty gsignond_dictionary_unref(data); data = gsignond_dictionary_new(); - gsignond_plugin_request_initial(plugin, data, "password"); + gsignond_plugin_request_initial(plugin, data, NULL, "password"); _run_mainloop (); fail_if(result != NULL); @@ -387,7 +387,7 @@ START_TEST (test_pluginremote_request) //username not empty, password empty gsignond_session_data_set_username(data, "megauser"); - gsignond_plugin_request_initial(plugin, data, "password"); + gsignond_plugin_request_initial(plugin, data, NULL, "password"); _run_mainloop (); fail_if(result != NULL); diff --git a/test/valgrind.supp b/test/valgrind.supp index e791e62..6155af4 100644 --- a/test/valgrind.supp +++ b/test/valgrind.supp @@ -52,5 +52,21 @@ Memcheck:Leak ... fun:g_resolver_lookup_by_name_async } - - +{ + + Memcheck:Leak + ... + fun:_dl_allocate_tls +} +{ + + Memcheck:Leak + ... + fun:gdbus_shared_thread_func +} +{ + + Memcheck:Leak + ... + fun:g_get_user_data_dir +} diff --git a/test/valgrind_common.mk b/test/valgrind_common.mk index 4b0cc5b..358fe3f 100644 --- a/test/valgrind_common.mk +++ b/test/valgrind_common.mk @@ -2,14 +2,15 @@ SUPPRESSIONS = $(top_srcdir)/test/valgrind.supp %.valgrind: % @$(TESTS_ENVIRONMENT) \ + RUNNING_VALGRIND=yes \ CK_FORK=no \ - CK_DEFAULT_TIMEOUT=120 \ + CK_TIMEOUT_MULTIPLIER=10 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ valgrind -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ - --leak-resolution=high --num-callers=20 \ + --leak-resolution=high --num-callers=30 \ --error-exitcode=1 \ ./$* diff --git a/tools/archive.sh b/tools/archive.sh index b28d24f..8d053c5 100755 --- a/tools/archive.sh +++ b/tools/archive.sh @@ -1,6 +1,6 @@ #!/bin/sh # -git archive --format=tar --prefix=gsignond-0.0.0/ -o ../gsignond-0.0.0.tar daemon -bzip2 ../gsignond-0.0.0.tar -mv ../gsignond-0.0.0.tar.bz2 ~/rpmbuild/SOURCES/ +git archive --format=tar --prefix=gsignond-0.0.2/ -o ../gsignond-0.0.2.tar daemon +bzip2 ../gsignond-0.0.2.tar +mv ../gsignond-0.0.2.tar.bz2 ~/rpmbuild/SOURCES/ diff --git a/tools/prepare-tizen.sh b/tools/prepare-tizen.sh index d4329b2..7c4f4e2 100755 --- a/tools/prepare-tizen.sh +++ b/tools/prepare-tizen.sh @@ -9,14 +9,15 @@ if [ $# -ne 2 -o -z "$1" -o -z "$2" ]; then exit fi -currdir = `pwd`; +currdir=`pwd`; echo "CURR dir = $currdir" mkdir -p $2 && \ -tar -xzvf $1 -C $2 --strip-components 1 && \ cd $2 && \ +git rm -r * && \ +tar -xzvf $currdir/$1 -C $2 --strip-components 1 && \ mkdir -p packaging && \ cd packaging && \ -cp -f ../dists/rpm/gsignond-tizen.spec gsignond.spec && -cp -f ../dists/rpm/gsignond-tizen.changes gsignond.changes; - +cp -f ../dists/rpm/gsignond-tizen.spec gsignond.spec && \ +cp -f ../dists/rpm/gsignond-tizen.changes gsignond.changes && \ +cd .. && git add *; diff --git a/tools/run-tests.sh b/tools/run-tests.sh index 0d271d4..6ed0257 100755 --- a/tools/run-tests.sh +++ b/tools/run-tests.sh @@ -1,7 +1,6 @@ #Environment variables for the tests export G_MESSAGES_DEBUG=all export SSO_STORAGE_PATH=/tmp/gsignond -export SSO_SECRET_PATH=/tmp/gsignond rm -rf "$SSO_STORAGE_PATH" diff --git a/tools/setup-and-start-daemon.sh b/tools/setup-and-start-daemon.sh index a7ecd8b..62dc071 100755 --- a/tools/setup-and-start-daemon.sh +++ b/tools/setup-and-start-daemon.sh @@ -16,7 +16,6 @@ fi killall gsignond -export SSO_SECRET_PATH="/tmp/gsignond" export SSO_STORAGE_PATH="/tmp/gsignond" if [ -f "$SRC_HOME/test/daemon/.libs/lt-daemontest" ] ; then export SSO_KEYCHAIN_SYSCTX="$SRC_HOME/test/daemon/.libs/lt-daemontest" -- cgit v1.2.3