summaryrefslogtreecommitdiff
path: root/open-vm-tools/vgauth/cli
diff options
context:
space:
mode:
Diffstat (limited to 'open-vm-tools/vgauth/cli')
-rw-r--r--open-vm-tools/vgauth/cli/Makefile.am51
-rw-r--r--open-vm-tools/vgauth/cli/Makefile.in591
-rw-r--r--open-vm-tools/vgauth/cli/l10n/de.vmsg77
-rw-r--r--open-vm-tools/vgauth/cli/l10n/en.vmsg77
-rw-r--r--open-vm-tools/vgauth/cli/l10n/es.vmsg77
-rw-r--r--open-vm-tools/vgauth/cli/l10n/fr.vmsg77
-rw-r--r--open-vm-tools/vgauth/cli/l10n/it.vmsg77
-rw-r--r--open-vm-tools/vgauth/cli/l10n/ja.vmsg77
-rw-r--r--open-vm-tools/vgauth/cli/l10n/ko.vmsg77
-rw-r--r--open-vm-tools/vgauth/cli/l10n/zh_CN.vmsg77
-rw-r--r--open-vm-tools/vgauth/cli/l10n/zh_TW.vmsg77
-rw-r--r--open-vm-tools/vgauth/cli/main.c661
12 files changed, 1996 insertions, 0 deletions
diff --git a/open-vm-tools/vgauth/cli/Makefile.am b/open-vm-tools/vgauth/cli/Makefile.am
new file mode 100644
index 00000000..fd6eb37f
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/Makefile.am
@@ -0,0 +1,51 @@
+################################################################################
+### Copyright (C) 2014-2015 VMware, Inc. All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+################################################################################
+
+bin_PROGRAMS = vmware-vgauth-cmd
+
+vmware_vgauth_cmd_SOURCES =
+vmware_vgauth_cmd_SOURCES += main.c
+
+vmware_vgauth_cmd_CPPFLAGS =
+vmware_vgauth_cmd_CPPFLAGS += -DVMTOOLS_USE_GLIB
+vmware_vgauth_cmd_CPPFLAGS += @GLIB2_CPPFLAGS@
+vmware_vgauth_cmd_CPPFLAGS += -I$(top_srcdir)/libvmtools
+vmware_vgauth_cmd_CPPFLAGS += -I$(top_srcdir)/vgauth/public
+vmware_vgauth_cmd_CPPFLAGS += -I$(top_srcdir)/vgauth/common
+
+vmware_vgauth_cmd_LDADD =
+vmware_vgauth_cmd_LDADD += @VMTOOLS_LIBS@
+vmware_vgauth_cmd_LDADD += @GLIB2_LIBS@
+vmware_vgauth_cmd_LDADD += @GTHREAD_LIBS@
+vmware_vgauth_cmd_LDADD += @SSL_LIBS@
+vmware_vgauth_cmd_LDADD += ../lib/libvgauth.la
+vmware_vgauth_cmd_LDADD += -lssl
+vmware_vgauth_cmd_LDADD += -lcrypto
+
+if HAVE_ICU
+ vmware_vgauth_cmd_LDADD += @ICU_LIBS@
+ vmware_vgauth_cmd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXX) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+else
+ vmware_vgauth_cmd_LINK = $(LINK)
+endif
+
+# Message catalogs.
+install-data-hook:
+ @INSTVMSG@ vmware-vgauth-cmd $(srcdir)/l10n $(DESTDIR)$(datadir)
diff --git a/open-vm-tools/vgauth/cli/Makefile.in b/open-vm-tools/vgauth/cli/Makefile.in
new file mode 100644
index 00000000..97e6883d
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/Makefile.in
@@ -0,0 +1,591 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 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@
+
+################################################################################
+### Copyright (C) 2014-2015 VMware, Inc. All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+################################################################################
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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@
+bin_PROGRAMS = vmware-vgauth-cmd$(EXEEXT)
+@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@
+subdir = vgauth/cli
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(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)/m4/vmtools.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_vmware_vgauth_cmd_OBJECTS = vmware_vgauth_cmd-main.$(OBJEXT)
+vmware_vgauth_cmd_OBJECTS = $(am_vmware_vgauth_cmd_OBJECTS)
+am__DEPENDENCIES_1 =
+vmware_vgauth_cmd_DEPENDENCIES = ../lib/libvgauth.la \
+ $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(vmware_vgauth_cmd_SOURCES)
+DIST_SOURCES = $(vmware_vgauth_cmd_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@
+COMMON_XLIBS = @COMMON_XLIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@
+CUNIT_LIBS = @CUNIT_LIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DNET_CPPFLAGS = @DNET_CPPFLAGS@
+DNET_LIBS = @DNET_LIBS@
+DOT = @DOT@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FUSE_CPPFLAGS = @FUSE_CPPFLAGS@
+FUSE_LIBS = @FUSE_LIBS@
+GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@
+GLIB2_LIBS = @GLIB2_LIBS@
+GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@
+GTHREAD_LIBS = @GTHREAD_LIBS@
+GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@
+GTKMM_LIBS = @GTKMM_LIBS@
+GTK_CPPFLAGS = @GTK_CPPFLAGS@
+GTK_LIBS = @GTK_LIBS@
+HAVE_DOT = @HAVE_DOT@
+HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
+HGFS_LIBS = @HGFS_LIBS@
+ICU_CPPFLAGS = @ICU_CPPFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTVMSG = @INSTVMSG@
+KERNEL_RELEASE = @KERNEL_RELEASE@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@
+LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@
+LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@
+LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@
+LINUXINCLUDE = @LINUXINCLUDE@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
+MODULES_OS = @MODULES_OS@
+MSCGEN = @MSCGEN@
+MSCGEN_DIR = @MSCGEN_DIR@
+MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@
+MSPACK_LIBS = @MSPACK_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_CPPFLAGS = @PAM_CPPFLAGS@
+PAM_LIBS = @PAM_LIBS@
+PAM_PREFIX = @PAM_PREFIX@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@
+PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@
+PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
+PROCPS_LIBS = @PROCPS_LIBS@
+RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
+RPCGENFLAGS = @RPCGENFLAGS@
+RPCGEN_WRAPPER = @RPCGEN_WRAPPER@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
+SSL_LIBS = @SSL_LIBS@
+STRIP = @STRIP@
+SYSDIR = @SYSDIR@
+TARGET_OS = @TARGET_OS@
+TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@
+TOOLS_VERSION = @TOOLS_VERSION@
+VERSION = @VERSION@
+VGAUTH_LIBADD = @VGAUTH_LIBADD@
+VIX_LIBADD = @VIX_LIBADD@
+VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@
+VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@
+VMTOOLS_LIBS = @VMTOOLS_LIBS@
+VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@
+XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
+XDR_LIBS = @XDR_LIBS@
+XERCES_CPPFLAGS = @XERCES_CPPFLAGS@
+XERCES_LIBS = @XERCES_LIBS@
+XMKMF = @XMKMF@
+XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@
+XMLSECURITY_LIBS = @XMLSECURITY_LIBS@
+XSM_LIBS = @XSM_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_vmw_lib_cfg = @ac_vmw_lib_cfg@
+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@
+have_cxx = @have_cxx@
+have_doxygen = @have_doxygen@
+have_genmarshal = @have_genmarshal@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+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_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+vmware_vgauth_cmd_SOURCES = main.c
+vmware_vgauth_cmd_CPPFLAGS = -DVMTOOLS_USE_GLIB @GLIB2_CPPFLAGS@ \
+ -I$(top_srcdir)/libvmtools -I$(top_srcdir)/vgauth/public \
+ -I$(top_srcdir)/vgauth/common
+vmware_vgauth_cmd_LDADD = @VMTOOLS_LIBS@ @GLIB2_LIBS@ @GTHREAD_LIBS@ \
+ @SSL_LIBS@ ../lib/libvgauth.la -lssl -lcrypto $(am__append_1)
+@HAVE_ICU_FALSE@vmware_vgauth_cmd_LINK = $(LINK)
+@HAVE_ICU_TRUE@vmware_vgauth_cmd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \
+@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vgauth/cli/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu vgauth/cli/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_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
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+vmware-vgauth-cmd$(EXEEXT): $(vmware_vgauth_cmd_OBJECTS) $(vmware_vgauth_cmd_DEPENDENCIES)
+ @rm -f vmware-vgauth-cmd$(EXEEXT)
+ $(vmware_vgauth_cmd_LINK) $(vmware_vgauth_cmd_OBJECTS) $(vmware_vgauth_cmd_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_vgauth_cmd-main.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+vmware_vgauth_cmd-main.o: main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_vgauth_cmd-main.o -MD -MP -MF $(DEPDIR)/vmware_vgauth_cmd-main.Tpo -c -o vmware_vgauth_cmd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_vgauth_cmd-main.Tpo $(DEPDIR)/vmware_vgauth_cmd-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='vmware_vgauth_cmd-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_vgauth_cmd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+
+vmware_vgauth_cmd-main.obj: main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_vgauth_cmd-main.obj -MD -MP -MF $(DEPDIR)/vmware_vgauth_cmd-main.Tpo -c -o vmware_vgauth_cmd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_vgauth_cmd-main.Tpo $(DEPDIR)/vmware_vgauth_cmd-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='vmware_vgauth_cmd-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_vgauth_cmd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-data-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags 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-data-hook 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 mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS
+
+
+# Message catalogs.
+install-data-hook:
+ @INSTVMSG@ vmware-vgauth-cmd $(srcdir)/l10n $(DESTDIR)$(datadir)
+# 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/open-vm-tools/vgauth/cli/l10n/de.vmsg b/open-vm-tools/vgauth/cli/l10n/de.vmsg
new file mode 100644
index 00000000..30e04775
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/l10n/de.vmsg
@@ -0,0 +1,77 @@
+##########################################################
+# Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+#
+# This program 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 version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+addsubj.fail = "%1$s: Fehler beim Hinzufügen eines Alias für Benutzer '%2$s': %3$s.\n"
+addsubj.success = "%1$s: Alias hinzugefügt\n"
+
+addoptions.comment = "Betreff Kommentar"
+
+addoptions.file = "Name der PEM-Datei"
+
+addoptions.global = "Zertifikat zur globalen Zuordnungsdatei hinzufügen"
+
+addoptions.subject = "SAML-Betreff"
+
+addoptions.username = "Benutzer, in dessen Zertifikatspeicher Hinzufügung erfolgt"
+
+addoptions.verbose = "Ausführlicher Vorgang"
+
+
+cmdline.parse = "Fehler beim Parsen der Befehlszeile"
+
+cmdline.summary.pemfile = "PEM-Datei"
+cmdline.summary.subject = "Betreff"
+cmdline.summary.username = "Benutzername"
+cmdline.summary.comm = "Kommentar"
+
+list.comment = "Kommentar"
+list.count = "%1$s Gefunden: %2$d Aliase für Benutzer '%3$s'\n"
+
+list.error = "%1$s: Fehler beim Auflisten von Aliasen für Benutzer '%2$s': %3$s.\n"
+list.subject = "Betreff"
+
+listmapped.count = "%1$s Gefunden: %2$d zugeordnete Aliase\n"
+
+listmapped.error = "%1$s: Fehler beim Auflisten von zugeordneten Aliasen: %2$s.\n"
+
+listmapped.subject = "Betreff"
+
+listmapped.username = "Benutzername"
+
+listoptions.username =
+ "Benutzer, dessen Zertifikatspeicher abgefragt wird"
+
+listoptions.verbose = "Ausführlicher Vorgang"
+
+loadfile.fail = "%1$s: Fehler beim Lesen von PEM-Datei '%2$s'\n"
+
+name.any = "<ALLE>"
+
+removesubj.fail = "%1$s: Fehler beim Löschen eines Alias für Benutzer '%2$s': %3$s.\n"
+
+removesubj.success = "%1$s: Alias gelöscht\n"
+
+removeoptions.file = "Name der PEM-Datei"
+
+removeoptions.subject = "SAML-Betreff"
+removeoptions.username =
+ "Benutzer, in dessen Zertifikatspeicher Löschvorgang erfolgt"
+
+removeoptions.verbose = "Ausführlicher Vorgang"
+
+vgauth.init.failed = "Fehler beim Initialisieren von VGAuth"
diff --git a/open-vm-tools/vgauth/cli/l10n/en.vmsg b/open-vm-tools/vgauth/cli/l10n/en.vmsg
new file mode 100644
index 00000000..320b5cf2
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/l10n/en.vmsg
@@ -0,0 +1,77 @@
+##########################################################
+# Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+#
+# This program 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 version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+addsubj.fail = "%1$s: Failed to add alias for user '%2$s': %3$s.\n"
+addsubj.success = "%1$s: alias added\n"
+
+addoptions.comment = "subject comment"
+
+addoptions.file = "PEM file name"
+
+addoptions.global = "Add the certificate to the global mapping file"
+
+addoptions.subject = "The SAML subject"
+
+addoptions.username = "User whose certificate store is being added to"
+
+addoptions.verbose = "Verbose operation"
+
+
+cmdline.parse = "Command line parsing failed"
+
+cmdline.summary.pemfile = "PEM-file"
+cmdline.summary.subject = "subject"
+cmdline.summary.username = "username"
+cmdline.summary.comm = "comment"
+
+list.comment = "Comment"
+list.count = "%1$s Found %2$d aliases for user '%3$s'\n"
+
+list.error = "%1$s: Failed to list aliases for user '%2$s': %3$s.\n"
+list.subject = "Subject"
+
+listmapped.count = "%1$s Found %2$d mapped aliases\n"
+
+listmapped.error = "%1$s: Failed to list mapped aliases: %2$s.\n"
+
+listmapped.subject = "Subject"
+
+listmapped.username = "Username"
+
+listoptions.username =
+ "User whose certificate store is being queried"
+
+listoptions.verbose = "Verbose operation"
+
+loadfile.fail = "%1$s: Unable to read PEM file '%2$s'\n"
+
+name.any = "<ANY>"
+
+removesubj.fail = "%1$s: Failed to remove alias for user '%2$s': %3$s.\n"
+
+removesubj.success = "%1$s: alias removed\n"
+
+removeoptions.file = "PEM file name"
+
+removeoptions.subject = "The SAML subject"
+removeoptions.username =
+ "User whose certificate store is being removed from"
+
+removeoptions.verbose = "Verbose operation"
+
+vgauth.init.failed = "Failed to init VGAuth"
diff --git a/open-vm-tools/vgauth/cli/l10n/es.vmsg b/open-vm-tools/vgauth/cli/l10n/es.vmsg
new file mode 100644
index 00000000..ad0e33f4
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/l10n/es.vmsg
@@ -0,0 +1,77 @@
+##########################################################
+# Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+#
+# This program 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 version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+addsubj.fail = "%1$s: No ha podido añadirse el alias del usuario '%2$s': %3$s.\n"
+addsubj.success = "%1$s: se ha añadido el alias\n"
+
+addoptions.comment = "comentario del tema"
+
+addoptions.file = "nombre de archivo PEM"
+
+addoptions.global = "Añadir el certificado al archivo de asignación global"
+
+addoptions.subject = "Tema de SAML"
+
+addoptions.username = "El usuario cuyo almacén de certificados se está añadiendo a"
+
+addoptions.verbose = "Operación detallada"
+
+
+cmdline.parse = "Error de análisis de línea de comando"
+
+cmdline.summary.pemfile = "Archivo PEM"
+cmdline.summary.subject = "asunto"
+cmdline.summary.username = "nombre de usuario"
+cmdline.summary.comm = "comentario"
+
+list.comment = "Comentario"
+list.count = "%1$s Se han encontrado %2$d alias para el usuario '%3$s'\n"
+
+list.error = "%1$s: No se han podido listar los alias del usuario '%2$s': %3$s.\n"
+list.subject = "Asunto"
+
+listmapped.count = "%1$s Se han encontrado %2$d alias asignados\n"
+
+listmapped.error = "%1$s: No se han podido listar los alias asignados: %2$s.\n"
+
+listmapped.subject = "Asunto"
+
+listmapped.username = "Nombre de usuario"
+
+listoptions.username =
+ "El usuario cuyo almacén de certificados se está consultando"
+
+listoptions.verbose = "Operación detallada"
+
+loadfile.fail = "%1$s: No se ha podido leer el archivo PEM '%2$s'\n"
+
+name.any = "<CUALQUIERA>"
+
+removesubj.fail = "%1$s: No se ha podido eliminar el alias del usuario '%2$s': %3$s.\n"
+
+removesubj.success = "%1$s: alias eliminado\n"
+
+removeoptions.file = "nombre de archivo PEM"
+
+removeoptions.subject = "Tema de SAML"
+removeoptions.username =
+ "El usuario cuyo almacén de certificados se está eliminando de"
+
+removeoptions.verbose = "Operación detallada"
+
+vgauth.init.failed = "No se ha podido iniciar VGAuth"
diff --git a/open-vm-tools/vgauth/cli/l10n/fr.vmsg b/open-vm-tools/vgauth/cli/l10n/fr.vmsg
new file mode 100644
index 00000000..d1d7d789
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/l10n/fr.vmsg
@@ -0,0 +1,77 @@
+##########################################################
+# Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+#
+# This program 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 version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+addsubj.fail = "%1$s : Échec de l'ajout de l'alias pour l'utilisateur '%2$s' : %3$s.\n"
+addsubj.success = "%1$s : alias ajouté\n"
+
+addoptions.comment = "commentaire de l'objet"
+
+addoptions.file = "Nom du fichier PEM"
+
+addoptions.global = "Ajouter le certificat au fichier de mappage global"
+
+addoptions.subject = "L'objet SAML"
+
+addoptions.username = "Utilisateur dont le magasin de certificats est en train d'être ajouté"
+
+addoptions.verbose = "Opération détaillée"
+
+
+cmdline.parse = "Échec de l'analyse de ligne de commande"
+
+cmdline.summary.pemfile = "Fichier PEM"
+cmdline.summary.subject = "objet"
+cmdline.summary.username = "nom d'utilisateur"
+cmdline.summary.comm = "commentaire"
+
+list.comment = "Commentaire"
+list.count = "%1$s A trouvé %2$d alias pour l'utilisateur '%3$s'\n"
+
+list.error = "%1$s : impossible de lister les alias pour l'utilisateur '%2$s' : %3$s.\n"
+list.subject = "Objet"
+
+listmapped.count = "%1$s A trouvé %2$d alias mappés\n"
+
+listmapped.error = "%1$s : impossible de lister les alias mappés : %2$s.\n"
+
+listmapped.subject = "Objet"
+
+listmapped.username = "Nom d'utilisateur"
+
+listoptions.username =
+ "Utilisateur dont le magasin de certificats est en cours d'interrogation"
+
+listoptions.verbose = "Opération détaillée"
+
+loadfile.fail = "%1$s : impossible de lire le fichier PEM '%2$s'\n"
+
+name.any = "<ANY>"
+
+removesubj.fail = "%1$s : impossible de supprimer l'alias pour l'utilisateur '%2$s' : %3$s.\n"
+
+removesubj.success = "%1$s : alias supprimé\n"
+
+removeoptions.file = "Nom du fichier PEM"
+
+removeoptions.subject = "L'objet SAML"
+removeoptions.username =
+ "Utilisateur dont le magasin de certificat est en cours de suppression"
+
+removeoptions.verbose = "Opération détaillée"
+
+vgauth.init.failed = "Échec de l'initialisation de VGAuth"
diff --git a/open-vm-tools/vgauth/cli/l10n/it.vmsg b/open-vm-tools/vgauth/cli/l10n/it.vmsg
new file mode 100644
index 00000000..a84e2a2b
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/l10n/it.vmsg
@@ -0,0 +1,77 @@
+##########################################################
+# Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+#
+# This program 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 version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+addsubj.fail = "%1$s: Impossibile aggiungere alias per l'utente "%2$s": %3$s.\n"
+addsubj.success = "%1$s: alias aggiunto\n"
+
+addoptions.comment = "commento oggetti"
+
+addoptions.file = "Nome file PEM"
+
+addoptions.global = "Aggiungere il certificato al file di mappatura globale"
+
+addoptions.subject = "L'oggetto SAML"
+
+addoptions.username = "Utente a cui viene aggiunto l'archivio certificati"
+
+addoptions.verbose = "Operazione Verbose"
+
+
+cmdline.parse = "Analisi della riga di comando non riuscita"
+
+cmdline.summary.pemfile = "File PEM"
+cmdline.summary.subject = "oggetto"
+cmdline.summary.username = "nome utente"
+cmdline.summary.comm = "commento"
+
+list.comment = "Commento"
+list.count = "%1$s Trovati %2$d alias per l'utente "%3$s"\n"
+
+list.error = "%1$s: Impossibile elencare gli alias per l'utente "%2$s": %3$s.\n"
+list.subject = "Oggetto"
+
+listmapped.count = "%1$s Trovati %2$d alias mappati\n"
+
+listmapped.error = "%1$s: Impossibile elencare gli alias mappati: %2$s.\n"
+
+listmapped.subject = "Oggetto"
+
+listmapped.username = "Nome utente"
+
+listoptions.username =
+ "Utente il cui archivio certificati viene interrogato"
+
+listoptions.verbose = "Operazione Verbose"
+
+loadfile.fail = "%1$s: Impossibile leggere il file PEM "%2$s"\n"
+
+name.any = "<QUALSIASI>"
+
+removesubj.fail = "%1$s: Impossibile rimuovere l'alias per l'utente "%2$s": %3$s.\n"
+
+removesubj.success = "%1$s: alias rimosso\n"
+
+removeoptions.file = "Nome file PEM"
+
+removeoptions.subject = "L'oggetto SAML"
+removeoptions.username =
+ "L'utente da cui viene rimosso l'archivio certificati"
+
+removeoptions.verbose = "Operazione Verbose"
+
+vgauth.init.failed = "Impossibile inizializzare VGAuth"
diff --git a/open-vm-tools/vgauth/cli/l10n/ja.vmsg b/open-vm-tools/vgauth/cli/l10n/ja.vmsg
new file mode 100644
index 00000000..89051602
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/l10n/ja.vmsg
@@ -0,0 +1,77 @@
+##########################################################
+# Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+#
+# This program 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 version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+addsubj.fail = "%1$s: ユーザー 「%2$s」のエイリアスを追加できませんでした: %3$s。\n"
+addsubj.success = "%1$s: 追加されたエイリアス\n"
+
+addoptions.comment = "件名コメント"
+
+addoptions.file = "PEM ファイル名"
+
+addoptions.global = "グローバル マッピング ファイルに証明書を追加します"
+
+addoptions.subject = "SAML 件名"
+
+addoptions.username = "証明書ストアが追加されるユーザー"
+
+addoptions.verbose = "冗長操作"
+
+
+cmdline.parse = "コマンド行の解析が失敗しました"
+
+cmdline.summary.pemfile = "PEM ファイル"
+cmdline.summary.subject = "件名"
+cmdline.summary.username = "username"
+cmdline.summary.comm = "コメント"
+
+list.comment = "コメント"
+list.count = "%1$s ユーザー「%3$s」の %2$d エイリアスが検出されました\n"
+
+list.error = "%1$s: ユーザー「%2$s」のエイリアスをリストできませんでした: %3$s。\n"
+list.subject = "件名"
+
+listmapped.count = "%1$s %2$d のマップ済みエイリアスが検出されました\n"
+
+listmapped.error = "%1$s: マップ済みエイリアスをリストできませんでした: %2$s。\n"
+
+listmapped.subject = "件名"
+
+listmapped.username = "ユーザー名"
+
+listoptions.username =
+ "証明書ストアがクエリされるユーザー"
+
+listoptions.verbose = "冗長操作"
+
+loadfile.fail = "%1$s: PEM ファイル「%2$s」を読み取れません\n"
+
+name.any = "<任意>"
+
+removesubj.fail = "%1$s: ユーザー「%2$s」のエイリアスを削除できませんでした: %3$s。\n"
+
+removesubj.success = "%1$s: 削除されたエイリアス\n"
+
+removeoptions.file = "PEM ファイル名"
+
+removeoptions.subject = "SAML 件名"
+removeoptions.username =
+ "証明書ストアが削除されるユーザー"
+
+removeoptions.verbose = "冗長操作"
+
+vgauth.init.failed = "VGAuth を初期化できませんでした"
diff --git a/open-vm-tools/vgauth/cli/l10n/ko.vmsg b/open-vm-tools/vgauth/cli/l10n/ko.vmsg
new file mode 100644
index 00000000..a27f9ddd
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/l10n/ko.vmsg
@@ -0,0 +1,77 @@
+##########################################################
+# Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+#
+# This program 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 version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+addsubj.fail = "%1$s: '%2$s' 사용자에 대한 별칭을 추가하지 못했습니다. %3$s.\n"
+addsubj.success = "%1$s: 별칭이 추가되었습니다.\n"
+
+addoptions.comment = "제목 설명"
+
+addoptions.file = "PEM 파일 이름"
+
+addoptions.global = "인증서를 글로벌 매핑 파일에 추가"
+
+addoptions.subject = "SAML 제목"
+
+addoptions.username = "추가되는 인증서 저장소를 소유한 사용자"
+
+addoptions.verbose = "세부 작업"
+
+
+cmdline.parse = "명령줄을 구문 분석하지 못함"
+
+cmdline.summary.pemfile = "PEM 파일"
+cmdline.summary.subject = "제목"
+cmdline.summary.username = "username"
+cmdline.summary.comm = "의견"
+
+list.comment = "설명"
+list.count = "%1$s '%3$s' 사용자에 대한 별칭을 %2$d개 찾았습니다.\n"
+
+list.error = "%1$s: '%2$s' 사용자에 대한 별칭을 나열하지 못했습니다. %3$s.\n"
+list.subject = "제목"
+
+listmapped.count = "%1$s 매핑된 별칭을 %2$d개 찾았습니다.\n"
+
+listmapped.error = "%1$s: %2$s에 대한 매핑된 별칭을 나열하지 못했습니다.\n"
+
+listmapped.subject = "제목"
+
+listmapped.username = "사용자 이름"
+
+listoptions.username =
+ "쿼리되는 인증서 저장소를 소유한 사용자"
+
+listoptions.verbose = "세부 작업"
+
+loadfile.fail = "%1$s: PEM 파일 '%2$s'을(를) 읽을 수 없습니다.\n"
+
+name.any = "<임의>"
+
+removesubj.fail = "%1$s: '%2$s' 사용자에 대한 별칭을 제거하지 못했습니다. %3$s.\n"
+
+removesubj.success = "%1$s: 별칭이 제거되었습니다.\n"
+
+removeoptions.file = "PEM 파일 이름"
+
+removeoptions.subject = "SAML 제목"
+removeoptions.username =
+ "제거되는 인증서 저장소를 소유한 사용자"
+
+removeoptions.verbose = "세부 작업"
+
+vgauth.init.failed = "VGAuth를 초기화하지 못했습니다."
diff --git a/open-vm-tools/vgauth/cli/l10n/zh_CN.vmsg b/open-vm-tools/vgauth/cli/l10n/zh_CN.vmsg
new file mode 100644
index 00000000..93f963f2
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/l10n/zh_CN.vmsg
@@ -0,0 +1,77 @@
+##########################################################
+# Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+#
+# This program 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 version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+addsubj.fail = "%1$s: 未能为用户“%2$s”添加别名: %3$s。\n"
+addsubj.success = "%1$s: 别名已添加\n"
+
+addoptions.comment = "主题备注"
+
+addoptions.file = "PEM 文件名"
+
+addoptions.global = "将证书添加到全局映射文件"
+
+addoptions.subject = "SAML 主题"
+
+addoptions.username = "要向其证书存储添加证书的用户"
+
+addoptions.verbose = "Verbose 操作"
+
+
+cmdline.parse = "命令行解析失败"
+
+cmdline.summary.pemfile = "PEM 文件"
+cmdline.summary.subject = "主题"
+cmdline.summary.username = "username"
+cmdline.summary.comm = "备注"
+
+list.comment = "备注"
+list.count = "%1$s 找到用户“%3$s”的 %2$d 个别名\n"
+
+list.error = "%1$s: 未能列出用户“%2$s”的别名: %3$s。\n"
+list.subject = "主题"
+
+listmapped.count = "%1$s 找到 %2$d 个映射的别名\n"
+
+listmapped.error = "%1$s: 未能列出映射的别名: %2$s。\n"
+
+listmapped.subject = "主题"
+
+listmapped.username = "用户名"
+
+listoptions.username =
+ "要对其证书存储进行查询的用户"
+
+listoptions.verbose = "Verbose 操作"
+
+loadfile.fail = "%1$s: 无法读取 PEM 文件“%2$s”\n"
+
+name.any = "<任意>"
+
+removesubj.fail = "%1$s: 未能移除用户“%2$s”的别名: %3$s。\n"
+
+removesubj.success = "%1$s: 别名已移除\n"
+
+removeoptions.file = "PEM 文件名"
+
+removeoptions.subject = "SAML 主题"
+removeoptions.username =
+ "要从其证书存储中移除证书的用户"
+
+removeoptions.verbose = "Verbose 操作"
+
+vgauth.init.failed = "未能初始化 VGAuth"
diff --git a/open-vm-tools/vgauth/cli/l10n/zh_TW.vmsg b/open-vm-tools/vgauth/cli/l10n/zh_TW.vmsg
new file mode 100644
index 00000000..20cad7f3
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/l10n/zh_TW.vmsg
@@ -0,0 +1,77 @@
+##########################################################
+# Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+#
+# This program 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 version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+addsubj.fail = "%1$s: 無法為使用者「%2$s」新增別名: %3$s。\n"
+addsubj.success = "%1$s: 已新增別名\n"
+
+addoptions.comment = "主旨註解"
+
+addoptions.file = "PEM 檔案名稱"
+
+addoptions.global = "將憑證新增至全域對應檔案"
+
+addoptions.subject = "SAML 主旨"
+
+addoptions.username = "正將其憑證存放區新增至以下項目的使用者"
+
+addoptions.verbose = "詳細資訊作業"
+
+
+cmdline.parse = "命令行剖析失敗"
+
+cmdline.summary.pemfile = "PEM 檔案"
+cmdline.summary.subject = "主旨"
+cmdline.summary.username = "使用者名稱"
+cmdline.summary.comm = "註解"
+
+list.comment = "註解"
+list.count = "%1$s 找到使用者「%3$s」的 %2$d 個別名\n"
+
+list.error = "%1$s: 無法列出使用者「%2$s」的別名: %3$s。\n"
+list.subject = "主旨"
+
+listmapped.count = "%1$s 找到 %2$d 個已對應的別名\n"
+
+listmapped.error = "%1$s: 無法列出已對應的別名: %2$s。\n"
+
+listmapped.subject = "主旨"
+
+listmapped.username = "使用者名稱"
+
+listoptions.username =
+ "正要查詢其憑證存放區的使用者"
+
+listoptions.verbose = "詳細資訊作業"
+
+loadfile.fail = "%1$s: 無法讀取 PEM 檔案「%2$s」\n"
+
+name.any = "<任何>"
+
+removesubj.fail = "%1$s: 無法移除使用者「%2$s」的別名: %3$s。\n"
+
+removesubj.success = "%1$s: 已移除別名\n"
+
+removeoptions.file = "PEM 檔案名稱"
+
+removeoptions.subject = "SAML 主旨"
+removeoptions.username =
+ "正從以下項目中移除其憑證存放區的使用者"
+
+removeoptions.verbose = "詳細資訊作業"
+
+vgauth.init.failed = "無法初始化 VGAuth"
diff --git a/open-vm-tools/vgauth/cli/main.c b/open-vm-tools/vgauth/cli/main.c
new file mode 100644
index 00000000..7755e1c6
--- /dev/null
+++ b/open-vm-tools/vgauth/cli/main.c
@@ -0,0 +1,661 @@
+/*********************************************************
+ * Copyright (C) 2011-2015 VMware, Inc. All rights reserved.
+ *
+ * This program 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 version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ *********************************************************/
+
+/**
+ * @file main.c
+ *
+ * The GuestAuth certificate manipulation command line tool.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifndef _WIN32
+#include <unistd.h>
+#include <errno.h>
+#endif
+#include <glib.h>
+
+#include "VGAuthBasicDefs.h"
+#include "VGAuthAlias.h"
+#include "VGAuthCommon.h"
+#include "VGAuthError.h"
+#include "VGAuthLog.h"
+#include "VGAuthUtil.h"
+#define VMW_TEXT_DOMAIN "VGAuthCli"
+#include "i18n.h"
+#include "prefs.h"
+
+static const gchar *appName;
+
+static gboolean verbose = FALSE;
+
+
+/*
+ ******************************************************************************
+ * Usage -- */ /**
+ *
+ * Usage message for CLI
+ *
+ * @param[in] optContext The GOptionContext for generating the message
+ *
+ ******************************************************************************
+ */
+
+static void
+Usage(GOptionContext *optContext)
+{
+ gchar *usage;
+
+ usage = g_option_context_get_help(optContext, TRUE, NULL);
+ g_printerr("%s", usage);
+ g_free(usage);
+ exit(-1);
+}
+
+
+/*
+ ******************************************************************************
+ * CliLog -- */ /**
+ *
+ * Error message logging function for the CLI.
+ *
+ * @param[in] logDomain The glib logging domain, which is set by the
+ * various glib components and vgauth itself.
+ * @param[in] logLevel The severity of the message.
+ * @param[in] msg The error message.
+ * @param[in] userData Any userData specified in the call to
+ * VGAuth_SetLogHandler()
+ *
+ ******************************************************************************
+ */
+
+static void
+CliLog(const char *logDomain,
+ int logLevel,
+ const char *msg,
+ void *userData)
+{
+ // ignore all but errors
+ if (logLevel & G_LOG_LEVEL_WARNING) {
+ g_printerr("%s[%d]: %s", logDomain, logLevel, msg);
+#ifdef VMX86_DEBUG
+ } else {
+ fprintf(stderr, "Dropping message %s[%d]: %s", logDomain, logLevel, msg);
+#endif
+ }
+}
+
+
+/*
+ ******************************************************************************
+ * SubjectName -- */ /**
+ *
+ * Returns the name value for a subject, or <ANY>.
+ *
+ * @param[in] s The VGAuthSubject.
+ *
+ ******************************************************************************
+ */
+
+static const gchar *
+SubjectName(VGAuthSubject *s)
+{
+ if (s->type == VGAUTH_SUBJECT_NAMED) {
+ return s->val.name;
+ } else {
+ return SU_(name.any, "<ANY>");
+ }
+}
+
+
+/*
+ ******************************************************************************
+ * CliLoadPemFile -- */ /**
+ *
+ * Loads a PEM certificate from a file. The caller should g_free() the
+ * return value when finished.
+ *
+ * @param[in] fileName The filename of the cert in PEM format.
+ *
+ * @return The contents of the certificate file.
+ *
+ ******************************************************************************
+ */
+
+static gchar *
+CliLoadPemFILE(const gchar *fileName)
+{
+ gchar *contents = NULL;
+ gsize fileSize;
+ GError *gErr = NULL;
+
+ /*
+ * XXX
+ *
+ * Might be nice for this to handle stdin. Either a NULL
+ * filename or "-" ?
+ */
+ if (!g_file_get_contents(fileName, &contents, &fileSize, &gErr)) {
+ g_printerr(SU_(loadfile.fail,
+ "%s: Unable to read PEM file '%s'\n"),
+ appName, gErr->message);
+ g_error_free(gErr);
+ }
+
+ return contents;
+}
+
+
+/*
+ ******************************************************************************
+ * CliAddAlias -- */ /**
+ *
+ * Adds a certficate and subject for the user.
+ *
+ * @param[in] ctx The VGAuthContext.
+ * @param[in] userName The user whose store is being changed.
+ * @param[in] subject The associated subject name.
+ * @param[in] pemFileName The filename of the cert in PEM format.
+ * @param[in] addMapped Set if a link is also to be added to
+ * the mapping file.
+ * @param[in] comment The comment.
+ *
+ * @return VGAUTH_E_OK on success, VGAuthError on failure
+ *
+ ******************************************************************************
+ */
+
+static VGAuthError
+CliAddAlias(VGAuthContext *ctx,
+ const char *userName,
+ const char *subject,
+ const char *pemFilename,
+ gboolean addMapped,
+ const char *comment)
+{
+ gchar *pemCert = NULL;
+ VGAuthError err;
+ VGAuthAliasInfo ai;
+
+ pemCert = CliLoadPemFILE(pemFilename);
+ if (NULL == pemCert) {
+ return VGAUTH_E_INVALID_CERTIFICATE;
+ }
+
+ /*
+ * The 'comment' cmdline arg is optional, but the underlying API needs
+ * a real value.
+ */
+ ai.comment = (comment) ? (char *) comment : "";
+
+ ai.subject.type = VGAUTH_SUBJECT_NAMED;
+ ai.subject.val.name = (char *) subject;
+
+ err = VGAuth_AddAlias(ctx, userName, addMapped, pemCert, &ai, 0, NULL);
+ if (VGAUTH_E_OK != err) {
+ g_printerr(SU_(addsubj.fail,
+ "%s: Failed to add alias for user '%s': %s.\n"),
+ appName, userName, VGAuth_GetErrorText(err, NULL));
+ } else if (verbose) {
+ g_print(SU_(addsubj.success, "%s: alias added\n"), appName);
+ }
+
+ g_free(pemCert);
+
+ return err;
+}
+
+
+/*
+ ******************************************************************************
+ * CliRemoveAlias -- */ /**
+ *
+ * Removes a certficate for the user.
+ *
+ * @param[in] ctx The VGAuthContext.
+ * @param[in] userName The user whose store is being changed.
+ * @param[in] subject The associated subject.
+ * @param[in] pemFileName The filename of the cert in PEM format.
+ *
+ * @return VGAUTH_E_OK on success, VGAuthError on failure
+ *
+ ******************************************************************************
+ */
+
+static VGAuthError
+CliRemoveAlias(VGAuthContext *ctx,
+ const char *userName,
+ const char *subject,
+ const char *pemFilename)
+{
+ VGAuthError err;
+ gchar *pemCert = NULL;
+ VGAuthSubject subj;
+
+ pemCert = CliLoadPemFILE(pemFilename);
+ if (NULL == pemCert) {
+ return VGAUTH_E_INVALID_CERTIFICATE;
+ }
+
+ if (subject) {
+ subj.val.name = (char *) subject;
+ subj.type = VGAUTH_SUBJECT_NAMED;
+ err = VGAuth_RemoveAlias(ctx, userName, pemCert, &subj, 0, NULL);
+ } else {
+ err = VGAuth_RemoveAliasByCert(ctx, userName, pemCert, 0, NULL);
+ }
+
+ if (VGAUTH_E_OK != err) {
+ g_printerr(SU_(removesubj.fail,
+ "%s: Failed to remove alias for user '%s': %s.\n"),
+ appName, userName, VGAuth_GetErrorText(err, NULL));
+ } else if (verbose) {
+ g_print(SU_(removesubj.success, "%s: alias removed\n"), appName);
+ }
+
+ g_free(pemCert);
+
+ return err;
+}
+
+
+/*
+ ******************************************************************************
+ * CliList -- */ /**
+ *
+ * List all UserAliases for a user.
+ *
+ * @param[in] ctx The VGAuthContext.
+ * @param[in] userName The user whose store is being queried.
+ *
+ * @return VGAUTH_E_OK on success, VGAuthError on failure
+ *
+ ******************************************************************************
+ */
+
+static VGAuthError
+CliList(VGAuthContext *ctx,
+ const char *userName)
+{
+ VGAuthError err;
+ int num;
+ int i;
+ int j;
+ VGAuthUserAlias *uaList;
+
+ err = VGAuth_QueryUserAliases(ctx, userName, 0, NULL, &num, &uaList);
+ if (VGAUTH_E_OK != err) {
+ g_printerr(SU_(list.error,
+ "%s: Failed to list aliases for user '%s': %s.\n"),
+ appName, userName, VGAuth_GetErrorText(err, NULL));
+ return err;
+ }
+
+ if (verbose) {
+ g_print(SU_(list.count, "%s Found %d aliases for user '%s'\n"),
+ appName, num, userName);
+ }
+
+ for (i = 0; i < num; i++) {
+ g_print("%s\n", uaList[i].pemCert);
+ for (j = 0; j < uaList[i].numInfos; j++) {
+ g_print("\t%s: %s %s: %s\n",
+ SU_(list.subject, "Subject"),
+ SubjectName(&(uaList[i].infos[j].subject)),
+ SU_(list.comment, "Comment"),
+ uaList[i].infos[j].comment);
+ }
+ }
+ VGAuth_FreeUserAliasList(num, uaList);
+
+ return err;
+}
+
+
+/*
+ ******************************************************************************
+ * CliListMapped -- */ /**
+ *
+ * List all IdProviders in the mapping file.
+ *
+ * @param[in] ctx The VGAuthContext.
+ *
+ * @return VGAUTH_E_OK on success, VGAuthError on failure
+ *
+ ******************************************************************************
+ */
+
+static VGAuthError
+CliListMapped(VGAuthContext *ctx)
+{
+ VGAuthError err;
+ int num;
+ VGAuthMappedAlias *maList;
+ int i;
+ int j;
+
+ err = VGAuth_QueryMappedAliases(ctx, 0, NULL, &num, &maList);
+ if (VGAUTH_E_OK != err) {
+ g_printerr(SU_(listmapped.error,
+ "%s: Failed to list mapped aliases: %s.\n"),
+ appName, VGAuth_GetErrorText(err, NULL));
+ return err;
+ }
+
+ if (verbose) {
+ g_print(SU_(listmapped.count, "%s Found %d mapped aliases\n"),
+ appName, num);
+ }
+ for (i = 0; i < num; i++) {
+ g_print("%s\n%s:%s\n", maList[i].pemCert,
+ SU_(listmapped.username, "Username"),
+ maList[i].userName);
+ for (j = 0; j < maList[i].numSubjects; j++) {
+ g_print("\t%s: %s\n",
+ SU_(listmapped.subject, "Subject"),
+ SubjectName(&(maList[i].subjects[j])));
+
+ }
+ }
+ VGAuth_FreeMappedAliasList(num, maList);
+
+ return err;
+}
+
+
+/*
+ ******************************************************************************
+ * mainRun -- */ /**
+ *
+ * Initializes and parses commandline args.
+ *
+ * @param[in] argc Number of command line arguments.
+ * @param[in] argv The command line arguments.
+ *
+ * @return 0 if the operation ran successfully, -1 if there was an error during
+ * execution.
+ *
+ ******************************************************************************
+ */
+
+static int
+mainRun(int argc,
+ char *argv[])
+{
+ VGAuthError err;
+ VGAuthContext *ctx = NULL;
+ gboolean doAdd = FALSE;
+ gboolean doRemove = FALSE;
+ gboolean doList = FALSE;
+ gboolean addMapped = FALSE;
+ gchar **argvCopy = NULL;
+ int argcCopy;
+ char *userName = NULL;
+ char *pemFilename = NULL;
+ gchar *comment = NULL;
+ gchar *summaryMsg;
+ gchar *subject = NULL;
+ const gchar *lUsername = SU_(cmdline.summary.username, "username");
+ const gchar *lSubject = SU_(cmdline.summary.subject, "subject");
+ const gchar *lPEMfile = SU_(cmdline.summary.pemfile, "PEM-file");
+ const gchar *lComm = SU_(cmdline.summary.comm, "comment");
+ GError *gErr = NULL;
+ PrefHandle prefs;
+ gchar *msgCatalog = NULL;
+ GOptionEntry listOptions[] = {
+ { "username", 'u', 0, G_OPTION_ARG_STRING, &userName,
+ SU_(listoptions.username,
+ "User whose certificate store is being queried"), NULL },
+ { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
+ SU_(listoptions.verbose,
+ "Verbose operation"), NULL },
+ { NULL }
+ };
+ GOptionEntry removeOptions[] = {
+ { "username", 'u', 0, G_OPTION_ARG_STRING, &userName,
+ SU_(removeoptions.username,
+ "User whose certificate store is being removed from"), NULL },
+ { "file", 'f', 0, G_OPTION_ARG_STRING, &pemFilename,
+ SU_(removeoptions.file, "PEM file name"), NULL },
+ { "subject", 's', 0, G_OPTION_ARG_STRING, &subject,
+ SU_(removeoptions.subject, "The SAML subject"), NULL },
+ { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
+ SU_(removeoptions.verbose, "Verbose operation"), NULL },
+ { NULL }
+ };
+ GOptionEntry addOptions[] = {
+ { "username", 'u', 0, G_OPTION_ARG_STRING, &userName,
+ SU_(addoptions.username,
+ "User whose certificate store is being added to"), NULL },
+ { "file", 'f', 0, G_OPTION_ARG_STRING, &pemFilename,
+ SU_(addoptions.file, "PEM file name"), NULL },
+ { "subject", 's', 0, G_OPTION_ARG_STRING, &subject,
+ SU_(addoptions.subject, "The SAML subject"), NULL },
+ { "global", 'g', 0, G_OPTION_ARG_NONE, &addMapped,
+ SU_(addoptions.global,
+ "Add the certificate to the global mapping file"), NULL },
+ { "comment", 'a', 0, G_OPTION_ARG_STRING, &comment,
+ SU_(addoptions.comment, "subject comment"), NULL},
+ { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
+ SU_(addoptions.verbose, "Verbose operation"), NULL },
+ { NULL }
+ };
+ GOptionContext *context;
+
+ appName = g_basename(argv[0]);
+
+ /*
+ * The option parser needs to modify these, and using the variables
+ * coming into main doesn't work.
+ */
+ argcCopy = argc;
+ argvCopy = argv;
+
+ /*
+ * Do this first, so any noise form the locale setup is properly filtered.
+ */
+ VGAuth_SetLogHandler(CliLog, NULL, 0, NULL);
+
+ /*
+ * Find the location of the i18n catalogs.
+ */
+ prefs = Pref_Init(VGAUTH_PREF_CONFIG_FILENAME);
+ msgCatalog = Pref_GetString(prefs,
+ VGAUTH_PREF_LOCALIZATION_DIR,
+ VGAUTH_PREF_GROUP_NAME_LOCALIZATION,
+ VGAUTH_PREF_DEFAULT_LOCALIZATION_CATALOG);
+
+ I18n_BindTextDomain(VMW_TEXT_DOMAIN, // domain -- base name of vmsg files
+ NULL, // locale -- let it figure it out
+ msgCatalog); // path to message catalogs
+ g_free(msgCatalog);
+
+ /*
+ * Set up the option parser
+ */
+ g_set_prgname(appName);
+ context = g_option_context_new("[add | list | remove]\n");
+ summaryMsg = g_strdup_printf(
+ "add --global --username=%s --file=%s --subject=%s "
+ "[ --comment=%s ]\n"
+ "remove --username=%s --file=%s [ --subject=%s ]\n"
+ "list [ --username=%s ]\n",
+ lUsername, lPEMfile, lSubject, lComm,
+ lUsername, lPEMfile, lSubject,
+ lUsername);
+
+ g_option_context_set_summary(context, summaryMsg);
+ g_free(summaryMsg);
+ if (argc < 2) {
+ Usage(context);
+ }
+
+ /*
+ * Determine the command and set up the appropriate option table.
+ */
+ if (strcmp(argvCopy[1], "add") == 0) {
+ doAdd = TRUE;
+ g_option_context_add_main_entries(context, addOptions, NULL);
+ } else if (strcmp(argvCopy[1], "remove") == 0) {
+ doRemove = TRUE;
+ g_option_context_add_main_entries(context, removeOptions, NULL);
+ } else if (strcmp(argvCopy[1], "list") == 0) {
+ doList = TRUE;
+ g_option_context_add_main_entries(context, listOptions, NULL);
+ } else {
+ Usage(context);
+ }
+
+ /*
+ * Pull out the options.
+ */
+#ifdef _WIN32
+ {
+ char * val = getenv("CHARSET");
+ char *saved = g_strdup_printf("CHARSET=%s", val ? val : "");
+
+ /*
+ * Force the glib parser to interpret the input as the UTF-8
+ * Otherwise, glib treat the input encoding as the current code page,
+ * e.g. 1252
+ */
+ _putenv("CHARSET=UTF-8");
+#endif
+
+ if (!g_option_context_parse(context, &argcCopy, &argvCopy, &gErr)) {
+ g_printerr("%s: %s: %s\n", appName,
+ SU_(cmdline.parse, "Command line parsing failed"),
+ gErr->message);
+ g_error_free(gErr);
+ exit(-1);
+ }
+
+#ifdef _WIN32
+ _putenv("CHARSET=");
+ g_free(saved);
+ }
+#endif
+
+ /*
+ * XXX pull this if we use stdin for the cert contents.
+ */
+ if ((doAdd || doRemove) && !pemFilename) {
+ Usage(context);
+ }
+
+ err = VGAuth_Init(appName, 0, NULL, &ctx);
+ if (VGAUTH_E_OK != err) {
+ g_printerr("%s\n", SU_(vgauth.init.failed, "Failed to init VGAuth"));
+ exit(-1);
+ }
+
+ /*
+ * XXX
+ * If username is unset, should it use the current user?
+ * This breaks the model where no username means listMapped.
+ * Can we do it just for add/remove, or is that too confusing?
+ * Add an explicit listmapped instead?
+ */
+
+ if (doAdd) {
+ err = CliAddAlias(ctx, userName, subject, pemFilename, addMapped, comment);
+ } else if (doRemove) {
+ err= CliRemoveAlias(ctx, userName, subject, pemFilename);
+ } else if (doList) {
+ if (userName) {
+ err = CliList(ctx, userName);
+ } else {
+ err = CliListMapped(ctx);
+ }
+ }
+
+ VGAuth_Shutdown(ctx);
+ return (err == VGAUTH_E_OK) ? 0 : -1;
+}
+
+
+#ifdef _WIN32
+
+
+/*
+ ******************************************************************************
+ * wmain -- */ /**
+ *
+ * Initializes and parses commandline args.
+ *
+ * @param[in] argc Number of command line arguments.
+ * @param[in] argv The command line arguments in unicode.
+ *
+ * @return 0 if the operation ran successfully, -1 if there was an error during
+ * execution.
+ *
+ ******************************************************************************
+ */
+
+int
+wmain(int argc,
+ wchar_t *argv[])
+{
+ int retval = -1;
+ int i;
+ char **argvUtf8 = g_malloc0((argc + 1) * sizeof (char*));
+
+ for (i = 0; i < argc; ++i) {
+ CHK_UTF16_TO_UTF8(argvUtf8[i], argv[i], goto end);
+ }
+
+ retval = mainRun(argc, argvUtf8);
+
+end:
+
+ for (i = 0; i < argc; ++i) {
+ g_free(argvUtf8[i]);
+ }
+
+ g_free(argvUtf8);
+
+ return retval;
+}
+
+#else
+
+
+/*
+ ******************************************************************************
+ * main -- */ /**
+ *
+ * Initializes and parses commandline args.
+ *
+ * @param[in] argc Number of command line arguments.
+ * @param[in] argv The command line arguments.
+ *
+ * @return 0 if the operation ran successfully, -1 if there was an error during
+ * execution.
+ *
+ ******************************************************************************
+ */
+
+int
+main(int argc,
+ char *argv[])
+{
+ return mainRun(argc, argv);
+}
+
+#endif