mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 06:00:32 +01:00
2005-11-14 Robert Love <rml@novell.com>
* vpn-daemons/openvpn: initial checkin of OpenVPN VPN Module, by Tim
Niemueller <tim@niemueller.de>.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1104 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
01b17e0450
commit
266c94917f
50 changed files with 56042 additions and 0 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2005-11-14 Robert Love <rml@novell.com>
|
||||
|
||||
* vpn-daemons/openvpn: initial checkin of OpenVPN VPN Module, by Tim
|
||||
Niemueller <tim@niemueller.de>.
|
||||
|
||||
2005-11-08 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Patch from Bill Moss <bmoss@clemson.edu>
|
||||
|
|
|
|||
4
vpn-daemons/openvpn/AUTHORS
Normal file
4
vpn-daemons/openvpn/AUTHORS
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Tim Niemueller <tim@niemueller.de>
|
||||
Dan Williams <dcbw@redhat.com>
|
||||
David Zeuthen <davidz@redhat.com>
|
||||
|
||||
4
vpn-daemons/openvpn/ChangeLog
Normal file
4
vpn-daemons/openvpn/ChangeLog
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
2005-10-29 Tim Niemueller <tim@niemueller.de>
|
||||
|
||||
* started work based on vpnc work
|
||||
|
||||
28
vpn-daemons/openvpn/Makefile.am
Normal file
28
vpn-daemons/openvpn/Makefile.am
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
SUBDIRS = src auth-dialog properties po
|
||||
|
||||
dbusservicedir = $(sysconfdir)/dbus-1/system.d
|
||||
dbusservice_DATA = nm-openvpn-service.conf
|
||||
|
||||
nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN
|
||||
nmvpnservice_DATA = nm-openvpn-service.name
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
desktop_in_files = nm-openvpn.desktop.in
|
||||
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/48x48/apps
|
||||
icon_DATA = gnome-mime-application-x-openvpn-settings.png
|
||||
|
||||
EXTRA_DIST = $(nmvpnservice_DATA) \
|
||||
$(dbusservice_DATA) \
|
||||
$(desktop_in_files) \
|
||||
$(icon_DATA) \
|
||||
intltool-extract.in \
|
||||
intltool-merge.in \
|
||||
intltool-update.in
|
||||
|
||||
CLEANFILES = $(desktop_DATA) *~
|
||||
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
|
||||
801
vpn-daemons/openvpn/Makefile.in
Normal file
801
vpn-daemons/openvpn/Makefile.in
Normal file
|
|
@ -0,0 +1,801 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
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 = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(srcdir)/nm-openvpn-service.name.in $(top_srcdir)/configure \
|
||||
AUTHORS ChangeLog NEWS compile config.guess config.sub depcomp \
|
||||
install-sh ltmain.sh missing mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = nm-openvpn-service.name
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
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 = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(dbusservicedir)" \
|
||||
"$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)" \
|
||||
"$(DESTDIR)$(nmvpnservicedir)"
|
||||
dbusserviceDATA_INSTALL = $(INSTALL_DATA)
|
||||
desktopDATA_INSTALL = $(INSTALL_DATA)
|
||||
iconDATA_INSTALL = $(INSTALL_DATA)
|
||||
nmvpnserviceDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(dbusservice_DATA) $(desktop_DATA) $(icon_DATA) \
|
||||
$(nmvpnservice_DATA)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALL_LINGUAS = @ALL_LINGUAS@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BINDIR = @BINDIR@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIR = @DATADIR@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DBUS_CFLAGS = @DBUS_CFLAGS@
|
||||
DBUS_LIBS = @DBUS_LIBS@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GCONF_CFLAGS = @GCONF_CFLAGS@
|
||||
GCONF_LIBS = @GCONF_LIBS@
|
||||
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
|
||||
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
GLADE_CFLAGS = @GLADE_CFLAGS@
|
||||
GLADE_LIBS = @GLADE_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNOMEKEYRING_CFLAGS = @GNOMEKEYRING_CFLAGS@
|
||||
GNOMEKEYRING_LIBS = @GNOMEKEYRING_LIBS@
|
||||
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
|
||||
GTHREAD_LIBS = @GTHREAD_LIBS@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
|
||||
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
|
||||
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
|
||||
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
|
||||
INTLTOOL_ICONV = @INTLTOOL_ICONV@
|
||||
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
|
||||
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
|
||||
INTLTOOL_MERGE = @INTLTOOL_MERGE@
|
||||
INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
|
||||
INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
|
||||
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
|
||||
INTLTOOL_PERL = @INTLTOOL_PERL@
|
||||
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
|
||||
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
|
||||
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
|
||||
INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
|
||||
INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
|
||||
INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
|
||||
INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
|
||||
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
|
||||
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
|
||||
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
|
||||
INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
|
||||
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
|
||||
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBDIR = @LIBDIR@
|
||||
LIBEXECDIR = @LIBEXECDIR@
|
||||
LIBGNOMEUI_CFLAGS = @LIBGNOMEUI_CFLAGS@
|
||||
LIBGNOMEUI_LIBS = @LIBGNOMEUI_LIBS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LOCALSTATEDIR = @LOCALSTATEDIR@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MSGFMT = @MSGFMT@
|
||||
NETWORK_MANAGER_CFLAGS = @NETWORK_MANAGER_CFLAGS@
|
||||
NETWORK_MANAGER_LIBS = @NETWORK_MANAGER_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
|
||||
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
|
||||
RANLIB = @RANLIB@
|
||||
SBINDIR = @SBINDIR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
SYSCONFDIR = @SYSCONFDIR@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
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@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
SUBDIRS = src auth-dialog properties po
|
||||
dbusservicedir = $(sysconfdir)/dbus-1/system.d
|
||||
dbusservice_DATA = nm-openvpn-service.conf
|
||||
nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN
|
||||
nmvpnservice_DATA = nm-openvpn-service.name
|
||||
desktopdir = $(datadir)/applications
|
||||
desktop_in_files = nm-openvpn.desktop.in
|
||||
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
||||
icondir = $(datadir)/icons/hicolor/48x48/apps
|
||||
icon_DATA = gnome-mime-application-x-openvpn-settings.png
|
||||
EXTRA_DIST = $(nmvpnservice_DATA) \
|
||||
$(dbusservice_DATA) \
|
||||
$(desktop_in_files) \
|
||||
$(icon_DATA) \
|
||||
intltool-extract.in \
|
||||
intltool-merge.in \
|
||||
intltool-update.in
|
||||
|
||||
CLEANFILES = $(desktop_DATA) *~
|
||||
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
nm-openvpn-service.name: $(top_builddir)/config.status $(srcdir)/nm-openvpn-service.name.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-dbusserviceDATA: $(dbusservice_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(dbusservicedir)" || $(mkdir_p) "$(DESTDIR)$(dbusservicedir)"
|
||||
@list='$(dbusservice_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(dbusserviceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(dbusservicedir)/$$f'"; \
|
||||
$(dbusserviceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(dbusservicedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-dbusserviceDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dbusservice_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(dbusservicedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(dbusservicedir)/$$f"; \
|
||||
done
|
||||
install-desktopDATA: $(desktop_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(desktopdir)" || $(mkdir_p) "$(DESTDIR)$(desktopdir)"
|
||||
@list='$(desktop_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \
|
||||
$(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-desktopDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(desktop_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(desktopdir)/$$f"; \
|
||||
done
|
||||
install-iconDATA: $(icon_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(icondir)" || $(mkdir_p) "$(DESTDIR)$(icondir)"
|
||||
@list='$(icon_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(iconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(icondir)/$$f'"; \
|
||||
$(iconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(icondir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-iconDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(icon_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(icondir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(icondir)/$$f"; \
|
||||
done
|
||||
install-nmvpnserviceDATA: $(nmvpnservice_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(nmvpnservicedir)" || $(mkdir_p) "$(DESTDIR)$(nmvpnservicedir)"
|
||||
@list='$(nmvpnservice_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(nmvpnserviceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(nmvpnservicedir)/$$f'"; \
|
||||
$(nmvpnserviceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(nmvpnservicedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-nmvpnserviceDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(nmvpnservice_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(nmvpnservicedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(nmvpnservicedir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
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: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(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: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(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)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/. $(distdir)/po
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
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
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(DATA) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(dbusservicedir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(nmvpnservicedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
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:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
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-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dbusserviceDATA install-desktopDATA \
|
||||
install-iconDATA install-nmvpnserviceDATA
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dbusserviceDATA uninstall-desktopDATA \
|
||||
uninstall-iconDATA uninstall-info-am \
|
||||
uninstall-nmvpnserviceDATA
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-libtool clean-recursive \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-recursive distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-dbusserviceDATA install-desktopDATA install-exec \
|
||||
install-exec-am install-iconDATA install-info install-info-am \
|
||||
install-man install-nmvpnserviceDATA install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-dbusserviceDATA uninstall-desktopDATA \
|
||||
uninstall-iconDATA uninstall-info-am \
|
||||
uninstall-nmvpnserviceDATA
|
||||
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
# 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:
|
||||
0
vpn-daemons/openvpn/NEWS
Normal file
0
vpn-daemons/openvpn/NEWS
Normal file
15
vpn-daemons/openvpn/README
Normal file
15
vpn-daemons/openvpn/README
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
OpenVPN support for NetworkManager
|
||||
|
||||
Added by Tim Niemueller http://www.niemueller.de
|
||||
|
||||
Assumes that you have a running OpenVPN X.509 setup as mentioned
|
||||
in the OpenVPN 2.0 HOWOT on the OpenVPN homepage.
|
||||
|
||||
TODO: Support for static keys, support for password authentication,
|
||||
only present auth-dialog if needed.
|
||||
|
||||
Code released under the GPL. See COPYING file in the NetworkManager
|
||||
directory.
|
||||
|
||||
Aachen, 2005/11/12
|
||||
|
||||
45
vpn-daemons/openvpn/acinclude.m4
Normal file
45
vpn-daemons/openvpn/acinclude.m4
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
|
||||
dnl as-ac-expand.m4 0.1.0
|
||||
dnl autostars m4 macro for expanding directories using configure's prefix
|
||||
dnl thomas@apestaart.org
|
||||
|
||||
dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
|
||||
dnl
|
||||
dnl example
|
||||
dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
|
||||
dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
|
||||
|
||||
AC_DEFUN(AS_AC_EXPAND,
|
||||
[
|
||||
EXP_VAR=[$1]
|
||||
FROM_VAR=[$2]
|
||||
|
||||
dnl first expand prefix and exec_prefix if necessary
|
||||
prefix_save=$prefix
|
||||
exec_prefix_save=$exec_prefix
|
||||
|
||||
dnl if no prefix given, then use /usr/local, the default prefix
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
prefix=$ac_default_prefix
|
||||
fi
|
||||
dnl if no exec_prefix given, then use prefix
|
||||
if test "x$exec_prefix" = "xNONE"; then
|
||||
exec_prefix=$prefix
|
||||
fi
|
||||
|
||||
full_var="$FROM_VAR"
|
||||
dnl loop until it doesn't change anymore
|
||||
while true; do
|
||||
new_full_var="`eval echo $full_var`"
|
||||
if test "x$new_full_var"="x$full_var"; then break; fi
|
||||
full_var=$new_full_var
|
||||
done
|
||||
|
||||
dnl clean up
|
||||
full_var=$new_full_var
|
||||
AC_SUBST([$1], "$full_var")
|
||||
|
||||
dnl restore prefix and exec_prefix
|
||||
prefix=$prefix_save
|
||||
exec_prefix=$exec_prefix_save
|
||||
])
|
||||
7765
vpn-daemons/openvpn/aclocal.m4
vendored
Normal file
7765
vpn-daemons/openvpn/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
33
vpn-daemons/openvpn/auth-dialog/Makefile.am
Normal file
33
vpn-daemons/openvpn/auth-dialog/Makefile.am
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils
|
||||
|
||||
libexec_PROGRAMS = nm-openvpn-auth-dialog
|
||||
|
||||
nm_openvpn_auth_dialog_CPPFLAGS = \
|
||||
$(GTHREAD_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(LIBGNOMEUI_CFLAGS) \
|
||||
$(GNOMEKEYRING_CFLAGS) \
|
||||
-DICONDIR=\""$(datadir)/pixmaps"\" \
|
||||
-DGLADEDIR=\""$(gladedir)"\" \
|
||||
-DBINDIR=\""$(bindir)"\" \
|
||||
-DDBUS_API_SUBJECT_TO_CHANGE \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGNOME_DISABLE_DEPRECATED \
|
||||
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
|
||||
-DVERSION=\"$(VERSION)\" \
|
||||
$(NULL)
|
||||
|
||||
nm_openvpn_auth_dialog_SOURCES = \
|
||||
main.c \
|
||||
gnome-two-password-dialog.c \
|
||||
gnome-two-password-dialog.h \
|
||||
$(NULL)
|
||||
|
||||
nm_openvpn_auth_dialog_LDADD = \
|
||||
$(GTK_LIBS) \
|
||||
$(LIBGNOMEUI_LIBS) \
|
||||
$(GNOMEKEYRING_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
CLEANFILES = *~
|
||||
582
vpn-daemons/openvpn/auth-dialog/Makefile.in
Normal file
582
vpn-daemons/openvpn/auth-dialog/Makefile.in
Normal file
|
|
@ -0,0 +1,582 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
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@
|
||||
libexec_PROGRAMS = nm-openvpn-auth-dialog$(EXEEXT)
|
||||
subdir = auth-dialog
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(libexecdir)"
|
||||
libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(libexec_PROGRAMS)
|
||||
am_nm_openvpn_auth_dialog_OBJECTS = \
|
||||
nm_openvpn_auth_dialog-main.$(OBJEXT) \
|
||||
nm_openvpn_auth_dialog-gnome-two-password-dialog.$(OBJEXT)
|
||||
nm_openvpn_auth_dialog_OBJECTS = $(am_nm_openvpn_auth_dialog_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
nm_openvpn_auth_dialog_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(nm_openvpn_auth_dialog_SOURCES)
|
||||
DIST_SOURCES = $(nm_openvpn_auth_dialog_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALL_LINGUAS = @ALL_LINGUAS@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BINDIR = @BINDIR@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIR = @DATADIR@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DBUS_CFLAGS = @DBUS_CFLAGS@
|
||||
DBUS_LIBS = @DBUS_LIBS@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GCONF_CFLAGS = @GCONF_CFLAGS@
|
||||
GCONF_LIBS = @GCONF_LIBS@
|
||||
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
|
||||
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
GLADE_CFLAGS = @GLADE_CFLAGS@
|
||||
GLADE_LIBS = @GLADE_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNOMEKEYRING_CFLAGS = @GNOMEKEYRING_CFLAGS@
|
||||
GNOMEKEYRING_LIBS = @GNOMEKEYRING_LIBS@
|
||||
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
|
||||
GTHREAD_LIBS = @GTHREAD_LIBS@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
|
||||
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
|
||||
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
|
||||
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
|
||||
INTLTOOL_ICONV = @INTLTOOL_ICONV@
|
||||
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
|
||||
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
|
||||
INTLTOOL_MERGE = @INTLTOOL_MERGE@
|
||||
INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
|
||||
INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
|
||||
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
|
||||
INTLTOOL_PERL = @INTLTOOL_PERL@
|
||||
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
|
||||
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
|
||||
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
|
||||
INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
|
||||
INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
|
||||
INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
|
||||
INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
|
||||
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
|
||||
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
|
||||
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
|
||||
INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
|
||||
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
|
||||
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBDIR = @LIBDIR@
|
||||
LIBEXECDIR = @LIBEXECDIR@
|
||||
LIBGNOMEUI_CFLAGS = @LIBGNOMEUI_CFLAGS@
|
||||
LIBGNOMEUI_LIBS = @LIBGNOMEUI_LIBS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LOCALSTATEDIR = @LOCALSTATEDIR@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MSGFMT = @MSGFMT@
|
||||
NETWORK_MANAGER_CFLAGS = @NETWORK_MANAGER_CFLAGS@
|
||||
NETWORK_MANAGER_LIBS = @NETWORK_MANAGER_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
|
||||
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
|
||||
RANLIB = @RANLIB@
|
||||
SBINDIR = @SBINDIR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
SYSCONFDIR = @SYSCONFDIR@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
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@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils
|
||||
nm_openvpn_auth_dialog_CPPFLAGS = \
|
||||
$(GTHREAD_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(LIBGNOMEUI_CFLAGS) \
|
||||
$(GNOMEKEYRING_CFLAGS) \
|
||||
-DICONDIR=\""$(datadir)/pixmaps"\" \
|
||||
-DGLADEDIR=\""$(gladedir)"\" \
|
||||
-DBINDIR=\""$(bindir)"\" \
|
||||
-DDBUS_API_SUBJECT_TO_CHANGE \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGNOME_DISABLE_DEPRECATED \
|
||||
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
|
||||
-DVERSION=\"$(VERSION)\" \
|
||||
$(NULL)
|
||||
|
||||
nm_openvpn_auth_dialog_SOURCES = \
|
||||
main.c \
|
||||
gnome-two-password-dialog.c \
|
||||
gnome-two-password-dialog.h \
|
||||
$(NULL)
|
||||
|
||||
nm_openvpn_auth_dialog_LDADD = \
|
||||
$(GTK_LIBS) \
|
||||
$(LIBGNOMEUI_LIBS) \
|
||||
$(GNOMEKEYRING_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
CLEANFILES = *~
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 auth-dialog/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu auth-dialog/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libexecPROGRAMS: $(libexec_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
|
||||
@list='$(libexec_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 $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libexecPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(libexec_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libexecPROGRAMS:
|
||||
@list='$(libexec_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
nm-openvpn-auth-dialog$(EXEEXT): $(nm_openvpn_auth_dialog_OBJECTS) $(nm_openvpn_auth_dialog_DEPENDENCIES)
|
||||
@rm -f nm-openvpn-auth-dialog$(EXEEXT)
|
||||
$(LINK) $(nm_openvpn_auth_dialog_LDFLAGS) $(nm_openvpn_auth_dialog_OBJECTS) $(nm_openvpn_auth_dialog_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm_openvpn_auth_dialog-gnome-two-password-dialog.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm_openvpn_auth_dialog-main.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@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 -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@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 -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@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 $@ $<
|
||||
|
||||
nm_openvpn_auth_dialog-main.o: main.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_openvpn_auth_dialog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm_openvpn_auth_dialog-main.o -MD -MP -MF "$(DEPDIR)/nm_openvpn_auth_dialog-main.Tpo" -c -o nm_openvpn_auth_dialog-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/nm_openvpn_auth_dialog-main.Tpo" "$(DEPDIR)/nm_openvpn_auth_dialog-main.Po"; else rm -f "$(DEPDIR)/nm_openvpn_auth_dialog-main.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='nm_openvpn_auth_dialog-main.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_openvpn_auth_dialog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm_openvpn_auth_dialog-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
|
||||
|
||||
nm_openvpn_auth_dialog-main.obj: main.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_openvpn_auth_dialog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm_openvpn_auth_dialog-main.obj -MD -MP -MF "$(DEPDIR)/nm_openvpn_auth_dialog-main.Tpo" -c -o nm_openvpn_auth_dialog-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/nm_openvpn_auth_dialog-main.Tpo" "$(DEPDIR)/nm_openvpn_auth_dialog-main.Po"; else rm -f "$(DEPDIR)/nm_openvpn_auth_dialog-main.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='nm_openvpn_auth_dialog-main.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_openvpn_auth_dialog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm_openvpn_auth_dialog-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
|
||||
|
||||
nm_openvpn_auth_dialog-gnome-two-password-dialog.o: gnome-two-password-dialog.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_openvpn_auth_dialog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm_openvpn_auth_dialog-gnome-two-password-dialog.o -MD -MP -MF "$(DEPDIR)/nm_openvpn_auth_dialog-gnome-two-password-dialog.Tpo" -c -o nm_openvpn_auth_dialog-gnome-two-password-dialog.o `test -f 'gnome-two-password-dialog.c' || echo '$(srcdir)/'`gnome-two-password-dialog.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/nm_openvpn_auth_dialog-gnome-two-password-dialog.Tpo" "$(DEPDIR)/nm_openvpn_auth_dialog-gnome-two-password-dialog.Po"; else rm -f "$(DEPDIR)/nm_openvpn_auth_dialog-gnome-two-password-dialog.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnome-two-password-dialog.c' object='nm_openvpn_auth_dialog-gnome-two-password-dialog.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_openvpn_auth_dialog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm_openvpn_auth_dialog-gnome-two-password-dialog.o `test -f 'gnome-two-password-dialog.c' || echo '$(srcdir)/'`gnome-two-password-dialog.c
|
||||
|
||||
nm_openvpn_auth_dialog-gnome-two-password-dialog.obj: gnome-two-password-dialog.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_openvpn_auth_dialog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm_openvpn_auth_dialog-gnome-two-password-dialog.obj -MD -MP -MF "$(DEPDIR)/nm_openvpn_auth_dialog-gnome-two-password-dialog.Tpo" -c -o nm_openvpn_auth_dialog-gnome-two-password-dialog.obj `if test -f 'gnome-two-password-dialog.c'; then $(CYGPATH_W) 'gnome-two-password-dialog.c'; else $(CYGPATH_W) '$(srcdir)/gnome-two-password-dialog.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/nm_openvpn_auth_dialog-gnome-two-password-dialog.Tpo" "$(DEPDIR)/nm_openvpn_auth_dialog-gnome-two-password-dialog.Po"; else rm -f "$(DEPDIR)/nm_openvpn_auth_dialog-gnome-two-password-dialog.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnome-two-password-dialog.c' object='nm_openvpn_auth_dialog-gnome-two-password-dialog.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_openvpn_auth_dialog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm_openvpn_auth_dialog-gnome-two-password-dialog.obj `if test -f 'gnome-two-password-dialog.c'; then $(CYGPATH_W) 'gnome-two-password-dialog.c'; else $(CYGPATH_W) '$(srcdir)/gnome-two-password-dialog.c'; fi`
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
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)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
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)$(libexecdir)"; 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:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
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-generic clean-libexecPROGRAMS clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libexecPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
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-info-am uninstall-libexecPROGRAMS
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libexecPROGRAMS 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-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libexecPROGRAMS install-man 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-info-am \
|
||||
uninstall-libexecPROGRAMS
|
||||
|
||||
# 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:
|
||||
745
vpn-daemons/openvpn/auth-dialog/gnome-two-password-dialog.c
Normal file
745
vpn-daemons/openvpn/auth-dialog/gnome-two-password-dialog.c
Normal file
|
|
@ -0,0 +1,745 @@
|
|||
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
|
||||
|
||||
/* gnome-password-dialog.c - A use password prompting dialog widget.
|
||||
|
||||
Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
|
||||
The Gnome Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the ree Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the Gnome Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
Authors: Ramiro Estrugo <ramiro@eazel.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
//#include "gnome-i18nP.h"
|
||||
#include "gnome-two-password-dialog.h"
|
||||
#include <gtk/gtkbox.h>
|
||||
#include <gtk/gtkcheckbutton.h>
|
||||
#include <gtk/gtkentry.h>
|
||||
#include <gtk/gtkhbox.h>
|
||||
#include <gtk/gtkimage.h>
|
||||
#include <gtk/gtklabel.h>
|
||||
#include <gtk/gtkmain.h>
|
||||
#include <gtk/gtksignal.h>
|
||||
#include <gtk/gtkstock.h>
|
||||
#include <gtk/gtktable.h>
|
||||
#include <gtk/gtkvbox.h>
|
||||
#include <gtk/gtkradiobutton.h>
|
||||
#include <gtk/gtkstock.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
struct GnomeTwoPasswordDialogDetails
|
||||
{
|
||||
/* Attributes */
|
||||
gboolean readonly_username;
|
||||
gboolean readonly_domain;
|
||||
|
||||
gboolean show_username;
|
||||
gboolean show_domain;
|
||||
gboolean show_password;
|
||||
gboolean show_password_secondary;
|
||||
|
||||
/* TODO: */
|
||||
gboolean remember;
|
||||
char *remember_label_text;
|
||||
|
||||
/* Internal widgetry and flags */
|
||||
GtkWidget *username_entry;
|
||||
GtkWidget *password_entry;
|
||||
GtkWidget *password_entry_secondary;
|
||||
GtkWidget *domain_entry;
|
||||
|
||||
GtkWidget *table;
|
||||
|
||||
GtkWidget *remember_session_button;
|
||||
GtkWidget *remember_forever_button;
|
||||
|
||||
GtkWidget *radio_vbox;
|
||||
GtkWidget *connect_with_no_userpass_button;
|
||||
GtkWidget *connect_with_userpass_button;
|
||||
|
||||
gboolean anon_support_on;
|
||||
|
||||
char *secondary_password_label;
|
||||
};
|
||||
|
||||
/* Caption table rows indices */
|
||||
static const guint CAPTION_TABLE_USERNAME_ROW = 0;
|
||||
static const guint CAPTION_TABLE_PASSWORD_ROW = 1;
|
||||
|
||||
/* Layout constants */
|
||||
static const guint DIALOG_BORDER_WIDTH = 6;
|
||||
static const guint CAPTION_TABLE_BORDER_WIDTH = 4;
|
||||
|
||||
/* GnomeTwoPasswordDialogClass methods */
|
||||
static void gnome_two_password_dialog_class_init (GnomeTwoPasswordDialogClass *password_dialog_class);
|
||||
static void gnome_two_password_dialog_init (GnomeTwoPasswordDialog *password_dialog);
|
||||
|
||||
/* GObjectClass methods */
|
||||
static void gnome_two_password_dialog_finalize (GObject *object);
|
||||
|
||||
|
||||
/* GtkDialog callbacks */
|
||||
static void dialog_show_callback (GtkWidget *widget,
|
||||
gpointer callback_data);
|
||||
static void dialog_close_callback (GtkWidget *widget,
|
||||
gpointer callback_data);
|
||||
|
||||
static gpointer parent_class;
|
||||
|
||||
GtkType
|
||||
gnome_two_password_dialog_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type) {
|
||||
static const GTypeInfo info = {
|
||||
sizeof (GnomeTwoPasswordDialogClass),
|
||||
NULL, NULL,
|
||||
(GClassInitFunc) gnome_two_password_dialog_class_init,
|
||||
NULL, NULL,
|
||||
sizeof (GnomeTwoPasswordDialog), 0,
|
||||
(GInstanceInitFunc) gnome_two_password_dialog_init,
|
||||
NULL
|
||||
};
|
||||
|
||||
type = g_type_register_static (gtk_dialog_get_type(),
|
||||
"GnomeTwoPasswordDialog",
|
||||
&info, 0);
|
||||
|
||||
parent_class = g_type_class_ref (gtk_dialog_get_type());
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnome_two_password_dialog_class_init (GnomeTwoPasswordDialogClass * klass)
|
||||
{
|
||||
G_OBJECT_CLASS (klass)->finalize = gnome_two_password_dialog_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_two_password_dialog_init (GnomeTwoPasswordDialog *password_dialog)
|
||||
{
|
||||
password_dialog->details = g_new0 (GnomeTwoPasswordDialogDetails, 1);
|
||||
password_dialog->details->show_username = TRUE;
|
||||
password_dialog->details->show_password = TRUE;
|
||||
password_dialog->details->show_password_secondary = TRUE;
|
||||
password_dialog->details->anon_support_on = FALSE;
|
||||
|
||||
password_dialog->details->secondary_password_label = g_strdup ( _("_Secondary Password:") );
|
||||
}
|
||||
|
||||
/* GObjectClass methods */
|
||||
static void
|
||||
gnome_two_password_dialog_finalize (GObject *object)
|
||||
{
|
||||
GnomeTwoPasswordDialog *password_dialog;
|
||||
|
||||
password_dialog = GNOME_TWO_PASSWORD_DIALOG (object);
|
||||
|
||||
g_object_unref (password_dialog->details->username_entry);
|
||||
g_object_unref (password_dialog->details->domain_entry);
|
||||
g_object_unref (password_dialog->details->password_entry);
|
||||
g_object_unref (password_dialog->details->password_entry_secondary);
|
||||
|
||||
g_free (password_dialog->details->remember_label_text);
|
||||
g_free (password_dialog->details);
|
||||
|
||||
g_free (password_dialog->details->secondary_password_label);
|
||||
|
||||
if (G_OBJECT_CLASS (parent_class)->finalize != NULL)
|
||||
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
|
||||
}
|
||||
|
||||
/* GtkDialog callbacks */
|
||||
static void
|
||||
dialog_show_callback (GtkWidget *widget, gpointer callback_data)
|
||||
{
|
||||
GnomeTwoPasswordDialog *password_dialog;
|
||||
|
||||
password_dialog = GNOME_TWO_PASSWORD_DIALOG (callback_data);
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (password_dialog->details->username_entry) &&
|
||||
!password_dialog->details->readonly_username) {
|
||||
gtk_widget_grab_focus (password_dialog->details->username_entry);
|
||||
} else if (GTK_WIDGET_VISIBLE (password_dialog->details->domain_entry) &&
|
||||
!password_dialog->details->readonly_domain) {
|
||||
gtk_widget_grab_focus (password_dialog->details->domain_entry);
|
||||
} else if (GTK_WIDGET_VISIBLE (password_dialog->details->password_entry)) {
|
||||
gtk_widget_grab_focus (password_dialog->details->password_entry);
|
||||
} else if (GTK_WIDGET_VISIBLE (password_dialog->details->password_entry_secondary)) {
|
||||
gtk_widget_grab_focus (password_dialog->details->password_entry_secondary);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dialog_close_callback (GtkWidget *widget, gpointer callback_data)
|
||||
{
|
||||
gtk_widget_hide (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
userpass_radio_button_clicked (GtkWidget *widget, gpointer callback_data)
|
||||
{
|
||||
GnomeTwoPasswordDialog *password_dialog;
|
||||
|
||||
password_dialog = GNOME_TWO_PASSWORD_DIALOG (callback_data);
|
||||
|
||||
if (widget == password_dialog->details->connect_with_no_userpass_button) {
|
||||
gtk_widget_set_sensitive (
|
||||
password_dialog->details->table, FALSE);
|
||||
}
|
||||
else { /* the other button */
|
||||
gtk_widget_set_sensitive (
|
||||
password_dialog->details->table, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
add_row (GtkWidget *table, int row, const char *label_text, GtkWidget *entry, int offset)
|
||||
{
|
||||
GtkWidget *label;
|
||||
|
||||
label = gtk_label_new_with_mnemonic (label_text);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table), label,
|
||||
0, 1,
|
||||
row, row + 1,
|
||||
GTK_FILL,
|
||||
(GTK_FILL|GTK_EXPAND),
|
||||
offset, 0);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table), entry,
|
||||
1, 2,
|
||||
row, row + 1,
|
||||
(GTK_FILL|GTK_EXPAND),
|
||||
(GTK_FILL|GTK_EXPAND),
|
||||
0, 0);
|
||||
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
|
||||
}
|
||||
|
||||
static void
|
||||
remove_child (GtkWidget *child, GtkWidget *table)
|
||||
{
|
||||
gtk_container_remove (GTK_CONTAINER (table), child);
|
||||
}
|
||||
|
||||
static void
|
||||
add_table_rows (GnomeTwoPasswordDialog *password_dialog)
|
||||
{
|
||||
int row;
|
||||
GtkWidget *table;
|
||||
int offset;
|
||||
|
||||
if (password_dialog->details->anon_support_on) {
|
||||
offset = 20;
|
||||
}
|
||||
else {
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
table = password_dialog->details->table;
|
||||
/* This will not kill the entries, since they are ref:ed */
|
||||
gtk_container_foreach (GTK_CONTAINER (table),
|
||||
(GtkCallback)remove_child, table);
|
||||
|
||||
row = 0;
|
||||
if (password_dialog->details->show_username)
|
||||
add_row (table, row++, _("_Username:"), password_dialog->details->username_entry, offset);
|
||||
if (password_dialog->details->show_domain)
|
||||
add_row (table, row++, _("_Domain:"), password_dialog->details->domain_entry, offset);
|
||||
if (password_dialog->details->show_password)
|
||||
add_row (table, row++, _("_Password:"), password_dialog->details->password_entry, offset);
|
||||
if (password_dialog->details->show_password_secondary)
|
||||
add_row (table, row++, password_dialog->details->secondary_password_label,
|
||||
password_dialog->details->password_entry_secondary, offset);
|
||||
|
||||
gtk_widget_show_all (table);
|
||||
}
|
||||
|
||||
static void
|
||||
username_entry_activate (GtkWidget *widget, GtkWidget *dialog)
|
||||
{
|
||||
GnomeTwoPasswordDialog *password_dialog;
|
||||
|
||||
password_dialog = GNOME_TWO_PASSWORD_DIALOG (dialog);
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (password_dialog->details->domain_entry) &&
|
||||
GTK_WIDGET_SENSITIVE (password_dialog->details->domain_entry))
|
||||
gtk_widget_grab_focus (password_dialog->details->domain_entry);
|
||||
else if (GTK_WIDGET_VISIBLE (password_dialog->details->password_entry) &&
|
||||
GTK_WIDGET_SENSITIVE (password_dialog->details->password_entry))
|
||||
gtk_widget_grab_focus (password_dialog->details->password_entry);
|
||||
else if (GTK_WIDGET_VISIBLE (password_dialog->details->password_entry_secondary) &&
|
||||
GTK_WIDGET_SENSITIVE (password_dialog->details->password_entry_secondary))
|
||||
gtk_widget_grab_focus (password_dialog->details->password_entry_secondary);
|
||||
}
|
||||
|
||||
static void
|
||||
domain_entry_activate (GtkWidget *widget, GtkWidget *dialog)
|
||||
{
|
||||
GnomeTwoPasswordDialog *password_dialog;
|
||||
|
||||
password_dialog = GNOME_TWO_PASSWORD_DIALOG (dialog);
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (password_dialog->details->password_entry) &&
|
||||
GTK_WIDGET_SENSITIVE (password_dialog->details->password_entry))
|
||||
gtk_widget_grab_focus (password_dialog->details->password_entry);
|
||||
else if (GTK_WIDGET_VISIBLE (password_dialog->details->password_entry_secondary) &&
|
||||
GTK_WIDGET_SENSITIVE (password_dialog->details->password_entry_secondary))
|
||||
gtk_widget_grab_focus (password_dialog->details->password_entry_secondary);
|
||||
}
|
||||
|
||||
|
||||
/* Public GnomeTwoPasswordDialog methods */
|
||||
GtkWidget *
|
||||
gnome_two_password_dialog_new (const char *dialog_title,
|
||||
const char *message,
|
||||
const char *username,
|
||||
const char *password,
|
||||
gboolean readonly_username)
|
||||
{
|
||||
GnomeTwoPasswordDialog *password_dialog;
|
||||
GtkWidget *table;
|
||||
GtkLabel *message_label;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *dialog_icon;
|
||||
GSList *group;
|
||||
|
||||
password_dialog = GNOME_TWO_PASSWORD_DIALOG (gtk_widget_new (gnome_two_password_dialog_get_type (), NULL));
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (password_dialog), dialog_title);
|
||||
gtk_dialog_add_buttons (GTK_DIALOG (password_dialog),
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OK, GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
/* Setup the dialog */
|
||||
gtk_dialog_set_has_separator (GTK_DIALOG (password_dialog), FALSE);
|
||||
|
||||
gtk_window_set_position (GTK_WINDOW (password_dialog), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_modal (GTK_WINDOW (password_dialog), TRUE);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (password_dialog), DIALOG_BORDER_WIDTH);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (password_dialog), GTK_RESPONSE_OK);
|
||||
|
||||
g_signal_connect (password_dialog, "show",
|
||||
G_CALLBACK (dialog_show_callback), password_dialog);
|
||||
g_signal_connect (password_dialog, "close",
|
||||
G_CALLBACK (dialog_close_callback), password_dialog);
|
||||
|
||||
/* the radio buttons for anonymous login */
|
||||
password_dialog->details->connect_with_no_userpass_button =
|
||||
gtk_radio_button_new_with_mnemonic (NULL, _("Connect _anonymously"));
|
||||
group = gtk_radio_button_get_group (
|
||||
GTK_RADIO_BUTTON (password_dialog->details->connect_with_no_userpass_button));
|
||||
password_dialog->details->connect_with_userpass_button =
|
||||
gtk_radio_button_new_with_mnemonic (
|
||||
group, _("Connect as _user:"));
|
||||
|
||||
if (username != NULL && *username != 0) {
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (password_dialog->details->connect_with_userpass_button), TRUE);
|
||||
} else {
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (password_dialog->details->connect_with_no_userpass_button), TRUE);
|
||||
}
|
||||
|
||||
|
||||
password_dialog->details->radio_vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (password_dialog->details->radio_vbox),
|
||||
password_dialog->details->connect_with_no_userpass_button,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (password_dialog->details->radio_vbox),
|
||||
password_dialog->details->connect_with_userpass_button,
|
||||
FALSE, FALSE, 0);
|
||||
g_signal_connect (password_dialog->details->connect_with_no_userpass_button, "clicked",
|
||||
G_CALLBACK (userpass_radio_button_clicked), password_dialog);
|
||||
g_signal_connect (password_dialog->details->connect_with_userpass_button, "clicked",
|
||||
G_CALLBACK (userpass_radio_button_clicked), password_dialog);
|
||||
|
||||
/* The table that holds the captions */
|
||||
password_dialog->details->table = table = gtk_table_new (3, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 12);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
||||
|
||||
password_dialog->details->username_entry = gtk_entry_new ();
|
||||
password_dialog->details->domain_entry = gtk_entry_new ();
|
||||
password_dialog->details->password_entry = gtk_entry_new ();
|
||||
password_dialog->details->password_entry_secondary = gtk_entry_new ();
|
||||
|
||||
/* We want to hold on to these during the table rearrangement */
|
||||
g_object_ref (password_dialog->details->username_entry);
|
||||
gtk_object_sink (GTK_OBJECT (password_dialog->details->username_entry));
|
||||
g_object_ref (password_dialog->details->domain_entry);
|
||||
gtk_object_sink (GTK_OBJECT (password_dialog->details->domain_entry));
|
||||
g_object_ref (password_dialog->details->password_entry);
|
||||
gtk_object_sink (GTK_OBJECT (password_dialog->details->password_entry));
|
||||
g_object_ref (password_dialog->details->password_entry_secondary);
|
||||
gtk_object_sink (GTK_OBJECT (password_dialog->details->password_entry_secondary));
|
||||
|
||||
gtk_entry_set_visibility (GTK_ENTRY (password_dialog->details->password_entry), FALSE);
|
||||
gtk_entry_set_visibility (GTK_ENTRY (password_dialog->details->password_entry_secondary), FALSE);
|
||||
|
||||
g_signal_connect (password_dialog->details->username_entry,
|
||||
"activate",
|
||||
G_CALLBACK (username_entry_activate),
|
||||
password_dialog);
|
||||
g_signal_connect (password_dialog->details->domain_entry,
|
||||
"activate",
|
||||
G_CALLBACK (domain_entry_activate),
|
||||
password_dialog);
|
||||
g_signal_connect_swapped (password_dialog->details->password_entry,
|
||||
"activate",
|
||||
G_CALLBACK (gtk_window_activate_default),
|
||||
password_dialog);
|
||||
g_signal_connect_swapped (password_dialog->details->password_entry_secondary,
|
||||
"activate",
|
||||
G_CALLBACK (gtk_window_activate_default),
|
||||
password_dialog);
|
||||
add_table_rows (password_dialog);
|
||||
|
||||
/* Adds some eye-candy to the dialog */
|
||||
hbox = gtk_hbox_new (FALSE, 12);
|
||||
dialog_icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG);
|
||||
gtk_misc_set_alignment (GTK_MISC (dialog_icon), 0.5, 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), dialog_icon, FALSE, FALSE, 0);
|
||||
|
||||
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (password_dialog)->vbox), 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(hbox), 6);
|
||||
gtk_box_set_spacing (GTK_BOX (hbox), 12);
|
||||
|
||||
/* Fills the vbox */
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
|
||||
if (message) {
|
||||
message_label = GTK_LABEL (gtk_label_new (message));
|
||||
gtk_label_set_justify (message_label, GTK_JUSTIFY_LEFT);
|
||||
gtk_label_set_line_wrap (message_label, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
GTK_WIDGET (message_label),
|
||||
TRUE, /* expand */
|
||||
TRUE, /* fill */
|
||||
5); /* padding */
|
||||
}
|
||||
gtk_box_pack_start (GTK_BOX (vbox), password_dialog->details->radio_vbox,
|
||||
TRUE, TRUE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table,
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
/* Configure the table */
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table),
|
||||
CAPTION_TABLE_BORDER_WIDTH);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (password_dialog)->vbox),
|
||||
hbox,
|
||||
TRUE, /* expand */
|
||||
TRUE, /* fill */
|
||||
0); /* padding */
|
||||
|
||||
gtk_widget_show_all (GTK_DIALOG (password_dialog)->vbox);
|
||||
|
||||
password_dialog->details->remember_session_button =
|
||||
gtk_check_button_new_with_mnemonic (_("_Remember password for this session"));
|
||||
password_dialog->details->remember_forever_button =
|
||||
gtk_check_button_new_with_mnemonic (_("_Save password in keyring"));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), password_dialog->details->remember_session_button,
|
||||
TRUE, TRUE, 6);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), password_dialog->details->remember_forever_button,
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
|
||||
gnome_two_password_dialog_set_username (password_dialog, username);
|
||||
gnome_two_password_dialog_set_password (password_dialog, password);
|
||||
gnome_two_password_dialog_set_readonly_domain (password_dialog, readonly_username);
|
||||
|
||||
return GTK_WIDGET (password_dialog);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gnome_two_password_dialog_run_and_block (GnomeTwoPasswordDialog *password_dialog)
|
||||
{
|
||||
gint button_clicked;
|
||||
|
||||
g_return_val_if_fail (password_dialog != NULL, FALSE);
|
||||
g_return_val_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog), FALSE);
|
||||
|
||||
button_clicked = gtk_dialog_run (GTK_DIALOG (password_dialog));
|
||||
gtk_widget_hide (GTK_WIDGET (password_dialog));
|
||||
|
||||
return button_clicked == GTK_RESPONSE_OK;
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_username (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *username)
|
||||
{
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
g_return_if_fail (password_dialog->details->username_entry != NULL);
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (password_dialog->details->username_entry),
|
||||
username?username:"");
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_password (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *password)
|
||||
{
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (password_dialog->details->password_entry),
|
||||
password ? password : "");
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_password_secondary (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *password_secondary)
|
||||
{
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (password_dialog->details->password_entry_secondary),
|
||||
password_secondary ? password_secondary : "");
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_domain (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *domain)
|
||||
{
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
g_return_if_fail (password_dialog->details->domain_entry != NULL);
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (password_dialog->details->domain_entry),
|
||||
domain ? domain : "");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_show_username (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show)
|
||||
{
|
||||
g_return_if_fail (password_dialog != NULL);
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
|
||||
show = !!show;
|
||||
if (password_dialog->details->show_username != show) {
|
||||
password_dialog->details->show_username = show;
|
||||
add_table_rows (password_dialog);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_show_domain (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show)
|
||||
{
|
||||
g_return_if_fail (password_dialog != NULL);
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
|
||||
show = !!show;
|
||||
if (password_dialog->details->show_domain != show) {
|
||||
password_dialog->details->show_domain = show;
|
||||
add_table_rows (password_dialog);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_show_password (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show)
|
||||
{
|
||||
g_return_if_fail (password_dialog != NULL);
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
|
||||
show = !!show;
|
||||
if (password_dialog->details->show_password != show) {
|
||||
password_dialog->details->show_password = show;
|
||||
add_table_rows (password_dialog);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_show_password_secondary (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show)
|
||||
{
|
||||
g_return_if_fail (password_dialog != NULL);
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
|
||||
show = !!show;
|
||||
if (password_dialog->details->show_password_secondary != show) {
|
||||
password_dialog->details->show_password_secondary = show;
|
||||
add_table_rows (password_dialog);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_readonly_username (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean readonly)
|
||||
{
|
||||
g_return_if_fail (password_dialog != NULL);
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
|
||||
password_dialog->details->readonly_username = readonly;
|
||||
|
||||
gtk_widget_set_sensitive (password_dialog->details->username_entry,
|
||||
!readonly);
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_readonly_domain (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean readonly)
|
||||
{
|
||||
g_return_if_fail (password_dialog != NULL);
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
|
||||
password_dialog->details->readonly_domain = readonly;
|
||||
|
||||
gtk_widget_set_sensitive (password_dialog->details->domain_entry,
|
||||
!readonly);
|
||||
}
|
||||
|
||||
char *
|
||||
gnome_two_password_dialog_get_username (GnomeTwoPasswordDialog *password_dialog)
|
||||
{
|
||||
g_return_val_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog), NULL);
|
||||
|
||||
return g_strdup (gtk_entry_get_text (GTK_ENTRY (password_dialog->details->username_entry)));
|
||||
}
|
||||
|
||||
char *
|
||||
gnome_two_password_dialog_get_domain (GnomeTwoPasswordDialog *password_dialog)
|
||||
{
|
||||
g_return_val_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog), NULL);
|
||||
|
||||
return g_strdup (gtk_entry_get_text (GTK_ENTRY (password_dialog->details->domain_entry)));
|
||||
}
|
||||
|
||||
char *
|
||||
gnome_two_password_dialog_get_password (GnomeTwoPasswordDialog *password_dialog)
|
||||
{
|
||||
g_return_val_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog), NULL);
|
||||
|
||||
return g_strdup (gtk_entry_get_text (GTK_ENTRY (password_dialog->details->password_entry)));
|
||||
}
|
||||
|
||||
char *
|
||||
gnome_two_password_dialog_get_password_secondary (GnomeTwoPasswordDialog *password_dialog)
|
||||
{
|
||||
g_return_val_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog), NULL);
|
||||
|
||||
return g_strdup (gtk_entry_get_text (GTK_ENTRY (password_dialog->details->password_entry_secondary)));
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_show_userpass_buttons (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show_userpass_buttons)
|
||||
{
|
||||
if (show_userpass_buttons) {
|
||||
password_dialog->details->anon_support_on = TRUE;
|
||||
gtk_widget_show (password_dialog->details->radio_vbox);
|
||||
if (gtk_toggle_button_get_active (
|
||||
GTK_TOGGLE_BUTTON (password_dialog->details->connect_with_no_userpass_button))) {
|
||||
gtk_widget_set_sensitive (password_dialog->details->table, FALSE);
|
||||
}
|
||||
else {
|
||||
gtk_widget_set_sensitive (password_dialog->details->table, TRUE);
|
||||
}
|
||||
} else {
|
||||
password_dialog->details->anon_support_on = FALSE;
|
||||
gtk_widget_hide (password_dialog->details->radio_vbox);
|
||||
gtk_widget_set_sensitive (password_dialog->details->table, TRUE);
|
||||
}
|
||||
|
||||
add_table_rows (password_dialog);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gnome_two_password_dialog_anon_selected (GnomeTwoPasswordDialog *password_dialog)
|
||||
{
|
||||
return password_dialog->details->anon_support_on &&
|
||||
gtk_toggle_button_get_active (
|
||||
GTK_TOGGLE_BUTTON (
|
||||
password_dialog->details->connect_with_no_userpass_button));
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_show_remember (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show_remember)
|
||||
{
|
||||
if (show_remember) {
|
||||
gtk_widget_show (password_dialog->details->remember_session_button);
|
||||
gtk_widget_show (password_dialog->details->remember_forever_button);
|
||||
} else {
|
||||
gtk_widget_hide (password_dialog->details->remember_session_button);
|
||||
gtk_widget_hide (password_dialog->details->remember_forever_button);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gnome_two_password_dialog_set_remember (GnomeTwoPasswordDialog *password_dialog,
|
||||
GnomeTwoPasswordDialogRemember remember)
|
||||
{
|
||||
gboolean session, forever;
|
||||
|
||||
session = FALSE;
|
||||
forever = FALSE;
|
||||
if (remember == GNOME_TWO_PASSWORD_DIALOG_REMEMBER_SESSION) {
|
||||
session = TRUE;
|
||||
} else if (remember == GNOME_TWO_PASSWORD_DIALOG_REMEMBER_FOREVER){
|
||||
forever = TRUE;
|
||||
}
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (password_dialog->details->remember_session_button),
|
||||
session);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (password_dialog->details->remember_forever_button),
|
||||
forever);
|
||||
}
|
||||
|
||||
GnomeTwoPasswordDialogRemember
|
||||
gnome_two_password_dialog_get_remember (GnomeTwoPasswordDialog *password_dialog)
|
||||
{
|
||||
gboolean session, forever;
|
||||
|
||||
session = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (password_dialog->details->remember_session_button));
|
||||
forever = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (password_dialog->details->remember_forever_button));
|
||||
if (forever) {
|
||||
return GNOME_TWO_PASSWORD_DIALOG_REMEMBER_FOREVER;
|
||||
} else if (session) {
|
||||
return GNOME_TWO_PASSWORD_DIALOG_REMEMBER_SESSION;
|
||||
}
|
||||
return GNOME_TWO_PASSWORD_DIALOG_REMEMBER_NOTHING;
|
||||
}
|
||||
|
||||
void gnome_two_password_dialog_set_password_secondary_label (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *password_secondary_label)
|
||||
{
|
||||
g_return_if_fail (password_dialog != NULL);
|
||||
g_return_if_fail (GNOME_IS_TWO_PASSWORD_DIALOG (password_dialog));
|
||||
|
||||
g_free (password_dialog->details->secondary_password_label);
|
||||
password_dialog->details->secondary_password_label = g_strdup (password_secondary_label);
|
||||
|
||||
if (password_dialog->details->show_password_secondary) {
|
||||
add_table_rows (password_dialog);
|
||||
}
|
||||
}
|
||||
116
vpn-daemons/openvpn/auth-dialog/gnome-two-password-dialog.h
Normal file
116
vpn-daemons/openvpn/auth-dialog/gnome-two-password-dialog.h
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
|
||||
|
||||
/* gnome-two-password-dialog.h - A use password prompting dialog widget
|
||||
asking for two passwords. Based of
|
||||
gnome-password-dialog.[ch] from libgnomeui
|
||||
|
||||
Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
Copyright (C) 2005, Red Hat, Inc.
|
||||
|
||||
The Gnome Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the Gnome Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
Authors: Ramiro Estrugo <ramiro@eazel.com>
|
||||
*/
|
||||
|
||||
#ifndef GNOME_TWO_PASSWORD_DIALOG_H
|
||||
#define GNOME_TWO_PASSWORD_DIALOG_H
|
||||
|
||||
#include <gtk/gtkdialog.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GNOME_TYPE_TWO_PASSWORD_DIALOG (gnome_two_password_dialog_get_type ())
|
||||
#define GNOME_TWO_PASSWORD_DIALOG(obj) (GTK_CHECK_CAST ((obj), GNOME_TYPE_TWO_PASSWORD_DIALOG, GnomeTwoPasswordDialog))
|
||||
#define GNOME_TWO_PASSWORD_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_TWO_PASSWORD_DIALOG, GnomeTwoPasswordDialogClass))
|
||||
#define GNOME_IS_TWO_PASSWORD_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_TWO_PASSWORD_DIALOG))
|
||||
#define GNOME_IS_TWO_PASSWORD_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_TWO_PASSWORD_DIALOG))
|
||||
|
||||
typedef struct GnomeTwoPasswordDialog GnomeTwoPasswordDialog;
|
||||
typedef struct GnomeTwoPasswordDialogClass GnomeTwoPasswordDialogClass;
|
||||
typedef struct GnomeTwoPasswordDialogDetails GnomeTwoPasswordDialogDetails;
|
||||
|
||||
struct GnomeTwoPasswordDialog
|
||||
{
|
||||
GtkDialog gtk_dialog;
|
||||
|
||||
GnomeTwoPasswordDialogDetails *details;
|
||||
};
|
||||
|
||||
struct GnomeTwoPasswordDialogClass
|
||||
{
|
||||
GtkDialogClass parent_class;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
GNOME_TWO_PASSWORD_DIALOG_REMEMBER_NOTHING,
|
||||
GNOME_TWO_PASSWORD_DIALOG_REMEMBER_SESSION,
|
||||
GNOME_TWO_PASSWORD_DIALOG_REMEMBER_FOREVER
|
||||
} GnomeTwoPasswordDialogRemember;
|
||||
|
||||
|
||||
GtkType gnome_two_password_dialog_get_type (void);
|
||||
GtkWidget* gnome_two_password_dialog_new (const char *dialog_title,
|
||||
const char *message,
|
||||
const char *username,
|
||||
const char *password,
|
||||
gboolean readonly_username);
|
||||
|
||||
gboolean gnome_two_password_dialog_run_and_block (GnomeTwoPasswordDialog *password_dialog);
|
||||
|
||||
/* Attribute mutators */
|
||||
void gnome_two_password_dialog_set_show_username (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show);
|
||||
void gnome_two_password_dialog_set_show_domain (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show);
|
||||
void gnome_two_password_dialog_set_show_password (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show);
|
||||
void gnome_two_password_dialog_set_show_password_secondary (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show);
|
||||
void gnome_two_password_dialog_set_username (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *username);
|
||||
void gnome_two_password_dialog_set_domain (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *domain);
|
||||
void gnome_two_password_dialog_set_password (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *password);
|
||||
void gnome_two_password_dialog_set_password_secondary (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *password_secondary);
|
||||
void gnome_two_password_dialog_set_readonly_username (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean readonly);
|
||||
void gnome_two_password_dialog_set_readonly_domain (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean readonly);
|
||||
|
||||
void gnome_two_password_dialog_set_password_secondary_label (GnomeTwoPasswordDialog *password_dialog,
|
||||
const char *password_secondary_description);
|
||||
|
||||
void gnome_two_password_dialog_set_show_remember (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show_remember);
|
||||
void gnome_two_password_dialog_set_remember (GnomeTwoPasswordDialog *password_dialog,
|
||||
GnomeTwoPasswordDialogRemember remember);
|
||||
GnomeTwoPasswordDialogRemember gnome_two_password_dialog_get_remember (GnomeTwoPasswordDialog *password_dialog);
|
||||
void gnome_two_password_dialog_set_show_userpass_buttons (GnomeTwoPasswordDialog *password_dialog,
|
||||
gboolean show_userpass_buttons);
|
||||
|
||||
/* Attribute accessors */
|
||||
char * gnome_two_password_dialog_get_username (GnomeTwoPasswordDialog *password_dialog);
|
||||
char * gnome_two_password_dialog_get_domain (GnomeTwoPasswordDialog *password_dialog);
|
||||
char * gnome_two_password_dialog_get_password (GnomeTwoPasswordDialog *password_dialog);
|
||||
char * gnome_two_password_dialog_get_password_secondary (GnomeTwoPasswordDialog *password_dialog);
|
||||
|
||||
gboolean gnome_two_password_dialog_anon_selected (GnomeTwoPasswordDialog *password_dialog);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GNOME_TWO_PASSWORD_DIALOG_H */
|
||||
289
vpn-daemons/openvpn/auth-dialog/main.c
Normal file
289
vpn-daemons/openvpn/auth-dialog/main.c
Normal file
|
|
@ -0,0 +1,289 @@
|
|||
/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
|
||||
*
|
||||
* Dan Williams <dcbw@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* (C) Copyright 2004 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <libgnomeui/libgnomeui.h>
|
||||
#include <gnome-keyring.h>
|
||||
|
||||
#include "gnome-two-password-dialog.h"
|
||||
|
||||
#define VPN_SERVICE "org.freedesktop.NetworkManager.openvpn"
|
||||
|
||||
static GSList *
|
||||
lookup_pass (const char *vpn_name, const char *vpn_service, gboolean *is_session)
|
||||
{
|
||||
GSList *passwords;
|
||||
GList *keyring_result;
|
||||
|
||||
passwords = NULL;
|
||||
|
||||
if (gnome_keyring_find_network_password_sync (g_get_user_name (), /* user */
|
||||
NULL, /* domain */
|
||||
vpn_name, /* server */
|
||||
NULL, /* object */
|
||||
vpn_service, /* protocol */
|
||||
NULL, /* authtype */
|
||||
0, /* port */
|
||||
&keyring_result) != GNOME_KEYRING_RESULT_OK)
|
||||
return FALSE;
|
||||
|
||||
if (keyring_result != NULL && g_list_length (keyring_result) == 2) {
|
||||
char *password;
|
||||
char *group_password;
|
||||
GnomeKeyringNetworkPasswordData *data1 = keyring_result->data;
|
||||
GnomeKeyringNetworkPasswordData *data2 = (g_list_next (keyring_result))->data;
|
||||
|
||||
password = NULL;
|
||||
group_password = NULL;
|
||||
|
||||
if (strcmp (data1->object, "group_password") == 0) {
|
||||
group_password = data1->password;
|
||||
} else if (strcmp (data1->object, "password") == 0) {
|
||||
password = data1->password;
|
||||
}
|
||||
|
||||
if (strcmp (data2->object, "group_password") == 0) {
|
||||
group_password = data2->password;
|
||||
} else if (strcmp (data2->object, "password") == 0) {
|
||||
password = data2->password;
|
||||
}
|
||||
|
||||
if (password != NULL && group_password != NULL) {
|
||||
passwords = g_slist_append (passwords, g_strdup (group_password));
|
||||
passwords = g_slist_append (passwords, g_strdup (password));
|
||||
if (strcmp (data1->keyring, "session") == 0)
|
||||
*is_session = TRUE;
|
||||
else
|
||||
*is_session = FALSE;
|
||||
}
|
||||
|
||||
gnome_keyring_network_password_list_free (keyring_result);
|
||||
}
|
||||
|
||||
return passwords;
|
||||
}
|
||||
|
||||
static void save_vpn_password (const char *vpn_name, const char *vpn_service, const char *keyring,
|
||||
const char *password, const char *group_password)
|
||||
{
|
||||
guint32 item_id;
|
||||
GnomeKeyringResult keyring_result;
|
||||
|
||||
keyring_result = gnome_keyring_set_network_password_sync (keyring,
|
||||
g_get_user_name (),
|
||||
NULL,
|
||||
vpn_name,
|
||||
"password",
|
||||
vpn_service,
|
||||
NULL,
|
||||
0,
|
||||
password,
|
||||
&item_id);
|
||||
if (keyring_result != GNOME_KEYRING_RESULT_OK)
|
||||
{
|
||||
g_warning ("Couldn't store password in keyring, code %d", (int) keyring_result);
|
||||
}
|
||||
|
||||
keyring_result = gnome_keyring_set_network_password_sync (keyring,
|
||||
g_get_user_name (),
|
||||
NULL,
|
||||
vpn_name,
|
||||
"group_password",
|
||||
vpn_service,
|
||||
NULL,
|
||||
0,
|
||||
group_password,
|
||||
&item_id);
|
||||
|
||||
if (keyring_result != GNOME_KEYRING_RESULT_OK)
|
||||
{
|
||||
g_warning ("Couldn't store password in keyring, code %d", (int) keyring_result);
|
||||
}
|
||||
}
|
||||
|
||||
static GSList *
|
||||
get_passwords (const char *vpn_name, const char *vpn_service, gboolean retry)
|
||||
{
|
||||
GSList *result;
|
||||
char *prompt;
|
||||
GtkWidget *dialog;
|
||||
char *keyring_password;
|
||||
char *keyring_group_password;
|
||||
gboolean keyring_is_session;
|
||||
GSList *keyring_result;
|
||||
GnomeTwoPasswordDialogRemember remember;
|
||||
|
||||
result = NULL;
|
||||
keyring_password = NULL;
|
||||
keyring_group_password = NULL;
|
||||
keyring_result = NULL;
|
||||
|
||||
g_return_val_if_fail (vpn_name != NULL, NULL);
|
||||
|
||||
/* Use the system user name, since the VPN might have a different user name */
|
||||
if (!retry) {
|
||||
if ((result = lookup_pass (vpn_name, vpn_service, &keyring_is_session)) != NULL) {
|
||||
return result;
|
||||
}
|
||||
} else {
|
||||
if ((keyring_result = lookup_pass (vpn_name, vpn_service, &keyring_is_session)) != NULL) {
|
||||
keyring_group_password = g_strdup ((char *) keyring_result->data);
|
||||
keyring_password = g_strdup ((char *) (g_slist_next (keyring_result))->data);
|
||||
}
|
||||
g_slist_foreach (keyring_result, (GFunc)g_free, NULL);
|
||||
g_slist_free (keyring_result);
|
||||
}
|
||||
|
||||
prompt = g_strdup_printf (_("You need to authenticate to access the Virtual Private Network '%s'."), vpn_name);
|
||||
dialog = gnome_two_password_dialog_new (_("Authenticate VPN"), prompt, NULL, NULL, FALSE);
|
||||
g_free (prompt);
|
||||
|
||||
gnome_two_password_dialog_set_show_username (GNOME_TWO_PASSWORD_DIALOG (dialog), FALSE);
|
||||
gnome_two_password_dialog_set_show_userpass_buttons (GNOME_TWO_PASSWORD_DIALOG (dialog), FALSE);
|
||||
gnome_two_password_dialog_set_show_domain (GNOME_TWO_PASSWORD_DIALOG (dialog), FALSE);
|
||||
gnome_two_password_dialog_set_show_remember (GNOME_TWO_PASSWORD_DIALOG (dialog), TRUE);
|
||||
gnome_two_password_dialog_set_password_secondary_label (GNOME_TWO_PASSWORD_DIALOG (dialog), _("_Group Password:"));
|
||||
/* use the same keyring storage options as from the items we put in the entry boxes */
|
||||
remember = GNOME_TWO_PASSWORD_DIALOG_REMEMBER_NOTHING;
|
||||
if (keyring_result != NULL) {
|
||||
if (keyring_is_session)
|
||||
remember = GNOME_TWO_PASSWORD_DIALOG_REMEMBER_SESSION;
|
||||
else
|
||||
remember = GNOME_TWO_PASSWORD_DIALOG_REMEMBER_FOREVER;
|
||||
}
|
||||
gnome_two_password_dialog_set_remember (GNOME_TWO_PASSWORD_DIALOG (dialog), remember);
|
||||
|
||||
/* if retrying, put in the passwords from the keyring */
|
||||
if (keyring_password != NULL) {
|
||||
gnome_two_password_dialog_set_password (GNOME_TWO_PASSWORD_DIALOG (dialog), keyring_password);
|
||||
}
|
||||
if (keyring_group_password != NULL) {
|
||||
gnome_two_password_dialog_set_password_secondary (GNOME_TWO_PASSWORD_DIALOG (dialog), keyring_group_password);
|
||||
}
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
if (gnome_two_password_dialog_run_and_block (GNOME_TWO_PASSWORD_DIALOG (dialog)))
|
||||
{
|
||||
char *password;
|
||||
char *group_password;
|
||||
|
||||
password = gnome_two_password_dialog_get_password (GNOME_TWO_PASSWORD_DIALOG (dialog));
|
||||
group_password = gnome_two_password_dialog_get_password_secondary (GNOME_TWO_PASSWORD_DIALOG (dialog));
|
||||
result = g_slist_append (result, group_password);
|
||||
result = g_slist_append (result, password);
|
||||
|
||||
switch (gnome_two_password_dialog_get_remember (GNOME_TWO_PASSWORD_DIALOG (dialog)))
|
||||
{
|
||||
case GNOME_TWO_PASSWORD_DIALOG_REMEMBER_SESSION:
|
||||
save_vpn_password (vpn_name, vpn_service, "session", password, group_password);
|
||||
break;
|
||||
case GNOME_TWO_PASSWORD_DIALOG_REMEMBER_FOREVER:
|
||||
save_vpn_password (vpn_name, vpn_service, NULL, password, group_password);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
g_free (keyring_password);
|
||||
g_free (keyring_group_password);
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GSList *i;
|
||||
GSList *passwords;
|
||||
static gboolean retry = FALSE;
|
||||
static gchar *vpn_name = NULL;
|
||||
static gchar *vpn_service = NULL;
|
||||
GError *error = NULL;
|
||||
GOptionContext *context;
|
||||
static GOptionEntry entries[] =
|
||||
{
|
||||
{ "reprompt", 'r', 0, G_OPTION_ARG_NONE, &retry, "Reprompt for passwords", NULL},
|
||||
{ "name", 'n', 0, G_OPTION_ARG_STRING, &vpn_name, "Name of VPN connection", NULL},
|
||||
{ "service", 's', 0, G_OPTION_ARG_STRING, &vpn_service, "VPN service type", NULL},
|
||||
{ NULL }
|
||||
};
|
||||
char buf[1];
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, NULL);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
passwords = NULL;
|
||||
|
||||
context = g_option_context_new ("- openvpn auth dialog");
|
||||
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
|
||||
g_option_context_add_group (context, gtk_get_option_group (TRUE));
|
||||
g_option_context_parse (context, &argc, &argv, &error);
|
||||
|
||||
if (vpn_name == NULL || vpn_service == NULL) {
|
||||
fprintf (stderr, "Have to supply both name and service\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (strcmp (vpn_service, VPN_SERVICE) != 0) {
|
||||
fprintf (stderr, "This dialog only works with the '%s' service\n", VPN_SERVICE);
|
||||
goto out;
|
||||
}
|
||||
|
||||
gnome_program_init ("nm-openvpn-auth-dialog", VERSION, LIBGNOMEUI_MODULE,
|
||||
argc, argv,
|
||||
GNOME_PARAM_NONE);
|
||||
|
||||
passwords = get_passwords (vpn_name, vpn_service, retry);
|
||||
if (passwords == NULL)
|
||||
goto out;
|
||||
|
||||
/* dump the passwords to stdout */
|
||||
for (i = passwords; i != NULL; i = g_slist_next (i)) {
|
||||
char *password = (char *) i->data;
|
||||
printf ("%s\n", password);
|
||||
}
|
||||
printf ("\n\n");
|
||||
/* for good measure, flush stdout since Kansas is going Bye-Bye */
|
||||
fflush (stdout);
|
||||
|
||||
g_slist_foreach (passwords, (GFunc)g_free, NULL);
|
||||
g_slist_free (passwords);
|
||||
|
||||
/* wait for data on stdin */
|
||||
fread (buf, sizeof (char), sizeof (buf), stdin);
|
||||
|
||||
out:
|
||||
g_option_context_free (context);
|
||||
|
||||
return passwords != NULL ? 0 : 1;
|
||||
}
|
||||
23
vpn-daemons/openvpn/autogen.sh
Executable file
23
vpn-daemons/openvpn/autogen.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
REQUIRED_AUTOMAKE_VERSION=1.7
|
||||
PKG_NAME=NetworkManager-openvpn
|
||||
|
||||
(test -f $srcdir/configure.in \
|
||||
&& test -f $srcdir/auth-dialog/main.c) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level $PKG_NAME directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
which gnome-autogen.sh || {
|
||||
echo "You need to install gnome-common from the GNOME CVS"
|
||||
exit 1
|
||||
}
|
||||
USE_GNOME2_MACROS=1 . gnome-autogen.sh
|
||||
|
||||
|
||||
142
vpn-daemons/openvpn/compile
Executable file
142
vpn-daemons/openvpn/compile
Executable file
|
|
@ -0,0 +1,142 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
1473
vpn-daemons/openvpn/config.guess
vendored
Executable file
1473
vpn-daemons/openvpn/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load diff
112
vpn-daemons/openvpn/config.h.in
Normal file
112
vpn-daemons/openvpn/config.h.in
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* always defined to indicate that i18n is enabled */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Gettext package */
|
||||
#undef GETTEXT_PACKAGE
|
||||
|
||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
||||
#undef HAVE_BIND_TEXTDOMAIN_CODESET
|
||||
|
||||
/* Define to 1 if you have the `dcgettext' function. */
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <paths.h> header file. */
|
||||
#undef HAVE_PATHS_H
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#undef HAVE_UNAME
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
#undef NO_MINUS_C_MINUS_O
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef mode_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef pid_t
|
||||
1576
vpn-daemons/openvpn/config.sub
vendored
Executable file
1576
vpn-daemons/openvpn/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load diff
25271
vpn-daemons/openvpn/configure
vendored
Executable file
25271
vpn-daemons/openvpn/configure
vendored
Executable file
File diff suppressed because it is too large
Load diff
131
vpn-daemons/openvpn/configure.in
Normal file
131
vpn-daemons/openvpn/configure.in
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
AC_PREREQ(2.52)
|
||||
|
||||
AC_INIT(NetworkManager-openvpn, 0.1.0, tim@niemueller.de, NetworkManager-openvpn)
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl
|
||||
dnl Require programs
|
||||
dnl
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
dnl
|
||||
dnl Required headers
|
||||
dnl
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
|
||||
|
||||
dnl
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
dnl
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_PID_T
|
||||
AC_HEADER_TIME
|
||||
|
||||
dnl
|
||||
dnl Checks for library functions.
|
||||
dnl
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MEMCMP
|
||||
AC_CHECK_FUNCS(select socket uname)
|
||||
|
||||
ALL_LINGUAS="da sv"
|
||||
AC_SUBST(ALL_LINGUAS)
|
||||
|
||||
GETTEXT_PACKAGE=NetworkManager-openvpn
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
|
||||
|
||||
AC_PROG_INTLTOOL([0.27.2])
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
|
||||
PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
|
||||
AC_SUBST(GTHREAD_CFLAGS)
|
||||
AC_SUBST(GTHREAD_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.30)
|
||||
AC_SUBST(DBUS_CFLAGS)
|
||||
AC_SUBST(DBUS_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= 0.4.1)
|
||||
AC_SUBST(NETWORK_MANAGER_CFLAGS)
|
||||
AC_SUBST(NETWORK_MANAGER_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6)
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0)
|
||||
AC_SUBST(GDK_PIXBUF_CFLAGS)
|
||||
AC_SUBST(GDK_PIXBUF_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(GLADE, libglade-2.0)
|
||||
AC_SUBST(GLADE_CFLAGS)
|
||||
AC_SUBST(GLADE_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
|
||||
AC_SUBST(LIBGNOMEUI_CFLAGS)
|
||||
AC_SUBST(LIBGNOMEUI_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(GCONF, gconf-2.0)
|
||||
AC_SUBST(GCONF_CFLAGS)
|
||||
AC_SUBST(GCONF_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1)
|
||||
AC_SUBST(GNOMEKEYRING_CFLAGS)
|
||||
AC_SUBST(GNOMEKEYRING_LIBS)
|
||||
|
||||
AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
|
||||
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
|
||||
AS_AC_EXPAND(DATADIR, $datadir)
|
||||
AS_AC_EXPAND(BINDIR, $bindir)
|
||||
AS_AC_EXPAND(SBINDIR, $sbindir)
|
||||
AS_AC_EXPAND(LIBDIR, $libdir)
|
||||
AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
|
||||
|
||||
AC_ARG_ENABLE(more-warnings,
|
||||
AC_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
|
||||
set_more_warnings="$enableval",[
|
||||
if test -d "$srcdir/{arch}" || test -d "$srcdir/CVS"; then
|
||||
set_more_warnings=yes
|
||||
else
|
||||
set_more_warnings=no
|
||||
fi
|
||||
])
|
||||
AC_MSG_CHECKING(for more warnings, including -Werror)
|
||||
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"
|
||||
|
||||
for option in -Wno-unused -Wno-strict-aliasing -Wno-sign-compare -Wdeclaration-after-statement -Wno-pointer-sign ; do
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $option"
|
||||
AC_MSG_CHECKING([whether gcc understands $option])
|
||||
AC_TRY_COMPILE([], [],
|
||||
has_option=yes,
|
||||
has_option=no,)
|
||||
if test $has_option = no; then
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
AC_MSG_RESULT($has_option)
|
||||
unset has_option
|
||||
unset SAVE_CFLAGS
|
||||
done
|
||||
unset option
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
auth-dialog/Makefile
|
||||
properties/Makefile
|
||||
po/Makefile.in
|
||||
nm-openvpn-service.name
|
||||
])
|
||||
530
vpn-daemons/openvpn/depcomp
Executable file
530
vpn-daemons/openvpn/depcomp
Executable file
|
|
@ -0,0 +1,530 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2005-07-09.11
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 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
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
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 outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## 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.
|
||||
## 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
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## 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"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# 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
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# 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
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
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
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# 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:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -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:
|
||||
# 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 \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
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 \'.
|
||||
# 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"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
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'.
|
||||
# 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.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mecanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
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"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# 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.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$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"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## 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"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
28
vpn-daemons/openvpn/doc/example-vpnc-system-wide-connection.sh
Executable file
28
vpn-daemons/openvpn/doc/example-vpnc-system-wide-connection.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This is an example of how to install a system-wide connection that
|
||||
# cannot be edited by unprivileged users using nm-vpn-properties. This
|
||||
# script needs to be run as root and you may need to restart any
|
||||
# gconfd daemons after the script has run (logging in and out will
|
||||
# suffice)
|
||||
|
||||
NAME="openvpn-system-wide"
|
||||
ESCAPED_NAME="openvpn-system-wide"
|
||||
REMOTE="1.2.3.4"
|
||||
CA="/etc/openvpn/CA.crt"
|
||||
CERT="/etc/openvpn/thisclient.crt"
|
||||
KEY="/etc/openvpn/thisclient.key"
|
||||
# must be either yes or no
|
||||
USELZO="no"
|
||||
|
||||
IPSEC_ROUTES="[172.16.0.0/16,192.168.4.0/24]"
|
||||
|
||||
GCONF_PATH="/system/networking/vpn_connections/$ESCAPED_NAME"
|
||||
|
||||
GCONFTOOL2_OPTS="--direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory"
|
||||
|
||||
gconftool-2 $GCONFTOOL2_OPTS --type string --set $GCONF_PATH/name "$NAME"
|
||||
gconftool-2 $GCONFTOOL2_OPTS --type string --set $GCONF_PATH/service_name "org.freedesktop.NetworkManager.openvpn"
|
||||
gconftool-2 $GCONFTOOL2_OPTS --type list --list-type=string --set $GCONF_PATH/vpn_data ["remote","$REMOTE","ca","$CA","cert",$CERT,"key",$KEY,"comp-lzo",$USELZO]
|
||||
gconftool-2 $GCONFTOOL2_OPTS --type list --list-type=string --set $GCONF_PATH/routes $IPSEC_ROUTES
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
323
vpn-daemons/openvpn/install-sh
Executable file
323
vpn-daemons/openvpn/install-sh
Executable file
|
|
@ -0,0 +1,323 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=
|
||||
chgrpcmd=
|
||||
stripcmd=
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dstarg=
|
||||
no_target_directory=
|
||||
|
||||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
-c (ignored)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test -n "$1"; do
|
||||
case $1 in
|
||||
-c) shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t) dstarg=$2
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-T) no_target_directory=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
*) # When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
test -n "$dir_arg$dstarg" && break
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dstarg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dstarg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dstarg=$arg
|
||||
done
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -z "$1"; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src ;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
src=
|
||||
|
||||
if test -d "$dst"; then
|
||||
mkdircmd=:
|
||||
chmodcmd=
|
||||
else
|
||||
mkdircmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dstarg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dstarg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst ;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dstarg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst/`basename "$src"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# This sed command emulates the dirname command.
|
||||
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if test ! -d "$dstdir"; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=
|
||||
|
||||
while test $# -ne 0 ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
if test ! -d "$pathcomp"; then
|
||||
$mkdirprog "$pathcomp"
|
||||
# mkdir can fail with a `File exist' error in case several
|
||||
# install-sh are creating the directory concurrently. This
|
||||
# is OK.
|
||||
test -d "$pathcomp" || exit
|
||||
fi
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
$doit $mkdircmd "$dst" \
|
||||
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
|
||||
|
||||
else
|
||||
dstfile=`basename "$dst"`
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
$doit $cpprog "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| {
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
if test -f "$dstdir/$dstfile"; then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|
||||
|| {
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
}
|
||||
}
|
||||
fi || { (exit 1); exit 1; }
|
||||
done
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
{
|
||||
(exit 0); exit 0
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
839
vpn-daemons/openvpn/intltool-extract.in
Executable file
839
vpn-daemons/openvpn/intltool-extract.in
Executable file
|
|
@ -0,0 +1,839 @@
|
|||
#!@INTLTOOL_PERL@ -w
|
||||
# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
#
|
||||
# The Intltool Message Extractor
|
||||
#
|
||||
# Copyright (C) 2000-2001, 2003 Free Software Foundation.
|
||||
#
|
||||
# Intltool is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Intltool is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
#
|
||||
# Authors: Kenneth Christiansen <kenneth@gnu.org>
|
||||
# Darin Adler <darin@bentspoon.com>
|
||||
#
|
||||
|
||||
## Release information
|
||||
my $PROGRAM = "intltool-extract";
|
||||
my $PACKAGE = "intltool";
|
||||
my $VERSION = "0.34.1";
|
||||
|
||||
## Loaded modules
|
||||
use strict;
|
||||
use File::Basename;
|
||||
use Getopt::Long;
|
||||
|
||||
## Scalars used by the option stuff
|
||||
my $TYPE_ARG = "0";
|
||||
my $LOCAL_ARG = "0";
|
||||
my $HELP_ARG = "0";
|
||||
my $VERSION_ARG = "0";
|
||||
my $UPDATE_ARG = "0";
|
||||
my $QUIET_ARG = "0";
|
||||
my $SRCDIR_ARG = ".";
|
||||
|
||||
my $FILE;
|
||||
my $OUTFILE;
|
||||
|
||||
my $gettext_type = "";
|
||||
my $input;
|
||||
my %messages = ();
|
||||
my %loc = ();
|
||||
my %count = ();
|
||||
my %comments = ();
|
||||
my $strcount = 0;
|
||||
|
||||
my $XMLCOMMENT = "";
|
||||
|
||||
## Use this instead of \w for XML files to handle more possible characters.
|
||||
my $w = "[-A-Za-z0-9._:]";
|
||||
|
||||
## Always print first
|
||||
$| = 1;
|
||||
|
||||
## Handle options
|
||||
GetOptions (
|
||||
"type=s" => \$TYPE_ARG,
|
||||
"local|l" => \$LOCAL_ARG,
|
||||
"help|h" => \$HELP_ARG,
|
||||
"version|v" => \$VERSION_ARG,
|
||||
"update" => \$UPDATE_ARG,
|
||||
"quiet|q" => \$QUIET_ARG,
|
||||
"srcdir=s" => \$SRCDIR_ARG,
|
||||
) or &error;
|
||||
|
||||
&split_on_argument;
|
||||
|
||||
|
||||
## Check for options.
|
||||
## This section will check for the different options.
|
||||
|
||||
sub split_on_argument {
|
||||
|
||||
if ($VERSION_ARG) {
|
||||
&version;
|
||||
|
||||
} elsif ($HELP_ARG) {
|
||||
&help;
|
||||
|
||||
} elsif ($LOCAL_ARG) {
|
||||
&place_local;
|
||||
&extract;
|
||||
|
||||
} elsif ($UPDATE_ARG) {
|
||||
&place_normal;
|
||||
&extract;
|
||||
|
||||
} elsif (@ARGV > 0) {
|
||||
&place_normal;
|
||||
&message;
|
||||
&extract;
|
||||
|
||||
} else {
|
||||
&help;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
sub place_normal {
|
||||
$FILE = $ARGV[0];
|
||||
$OUTFILE = "$FILE.h";
|
||||
}
|
||||
|
||||
sub place_local {
|
||||
$FILE = $ARGV[0];
|
||||
$OUTFILE = fileparse($FILE, ());
|
||||
if (!-e "tmp/") {
|
||||
system("mkdir tmp/");
|
||||
}
|
||||
$OUTFILE = "./tmp/$OUTFILE.h"
|
||||
}
|
||||
|
||||
sub determine_type {
|
||||
if ($TYPE_ARG =~ /^gettext\/(.*)/) {
|
||||
$gettext_type=$1
|
||||
}
|
||||
}
|
||||
|
||||
## Sub for printing release information
|
||||
sub version{
|
||||
print <<_EOF_;
|
||||
${PROGRAM} (${PACKAGE}) $VERSION
|
||||
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
Written by Kenneth Christiansen, 2000.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
_EOF_
|
||||
exit;
|
||||
}
|
||||
|
||||
## Sub for printing usage information
|
||||
sub help {
|
||||
print <<_EOF_;
|
||||
Usage: ${PROGRAM} [OPTION]... [FILENAME]
|
||||
Generates a header file from an XML source file.
|
||||
|
||||
It grabs all strings between <_translatable_node> and its end tag in
|
||||
XML files. Read manpage (man ${PROGRAM}) for more info.
|
||||
|
||||
--type=TYPE Specify the file type of FILENAME. Currently supports:
|
||||
"gettext/glade", "gettext/ini", "gettext/keys"
|
||||
"gettext/rfc822deb", "gettext/schemas",
|
||||
"gettext/scheme", "gettext/xml"
|
||||
-l, --local Writes output into current working directory
|
||||
(conflicts with --update)
|
||||
--update Writes output into the same directory the source file
|
||||
reside (conflicts with --local)
|
||||
--srcdir Root of the source tree
|
||||
-v, --version Output version information and exit
|
||||
-h, --help Display this help and exit
|
||||
-q, --quiet Quiet mode
|
||||
|
||||
Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
|
||||
or send email to <xml-i18n-tools\@gnome.org>.
|
||||
_EOF_
|
||||
exit;
|
||||
}
|
||||
|
||||
## Sub for printing error messages
|
||||
sub error{
|
||||
print STDERR "Try `${PROGRAM} --help' for more information.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
sub message {
|
||||
print "Generating C format header file for translation.\n" unless $QUIET_ARG;
|
||||
}
|
||||
|
||||
sub extract {
|
||||
&determine_type;
|
||||
|
||||
&convert;
|
||||
|
||||
open OUT, ">$OUTFILE";
|
||||
binmode (OUT) if $^O eq 'MSWin32';
|
||||
&msg_write;
|
||||
close OUT;
|
||||
|
||||
print "Wrote $OUTFILE\n" unless $QUIET_ARG;
|
||||
}
|
||||
|
||||
sub convert {
|
||||
|
||||
## Reading the file
|
||||
{
|
||||
local (*IN);
|
||||
local $/; #slurp mode
|
||||
open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!";
|
||||
$input = <IN>;
|
||||
}
|
||||
|
||||
&type_ini if $gettext_type eq "ini";
|
||||
&type_keys if $gettext_type eq "keys";
|
||||
&type_xml if $gettext_type eq "xml";
|
||||
&type_glade if $gettext_type eq "glade";
|
||||
&type_scheme if $gettext_type eq "scheme";
|
||||
&type_schemas if $gettext_type eq "schemas";
|
||||
&type_rfc822deb if $gettext_type eq "rfc822deb";
|
||||
}
|
||||
|
||||
sub entity_decode_minimal
|
||||
{
|
||||
local ($_) = @_;
|
||||
|
||||
s/'/'/g; # '
|
||||
s/"/"/g; # "
|
||||
s/&/&/g;
|
||||
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub entity_decode
|
||||
{
|
||||
local ($_) = @_;
|
||||
|
||||
s/'/'/g; # '
|
||||
s/"/"/g; # "
|
||||
s/&/&/g;
|
||||
s/</</g;
|
||||
s/>/>/g;
|
||||
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub escape_char
|
||||
{
|
||||
return '\"' if $_ eq '"';
|
||||
return '\n' if $_ eq "\n";
|
||||
return '\\' if $_ eq '\\';
|
||||
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub escape
|
||||
{
|
||||
my ($string) = @_;
|
||||
return join "", map &escape_char, split //, $string;
|
||||
}
|
||||
|
||||
sub type_ini {
|
||||
### For generic translatable desktop files ###
|
||||
while ($input =~ /^_.*=(.*)$/mg) {
|
||||
$messages{$1} = [];
|
||||
}
|
||||
}
|
||||
|
||||
sub type_keys {
|
||||
### For generic translatable mime/keys files ###
|
||||
while ($input =~ /^\s*_\w+=(.*)$/mg) {
|
||||
$messages{$1} = [];
|
||||
}
|
||||
}
|
||||
|
||||
sub type_xml {
|
||||
### For generic translatable XML files ###
|
||||
my $tree = readXml($input);
|
||||
parseTree(0, $tree);
|
||||
}
|
||||
|
||||
sub print_var {
|
||||
my $var = shift;
|
||||
my $vartype = ref $var;
|
||||
|
||||
if ($vartype =~ /ARRAY/) {
|
||||
my @arr = @{$var};
|
||||
print "[ ";
|
||||
foreach my $el (@arr) {
|
||||
print_var($el);
|
||||
print ", ";
|
||||
}
|
||||
print "] ";
|
||||
} elsif ($vartype =~ /HASH/) {
|
||||
my %hash = %{$var};
|
||||
print "{ ";
|
||||
foreach my $key (keys %hash) {
|
||||
print "$key => ";
|
||||
print_var($hash{$key});
|
||||
print ", ";
|
||||
}
|
||||
print "} ";
|
||||
} else {
|
||||
print $var;
|
||||
}
|
||||
}
|
||||
|
||||
# Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment)
|
||||
sub getAttributeString
|
||||
{
|
||||
my $sub = shift;
|
||||
my $do_translate = shift || 1;
|
||||
my $language = shift || "";
|
||||
my $translate = shift;
|
||||
my $result = "";
|
||||
foreach my $e (reverse(sort(keys %{ $sub }))) {
|
||||
my $key = $e;
|
||||
my $string = $sub->{$e};
|
||||
my $quote = '"';
|
||||
|
||||
$string =~ s/^[\s]+//;
|
||||
$string =~ s/[\s]+$//;
|
||||
|
||||
if ($string =~ /^'.*'$/)
|
||||
{
|
||||
$quote = "'";
|
||||
}
|
||||
$string =~ s/^['"]//g;
|
||||
$string =~ s/['"]$//g;
|
||||
|
||||
## differences from intltool-merge.in.in
|
||||
if ($key =~ /^_/) {
|
||||
$comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT;
|
||||
$messages{entity_decode($string)} = [];
|
||||
$$translate = 2;
|
||||
}
|
||||
## differences end here from intltool-merge.in.in
|
||||
$result .= " $key=$quote$string$quote";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
# Verbatim copy from intltool-merge.in.in
|
||||
sub getXMLstring
|
||||
{
|
||||
my $ref = shift;
|
||||
my $spacepreserve = shift || 0;
|
||||
my @list = @{ $ref };
|
||||
my $result = "";
|
||||
|
||||
my $count = scalar(@list);
|
||||
my $attrs = $list[0];
|
||||
my $index = 1;
|
||||
|
||||
$spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
|
||||
$spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
|
||||
|
||||
while ($index < $count) {
|
||||
my $type = $list[$index];
|
||||
my $content = $list[$index+1];
|
||||
if (! $type ) {
|
||||
# We've got CDATA
|
||||
if ($content) {
|
||||
# lets strip the whitespace here, and *ONLY* here
|
||||
$content =~ s/\s+/ /gs if (!$spacepreserve);
|
||||
$result .= $content;
|
||||
}
|
||||
} elsif ( "$type" ne "1" ) {
|
||||
# We've got another element
|
||||
$result .= "<$type";
|
||||
$result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
|
||||
if ($content) {
|
||||
my $subresult = getXMLstring($content, $spacepreserve);
|
||||
if ($subresult) {
|
||||
$result .= ">".$subresult . "</$type>";
|
||||
} else {
|
||||
$result .= "/>";
|
||||
}
|
||||
} else {
|
||||
$result .= "/>";
|
||||
}
|
||||
}
|
||||
$index += 2;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
# Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed
|
||||
# Translate list of nodes if necessary
|
||||
sub translate_subnodes
|
||||
{
|
||||
my $fh = shift;
|
||||
my $content = shift;
|
||||
my $language = shift || "";
|
||||
my $singlelang = shift || 0;
|
||||
my $spacepreserve = shift || 0;
|
||||
|
||||
my @nodes = @{ $content };
|
||||
|
||||
my $count = scalar(@nodes);
|
||||
my $index = 0;
|
||||
while ($index < $count) {
|
||||
my $type = $nodes[$index];
|
||||
my $rest = $nodes[$index+1];
|
||||
traverse($fh, $type, $rest, $language, $spacepreserve);
|
||||
$index += 2;
|
||||
}
|
||||
}
|
||||
|
||||
# Based on traverse() in intltool-merge.in.in
|
||||
sub traverse
|
||||
{
|
||||
my $fh = shift; # unused, to allow us to sync code between -merge and -extract
|
||||
my $nodename = shift;
|
||||
my $content = shift;
|
||||
my $language = shift || "";
|
||||
my $spacepreserve = shift || 0;
|
||||
|
||||
if ($nodename && "$nodename" eq "1") {
|
||||
$XMLCOMMENT = $content;
|
||||
} elsif ($nodename) {
|
||||
# element
|
||||
my @all = @{ $content };
|
||||
my $attrs = shift @all;
|
||||
my $translate = 0;
|
||||
my $outattr = getAttributeString($attrs, 1, $language, \$translate);
|
||||
|
||||
if ($nodename =~ /^_/) {
|
||||
$translate = 1;
|
||||
$nodename =~ s/^_//;
|
||||
}
|
||||
my $lookup = '';
|
||||
|
||||
$spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
|
||||
$spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
|
||||
|
||||
if ($translate) {
|
||||
$lookup = getXMLstring($content, $spacepreserve);
|
||||
if (!$spacepreserve) {
|
||||
$lookup =~ s/^\s+//s;
|
||||
$lookup =~ s/\s+$//s;
|
||||
}
|
||||
|
||||
if ($lookup && $translate != 2) {
|
||||
$comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT;
|
||||
$messages{$lookup} = [];
|
||||
} elsif ($translate == 2) {
|
||||
translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
|
||||
}
|
||||
} else {
|
||||
$XMLCOMMENT = "";
|
||||
my $count = scalar(@all);
|
||||
if ($count > 0) {
|
||||
my $index = 0;
|
||||
while ($index < $count) {
|
||||
my $type = $all[$index];
|
||||
my $rest = $all[$index+1];
|
||||
traverse($fh, $type, $rest, $language, $spacepreserve);
|
||||
$index += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
$XMLCOMMENT = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Verbatim copy from intltool-merge.in.in, $fh for compatibility
|
||||
sub parseTree
|
||||
{
|
||||
my $fh = shift;
|
||||
my $ref = shift;
|
||||
my $language = shift || "";
|
||||
|
||||
my $name = shift @{ $ref };
|
||||
my $cont = shift @{ $ref };
|
||||
|
||||
while (!$name || "$name" eq "1") {
|
||||
$name = shift @{ $ref };
|
||||
$cont = shift @{ $ref };
|
||||
}
|
||||
|
||||
my $spacepreserve = 0;
|
||||
my $attrs = @{$cont}[0];
|
||||
$spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
|
||||
|
||||
traverse($fh, $name, $cont, $language, $spacepreserve);
|
||||
}
|
||||
|
||||
# Verbatim copy from intltool-merge.in.in
|
||||
sub intltool_tree_comment
|
||||
{
|
||||
my $expat = shift;
|
||||
my $data = shift;
|
||||
my $clist = $expat->{Curlist};
|
||||
my $pos = $#$clist;
|
||||
|
||||
push @$clist, 1 => $data;
|
||||
}
|
||||
|
||||
# Verbatim copy from intltool-merge.in.in
|
||||
sub intltool_tree_cdatastart
|
||||
{
|
||||
my $expat = shift;
|
||||
my $clist = $expat->{Curlist};
|
||||
my $pos = $#$clist;
|
||||
|
||||
push @$clist, 0 => $expat->original_string();
|
||||
}
|
||||
|
||||
# Verbatim copy from intltool-merge.in.in
|
||||
sub intltool_tree_cdataend
|
||||
{
|
||||
my $expat = shift;
|
||||
my $clist = $expat->{Curlist};
|
||||
my $pos = $#$clist;
|
||||
|
||||
$clist->[$pos] .= $expat->original_string();
|
||||
}
|
||||
|
||||
# Verbatim copy from intltool-merge.in.in
|
||||
sub intltool_tree_char
|
||||
{
|
||||
my $expat = shift;
|
||||
my $text = shift;
|
||||
my $clist = $expat->{Curlist};
|
||||
my $pos = $#$clist;
|
||||
|
||||
# Use original_string so that we retain escaped entities
|
||||
# in CDATA sections.
|
||||
#
|
||||
if ($pos > 0 and $clist->[$pos - 1] eq '0') {
|
||||
$clist->[$pos] .= $expat->original_string();
|
||||
} else {
|
||||
push @$clist, 0 => $expat->original_string();
|
||||
}
|
||||
}
|
||||
|
||||
# Verbatim copy from intltool-merge.in.in
|
||||
sub intltool_tree_start
|
||||
{
|
||||
my $expat = shift;
|
||||
my $tag = shift;
|
||||
my @origlist = ();
|
||||
|
||||
# Use original_string so that we retain escaped entities
|
||||
# in attribute values. We must convert the string to an
|
||||
# @origlist array to conform to the structure of the Tree
|
||||
# Style.
|
||||
#
|
||||
my @original_array = split /\x/, $expat->original_string();
|
||||
my $source = $expat->original_string();
|
||||
|
||||
# Remove leading tag.
|
||||
#
|
||||
$source =~ s|^\s*<\s*(\S+)||s;
|
||||
|
||||
# Grab attribute key/value pairs and push onto @origlist array.
|
||||
#
|
||||
while ($source)
|
||||
{
|
||||
if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
|
||||
{
|
||||
$source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
|
||||
push @origlist, $1;
|
||||
push @origlist, '"' . $2 . '"';
|
||||
}
|
||||
elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
|
||||
{
|
||||
$source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
|
||||
push @origlist, $1;
|
||||
push @origlist, "'" . $2 . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
my $ol = [ { @origlist } ];
|
||||
|
||||
push @{ $expat->{Lists} }, $expat->{Curlist};
|
||||
push @{ $expat->{Curlist} }, $tag => $ol;
|
||||
$expat->{Curlist} = $ol;
|
||||
}
|
||||
|
||||
# Copied from intltool-merge.in.in and added comment handler.
|
||||
sub readXml
|
||||
{
|
||||
my $xmldoc = shift || return;
|
||||
my $ret = eval 'require XML::Parser';
|
||||
if(!$ret) {
|
||||
die "You must have XML::Parser installed to run $0\n\n";
|
||||
}
|
||||
my $xp = new XML::Parser(Style => 'Tree');
|
||||
$xp->setHandlers(Char => \&intltool_tree_char);
|
||||
$xp->setHandlers(Start => \&intltool_tree_start);
|
||||
$xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
|
||||
$xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
|
||||
|
||||
## differences from intltool-merge.in.in
|
||||
$xp->setHandlers(Comment => \&intltool_tree_comment);
|
||||
## differences end here from intltool-merge.in.in
|
||||
|
||||
my $tree = $xp->parse($xmldoc);
|
||||
#print_var($tree);
|
||||
|
||||
# <foo><!-- comment --><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
|
||||
# would be:
|
||||
# [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar,
|
||||
# [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ]
|
||||
|
||||
return $tree;
|
||||
}
|
||||
|
||||
sub type_schemas {
|
||||
### For schemas XML files ###
|
||||
|
||||
# FIXME: We should handle escaped < (less than)
|
||||
while ($input =~ /
|
||||
<locale\ name="C">\s*
|
||||
(<default>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/default>\s*)?
|
||||
(<short>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/short>\s*)?
|
||||
(<long>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/long>\s*)?
|
||||
<\/locale>
|
||||
/sgx) {
|
||||
my @totranslate = ($3,$6,$9);
|
||||
my @eachcomment = ($2,$5,$8);
|
||||
foreach (@totranslate) {
|
||||
my $currentcomment = shift @eachcomment;
|
||||
next if !$_;
|
||||
s/\s+/ /g;
|
||||
$messages{entity_decode_minimal($_)} = [];
|
||||
$comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub type_rfc822deb {
|
||||
### For rfc822-style Debian configuration files ###
|
||||
|
||||
my $lineno = 1;
|
||||
my $type = '';
|
||||
while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg)
|
||||
{
|
||||
my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5);
|
||||
while ($pre =~ m/\n/g)
|
||||
{
|
||||
$lineno ++;
|
||||
}
|
||||
$lineno += length($newline);
|
||||
my @str_list = rfc822deb_split(length($underscore), $text);
|
||||
for my $str (@str_list)
|
||||
{
|
||||
$strcount++;
|
||||
$messages{$str} = [];
|
||||
$loc{$str} = $lineno;
|
||||
$count{$str} = $strcount;
|
||||
my $usercomment = '';
|
||||
while($pre =~ s/(^|\n)#([^\n]*)$//s)
|
||||
{
|
||||
$usercomment = "\n" . $2 . $usercomment;
|
||||
}
|
||||
$comments{$str} = $tag . $usercomment;
|
||||
}
|
||||
$lineno += ($text =~ s/\n//g);
|
||||
}
|
||||
}
|
||||
|
||||
sub rfc822deb_split {
|
||||
# Debian defines a special way to deal with rfc822-style files:
|
||||
# when a value contain newlines, it consists of
|
||||
# 1. a short form (first line)
|
||||
# 2. a long description, all lines begin with a space,
|
||||
# and paragraphs are separated by a single dot on a line
|
||||
# This routine returns an array of all paragraphs, and reformat
|
||||
# them.
|
||||
# When first argument is 2, the string is a comma separated list of
|
||||
# values.
|
||||
my $type = shift;
|
||||
my $text = shift;
|
||||
$text =~ s/^[ \t]//mg;
|
||||
return (split(/, */, $text, 0)) if $type ne 1;
|
||||
return ($text) if $text !~ /\n/;
|
||||
|
||||
$text =~ s/([^\n]*)\n//;
|
||||
my @list = ($1);
|
||||
my $str = '';
|
||||
for my $line (split (/\n/, $text))
|
||||
{
|
||||
chomp $line;
|
||||
if ($line =~ /^\.\s*$/)
|
||||
{
|
||||
# New paragraph
|
||||
$str =~ s/\s*$//;
|
||||
push(@list, $str);
|
||||
$str = '';
|
||||
}
|
||||
elsif ($line =~ /^\s/)
|
||||
{
|
||||
# Line which must not be reformatted
|
||||
$str .= "\n" if length ($str) && $str !~ /\n$/;
|
||||
$line =~ s/\s+$//;
|
||||
$str .= $line."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
# Continuation line, remove newline
|
||||
$str .= " " if length ($str) && $str !~ /\n$/;
|
||||
$str .= $line;
|
||||
}
|
||||
}
|
||||
$str =~ s/\s*$//;
|
||||
push(@list, $str) if length ($str);
|
||||
return @list;
|
||||
}
|
||||
|
||||
sub type_glade {
|
||||
### For translatable Glade XML files ###
|
||||
|
||||
my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
|
||||
|
||||
while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
|
||||
# Glade sometimes uses tags that normally mark translatable things for
|
||||
# little bits of non-translatable content. We work around this by not
|
||||
# translating strings that only includes something like label4 or window1.
|
||||
$messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/;
|
||||
}
|
||||
|
||||
while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
|
||||
for my $item (split (/\n/, $1)) {
|
||||
$messages{entity_decode($item)} = [];
|
||||
}
|
||||
}
|
||||
|
||||
## handle new glade files
|
||||
while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) {
|
||||
$messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/;
|
||||
if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) {
|
||||
$comments{entity_decode($3)} = entity_decode($2) ;
|
||||
}
|
||||
}
|
||||
while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
|
||||
$messages{entity_decode_minimal($2)} = [];
|
||||
}
|
||||
}
|
||||
|
||||
sub type_scheme {
|
||||
my ($line, $i, $state, $str, $trcomment, $char);
|
||||
for $line (split(/\n/, $input)) {
|
||||
$i = 0;
|
||||
$state = 0; # 0 - nothing, 1 - string, 2 - translatable string
|
||||
while ($i < length($line)) {
|
||||
if (substr($line,$i,1) eq "\"") {
|
||||
if ($state == 2) {
|
||||
$comments{$str} = $trcomment if ($trcomment);
|
||||
$messages{$str} = [];
|
||||
$str = '';
|
||||
$state = 0; $trcomment = "";
|
||||
} elsif ($state == 1) {
|
||||
$str = '';
|
||||
$state = 0; $trcomment = "";
|
||||
} else {
|
||||
$state = 1;
|
||||
$str = '';
|
||||
if ($i>0 && substr($line,$i-1,1) eq '_') {
|
||||
$state = 2;
|
||||
}
|
||||
}
|
||||
} elsif (!$state) {
|
||||
if (substr($line,$i,1) eq ";") {
|
||||
$trcomment = substr($line,$i+1);
|
||||
$trcomment =~ s/^;*\s*//;
|
||||
$i = length($line);
|
||||
} elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) {
|
||||
$trcomment = "";
|
||||
}
|
||||
} else {
|
||||
if (substr($line,$i,1) eq "\\") {
|
||||
$char = substr($line,$i+1,1);
|
||||
if ($char ne "\"" && $char ne "\\") {
|
||||
$str = $str . "\\";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$str = $str . substr($line,$i,1);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub msg_write {
|
||||
my @msgids;
|
||||
if (%count)
|
||||
{
|
||||
@msgids = sort { $count{$a} <=> $count{$b} } keys %count;
|
||||
}
|
||||
else
|
||||
{
|
||||
@msgids = sort keys %messages;
|
||||
}
|
||||
for my $message (@msgids)
|
||||
{
|
||||
my $offsetlines = 1;
|
||||
$offsetlines++ if $message =~ /%/;
|
||||
if (defined ($comments{$message}))
|
||||
{
|
||||
while ($comments{$message} =~ m/\n/g)
|
||||
{
|
||||
$offsetlines++;
|
||||
}
|
||||
}
|
||||
print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n"
|
||||
if defined $loc{$message};
|
||||
print OUT "/* ".$comments{$message}." */\n"
|
||||
if defined $comments{$message};
|
||||
print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
|
||||
|
||||
my @lines = split (/\n/, $message, -1);
|
||||
for (my $n = 0; $n < @lines; $n++)
|
||||
{
|
||||
if ($n == 0)
|
||||
{
|
||||
print OUT "char *s = N_(\"";
|
||||
}
|
||||
else
|
||||
{
|
||||
print OUT " \"";
|
||||
}
|
||||
|
||||
print OUT escape($lines[$n]);
|
||||
|
||||
if ($n < @lines - 1)
|
||||
{
|
||||
print OUT "\\n\"\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print OUT "\");\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1356
vpn-daemons/openvpn/intltool-merge.in
Executable file
1356
vpn-daemons/openvpn/intltool-merge.in
Executable file
File diff suppressed because it is too large
Load diff
1065
vpn-daemons/openvpn/intltool-update.in
Executable file
1065
vpn-daemons/openvpn/intltool-update.in
Executable file
File diff suppressed because it is too large
Load diff
6530
vpn-daemons/openvpn/ltmain.sh
Normal file
6530
vpn-daemons/openvpn/ltmain.sh
Normal file
File diff suppressed because it is too large
Load diff
360
vpn-daemons/openvpn/missing
Executable file
360
vpn-daemons/openvpn/missing
Executable file
|
|
@ -0,0 +1,360 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2005-06-08.21
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case "$1" in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
158
vpn-daemons/openvpn/mkinstalldirs
Executable file
158
vpn-daemons/openvpn/mkinstalldirs
Executable file
|
|
@ -0,0 +1,158 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
|
||||
scriptversion=2005-06-29.22
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
errstatus=0
|
||||
dirmode=
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage"
|
||||
exit $?
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||
# one will create a, then the other will try to create a and die with
|
||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||
# from a parallel make. We use --version in the probe to restrict
|
||||
# ourselves to GNU mkdir, which is thread-safe.
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
# Clean up after NextStep and OpenStep mkdir.
|
||||
for d in ./-m ./-p ./--version "./$dirmode";
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
case $file in
|
||||
/*) pathcomp=/ ;;
|
||||
*) pathcomp= ;;
|
||||
esac
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set fnord $file
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
for d
|
||||
do
|
||||
test "x$d" = x && continue
|
||||
|
||||
pathcomp=$pathcomp$d
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
16
vpn-daemons/openvpn/nm-openvpn-service.conf
Normal file
16
vpn-daemons/openvpn/nm-openvpn-service.conf
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE busconfig PUBLIC
|
||||
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig>
|
||||
<policy user="root">
|
||||
<allow own="org.freedesktop.NetworkManager.openvpn"/>
|
||||
<allow send_destination="org.freedesktop.NetworkManager.openvpn"/>
|
||||
<allow send_interface="org.freedesktop.NetworkManager.openvpn"/>
|
||||
</policy>
|
||||
<policy context="default">
|
||||
<deny own="org.freedesktop.NetworkManager.openvpn"/>
|
||||
<deny send_destination="org.freedesktop.NetworkManager.openvpn"/>
|
||||
<deny send_interface="org.freedesktop.NetworkManager.openvpn"/>
|
||||
</policy>
|
||||
</busconfig>
|
||||
|
||||
8
vpn-daemons/openvpn/nm-openvpn-service.name.in
Normal file
8
vpn-daemons/openvpn/nm-openvpn-service.name.in
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[VPN Connection]
|
||||
name=openvpn
|
||||
service=org.freedesktop.NetworkManager.openvpn
|
||||
program=@BINDIR@/nm-openvpn-service
|
||||
|
||||
[GNOME]
|
||||
auth-dialog=@LIBEXECDIR@/nm-openvpn-auth-dialog
|
||||
properties=@LIBDIR@/libnm-openvpn-properties
|
||||
12
vpn-daemons/openvpn/nm-openvpn.desktop.in
Normal file
12
vpn-daemons/openvpn/nm-openvpn.desktop.in
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
_Name=VPN Connection Manager (OpenVPN)
|
||||
_GenericName=VPN Connection Manager (OpenVPN)
|
||||
_Comment=Add, Remove, and Edit VPN Connections
|
||||
Exec=nm-vpn-properties --import-service org.freedesktop.NetworkManager.openvpn --import-file %f
|
||||
Icon=gnome-mime-application-x-openvpn-settings
|
||||
Terminal=false
|
||||
Type=Application
|
||||
DocPath=
|
||||
Categories=GNOME;Application;Network;
|
||||
MimeType=application/x-openvpn-settings
|
||||
10
vpn-daemons/openvpn/po/ChangeLog
Normal file
10
vpn-daemons/openvpn/po/ChangeLog
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
2005-06-17 David Zeuthen <davidz@redhat.com>
|
||||
|
||||
* POTFILES.in: Added nm-vpnc.desktop.in
|
||||
|
||||
* da.po: Updated danish translations
|
||||
|
||||
2005-06-16 David Zeuthen <davidz@redhat.com>
|
||||
|
||||
* da.po: Updated danish translations
|
||||
|
||||
263
vpn-daemons/openvpn/po/Makefile.in.in
Executable file
263
vpn-daemons/openvpn/po/Makefile.in.in
Executable file
|
|
@ -0,0 +1,263 @@
|
|||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
#
|
||||
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
|
||||
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
|
||||
#
|
||||
# - Modified by jacob berkman <jacob@ximian.com> to install
|
||||
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
|
||||
#
|
||||
# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
|
||||
#
|
||||
# We have the following line for use by intltoolize:
|
||||
# INTLTOOL_MAKEFILE
|
||||
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ..
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
libdir = @libdir@
|
||||
localedir = $(libdir)/locale
|
||||
gnulocaledir = $(datadir)/locale
|
||||
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
|
||||
subdir = po
|
||||
install_sh = @install_sh@
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
CC = @CC@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
|
||||
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
|
||||
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
|
||||
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/intl
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
SOURCES =
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
DISTFILES = ChangeLog Makefile.in.in POTFILES.in \
|
||||
$(POFILES) $(SOURCES)
|
||||
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(GETTEXT_PACKAGE).pot
|
||||
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
|
||||
|
||||
.po.mo:
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
.po.gmo:
|
||||
file=`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && $(GMSGFMT) -o $$file $<
|
||||
|
||||
.po.cat:
|
||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
||||
&& rm -f $@ && $(GENCAT) $@ $*.msg
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: $(CATALOGS)
|
||||
all-no:
|
||||
|
||||
$(GETTEXT_PACKAGE).pot: $(POTFILES)
|
||||
$(GENPOT)
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
if test -n "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
|
||||
fi
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
case "$$cat" in \
|
||||
*.gmo) destdir=$(gnulocaledir);; \
|
||||
*) destdir=$(localedir);; \
|
||||
esac; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
|
||||
if test -n "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $$dir; \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
|
||||
fi; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
|
||||
fi; \
|
||||
if test -r $$cat.m; then \
|
||||
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
if test -r $(srcdir)/$$cat.m ; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat.m \
|
||||
$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
true; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "glib"; then \
|
||||
if test -n "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
|
||||
fi; \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "glib"; then \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
fi
|
||||
|
||||
check: all $(GETTEXT_PACKAGE).pot
|
||||
|
||||
dvi info tags TAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
|
||||
rm -fr *.o
|
||||
rm -f .intltool-merge-cache
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES
|
||||
rm -f *.mo *.msg *.cat *.cat.m $(GMOFILES)
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f Makefile.in.in
|
||||
|
||||
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
extra_dists="$(EXTRA_DISTFILES)"; \
|
||||
for file in $$extra_dists; do \
|
||||
test -f $$file && dists="$$dists $$file"; \
|
||||
done; \
|
||||
for file in $$dists; do \
|
||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(GETTEXT_PACKAGE).pot
|
||||
tmpdir=`pwd`; \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
echo "$$lang:"; \
|
||||
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
|
||||
if $$result; then \
|
||||
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# POTFILES is created from POTFILES.in by stripping comments, empty lines
|
||||
# and Intltool tags (enclosed in square brackets), and appending a full
|
||||
# relative path to them
|
||||
POTFILES: POTFILES.in
|
||||
( posrcprefix='$(top_srcdir)/'; \
|
||||
rm -f $@-t $@ \
|
||||
&& (sed -e '/^#/d' \
|
||||
-e 's/^[[].*] *//' \
|
||||
-e '/^[ ]*$$/d' \
|
||||
-e "s@^@ $$posrcprefix@" $(srcdir)/$@.in \
|
||||
| sed -e '$$!s/$$/ \\/') > $@-t \
|
||||
&& chmod a-w $@-t \
|
||||
&& mv $@-t $@ )
|
||||
|
||||
Makefile: Makefile.in.in ../config.status POTFILES
|
||||
cd .. \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
10
vpn-daemons/openvpn/po/POTFILES.in
Normal file
10
vpn-daemons/openvpn/po/POTFILES.in
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# List of source files containing translatable strings.
|
||||
# Please keep this file sorted alphabetically.
|
||||
auth-dialog/gnome-two-password-dialog.c
|
||||
auth-dialog/main.c
|
||||
nm-openvpn.desktop.in
|
||||
properties/nm-openvpn.c
|
||||
properties/nm-openvpn-dialog.glade
|
||||
src/nm-openvpn-service.c
|
||||
src/nm-openvpn-service-openvpn-helper.c
|
||||
|
||||
233
vpn-daemons/openvpn/po/da.po
Normal file
233
vpn-daemons/openvpn/po/da.po
Normal file
|
|
@ -0,0 +1,233 @@
|
|||
# Danish translation of NetworkManager-vpnc.
|
||||
# Copyright (C) 2005 Dan Williams <dcbw@redhat.com>, David Zeuthen <davidz@redhat.com>
|
||||
# This file is distributed under the same license as the NetworkManager-vpnc package.
|
||||
# David Zeuthen <davidz@redhat.com>, 2005
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: NetworkManager-vpnc\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-06-16 23:50-0400\n"
|
||||
"PO-Revision-Date: 2005-06-11 23:21-0400\n"
|
||||
"Last-Translator: David Zeuthen <davidz@redhat.com>\n"
|
||||
"Language-Team: Danish <dansk@klid.dk>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../auth-dialog/gnome-two-password-dialog.c:147
|
||||
msgid "_Secondary Password:"
|
||||
msgstr "_Sekundær Nøgle:"
|
||||
|
||||
#: ../auth-dialog/gnome-two-password-dialog.c:268
|
||||
msgid "_Username:"
|
||||
msgstr "_Brugernavn:"
|
||||
|
||||
#: ../auth-dialog/gnome-two-password-dialog.c:270
|
||||
msgid "_Domain:"
|
||||
msgstr "_Domæne:"
|
||||
|
||||
#: ../auth-dialog/gnome-two-password-dialog.c:272
|
||||
msgid "_Password:"
|
||||
msgstr "_Nøgle:"
|
||||
|
||||
#: ../auth-dialog/gnome-two-password-dialog.c:355
|
||||
msgid "Connect _anonymously"
|
||||
msgstr "Tilslut _anonymt"
|
||||
|
||||
#: ../auth-dialog/gnome-two-password-dialog.c:360
|
||||
msgid "Connect as _user:"
|
||||
msgstr "Tilslut som _bruger:"
|
||||
|
||||
#: ../auth-dialog/gnome-two-password-dialog.c:466
|
||||
msgid "Remember password for this session"
|
||||
msgstr "Husk adgangskode for denne session"
|
||||
|
||||
#: ../auth-dialog/gnome-two-password-dialog.c:468
|
||||
msgid "Save password in keyring"
|
||||
msgstr "Gem adgangskode i nøglering"
|
||||
|
||||
#: ../auth-dialog/main.c:161
|
||||
#, c-format
|
||||
msgid "You need to authenticate to access the Virtual Private Network '%s'."
|
||||
msgstr ""
|
||||
"Brugerverifikation er påkrævet for at tilslutte til det private netværk '%s'."
|
||||
|
||||
#: ../auth-dialog/main.c:162
|
||||
msgid "Authenticate VPN"
|
||||
msgstr "Brugerverifikation til privat netværk"
|
||||
|
||||
#: ../auth-dialog/main.c:169
|
||||
msgid "_Group Password:"
|
||||
msgstr "_Gruppe nøgle:"
|
||||
|
||||
#
|
||||
#: ../nm-vpnc.desktop.in.h:1
|
||||
msgid "VPN Connection Manager (vpnc)"
|
||||
msgstr "VPN forbindelser (vpnc)"
|
||||
|
||||
#: ../properties/nm-vpnc.c:83
|
||||
msgid "Compatible Cisco VPN client (vpnc)"
|
||||
msgstr "Kompatibel Cisco VPN klient (vpnc)"
|
||||
|
||||
#: ../properties/nm-vpnc.c:448
|
||||
#, c-format
|
||||
msgid "\tUsername: %s\n"
|
||||
msgstr "\tBrugernavn: %s\n"
|
||||
|
||||
#: ../properties/nm-vpnc.c:449
|
||||
#, c-format
|
||||
msgid "\tRoutes: %s\n"
|
||||
msgstr "\tRuter: %s\n"
|
||||
|
||||
#: ../properties/nm-vpnc.c:450
|
||||
#, c-format
|
||||
msgid "\tDomain: %s\n"
|
||||
msgstr "\tDomæne: %s\n"
|
||||
|
||||
#: ../properties/nm-vpnc.c:453
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The following vpnc VPN connection will be created:\n"
|
||||
"\n"
|
||||
"\tName: %s\n"
|
||||
"\n"
|
||||
"\tGateway: %s\n"
|
||||
"\tGroup Name: %s\n"
|
||||
"%s%s%s\n"
|
||||
"The connection details can be changed using the \"Edit\" button.\n"
|
||||
msgstr ""
|
||||
"Flg. private netværks forbindelse via vpnc vil blive oprettet:\n"
|
||||
"\n"
|
||||
"\tNavn: %s\n"
|
||||
"\n"
|
||||
"\tKnudepunkt: %s\n"
|
||||
"\tGruppe navn: %s\n"
|
||||
"%s%s%s\n"
|
||||
"Detaljer for forbindelsen kan senere redigeres vha. \"Redigér\" knappen\n"
|
||||
|
||||
#: ../properties/nm-vpnc.c:545
|
||||
msgid "TCP tunneling not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ../properties/nm-vpnc.c:547
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The VPN settings file '%s' specifies that VPN traffic should be tunneled "
|
||||
"through TCP which is currently not supported in the vpnc software.\n"
|
||||
"\n"
|
||||
"The connection can still be created, with TCP tunneling disabled, however it "
|
||||
"may not work as expected."
|
||||
msgstr ""
|
||||
|
||||
#: ../properties/nm-vpnc.c:571
|
||||
msgid "Cannot import settings"
|
||||
msgstr ""
|
||||
|
||||
#: ../properties/nm-vpnc.c:573
|
||||
#, c-format
|
||||
msgid "The VPN settings file '%s' does not contain valid data."
|
||||
msgstr ""
|
||||
|
||||
#: ../properties/nm-vpnc.c:590
|
||||
msgid "Select file to import"
|
||||
msgstr "Vælg fil der skal importeres"
|
||||
|
||||
#: ../properties/nm-vpnc.c:745
|
||||
msgid "Save as..."
|
||||
msgstr ""
|
||||
|
||||
#: ../properties/nm-vpnc.c:775
|
||||
#, c-format
|
||||
msgid "A file named \"%s\" already exists."
|
||||
msgstr ""
|
||||
|
||||
#: ../properties/nm-vpnc.c:778
|
||||
msgid "Do you want to replace it with the one you are saving?"
|
||||
msgstr ""
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:1
|
||||
msgid "<b>Connection Name</b>"
|
||||
msgstr "<b>Navn på forbindelse</b>"
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:2
|
||||
msgid "<b>Optional Information</b>"
|
||||
msgstr "<b>Andre oplysninger</b>"
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:3
|
||||
msgid "<b>Required Information</b>"
|
||||
msgstr "<b>Påkrævede oplysninger</b>"
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:4
|
||||
msgid "<i>example: 172.16.0.0/16 10.11.12.0/24</i>"
|
||||
msgstr "<i>eksempel: 172.16.0.0/16 10.11.12.0/24</i>"
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:5
|
||||
msgid "Gateway:"
|
||||
msgstr "Adgangspunkt:"
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:6
|
||||
msgid "Group Name:"
|
||||
msgstr "Gruppe navn:"
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:7
|
||||
msgid ""
|
||||
"Name used to identify the connection to the private network, e.g. \"Campus "
|
||||
"VPN\" or \"Corporate Network\""
|
||||
msgstr ""
|
||||
"Navn brugt til at identificere forbindelsen til det private netværk, f.eks. "
|
||||
"\"Universitets Privat Netværk\" eller \"Arbejds Privat Netværk\""
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:8
|
||||
msgid "Only use VPN connection for these addresses"
|
||||
msgstr "Brug kun det private netværk til flg. adresser"
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:9
|
||||
msgid "Override user name"
|
||||
msgstr "Overskriv brugernavn"
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:10
|
||||
msgid ""
|
||||
"Please enter the information provided by your system administrator below. Do "
|
||||
"not enter your password here as you will be prompted when connecting."
|
||||
msgstr ""
|
||||
"Indtast oplysninger fra din systemadministrator nedenfor. Du skal ikke "
|
||||
"indtaste din nøgle her da du bliver spurgt om den ved forbindelse."
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:11
|
||||
msgid "Use domain for authentication"
|
||||
msgstr "Brug domæne til brugerverifikation"
|
||||
|
||||
#: ../properties/nm-vpnc-dialog.glade.h:12
|
||||
msgid "_Import..."
|
||||
msgstr "_Importér..."
|
||||
|
||||
#: ../src/nm-vpnc-service.c:115
|
||||
msgid ""
|
||||
"The VPN login failed because the user name and password were not accepted."
|
||||
msgstr "VPN-tjenesten fejlede fordi brugernavn og nøgle blev afvist."
|
||||
|
||||
#: ../src/nm-vpnc-service.c:117
|
||||
msgid "The VPN login failed because the VPN program could not be started."
|
||||
msgstr "VPN-tjenesten fejlede fordi VPN programmet ikke kunne starte."
|
||||
|
||||
#: ../src/nm-vpnc-service.c:119
|
||||
msgid ""
|
||||
"The VPN login failed because the VPN program could not connect to the VPN "
|
||||
"server."
|
||||
msgstr ""
|
||||
"VPN-tjenesten fejlede fordi VPN programmet ikke kunne forbinde tilVPN "
|
||||
"knudepunktet"
|
||||
|
||||
#: ../src/nm-vpnc-service.c:121
|
||||
msgid ""
|
||||
"The VPN login failed because the VPN configuration options were invalid."
|
||||
msgstr "VPN-tjenesten fejlede fordi VPN indstillingerne var ugyldige."
|
||||
|
||||
#: ../src/nm-vpnc-service.c:123
|
||||
msgid ""
|
||||
"The VPN login failed because the VPN program received an invalid "
|
||||
"configuration from the VPN server."
|
||||
msgstr ""
|
||||
"VPN-tjenesten fejlede fordi VPN programmet modtog ugyldige indstillingen fra "
|
||||
"VPN værts-maskinen"
|
||||
246
vpn-daemons/openvpn/po/sv.po
Normal file
246
vpn-daemons/openvpn/po/sv.po
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
# Swedish messages for NetworkManager.
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
# Christian Rose <menthos@menthos.com>, 2004, 2005.
|
||||
#
|
||||
# $Id: sv.po,v 1.1 2005/11/14 16:04:36 rml Exp $
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: NetworkManager-vpnc\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-06-26 01:20+0200\n"
|
||||
"PO-Revision-Date: 2005-06-26 01:20+0200\n"
|
||||
"Last-Translator: Christian Rose <menthos@menthos.com>\n"
|
||||
"Language-Team: Swedish <sv@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c:147
|
||||
msgid "_Secondary Password:"
|
||||
msgstr "_Andrahandslösenord:"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c:268
|
||||
msgid "_Username:"
|
||||
msgstr "_Användarnamn:"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c:270
|
||||
msgid "_Domain:"
|
||||
msgstr "_Domän:"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c:272
|
||||
msgid "_Password:"
|
||||
msgstr "_Lösenord:"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c:355
|
||||
msgid "Connect _anonymously"
|
||||
msgstr "Anslut anon_ymt"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c:360
|
||||
msgid "Connect as _user:"
|
||||
msgstr "Anslut som _användare:"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c:466
|
||||
msgid "Remember password for this session"
|
||||
msgstr "Kom ihåg lösenordet för denna session"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c:468
|
||||
msgid "Save password in keyring"
|
||||
msgstr "Spara lösenordet i nyckelring"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/main.c:161
|
||||
#, c-format
|
||||
msgid "You need to authenticate to access the Virtual Private Network '%s'."
|
||||
msgstr "Du måsta autentisera för att komma åt VPN-nätverket \"%s\"."
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/main.c:162
|
||||
msgid "Authenticate VPN"
|
||||
msgstr "Autentisera VPN"
|
||||
|
||||
#: vpn-daemons/vpnc/auth-dialog/main.c:169
|
||||
msgid "_Group Password:"
|
||||
msgstr "_Grupplösenord:"
|
||||
|
||||
#: vpn-daemons/vpnc/nm-vpnc.desktop.in.h:1
|
||||
msgid "VPN Connection Manager (vpnc)"
|
||||
msgstr "VPN-anslutningshanterare (vpnc)"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:1
|
||||
msgid "<b>Connection Name</b>"
|
||||
msgstr "<b>Anslutningsnamn</b>"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:2
|
||||
msgid "<b>Optional Information</b>"
|
||||
msgstr "<b>Valfri information</b>"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:3
|
||||
msgid "<b>Required Information</b>"
|
||||
msgstr "<b>Nödvändig information</b>"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:4
|
||||
msgid "<i>example: 172.16.0.0/16 10.11.12.0/24</i>"
|
||||
msgstr "<i>exempel: 172.16.0.0/16 10.11.12.0/24</i>"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:5
|
||||
msgid "Gateway:"
|
||||
msgstr "Gateway:"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:6
|
||||
msgid "Group Name:"
|
||||
msgstr "Gruppnamn:"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:7
|
||||
msgid ""
|
||||
"Name used to identify the connection to the private network, e.g. \"Campus "
|
||||
"VPN\" or \"Corporate Network\""
|
||||
msgstr ""
|
||||
"Namn som används för att identifiera anslutningen till det privata "
|
||||
"nätverket, exempelvis \"Campus-VPN\" eller \"Företagsnätverket\""
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:8
|
||||
msgid "Only use VPN connection for these addresses"
|
||||
msgstr "Använd endast VPN-anslutning för dessa adresser"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:9
|
||||
msgid "Override user name"
|
||||
msgstr "Åsidosätt användarnamn"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:10
|
||||
msgid ""
|
||||
"Please enter the information provided by your system administrator below. Do "
|
||||
"not enter your password here as you will be prompted when connecting."
|
||||
msgstr ""
|
||||
"Ange den information som har tillhandahållits av din systemadministratör "
|
||||
"nedan. Ange inte lösenordet här eftersom du kommer att efterfrågas det när "
|
||||
"du ansluter."
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:11
|
||||
msgid "Use domain for authentication"
|
||||
msgstr "Använd domän för autentisering"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade.h:12
|
||||
msgid "_Import..."
|
||||
msgstr "_Importera..."
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:83
|
||||
msgid "Compatible Cisco VPN client (vpnc)"
|
||||
msgstr "Kompatibel Cisco VPN-klient (vpnc)"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:448
|
||||
#, c-format
|
||||
msgid "\tUsername: %s\n"
|
||||
msgstr "\tAnvändarnamn: %s\n"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:449
|
||||
#, c-format
|
||||
msgid "\tRoutes: %s\n"
|
||||
msgstr "\tVägar: %s\n"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:450
|
||||
#, c-format
|
||||
msgid "\tDomain: %s\n"
|
||||
msgstr "\tDomän: %s\n"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:453
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The following vpnc VPN connection will be created:\n"
|
||||
"\n"
|
||||
"\tName: %s\n"
|
||||
"\n"
|
||||
"\tGateway: %s\n"
|
||||
"\tGroup Name: %s\n"
|
||||
"%s%s%s\n"
|
||||
"The connection details can be changed using the \"Edit\" button.\n"
|
||||
msgstr ""
|
||||
"Följande vpnc-VPN-anslutning kommer att skapas:\n"
|
||||
"\n"
|
||||
"\tNamn: %s\n"
|
||||
"\n"
|
||||
"\tGateway: %s\n"
|
||||
"\tGruppnamn: %s\n"
|
||||
"%s%s%s\n"
|
||||
"Anslutningsdetaljerna kan ändras genom att använda knappen \"Redigera\".\n"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:544
|
||||
msgid "TCP tunneling not supported"
|
||||
msgstr "TCP-tunnling stöds inte"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:546
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The VPN settings file '%s' specifies that VPN traffic should be tunneled "
|
||||
"through TCP which is currently not supported in the vpnc software.\n"
|
||||
"\n"
|
||||
"The connection can still be created, with TCP tunneling disabled, however it "
|
||||
"may not work as expected."
|
||||
msgstr ""
|
||||
"VPN-inställningsfilen \"%s\" anger att VPN-trafiken ska tunnlas genom TCP "
|
||||
"vilket för tillfället inte stöds i vpnc-programvaran.\n"
|
||||
"\n"
|
||||
"Anslutningen kan fortfarande skapas, med inaktiverad TCP-tunnling, men det "
|
||||
"kanske inte fungerar som väntat."
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:570
|
||||
msgid "Cannot import settings"
|
||||
msgstr "Kan inte importera inställningar"
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:572
|
||||
#, c-format
|
||||
msgid "The VPN settings file '%s' does not contain valid data."
|
||||
msgstr "VPN-inställningsfilen \"%s\" innehåller inte giltiga data."
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:589
|
||||
msgid "Select file to import"
|
||||
msgstr "Välj fil att importera"
|
||||
|
||||
#. printf ("in impl_export\n");
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:744
|
||||
msgid "Save as..."
|
||||
msgstr "Spara som..."
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:774
|
||||
#, c-format
|
||||
msgid "A file named \"%s\" already exists."
|
||||
msgstr "En fil med namnet \"%s\" finns redan."
|
||||
|
||||
#: vpn-daemons/vpnc/properties/nm-vpnc.c:777
|
||||
msgid "Do you want to replace it with the one you are saving?"
|
||||
msgstr "Vill du ersätta den med den du håller på att spara?"
|
||||
|
||||
#: vpn-daemons/vpnc/src/nm-vpnc-service.c:115
|
||||
msgid ""
|
||||
"The VPN login failed because the user name and password were not accepted."
|
||||
msgstr ""
|
||||
"VPN-inloggningen misslyckades eftersom användarnamnet och lösenordet inte "
|
||||
"accepterades."
|
||||
|
||||
#: vpn-daemons/vpnc/src/nm-vpnc-service.c:117
|
||||
msgid "The VPN login failed because the VPN program could not be started."
|
||||
msgstr ""
|
||||
"VPN-inloggningen misslyckades eftersom VPN-programmet inte kunde startas."
|
||||
|
||||
#: vpn-daemons/vpnc/src/nm-vpnc-service.c:119
|
||||
msgid ""
|
||||
"The VPN login failed because the VPN program could not connect to the VPN "
|
||||
"server."
|
||||
msgstr ""
|
||||
"VPN-inloggningen misslyckades eftersom VPN-programmet inte kunde ansluta "
|
||||
"till VPN-servern."
|
||||
|
||||
#: vpn-daemons/vpnc/src/nm-vpnc-service.c:121
|
||||
msgid ""
|
||||
"The VPN login failed because the VPN configuration options were invalid."
|
||||
msgstr ""
|
||||
"VPN-inloggningen misslyckades eftersom VPN-konfigurationsalternativen var "
|
||||
"ogiltiga."
|
||||
|
||||
#: vpn-daemons/vpnc/src/nm-vpnc-service.c:123
|
||||
msgid ""
|
||||
"The VPN login failed because the VPN program received an invalid "
|
||||
"configuration from the VPN server."
|
||||
msgstr ""
|
||||
"VPN-inloggningen misslyckades eftersom VPN-programmet mottog en ogiltig "
|
||||
"konfiguration från VPN-servern."
|
||||
|
||||
33
vpn-daemons/openvpn/properties/Makefile.am
Normal file
33
vpn-daemons/openvpn/properties/Makefile.am
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
|
||||
lib_LTLIBRARIES = libnm-openvpn-properties.la
|
||||
|
||||
libnm_openvpn_properties_la_SOURCES = \
|
||||
nm-openvpn.c
|
||||
|
||||
gladedir = $(datadir)/gnome-vpn-properties/openvpn
|
||||
glade_DATA = nm-openvpn-dialog.glade
|
||||
|
||||
libnm_openvpn_properties_la_CFLAGS = \
|
||||
$(GLADE_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(GCONF_CFLAGS) \
|
||||
$(LIBGNOMEUI_CFLAGS) \
|
||||
-DICONDIR=\""$(datadir)/pixmaps"\" \
|
||||
-DGLADEDIR=\""$(gladedir)"\" \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGNOME_DISABLE_DEPRECATED \
|
||||
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
|
||||
-DVERSION=\"$(VERSION)\"
|
||||
|
||||
libnm_openvpn_properties_la_LIBADD = \
|
||||
$(GLADE_LIBS) \
|
||||
$(GTK_LIBS) \
|
||||
$(GCONF_LIBS) \
|
||||
$(LIBGNOMEUI_LIBS)
|
||||
|
||||
CLEANFILES = *.bak *.gladep *~
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(glade_DATA)
|
||||
584
vpn-daemons/openvpn/properties/Makefile.in
Normal file
584
vpn-daemons/openvpn/properties/Makefile.in
Normal file
|
|
@ -0,0 +1,584 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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@
|
||||
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
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@
|
||||
subdir = properties
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gladedir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
libnm_openvpn_properties_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1)
|
||||
am_libnm_openvpn_properties_la_OBJECTS = \
|
||||
libnm_openvpn_properties_la-nm-openvpn.lo
|
||||
libnm_openvpn_properties_la_OBJECTS = \
|
||||
$(am_libnm_openvpn_properties_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libnm_openvpn_properties_la_SOURCES)
|
||||
DIST_SOURCES = $(libnm_openvpn_properties_la_SOURCES)
|
||||
gladeDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(glade_DATA)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALL_LINGUAS = @ALL_LINGUAS@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BINDIR = @BINDIR@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIR = @DATADIR@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DBUS_CFLAGS = @DBUS_CFLAGS@
|
||||
DBUS_LIBS = @DBUS_LIBS@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GCONF_CFLAGS = @GCONF_CFLAGS@
|
||||
GCONF_LIBS = @GCONF_LIBS@
|
||||
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
|
||||
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
GLADE_CFLAGS = @GLADE_CFLAGS@
|
||||
GLADE_LIBS = @GLADE_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNOMEKEYRING_CFLAGS = @GNOMEKEYRING_CFLAGS@
|
||||
GNOMEKEYRING_LIBS = @GNOMEKEYRING_LIBS@
|
||||
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
|
||||
GTHREAD_LIBS = @GTHREAD_LIBS@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
|
||||
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
|
||||
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
|
||||
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
|
||||
INTLTOOL_ICONV = @INTLTOOL_ICONV@
|
||||
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
|
||||
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
|
||||
INTLTOOL_MERGE = @INTLTOOL_MERGE@
|
||||
INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
|
||||
INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
|
||||
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
|
||||
INTLTOOL_PERL = @INTLTOOL_PERL@
|
||||
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
|
||||
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
|
||||
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
|
||||
INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
|
||||
INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
|
||||
INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
|
||||
INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
|
||||
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
|
||||
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
|
||||
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
|
||||
INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
|
||||
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
|
||||
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBDIR = @LIBDIR@
|
||||
LIBEXECDIR = @LIBEXECDIR@
|
||||
LIBGNOMEUI_CFLAGS = @LIBGNOMEUI_CFLAGS@
|
||||
LIBGNOMEUI_LIBS = @LIBGNOMEUI_LIBS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LOCALSTATEDIR = @LOCALSTATEDIR@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MSGFMT = @MSGFMT@
|
||||
NETWORK_MANAGER_CFLAGS = @NETWORK_MANAGER_CFLAGS@
|
||||
NETWORK_MANAGER_LIBS = @NETWORK_MANAGER_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
|
||||
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
|
||||
RANLIB = @RANLIB@
|
||||
SBINDIR = @SBINDIR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
SYSCONFDIR = @SYSCONFDIR@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
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@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
lib_LTLIBRARIES = libnm-openvpn-properties.la
|
||||
libnm_openvpn_properties_la_SOURCES = \
|
||||
nm-openvpn.c
|
||||
|
||||
gladedir = $(datadir)/gnome-vpn-properties/openvpn
|
||||
glade_DATA = nm-openvpn-dialog.glade
|
||||
libnm_openvpn_properties_la_CFLAGS = \
|
||||
$(GLADE_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(GCONF_CFLAGS) \
|
||||
$(LIBGNOMEUI_CFLAGS) \
|
||||
-DICONDIR=\""$(datadir)/pixmaps"\" \
|
||||
-DGLADEDIR=\""$(gladedir)"\" \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGNOME_DISABLE_DEPRECATED \
|
||||
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
|
||||
-DVERSION=\"$(VERSION)\"
|
||||
|
||||
libnm_openvpn_properties_la_LIBADD = \
|
||||
$(GLADE_LIBS) \
|
||||
$(GTK_LIBS) \
|
||||
$(GCONF_LIBS) \
|
||||
$(LIBGNOMEUI_LIBS)
|
||||
|
||||
CLEANFILES = *.bak *.gladep *~
|
||||
EXTRA_DIST = \
|
||||
$(glade_DATA)
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 properties/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu properties/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_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
|
||||
libnm-openvpn-properties.la: $(libnm_openvpn_properties_la_OBJECTS) $(libnm_openvpn_properties_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libnm_openvpn_properties_la_LDFLAGS) $(libnm_openvpn_properties_la_OBJECTS) $(libnm_openvpn_properties_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_openvpn_properties_la-nm-openvpn.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@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 -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@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 -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@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 $@ $<
|
||||
|
||||
libnm_openvpn_properties_la-nm-openvpn.lo: nm-openvpn.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_openvpn_properties_la_CFLAGS) $(CFLAGS) -MT libnm_openvpn_properties_la-nm-openvpn.lo -MD -MP -MF "$(DEPDIR)/libnm_openvpn_properties_la-nm-openvpn.Tpo" -c -o libnm_openvpn_properties_la-nm-openvpn.lo `test -f 'nm-openvpn.c' || echo '$(srcdir)/'`nm-openvpn.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libnm_openvpn_properties_la-nm-openvpn.Tpo" "$(DEPDIR)/libnm_openvpn_properties_la-nm-openvpn.Plo"; else rm -f "$(DEPDIR)/libnm_openvpn_properties_la-nm-openvpn.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-openvpn.c' object='libnm_openvpn_properties_la-nm-openvpn.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_openvpn_properties_la_CFLAGS) $(CFLAGS) -c -o libnm_openvpn_properties_la-nm-openvpn.lo `test -f 'nm-openvpn.c' || echo '$(srcdir)/'`nm-openvpn.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-gladeDATA: $(glade_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(gladedir)" || $(mkdir_p) "$(DESTDIR)$(gladedir)"
|
||||
@list='$(glade_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \
|
||||
$(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-gladeDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(glade_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(gladedir)/$$f"; \
|
||||
done
|
||||
|
||||
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)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
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 $(LTLIBRARIES) $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gladedir)"; 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:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
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-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-gladeDATA
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
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-gladeDATA uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES 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-data install-data-am install-exec \
|
||||
install-exec-am install-gladeDATA install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man 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-gladeDATA \
|
||||
uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
# 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:
|
||||
1161
vpn-daemons/openvpn/properties/nm-openvpn-dialog.glade
Normal file
1161
vpn-daemons/openvpn/properties/nm-openvpn-dialog.glade
Normal file
File diff suppressed because it is too large
Load diff
844
vpn-daemons/openvpn/properties/nm-openvpn.c
Normal file
844
vpn-daemons/openvpn/properties/nm-openvpn.c
Normal file
|
|
@ -0,0 +1,844 @@
|
|||
/***************************************************************************
|
||||
* CVSID: $Id$
|
||||
*
|
||||
* nm-openvpn.c : GNOME UI dialogs for configuring OpenVPN connections
|
||||
*
|
||||
* Copyright (C) 2005 Tim Niemueller <tim@niemueller.de>
|
||||
* Based on work by David Zeuthen, <davidz@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <string.h>
|
||||
#include <glade/glade.h>
|
||||
|
||||
#define NM_VPN_API_SUBJECT_TO_CHANGE
|
||||
|
||||
#include <NetworkManager/nm-vpn-ui-interface.h>
|
||||
|
||||
typedef struct _NetworkManagerVpnUIImpl NetworkManagerVpnUIImpl;
|
||||
|
||||
|
||||
struct _NetworkManagerVpnUIImpl {
|
||||
NetworkManagerVpnUI parent;
|
||||
|
||||
NetworkManagerVpnUIDialogValidityCallback callback;
|
||||
gpointer callback_user_data;
|
||||
|
||||
GladeXML *xml;
|
||||
|
||||
GtkWidget *widget;
|
||||
|
||||
GtkEntry *w_connection_name;
|
||||
GtkEntry *w_remote;
|
||||
GtkEntry *w_ca;
|
||||
GtkEntry *w_cert;
|
||||
GtkEntry *w_key;
|
||||
GtkCheckButton *w_use_routes;
|
||||
GtkEntry *w_routes;
|
||||
GtkCheckButton *w_use_lzo;
|
||||
GtkExpander *w_opt_info_expander;
|
||||
GtkButton *w_import_button;
|
||||
GtkButton *w_button_ca;
|
||||
GtkButton *w_button_cert;
|
||||
GtkButton *w_button_key;
|
||||
};
|
||||
|
||||
static void
|
||||
openvpn_clear_widget (NetworkManagerVpnUIImpl *impl)
|
||||
{
|
||||
gtk_entry_set_text (impl->w_connection_name, "");
|
||||
gtk_entry_set_text (impl->w_remote, "");
|
||||
gtk_entry_set_text (impl->w_ca, "");
|
||||
gtk_entry_set_text (impl->w_cert, "");
|
||||
gtk_entry_set_text (impl->w_key, "");
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_routes), FALSE);
|
||||
gtk_entry_set_text (impl->w_routes, "");
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (impl->w_routes), FALSE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_lzo), FALSE);
|
||||
gtk_expander_set_expanded (impl->w_opt_info_expander, FALSE);
|
||||
}
|
||||
|
||||
static const char *
|
||||
impl_get_display_name (NetworkManagerVpnUI *self)
|
||||
{
|
||||
return _("OpenVPN Client");
|
||||
}
|
||||
|
||||
static const char *
|
||||
impl_get_service_name (NetworkManagerVpnUI *self)
|
||||
{
|
||||
return "org.freedesktop.NetworkManager.openvpn";
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
impl_get_widget (NetworkManagerVpnUI *self, GSList *properties, GSList *routes, const char *connection_name)
|
||||
{
|
||||
GSList *i;
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data;
|
||||
gboolean should_expand;
|
||||
|
||||
openvpn_clear_widget (impl);
|
||||
|
||||
should_expand = FALSE;
|
||||
|
||||
if (connection_name != NULL)
|
||||
gtk_entry_set_text (impl->w_connection_name, connection_name);
|
||||
|
||||
for (i = properties; i != NULL && g_slist_next (i) != NULL; i = g_slist_next (g_slist_next (i))) {
|
||||
const char *key;
|
||||
const char *value;
|
||||
|
||||
key = i->data;
|
||||
value = (g_slist_next (i))->data;
|
||||
|
||||
if (strcmp (key, "remote") == 0) {
|
||||
gtk_entry_set_text (impl->w_remote, value);
|
||||
} else if (strcmp (key, "ca") == 0) {
|
||||
gtk_entry_set_text (impl->w_ca, value);
|
||||
} else if (strcmp (key, "cert") == 0) {
|
||||
gtk_entry_set_text (impl->w_cert, value);
|
||||
} else if (strcmp (key, "key") == 0) {
|
||||
gtk_entry_set_text (impl->w_key, value);
|
||||
} else if ( (strcmp (key, "comp-lzo") == 0) &&
|
||||
(strcmp (value, "yes")) ) {
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_routes), TRUE);
|
||||
should_expand = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (routes != NULL) {
|
||||
GString *route_str;
|
||||
char *str;
|
||||
|
||||
route_str = g_string_new ("");
|
||||
for (i = routes; i != NULL; i = g_slist_next (i)) {
|
||||
const char *route;
|
||||
|
||||
if (i != routes)
|
||||
g_string_append_c(route_str, ' ');
|
||||
|
||||
route = (const char *) i->data;
|
||||
g_string_append(route_str, route);
|
||||
}
|
||||
|
||||
str = g_string_free (route_str, FALSE);
|
||||
gtk_entry_set_text (impl->w_routes, str);
|
||||
g_free (str);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_routes), TRUE);
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (impl->w_routes), TRUE);
|
||||
|
||||
should_expand = TRUE;
|
||||
}
|
||||
|
||||
gtk_expander_set_expanded (impl->w_opt_info_expander, should_expand);
|
||||
gtk_container_resize_children (GTK_CONTAINER (impl->widget));
|
||||
|
||||
return impl->widget;
|
||||
}
|
||||
|
||||
static GSList *
|
||||
impl_get_properties (NetworkManagerVpnUI *self)
|
||||
{
|
||||
GSList *data;
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data;
|
||||
const char *connectionname;
|
||||
const char *remote;
|
||||
const char *ca;
|
||||
const char *cert;
|
||||
const char *key;
|
||||
gboolean use_lzo;
|
||||
|
||||
connectionname = gtk_entry_get_text (impl->w_connection_name);
|
||||
remote = gtk_entry_get_text (impl->w_remote);
|
||||
ca = gtk_entry_get_text (impl->w_ca);
|
||||
cert = gtk_entry_get_text (impl->w_cert);
|
||||
key = gtk_entry_get_text (impl->w_key);
|
||||
use_lzo = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (impl->w_use_lzo));
|
||||
|
||||
data = NULL;
|
||||
data = g_slist_append (data, g_strdup ("remote"));
|
||||
data = g_slist_append (data, g_strdup (remote));
|
||||
data = g_slist_append (data, g_strdup ("ca"));
|
||||
data = g_slist_append (data, g_strdup (ca));
|
||||
data = g_slist_append (data, g_strdup ("cert"));
|
||||
data = g_slist_append (data, g_strdup (cert));
|
||||
data = g_slist_append (data, g_strdup ("key"));
|
||||
data = g_slist_append (data, g_strdup (key));
|
||||
data = g_slist_append (data, g_strdup ("comp-lzo"));
|
||||
data = g_slist_append (data, use_lzo ? g_strdup ("yes") : g_strdup("no"));
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
static GSList *
|
||||
get_routes (NetworkManagerVpnUIImpl *impl)
|
||||
{
|
||||
GSList *routes;
|
||||
const char *routes_entry;
|
||||
gboolean use_routes;
|
||||
char **substrs;
|
||||
unsigned int i;
|
||||
|
||||
routes = NULL;
|
||||
|
||||
routes_entry = gtk_entry_get_text (impl->w_routes);
|
||||
use_routes = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (impl->w_use_routes));
|
||||
|
||||
if (!use_routes)
|
||||
goto out;
|
||||
|
||||
substrs = g_strsplit (routes_entry, " ", 0);
|
||||
for (i = 0; substrs[i] != NULL; i++) {
|
||||
char *route;
|
||||
|
||||
route = substrs[i];
|
||||
if (strlen (route) > 0)
|
||||
routes = g_slist_append (routes, g_strdup (route));
|
||||
}
|
||||
|
||||
g_strfreev (substrs);
|
||||
|
||||
out:
|
||||
return routes;
|
||||
}
|
||||
|
||||
static GSList *
|
||||
impl_get_routes (NetworkManagerVpnUI *self)
|
||||
{
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data;
|
||||
|
||||
return get_routes (impl);
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
impl_get_connection_name (NetworkManagerVpnUI *self)
|
||||
{
|
||||
const char *name;
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data;
|
||||
|
||||
name = gtk_entry_get_text (impl->w_connection_name);
|
||||
if (name != NULL)
|
||||
return g_strdup (name);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
impl_is_valid (NetworkManagerVpnUI *self)
|
||||
{
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data;
|
||||
gboolean is_valid;
|
||||
const char *connectionname;
|
||||
const char *remote;
|
||||
const char *ca;
|
||||
const char *cert;
|
||||
const char *key;
|
||||
gboolean use_routes;
|
||||
const char *routes_entry;
|
||||
|
||||
|
||||
is_valid = FALSE;
|
||||
|
||||
connectionname = gtk_entry_get_text (impl->w_connection_name);
|
||||
remote = gtk_entry_get_text (impl->w_remote);
|
||||
ca = gtk_entry_get_text (impl->w_ca);
|
||||
cert = gtk_entry_get_text (impl->w_cert);
|
||||
key = gtk_entry_get_text (impl->w_key);
|
||||
use_routes = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (impl->w_use_routes));
|
||||
routes_entry = gtk_entry_get_text (impl->w_routes);
|
||||
|
||||
/* initial sanity checking */
|
||||
if (strlen (connectionname) > 0 &&
|
||||
strlen (remote) > 0 &&
|
||||
strlen (ca) > 0 &&
|
||||
strlen (cert) > 0 &&
|
||||
strlen (key) > 0 &&
|
||||
((!use_routes) || (use_routes && strlen (routes_entry) > 0)) ) {
|
||||
is_valid = TRUE;
|
||||
}
|
||||
|
||||
/* validate gateway: can be a hostname or an IP; do not allow spaces or tabs */
|
||||
if (is_valid &&
|
||||
( (strstr (remote, " ") != NULL) ||
|
||||
(strstr (remote, "\t") != NULL) ||
|
||||
(strstr (ca, " ") != NULL) ||
|
||||
(strstr (ca, "\t") != NULL) ||
|
||||
(strstr (cert, " ") != NULL) ||
|
||||
(strstr (cert, "\t") != NULL) ||
|
||||
(strstr (key, " ") != NULL) ||
|
||||
(strstr (key, "\t") != NULL) ) ) {
|
||||
is_valid = FALSE;
|
||||
}
|
||||
|
||||
/* validate ca/cert/key files */
|
||||
if ( ! ( g_file_test( ca, G_FILE_TEST_IS_REGULAR) &&
|
||||
g_file_test( cert, G_FILE_TEST_IS_REGULAR) &&
|
||||
g_file_test( key, G_FILE_TEST_IS_REGULAR) ) ) {
|
||||
is_valid = FALSE;
|
||||
}
|
||||
|
||||
/* validate routes: each entry must be of the form 'a.b.c.d/mask' */
|
||||
if (is_valid) {
|
||||
GSList *i;
|
||||
GSList *routes;
|
||||
|
||||
routes = get_routes (impl);
|
||||
|
||||
for (i = routes; i != NULL; i = g_slist_next (i)) {
|
||||
int d1, d2, d3, d4, mask;
|
||||
|
||||
const char *route = (const char *) i->data;
|
||||
//printf ("route = '%s'\n", route);
|
||||
|
||||
if (sscanf (route, "%d.%d.%d.%d/%d", &d1, &d2, &d3, &d4, &mask) != 5) {
|
||||
is_valid = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO: this can be improved a bit */
|
||||
if (d1 < 0 || d1 > 255 ||
|
||||
d2 < 0 || d2 > 255 ||
|
||||
d3 < 0 || d3 > 255 ||
|
||||
d4 < 0 || d4 > 255 ||
|
||||
mask < 0 || mask > 32) {
|
||||
is_valid = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
//if (routes != NULL)
|
||||
// printf ("\n");
|
||||
|
||||
if (routes != NULL) {
|
||||
g_slist_foreach (routes, (GFunc)g_free, NULL);
|
||||
g_slist_free (routes);
|
||||
}
|
||||
}
|
||||
|
||||
return is_valid;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
use_routes_toggled (GtkToggleButton *togglebutton, gpointer user_data)
|
||||
{
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) user_data;
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (impl->w_routes),
|
||||
gtk_toggle_button_get_active (togglebutton));
|
||||
|
||||
if (impl->callback != NULL) {
|
||||
gboolean is_valid;
|
||||
|
||||
is_valid = impl_is_valid (&(impl->parent));
|
||||
impl->callback (&(impl->parent), is_valid, impl->callback_user_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
editable_changed (GtkEditable *editable, gpointer user_data)
|
||||
{
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) user_data;
|
||||
|
||||
if (impl->callback != NULL) {
|
||||
gboolean is_valid;
|
||||
|
||||
is_valid = impl_is_valid (&(impl->parent));
|
||||
impl->callback (&(impl->parent), is_valid, impl->callback_user_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
impl_set_validity_changed_callback (NetworkManagerVpnUI *self,
|
||||
NetworkManagerVpnUIDialogValidityCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data;
|
||||
|
||||
impl->callback = callback;
|
||||
impl->callback_user_data = user_data;
|
||||
}
|
||||
|
||||
static void
|
||||
impl_get_confirmation_details (NetworkManagerVpnUI *self, gchar **retval)
|
||||
{
|
||||
GString *buf;
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data;
|
||||
const char *connectionname;
|
||||
const char *remote;
|
||||
const char *ca;
|
||||
const char *cert;
|
||||
const char *key;
|
||||
gboolean use_routes;
|
||||
const char *routes;
|
||||
gboolean use_lzo;
|
||||
|
||||
connectionname = gtk_entry_get_text (impl->w_connection_name);
|
||||
remote = gtk_entry_get_text (impl->w_remote);
|
||||
ca = gtk_entry_get_text (impl->w_ca);
|
||||
cert = gtk_entry_get_text (impl->w_cert);
|
||||
key = gtk_entry_get_text (impl->w_key);
|
||||
use_routes = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (impl->w_use_routes));
|
||||
routes = gtk_entry_get_text (impl->w_routes);
|
||||
use_lzo = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (impl->w_use_lzo));
|
||||
|
||||
|
||||
// This is risky, should be variable length depending on actual data!
|
||||
buf = g_string_sized_new (512);
|
||||
|
||||
g_string_append (buf, _("The following OpenVPN connection will be created:"));
|
||||
g_string_append (buf, "\n\n\t");
|
||||
g_string_append_printf (buf, _("Name: %s"), connectionname);
|
||||
g_string_append (buf, "\n\n\t");
|
||||
|
||||
g_string_append_printf (buf, _("Remote: %s"), remote);
|
||||
g_string_append (buf, "\n\t");
|
||||
|
||||
g_string_append_printf (buf, _("CA: %s"), ca);
|
||||
g_string_append (buf, "\n\t");
|
||||
|
||||
g_string_append_printf (buf, _("Cert: %s"), cert);
|
||||
g_string_append (buf, "\n\t");
|
||||
|
||||
g_string_append_printf (buf, _("Key: %s"), key);
|
||||
|
||||
if (use_routes) {
|
||||
g_string_append (buf, "\n\t");
|
||||
g_string_append_printf (buf, _("Routes: %s"), routes);
|
||||
}
|
||||
|
||||
g_string_append_printf( buf, _("Use LZO Compression: %s"), ((use_lzo) ? _("Yes") : _("No")));
|
||||
|
||||
g_string_append (buf, "\n\n");
|
||||
g_string_append (buf, _("The connection details can be changed using the \"Edit\" button."));
|
||||
g_string_append (buf, "\n");
|
||||
|
||||
*retval = g_string_free (buf, FALSE);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
import_from_file (NetworkManagerVpnUIImpl *impl, const char *path)
|
||||
{
|
||||
char *basename;
|
||||
GKeyFile *keyfile;
|
||||
gboolean file_is_good;
|
||||
|
||||
file_is_good = FALSE;
|
||||
basename = g_path_get_basename (path);
|
||||
|
||||
keyfile = g_key_file_new ();
|
||||
if (g_key_file_load_from_file (keyfile, path, 0, NULL)) {
|
||||
char *connectionname = NULL;
|
||||
char *remote = NULL;
|
||||
char *ca = NULL;
|
||||
char *cert = NULL;
|
||||
char *key = NULL;
|
||||
char *routes = NULL;
|
||||
char *lzo = NULL;
|
||||
gboolean should_expand;
|
||||
|
||||
connectionname = g_key_file_get_string (keyfile, "main", "Description", NULL);
|
||||
remote = g_key_file_get_string (keyfile, "main", "Remote", NULL);
|
||||
ca = g_key_file_get_string (keyfile, "main", "CA", NULL);
|
||||
cert = g_key_file_get_string (keyfile, "main", "Cert", NULL);
|
||||
key = g_key_file_get_string (keyfile, "main", "Key", NULL);
|
||||
lzo = g_key_file_get_string (keyfile, "main", "Comp-LZO", NULL);
|
||||
|
||||
/* may not exist */
|
||||
if ((routes = g_key_file_get_string (keyfile, "main", "X-NM-Routes", NULL)) == NULL)
|
||||
routes = g_strdup ("");
|
||||
|
||||
/* sanity check data */
|
||||
if ( ( connectionname != NULL) &&
|
||||
( remote != NULL ) &&
|
||||
( ca != NULL ) &&
|
||||
( cert != NULL ) &&
|
||||
( key != NULL ) &&
|
||||
(strlen(connectionname) > 0) &&
|
||||
(strlen(remote) > 0) &&
|
||||
(strlen(ca) > 0) &&
|
||||
(strlen(cert) > 0) &&
|
||||
(strlen(key) > 0) ) {
|
||||
|
||||
gtk_entry_set_text (impl->w_connection_name, connectionname);
|
||||
gtk_entry_set_text (impl->w_remote, remote);
|
||||
gtk_entry_set_text (impl->w_ca, ca);
|
||||
gtk_entry_set_text (impl->w_cert, cert);
|
||||
gtk_entry_set_text (impl->w_key, key);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_lzo), ((lzo != NULL) && (strcmp(lzo, "yes") == 0)));
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_routes), strlen (routes) > 0);
|
||||
gtk_entry_set_text (impl->w_routes, routes);
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (impl->w_routes), strlen (routes) > 0);
|
||||
|
||||
should_expand = (strlen (routes) > 0) ||
|
||||
((lzo != NULL) && (strcmp(lzo, "yes") == 0));
|
||||
gtk_expander_set_expanded (impl->w_opt_info_expander, should_expand);
|
||||
|
||||
} else {
|
||||
g_free (connectionname);
|
||||
g_free (remote);
|
||||
g_free (ca);
|
||||
g_free (cert);
|
||||
g_free (key);
|
||||
g_free (lzo);
|
||||
}
|
||||
g_key_file_free (keyfile);
|
||||
|
||||
if (!file_is_good) {
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_WARNING,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
_("Cannot import settings"));
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
_("The VPN settings file '%s' does not contain valid data."), basename);
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
}
|
||||
|
||||
g_free (basename);
|
||||
|
||||
return file_is_good;
|
||||
}
|
||||
|
||||
static void
|
||||
import_button_clicked (GtkButton *button, gpointer user_data)
|
||||
{
|
||||
char *filename = NULL;
|
||||
GtkWidget *dialog;
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) user_data;
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new (_("Select file to import"),
|
||||
NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
|
||||
|
||||
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
|
||||
/*printf ("User selected '%s'\n", filename);*/
|
||||
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
if (filename != NULL) {
|
||||
import_from_file (impl, filename);
|
||||
g_free (filename);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
open_button_clicked (GtkButton *button, gpointer user_data)
|
||||
{
|
||||
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *)user_data;
|
||||
GtkWidget *dialog;
|
||||
|
||||
const char *msg;
|
||||
GtkEntry *entry;
|
||||
|
||||
if ( button == impl->w_button_ca ) {
|
||||
msg = _("Select CA to use");
|
||||
entry = impl->w_ca;
|
||||
} else if ( button == impl->w_button_cert ) {
|
||||
msg = _("Select certificate to use");
|
||||
entry = impl->w_cert;
|
||||
} else if ( button == impl->w_button_key ) {
|
||||
msg = _("Select key to use");
|
||||
entry = impl->w_key;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new (msg,
|
||||
NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
|
||||
gtk_entry_set_text (entry, gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)));
|
||||
}
|
||||
|
||||
gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
}
|
||||
|
||||
static gboolean
|
||||
impl_can_export (NetworkManagerVpnUI *self)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
impl_import_file (NetworkManagerVpnUI *self, const char *path)
|
||||
{
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data;
|
||||
|
||||
return import_from_file (impl, path);
|
||||
}
|
||||
|
||||
static void
|
||||
export_to_file (NetworkManagerVpnUIImpl *impl, const char *path,
|
||||
GSList *properties, GSList *routes, const char *connection_name)
|
||||
{
|
||||
FILE *f;
|
||||
GSList *i;
|
||||
const char *remote = NULL;
|
||||
const char *ca = NULL;
|
||||
const char *cert = NULL;
|
||||
const char *key = NULL;
|
||||
const char *lzo = NULL;
|
||||
char *routes_str = NULL;
|
||||
|
||||
/*printf ("in export_to_file; path='%s'\n", path);*/
|
||||
|
||||
for (i = properties; i != NULL && g_slist_next (i) != NULL; i = g_slist_next (g_slist_next (i))) {
|
||||
const char *key;
|
||||
const char *value;
|
||||
|
||||
key = i->data;
|
||||
value = (g_slist_next (i))->data;
|
||||
|
||||
if (strcmp (key, "remote") == 0) {
|
||||
remote = value;
|
||||
} else if (strcmp (key, "ca") == 0) {
|
||||
ca = value;
|
||||
} else if (strcmp (key, "cert") == 0) {
|
||||
cert = value;
|
||||
} else if (strcmp (key, "key") == 0) {
|
||||
key = value;
|
||||
} else if (strcmp (key, "comp-lzo") == 0) {
|
||||
lzo = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (routes != NULL) {
|
||||
GString *str;
|
||||
|
||||
str = g_string_new ("X-NM-Routes=");
|
||||
for (i = routes; i != NULL; i = g_slist_next (i)) {
|
||||
const char *route;
|
||||
|
||||
if (i != routes)
|
||||
g_string_append_c (str, ' ');
|
||||
|
||||
route = (const char *) i->data;
|
||||
g_string_append (str, route);
|
||||
}
|
||||
|
||||
g_string_append_c (str, '\n');
|
||||
|
||||
routes_str = g_string_free (str, FALSE);
|
||||
}
|
||||
|
||||
f = fopen (path, "w");
|
||||
if (f != NULL) {
|
||||
|
||||
fprintf (f,
|
||||
"[main]\n"
|
||||
"Description=%s\n"
|
||||
"Remote=%s\n"
|
||||
"CA=%s\n"
|
||||
"Cert=%s\n"
|
||||
"Key=%s\n"
|
||||
"Comp-LZO=%s\n"
|
||||
"%s",
|
||||
/* Description */ connection_name,
|
||||
/* Host */ remote,
|
||||
/* CA */ ca,
|
||||
/* Cert */ cert,
|
||||
/* Key */ key,
|
||||
/* Comp-LZO */ lzo,
|
||||
/* X-NM-Routes */ routes_str != NULL ? routes_str : "");
|
||||
|
||||
fclose (f);
|
||||
}
|
||||
g_free (routes_str);
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
impl_export (NetworkManagerVpnUI *self, GSList *properties, GSList *routes, const char *connection_name)
|
||||
{
|
||||
char *suggested_name;
|
||||
char *path = NULL;
|
||||
GtkWidget *dialog;
|
||||
NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data;
|
||||
|
||||
/*printf ("in impl_export\n");*/
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new (_("Save as..."),
|
||||
NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
suggested_name = g_strdup_printf ("%s.pcf", connection_name);
|
||||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), suggested_name);
|
||||
g_free (suggested_name);
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
|
||||
path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
|
||||
/*printf ("User selected '%s'\n", path);*/
|
||||
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
if (path != NULL) {
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS)) {
|
||||
int response;
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_QUESTION,
|
||||
GTK_BUTTONS_CANCEL,
|
||||
_("A file named \"%s\" already exists."), path);
|
||||
gtk_dialog_add_buttons (GTK_DIALOG (dialog), "_Replace", GTK_RESPONSE_OK, NULL);
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
_("Do you want to replace it with the one you are saving?"));
|
||||
response = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
if (response == GTK_RESPONSE_OK)
|
||||
export_to_file (impl, path, properties, routes, connection_name);
|
||||
}
|
||||
}
|
||||
|
||||
g_free (path);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static NetworkManagerVpnUI*
|
||||
impl_get_object (void)
|
||||
{
|
||||
char *glade_file;
|
||||
NetworkManagerVpnUIImpl *impl;
|
||||
|
||||
impl = g_new0 (NetworkManagerVpnUIImpl, 1);
|
||||
|
||||
glade_file = g_strdup_printf ("%s/%s", GLADEDIR, "nm-openvpn-dialog.glade");
|
||||
impl->xml = glade_xml_new (glade_file, NULL, GETTEXT_PACKAGE);
|
||||
g_free( glade_file );
|
||||
if (impl->xml != NULL) {
|
||||
|
||||
impl->widget = glade_xml_get_widget(impl->xml, "nm-openvpn-widget");
|
||||
|
||||
impl->w_connection_name = GTK_ENTRY (glade_xml_get_widget (impl->xml, "openvpn-connection-name"));
|
||||
impl->w_remote = GTK_ENTRY (glade_xml_get_widget (impl->xml, "openvpn-remote"));
|
||||
impl->w_use_routes = GTK_CHECK_BUTTON (glade_xml_get_widget (impl->xml, "openvpn-use-routes"));
|
||||
impl->w_routes = GTK_ENTRY (glade_xml_get_widget (impl->xml, "openvpn-routes"));
|
||||
impl->w_opt_info_expander = GTK_EXPANDER (glade_xml_get_widget (impl->xml,
|
||||
"openvpn-optional-information-expander"));
|
||||
impl->w_import_button = GTK_BUTTON (glade_xml_get_widget (impl->xml,
|
||||
"openvpn-import-button"));
|
||||
|
||||
impl->w_ca = GTK_ENTRY( glade_xml_get_widget( impl->xml, "openvpn-ca" ) );
|
||||
impl->w_cert = GTK_ENTRY( glade_xml_get_widget( impl->xml, "openvpn-cert" ) );
|
||||
impl->w_key = GTK_ENTRY( glade_xml_get_widget( impl->xml, "openvpn-key" ) );
|
||||
|
||||
impl->w_button_ca = GTK_BUTTON( glade_xml_get_widget( impl->xml, "openvpn-but-ca" ) );
|
||||
impl->w_button_cert = GTK_BUTTON( glade_xml_get_widget( impl->xml, "openvpn-but-cert" ) );
|
||||
impl->w_button_key = GTK_BUTTON( glade_xml_get_widget( impl->xml, "openvpn-but-key" ) );
|
||||
|
||||
impl->w_use_lzo = GTK_CHECK_BUTTON (glade_xml_get_widget (impl->xml, "openvpn-use-lzo"));
|
||||
|
||||
impl->callback = NULL;
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_use_routes),
|
||||
"toggled", GTK_SIGNAL_FUNC (use_routes_toggled), impl);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_connection_name),
|
||||
"changed", GTK_SIGNAL_FUNC (editable_changed), impl);
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_remote),
|
||||
"changed", GTK_SIGNAL_FUNC (editable_changed), impl);
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_routes),
|
||||
"changed", GTK_SIGNAL_FUNC (editable_changed), impl);
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_ca),
|
||||
"changed", GTK_SIGNAL_FUNC (editable_changed), impl);
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_cert),
|
||||
"changed", GTK_SIGNAL_FUNC (editable_changed), impl);
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_key),
|
||||
"changed", GTK_SIGNAL_FUNC (editable_changed), impl);
|
||||
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_button_ca),
|
||||
"clicked", GTK_SIGNAL_FUNC (open_button_clicked), impl);
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_button_cert),
|
||||
"clicked", GTK_SIGNAL_FUNC (open_button_clicked), impl);
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_button_key),
|
||||
"clicked", GTK_SIGNAL_FUNC (open_button_clicked), impl);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (impl->w_import_button),
|
||||
"clicked", GTK_SIGNAL_FUNC (import_button_clicked), impl);
|
||||
|
||||
/* make the widget reusable */
|
||||
gtk_signal_connect (GTK_OBJECT (impl->widget), "delete-event",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_hide_on_delete), NULL);
|
||||
|
||||
openvpn_clear_widget (impl);
|
||||
|
||||
impl->parent.get_display_name = impl_get_display_name;
|
||||
impl->parent.get_service_name = impl_get_service_name;
|
||||
impl->parent.get_widget = impl_get_widget;
|
||||
impl->parent.get_connection_name = impl_get_connection_name;
|
||||
impl->parent.get_properties = impl_get_properties;
|
||||
impl->parent.get_routes = impl_get_routes;
|
||||
impl->parent.set_validity_changed_callback = impl_set_validity_changed_callback;
|
||||
impl->parent.is_valid = impl_is_valid;
|
||||
impl->parent.get_confirmation_details = impl_get_confirmation_details;
|
||||
impl->parent.can_export = impl_can_export;
|
||||
impl->parent.import_file = impl_import_file;
|
||||
impl->parent.export = impl_export;
|
||||
impl->parent.data = impl;
|
||||
|
||||
return &(impl->parent);
|
||||
} else {
|
||||
g_free (impl);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
NetworkManagerVpnUI*
|
||||
nm_vpn_properties_factory (void)
|
||||
{
|
||||
return impl_get_object();
|
||||
}
|
||||
39
vpn-daemons/openvpn/src/Makefile.am
Normal file
39
vpn-daemons/openvpn/src/Makefile.am
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils -I${top_srcdir}/vpn-daemons/openvpn
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(DBUS_CFLAGS) \
|
||||
$(GTHREAD_CFLAGS) \
|
||||
-Wall \
|
||||
-DDBUS_API_SUBJECT_TO_CHANGE \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DBINDIR=\"$(bindir)\" \
|
||||
-DPREFIX=\""$(prefix)"\" \
|
||||
-DSYSCONFDIR=\""$(sysconfdir)"\" \
|
||||
-DVERSION="\"$(VERSION)\"" \
|
||||
-DLIBDIR=\""$(libdir)"\" \
|
||||
-DLIBEXECDIR=\""$(libexecdir)"\" \
|
||||
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
|
||||
-DDATADIR=\"$(datadir)\"
|
||||
|
||||
bin_PROGRAMS = nm-openvpn-service nm-openvpn-service-openvpn-helper
|
||||
|
||||
nm_openvpn_service_SOURCES = \
|
||||
nm-openvpn-service.c \
|
||||
nm-openvpn-service.h \
|
||||
nm-utils.c \
|
||||
nm-utils.h
|
||||
|
||||
|
||||
nm_openvpn_service_LDADD = \
|
||||
$(DBUS_LIBS) \
|
||||
$(GTHREAD_LIBS)
|
||||
|
||||
|
||||
nm_openvpn_service_openvpn_helper_SOURCES = \
|
||||
nm-openvpn-service-openvpn-helper.c
|
||||
|
||||
nm_openvpn_service_openvpn_helper_LDADD = \
|
||||
$(DBUS_LIBS) \
|
||||
$(GTHREAD_LIBS)
|
||||
|
||||
CLEANFILES = *~
|
||||
568
vpn-daemons/openvpn/src/Makefile.in
Normal file
568
vpn-daemons/openvpn/src/Makefile.in
Normal file
|
|
@ -0,0 +1,568 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
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 = nm-openvpn-service$(EXEEXT) \
|
||||
nm-openvpn-service-openvpn-helper$(EXEEXT)
|
||||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_nm_openvpn_service_OBJECTS = nm-openvpn-service.$(OBJEXT) \
|
||||
nm-utils.$(OBJEXT)
|
||||
nm_openvpn_service_OBJECTS = $(am_nm_openvpn_service_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
nm_openvpn_service_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1)
|
||||
am_nm_openvpn_service_openvpn_helper_OBJECTS = \
|
||||
nm-openvpn-service-openvpn-helper.$(OBJEXT)
|
||||
nm_openvpn_service_openvpn_helper_OBJECTS = \
|
||||
$(am_nm_openvpn_service_openvpn_helper_OBJECTS)
|
||||
nm_openvpn_service_openvpn_helper_DEPENDENCIES = \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(nm_openvpn_service_SOURCES) \
|
||||
$(nm_openvpn_service_openvpn_helper_SOURCES)
|
||||
DIST_SOURCES = $(nm_openvpn_service_SOURCES) \
|
||||
$(nm_openvpn_service_openvpn_helper_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALL_LINGUAS = @ALL_LINGUAS@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BINDIR = @BINDIR@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIR = @DATADIR@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DBUS_CFLAGS = @DBUS_CFLAGS@
|
||||
DBUS_LIBS = @DBUS_LIBS@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GCONF_CFLAGS = @GCONF_CFLAGS@
|
||||
GCONF_LIBS = @GCONF_LIBS@
|
||||
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
|
||||
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
GLADE_CFLAGS = @GLADE_CFLAGS@
|
||||
GLADE_LIBS = @GLADE_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNOMEKEYRING_CFLAGS = @GNOMEKEYRING_CFLAGS@
|
||||
GNOMEKEYRING_LIBS = @GNOMEKEYRING_LIBS@
|
||||
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
|
||||
GTHREAD_LIBS = @GTHREAD_LIBS@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
|
||||
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
|
||||
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
|
||||
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
|
||||
INTLTOOL_ICONV = @INTLTOOL_ICONV@
|
||||
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
|
||||
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
|
||||
INTLTOOL_MERGE = @INTLTOOL_MERGE@
|
||||
INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
|
||||
INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
|
||||
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
|
||||
INTLTOOL_PERL = @INTLTOOL_PERL@
|
||||
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
|
||||
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
|
||||
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
|
||||
INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
|
||||
INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
|
||||
INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
|
||||
INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
|
||||
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
|
||||
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
|
||||
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
|
||||
INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
|
||||
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
|
||||
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBDIR = @LIBDIR@
|
||||
LIBEXECDIR = @LIBEXECDIR@
|
||||
LIBGNOMEUI_CFLAGS = @LIBGNOMEUI_CFLAGS@
|
||||
LIBGNOMEUI_LIBS = @LIBGNOMEUI_LIBS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LOCALSTATEDIR = @LOCALSTATEDIR@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MSGFMT = @MSGFMT@
|
||||
NETWORK_MANAGER_CFLAGS = @NETWORK_MANAGER_CFLAGS@
|
||||
NETWORK_MANAGER_LIBS = @NETWORK_MANAGER_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
|
||||
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
|
||||
RANLIB = @RANLIB@
|
||||
SBINDIR = @SBINDIR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
SYSCONFDIR = @SYSCONFDIR@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
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@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils -I${top_srcdir}/vpn-daemons/openvpn
|
||||
AM_CPPFLAGS = \
|
||||
$(DBUS_CFLAGS) \
|
||||
$(GTHREAD_CFLAGS) \
|
||||
-Wall \
|
||||
-DDBUS_API_SUBJECT_TO_CHANGE \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DBINDIR=\"$(bindir)\" \
|
||||
-DPREFIX=\""$(prefix)"\" \
|
||||
-DSYSCONFDIR=\""$(sysconfdir)"\" \
|
||||
-DVERSION="\"$(VERSION)\"" \
|
||||
-DLIBDIR=\""$(libdir)"\" \
|
||||
-DLIBEXECDIR=\""$(libexecdir)"\" \
|
||||
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
|
||||
-DDATADIR=\"$(datadir)\"
|
||||
|
||||
nm_openvpn_service_SOURCES = \
|
||||
nm-openvpn-service.c \
|
||||
nm-openvpn-service.h \
|
||||
nm-utils.c \
|
||||
nm-utils.h
|
||||
|
||||
nm_openvpn_service_LDADD = \
|
||||
$(DBUS_LIBS) \
|
||||
$(GTHREAD_LIBS)
|
||||
|
||||
nm_openvpn_service_openvpn_helper_SOURCES = \
|
||||
nm-openvpn-service-openvpn-helper.c
|
||||
|
||||
nm_openvpn_service_openvpn_helper_LDADD = \
|
||||
$(DBUS_LIBS) \
|
||||
$(GTHREAD_LIBS)
|
||||
|
||||
CLEANFILES = *~
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 src/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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
|
||||
nm-openvpn-service$(EXEEXT): $(nm_openvpn_service_OBJECTS) $(nm_openvpn_service_DEPENDENCIES)
|
||||
@rm -f nm-openvpn-service$(EXEEXT)
|
||||
$(LINK) $(nm_openvpn_service_LDFLAGS) $(nm_openvpn_service_OBJECTS) $(nm_openvpn_service_LDADD) $(LIBS)
|
||||
nm-openvpn-service-openvpn-helper$(EXEEXT): $(nm_openvpn_service_openvpn_helper_OBJECTS) $(nm_openvpn_service_openvpn_helper_DEPENDENCIES)
|
||||
@rm -f nm-openvpn-service-openvpn-helper$(EXEEXT)
|
||||
$(LINK) $(nm_openvpn_service_openvpn_helper_LDFLAGS) $(nm_openvpn_service_openvpn_helper_OBJECTS) $(nm_openvpn_service_openvpn_helper_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-openvpn-service-openvpn-helper.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-openvpn-service.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-utils.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@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 -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@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 -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@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 $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
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)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
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:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
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-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
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 uninstall-info-am
|
||||
|
||||
.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-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
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 uninstall-info-am
|
||||
|
||||
# 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:
|
||||
322
vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c
Normal file
322
vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c
Normal file
|
|
@ -0,0 +1,322 @@
|
|||
/* nm-openvpn-service - openvpn integration with NetworkManager
|
||||
*
|
||||
* Dan Williams <dcbw@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* (C) Copyright 2005 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <regex.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <dbus/dbus.h>
|
||||
#include <dbus/dbus-glib-lowlevel.h>
|
||||
#include <dbus/dbus-glib.h>
|
||||
#include <NetworkManager/NetworkManager.h>
|
||||
|
||||
#include "nm-openvpn-service.h"
|
||||
#include "nm-utils.h"
|
||||
|
||||
|
||||
/*
|
||||
* send_config_error
|
||||
*
|
||||
* Notify nm-openvpn-service of a config error from 'openvpn'.
|
||||
*
|
||||
*/
|
||||
static void send_config_error (DBusConnection *con, const char *item)
|
||||
{
|
||||
DBusMessage *message;
|
||||
|
||||
g_return_if_fail (con != NULL);
|
||||
g_return_if_fail (item != NULL);
|
||||
|
||||
if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE_OPENVPN, NM_DBUS_PATH_OPENVPN, NM_DBUS_INTERFACE_OPENVPN, "signalConfigError")))
|
||||
{
|
||||
nm_warning ("send_config_error(): Couldn't allocate the dbus message");
|
||||
return;
|
||||
}
|
||||
|
||||
dbus_message_append_args (message, DBUS_TYPE_STRING, &item, DBUS_TYPE_INVALID);
|
||||
if (!dbus_connection_send (con, message, NULL))
|
||||
nm_warning ("send_config_error(): could not send dbus message");
|
||||
|
||||
dbus_message_unref (message);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* send_config_info
|
||||
*
|
||||
* Send IP config info to nm-openvpn-service
|
||||
*
|
||||
*/
|
||||
static gboolean send_config_info (DBusConnection *con,
|
||||
const char *str_vpn_gateway,
|
||||
const char *str_tundev,
|
||||
const char *str_ip4_address,
|
||||
const char *str_ip4_netmask,
|
||||
const GPtrArray *gpa_ip4_dns,
|
||||
const GPtrArray *gpa_ip4_nbns
|
||||
)
|
||||
{
|
||||
DBusMessage * message;
|
||||
struct in_addr temp_addr;
|
||||
guint32 uint_vpn_gateway = 0;
|
||||
guint32 uint_ip4_address = 0;
|
||||
guint32 uint_ip4_netmask = 0xFFFFFFFF; /* Default mask of 255.255.255.255 */
|
||||
guint32 * uint_ip4_dns = NULL;
|
||||
guint32 uint_ip4_dns_len = 0;
|
||||
guint32 * uint_ip4_nbns = NULL;
|
||||
guint32 uint_ip4_nbns_len = 0;
|
||||
guint32 num_valid = 0, i = 0;
|
||||
gboolean success = FALSE;
|
||||
int exit_code = 0;
|
||||
|
||||
g_return_val_if_fail (con != NULL, FALSE);
|
||||
|
||||
if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE_OPENVPN, NM_DBUS_PATH_OPENVPN, NM_DBUS_INTERFACE_OPENVPN, "signalIP4Config")))
|
||||
{
|
||||
nm_warning ("send_config_error(): Couldn't allocate the dbus message");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Convert IPv4 address arguments from strings into numbers */
|
||||
if (!inet_aton (str_vpn_gateway, &temp_addr))
|
||||
{
|
||||
nm_warning ("nm-openvpn-service-openvpn-helper didn't receive a valid VPN Gateway from openvpn.");
|
||||
send_config_error (con, "VPN Gateway");
|
||||
goto out;
|
||||
}
|
||||
uint_vpn_gateway = temp_addr.s_addr;
|
||||
|
||||
if (!inet_aton (str_ip4_address, &temp_addr))
|
||||
{
|
||||
nm_warning ("nm-openvpn-service-openvpn-helper didn't receive a valid Internal IP4 Address from openvpn.");
|
||||
send_config_error (con, "IP4 Address");
|
||||
goto out;
|
||||
}
|
||||
uint_ip4_address = temp_addr.s_addr;
|
||||
|
||||
if (strlen (str_ip4_netmask) && inet_aton (str_ip4_netmask, &temp_addr))
|
||||
uint_ip4_netmask = temp_addr.s_addr;
|
||||
|
||||
if ( gpa_ip4_dns->len > 0 )
|
||||
{
|
||||
/* Pass over the array first to determine how many valid entries there are */
|
||||
num_valid = 0;
|
||||
for (i = 0; i < gpa_ip4_dns->len; ++i)
|
||||
if (inet_aton ((char *)gpa_ip4_dns->pdata[i], &temp_addr))
|
||||
num_valid++;
|
||||
|
||||
/* Do the actual string->int conversion and assign to the array. */
|
||||
if (num_valid > 0)
|
||||
{
|
||||
uint_ip4_dns = g_new0 (guint32, num_valid);
|
||||
for (i = 0; i < gpa_ip4_dns->len; ++i)
|
||||
if (inet_aton ((char *)gpa_ip4_dns->pdata[i], &temp_addr))
|
||||
uint_ip4_dns[i] = temp_addr.s_addr;
|
||||
}
|
||||
|
||||
uint_ip4_dns_len = num_valid;
|
||||
}
|
||||
if (!uint_ip4_dns)
|
||||
{
|
||||
uint_ip4_dns = g_malloc0 (sizeof (guint32));
|
||||
uint_ip4_dns_len = 1;
|
||||
}
|
||||
|
||||
if ( gpa_ip4_nbns->len > 0 )
|
||||
{
|
||||
/* Pass over the array first to determine how many valid entries there are */
|
||||
num_valid = 0;
|
||||
for (i = 0; i < gpa_ip4_nbns->len; ++i)
|
||||
if (inet_aton ((char *)gpa_ip4_nbns->pdata[i], &temp_addr))
|
||||
num_valid++;
|
||||
|
||||
/* Do the actual string->int conversion and assign to the array. */
|
||||
if (num_valid > 0)
|
||||
{
|
||||
uint_ip4_nbns = g_new0 (guint32, num_valid);
|
||||
for (i = 0; i < gpa_ip4_nbns->len; ++i)
|
||||
if (inet_aton ((char *)gpa_ip4_nbns->pdata[i], &temp_addr))
|
||||
uint_ip4_nbns[i] = temp_addr.s_addr;
|
||||
}
|
||||
|
||||
uint_ip4_nbns_len = num_valid;
|
||||
}
|
||||
if (!uint_ip4_nbns)
|
||||
{
|
||||
uint_ip4_nbns = g_malloc0 (sizeof (guint32));
|
||||
uint_ip4_nbns_len = 1;
|
||||
}
|
||||
|
||||
dbus_message_append_args (message, DBUS_TYPE_UINT32, &uint_vpn_gateway,
|
||||
DBUS_TYPE_STRING, &str_tundev,
|
||||
DBUS_TYPE_UINT32, &uint_ip4_address,
|
||||
DBUS_TYPE_UINT32, &uint_ip4_netmask,
|
||||
DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &uint_ip4_dns, uint_ip4_dns_len,
|
||||
DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &uint_ip4_nbns, uint_ip4_nbns_len,
|
||||
DBUS_TYPE_INVALID);
|
||||
if (dbus_connection_send (con, message, NULL))
|
||||
success = TRUE;
|
||||
else
|
||||
nm_warning ("send_config_error(): could not send dbus message");
|
||||
|
||||
dbus_message_unref (message);
|
||||
|
||||
out:
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Environment variables passed back from 'openvpn':
|
||||
*
|
||||
* VPNGATEWAY -- vpn gateway address (always present)
|
||||
* TUNDEV -- tunnel device (always present)
|
||||
* IP4_ADDRESS -- address (always present)
|
||||
* IP4_NETMASK -- netmask (often unset)
|
||||
* IP4_DNS -- list of dns serverss
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* main
|
||||
*
|
||||
*/
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
DBusConnection * con;
|
||||
DBusError error;
|
||||
char * vpn_gateway = NULL;
|
||||
char * tundev = NULL;
|
||||
char * ip4_address = NULL;
|
||||
char * ip4_netmask = NULL;
|
||||
GPtrArray * ip4_dns = NULL;
|
||||
GPtrArray * ip4_nbns = NULL;
|
||||
|
||||
char **split = NULL;
|
||||
char **item;
|
||||
|
||||
char * tmp;
|
||||
char envname[100];
|
||||
int i = 1;
|
||||
int exit_code = 0;
|
||||
|
||||
g_type_init ();
|
||||
if (!g_thread_supported ())
|
||||
g_thread_init (NULL);
|
||||
|
||||
dbus_error_init (&error);
|
||||
con = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
|
||||
if ((con == NULL) || dbus_error_is_set (&error))
|
||||
{
|
||||
nm_warning ("Could not get the system bus. Make sure the message bus daemon is running?");
|
||||
exit (1);
|
||||
}
|
||||
dbus_connection_set_exit_on_disconnect (con, FALSE);
|
||||
|
||||
|
||||
vpn_gateway = getenv( "route_vpn_gateway" );
|
||||
tundev = getenv ("dev");
|
||||
ip4_address = getenv("ifconfig_local");
|
||||
ip4_netmask = getenv("route_netmask_1");
|
||||
|
||||
ip4_dns = g_ptr_array_new();
|
||||
ip4_nbns = g_ptr_array_new();
|
||||
|
||||
while (1) {
|
||||
sprintf(envname, "foreign_option_%i", i++);
|
||||
tmp = getenv( envname );
|
||||
|
||||
if ( (tmp == NULL) || (strlen(tmp) == 0) ) {
|
||||
break;
|
||||
} else {
|
||||
|
||||
if ((split = g_strsplit( tmp, " ", -1))) {
|
||||
int size = 0;
|
||||
for( item = split; *item; item++) {
|
||||
++size;
|
||||
}
|
||||
if ( size != 3 ) continue;
|
||||
|
||||
if (strcmp( split[0], "dhcp-option") == 0) {
|
||||
// Interesting, now check if DNS or NBNS/WINS
|
||||
if (strcmp( split[1], "DNS") == 0) {
|
||||
// DNS, push it!
|
||||
g_ptr_array_add( ip4_dns, (gpointer) split[2] );
|
||||
} else if (strcmp( split[1], "WINS") == 0) {
|
||||
// WINS, push it!
|
||||
g_ptr_array_add( ip4_nbns, (gpointer) split[2] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
{
|
||||
FILE *file = fopen ("/tmp/vpnstuff", "w");
|
||||
fprintf (file, "VPNGATEWAY: '%s'\n", vpn_gateway);
|
||||
fprintf (file, "TUNDEF: '%s'\n", tundev);
|
||||
fprintf (file, "IP4_ADDRESS: '%s'\n", ip4_address);
|
||||
fprintf (file, "IP4_NETMASK: '%s'\n", ip4_netmask);
|
||||
fclose (file);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!vpn_gateway)
|
||||
{
|
||||
nm_warning ("nm-openvpn-service-openvpn-helper didn't receive a VPN Gateway from openvpn.");
|
||||
send_config_error (con, "VPN Gateway");
|
||||
exit (1);
|
||||
}
|
||||
if (!tundev || !g_utf8_validate (tundev, -1, NULL))
|
||||
{
|
||||
nm_warning ("nm-openvpn-service-openvpn-helper didn't receive a Tunnel Device from openvpn, or the tunnel device was not valid UTF-8.");
|
||||
send_config_error (con, "Tunnel Device");
|
||||
exit (1);
|
||||
}
|
||||
if (!ip4_address)
|
||||
{
|
||||
nm_warning ("nm-openvpn-service-openvpn-helper didn't receive an Internal IP4 Address from openvpn.");
|
||||
send_config_error (con, "IP4 Address");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (!ip4_netmask)
|
||||
ip4_netmask = g_strdup ("");
|
||||
|
||||
|
||||
/* Send the config info to nm-openvpn-service */
|
||||
if (!send_config_info (con, vpn_gateway, tundev, ip4_address, ip4_netmask, ip4_dns, ip4_nbns))
|
||||
{
|
||||
exit_code = 1;
|
||||
}
|
||||
|
||||
g_strfreev( split );
|
||||
g_ptr_array_free( ip4_dns, TRUE );
|
||||
g_ptr_array_free( ip4_nbns, TRUE );
|
||||
|
||||
exit (exit_code);
|
||||
}
|
||||
|
||||
1052
vpn-daemons/openvpn/src/nm-openvpn-service.c
Normal file
1052
vpn-daemons/openvpn/src/nm-openvpn-service.c
Normal file
File diff suppressed because it is too large
Load diff
29
vpn-daemons/openvpn/src/nm-openvpn-service.h
Normal file
29
vpn-daemons/openvpn/src/nm-openvpn-service.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* nm-openvpn-service - openvpn integration with NetworkManager
|
||||
*
|
||||
* Tim Niemueller <tim@niemueller.de>
|
||||
* Based on work by Dan Williams <dcbw@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef NM_OPENVPN_SERVICE_H
|
||||
#define NM_OPENVPN_SERVICE_H
|
||||
|
||||
#define NM_DBUS_SERVICE_OPENVPN "org.freedesktop.NetworkManager.openvpn"
|
||||
#define NM_DBUS_INTERFACE_OPENVPN "org.freedesktop.NetworkManager.openvpn"
|
||||
#define NM_DBUS_PATH_OPENVPN "/org/freedesktop/NetworkManager/openvpn"
|
||||
|
||||
#endif
|
||||
132
vpn-daemons/openvpn/src/nm-utils.c
Normal file
132
vpn-daemons/openvpn/src/nm-utils.c
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
/* NetworkManager -- Network link manager
|
||||
*
|
||||
* Ray Strode <rstrode@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* (C) Copyright 2005 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include "nm-utils.h"
|
||||
|
||||
gchar *nm_dbus_escape_object_path (const gchar *utf8_string)
|
||||
{
|
||||
const gchar *p;
|
||||
gchar *object_path;
|
||||
GString *string;
|
||||
|
||||
g_return_val_if_fail (utf8_string != NULL, NULL);
|
||||
g_return_val_if_fail (g_utf8_validate (utf8_string, -1, NULL), NULL);
|
||||
|
||||
string = g_string_sized_new ((strlen (utf8_string) + 1) * 6);
|
||||
|
||||
for (p = utf8_string; *p != '\0'; p = g_utf8_next_char (p))
|
||||
{
|
||||
gunichar character;
|
||||
|
||||
character = g_utf8_get_char (p);
|
||||
|
||||
if (((character >= ((gunichar) 'a')) &&
|
||||
(character <= ((gunichar) 'z'))) ||
|
||||
((character >= ((gunichar) 'A')) &&
|
||||
(character <= ((gunichar) 'Z'))) ||
|
||||
((character >= ((gunichar) '0')) &&
|
||||
(character <= ((gunichar) '9'))) ||
|
||||
(character == ((gunichar) '/')))
|
||||
{
|
||||
g_string_append_c (string, (gchar) character);
|
||||
continue;
|
||||
}
|
||||
|
||||
g_string_append_printf (string, "_%x_", character);
|
||||
}
|
||||
|
||||
object_path = string->str;
|
||||
|
||||
g_string_free (string, FALSE);
|
||||
|
||||
return object_path;
|
||||
}
|
||||
|
||||
gchar *nm_dbus_unescape_object_path (const gchar *object_path)
|
||||
{
|
||||
const gchar *p;
|
||||
gchar *utf8_string;
|
||||
GString *string;
|
||||
|
||||
g_return_val_if_fail (object_path != NULL, NULL);
|
||||
|
||||
string = g_string_sized_new (strlen (object_path) + 1);
|
||||
|
||||
for (p = object_path; *p != '\0'; p++)
|
||||
{
|
||||
const gchar *q;
|
||||
gchar *hex_digits, *end, utf8_character[6] = { '\0' };
|
||||
gint utf8_character_size;
|
||||
gunichar character;
|
||||
gulong hex_value;
|
||||
|
||||
if (*p != '_')
|
||||
{
|
||||
g_string_append_c (string, *p);
|
||||
continue;
|
||||
}
|
||||
|
||||
q = strchr (p + 1, '_');
|
||||
|
||||
if ((q == NULL) || (q == p + 1))
|
||||
{
|
||||
g_string_free (string, TRUE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hex_digits = g_strndup (p + 1, (q - 1) - p);
|
||||
|
||||
hex_value = strtoul (hex_digits, &end, 16);
|
||||
|
||||
character = (gunichar) hex_value;
|
||||
|
||||
if (((hex_value == G_MAXLONG) && (errno == ERANGE)) ||
|
||||
(hex_value > G_MAXUINT32) ||
|
||||
(*end != '\0') ||
|
||||
(!g_unichar_validate (character)))
|
||||
{
|
||||
g_free (hex_digits);
|
||||
g_string_free (string, TRUE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
utf8_character_size =
|
||||
g_unichar_to_utf8 (character, utf8_character);
|
||||
|
||||
g_assert (utf8_character_size > 0);
|
||||
|
||||
g_string_append_len (string, utf8_character,
|
||||
utf8_character_size);
|
||||
|
||||
p = q;
|
||||
}
|
||||
|
||||
utf8_string = string->str;
|
||||
|
||||
g_string_free (string, FALSE);
|
||||
|
||||
return utf8_string;
|
||||
}
|
||||
131
vpn-daemons/openvpn/src/nm-utils.h
Normal file
131
vpn-daemons/openvpn/src/nm-utils.h
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
/* NetworkManager -- Network link manager
|
||||
*
|
||||
* Ray Strode <rstrode@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* (C) Copyright 2005 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef NM_UTILS_H
|
||||
#define NM_UTILS_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <execinfo.h>
|
||||
|
||||
#define nm_print_backtrace() \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
void *_call_stack[512]; \
|
||||
int _call_stack_size; \
|
||||
char **_symbols; \
|
||||
_call_stack_size = backtrace (_call_stack, \
|
||||
G_N_ELEMENTS (_call_stack)); \
|
||||
_symbols = backtrace_symbols (_call_stack, _call_stack_size); \
|
||||
if (_symbols != NULL) \
|
||||
{ \
|
||||
int _i; \
|
||||
_i = 0; \
|
||||
g_critical ("traceback:\n"); \
|
||||
while (_i < _call_stack_size) \
|
||||
{ \
|
||||
g_critical ("\t%s\n", _symbols[_i]); \
|
||||
_i++; \
|
||||
} \
|
||||
free (_symbols); \
|
||||
} \
|
||||
} \
|
||||
G_STMT_END
|
||||
|
||||
#define nm_get_timestamp(timestamp) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
GTimeVal _tv; \
|
||||
g_get_current_time (&_tv); \
|
||||
*timestamp = (_tv.tv_sec * (1.0 * G_USEC_PER_SEC) + \
|
||||
_tv.tv_usec) / G_USEC_PER_SEC; \
|
||||
} \
|
||||
G_STMT_END
|
||||
|
||||
#define nm_info(fmt, args...) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
g_message ("<information>\t" fmt "\n", ##args); \
|
||||
} G_STMT_END
|
||||
|
||||
#define nm_info_str(fmt_str, args...) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
g_message ("<information>\t%s\n", fmt_str, ##args); \
|
||||
} G_STMT_END
|
||||
|
||||
#define nm_debug(fmt, args...) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
gdouble _timestamp; \
|
||||
nm_get_timestamp (&_timestamp); \
|
||||
g_debug ("<debug info>\t[%f] %s (): " fmt "\n", _timestamp, \
|
||||
G_GNUC_PRETTY_FUNCTION, ##args); \
|
||||
} G_STMT_END
|
||||
|
||||
#define nm_debug_str(fmt_str, args...) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
gdouble _timestamp; \
|
||||
nm_get_timestamp (&_timestamp); \
|
||||
g_debug ("<debug info>\t[%f] %s (): %s\n", _timestamp, \
|
||||
G_GNUC_PRETTY_FUNCTION, fmt_str, ##args); \
|
||||
} G_STMT_END
|
||||
|
||||
#define nm_warning(fmt, args...) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
g_warning ("<WARNING>\t %s (): " fmt "\n", \
|
||||
G_GNUC_PRETTY_FUNCTION, ##args); \
|
||||
} G_STMT_END
|
||||
|
||||
#define nm_warning_str(fmt_str, args...) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
g_warning ("<WARNING>\t %s (): %s\n", \
|
||||
G_GNUC_PRETTY_FUNCTION, fmt_str, ##args); \
|
||||
} G_STMT_END
|
||||
|
||||
#define nm_error(fmt, args...) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
gdouble _timestamp; \
|
||||
nm_get_timestamp (&_timestamp); \
|
||||
g_critical ("<ERROR>\t[%f] %s (): " fmt "\n", _timestamp, \
|
||||
G_GNUC_PRETTY_FUNCTION, ##args); \
|
||||
nm_print_backtrace (); \
|
||||
G_BREAKPOINT (); \
|
||||
} G_STMT_END
|
||||
|
||||
#define nm_error_str(fmt_str, args...) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
gdouble _timestamp; \
|
||||
nm_get_timestamp (&_timestamp); \
|
||||
g_critical ("<ERROR>\t[%f] %s (): %s\n", _timestamp, \
|
||||
G_GNUC_PRETTY_FUNCTION, fmt_str, ##args); \
|
||||
nm_print_backtrace (); \
|
||||
G_BREAKPOINT (); \
|
||||
} G_STMT_END
|
||||
|
||||
gchar *nm_dbus_escape_object_path (const gchar *utf8_string);
|
||||
gchar *nm_dbus_unescape_object_path (const gchar *object_path);
|
||||
|
||||
#endif /* NM_UTILS_H */
|
||||
Loading…
Add table
Reference in a new issue