gadmin-proftpd-0.4.2/0000755000076400007640000000000011566007413013403 5ustar mangemangegadmin-proftpd-0.4.2/configure.in0000644000076400007640000001752211566003200015711 0ustar mangemangednl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(gadmin-proftpd, 0.4.2) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_CANONICAL_HOST AC_MSG_CHECKING([for OS type]) case $host in *-linux*) AC_MSG_RESULT([Linux ($host) found.]) AC_DEFINE(USE_LINUX,1,[using linux macros...]) ;; *-solaris*) AC_MSG_RESULT([Solaris ($host) found.]) AC_DEFINE(USE_SUNOS,1,[using sunos macros...]) ;; *-sunos*) AC_MSG_RESULT([Solaris ($host) found.]) AC_DEFINE(USE_SUNOS,1,[using sunos macros...]) ;; *-freebsd*) AC_MSG_RESULT([Free BSD ($host) found.]) AC_DEFINE(USE_FREEBSD,1,[using freebsd macros...]) ;; *-openbsd*) AC_MSG_RESULT([Open BSD ($host) found.]) AC_DEFINE(USE_OPENBSD,1,[using openbsd macros...]) ;; *-netbsd*) AC_MSG_RESULT([Net BSD ($host) found.]) AC_DEFINE(USE_NETBSD,1,[using netbsd macros...]) ;; *-darwin*) AC_MSG_RESULT([Darwin Mac OS X ($host) found.]) AC_DEFINE(USE_DARWIN,1,[using darwin macros...]) ;; *-aix*) AC_MSG_RESULT([AIX ($host) found.]) AC_DEFINE(USE_AIX,1,[using aix macros...]) ;; *-hpux*) AC_MSG_RESULT([HP UX ($host) found.]) AC_DEFINE(USE_HPUX,1,[using hpux macros...]) ;; *) AC_MSG_RESULT([Unknown host found: ($host). Using Linux macros...]) AC_DEFINE(USE_LINUX,1,[using Linux macros...]) ;; esac AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC pkg_modules="gtk+-2.0 >= 1.3.13" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) GETTEXT_PACKAGE=gadmin-proftpd AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[needed for gettext...]) dnl Add the languages which your application supports here. ALL_LINGUAS="sv fr es zh_CN" AM_GLIB_GNU_GETTEXT dnl Use -Wall if we have gcc (added -lcrypt for crypt). changequote(,)dnl if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi changequote([,])dnl dnl Determine if we can link with -lcrypt AC_SEARCH_LIBS(crypt, [crypt], [test "$ac_cv_search_crypt" = "none required" || AUTHLIBS="-lcrypt $AUTHLIBS" AC_DEFINE_UNQUOTED(HAVE_CRYPT,1,[Define for linking with -lcrypt])]) dnl some dynamic defines and corrections for configure options SYSCONFDIR=`eval echo $sysconfdir` AC_SUBST(SYSCONFDIR) LOCALSTATEDIR=`eval echo $localstatedir` AC_SUBST(LOCALSTATEDIR) test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' dnl Path to proftpd's configuration file. default_proftpd_conf="/etc/proftpd.conf" test "x$PROFTPD_CONF" = x && PROFTPD_CONF=$default_proftpd_conf AC_DEFINE_UNQUOTED(PROFTPD_CONF,"`eval echo "${PROFTPD_CONF}"`",[path to proftpd.conf]) AC_MSG_RESULT([Using configuration file: (${PROFTPD_CONF})]) dnl Path to the systems security log. default_secure_log="/var/log/secure" test "x$SECURE_LOG" = x && SECURE_LOG=$default_secure_log AC_DEFINE_UNQUOTED(SECURE_LOG,"`eval echo "${SECURE_LOG}"`",[path to the systems security log]) AC_MSG_RESULT([Using security log: (${SECURE_LOG})]) dnl Path to proftpds xferlog. default_xfer_log="/var/log/xferlog" test "x$XFER_LOG" = x && XFER_LOG=$default_xfer_log AC_DEFINE_UNQUOTED(XFER_LOG,"`eval echo "${XFER_LOG}"`",[path to proftpds xferlog]) AC_MSG_RESULT([Using xferlog: (${XFER_LOG})]) dnl Path to the webserver root directory/gprostats html output file. default_html_statistics="/var/www/html/ftp.htm" test "x$HTML_STATISTICS" = x && HTML_STATISTICS=$default_html_statistics AC_DEFINE_UNQUOTED(HTML_STATISTICS,"`eval echo "${HTML_STATISTICS}"`",[path to generated html statistics]) AC_MSG_RESULT([Using html statistics output file: (${HTML_STATISTICS})]) dnl Name of the generated ftp welcome message. default_welcome_message="welcome.msg" test "x$WELCOME_MESSAGE" = x && WELCOME_MESSAGE=$default_welcome_message AC_DEFINE_UNQUOTED(WELCOME_MESSAGE,"`eval echo "${WELCOME_MESSAGE}"`",[Name of generated welcome messages]) AC_MSG_RESULT([Using welcome message output file: (${WELCOME_MESSAGE})]) dnl The server runs as this user. default_server_user="nobody" test "x$SERVER_USER" = x && SERVER_USER=$default_server_user AC_DEFINE_UNQUOTED(SERVER_USER,"`eval echo "${SERVER_USER}"`",[The server runs as this user]) AC_MSG_RESULT([Using server user: (${SERVER_USER})]) dnl The server runs as this group. default_server_group="nobody" test "x$SERVER_GROUP" = x && SERVER_GROUP=$default_server_group AC_DEFINE_UNQUOTED(SERVER_GROUP,"`eval echo "${SERVER_GROUP}"`",[The server runs as this group]) AC_MSG_RESULT([Using server group: (${SERVER_GROUP})]) dnl Path to the proftpd binary. default_proftpd_binary="proftpd" test "x$PROFTPD_BINARY" = x && PROFTPD_BINARY=$default_proftpd_binary AC_DEFINE_UNQUOTED(PROFTPD_BINARY,"`eval echo "${PROFTPD_BINARY}"`",[Path to the proftpd binary]) AC_MSG_RESULT([Using PROFTPD binary: (${PROFTPD_BINARY})]) dnl Path to the ftpwho binary. default_ftpwho_binary="ftpwho" test "x$FTPWHO_BINARY" = x && FTPWHO_BINARY=$default_ftpwho_binary AC_DEFINE_UNQUOTED(FTPWHO_BINARY,"`eval echo "${FTPWHO_BINARY}"`",[Path to the ftpwho binary]) AC_MSG_RESULT([Using FTPWHO binary: (${FTPWHO_BINARY})]) dnl Path to the proc filesystem. default_proc_path="/proc" test "x$PROC_PATH" = x && PROC_PATH=$default_proc_path AC_DEFINE_UNQUOTED(PROC_PATH,"`eval echo "${PROC_PATH}"`",[Path to the proc filesystem]) AC_MSG_RESULT([Using Proc filesystem: (${PROC_PATH})]) dnl Minimum accepted password length. default_min_pass_len=6 test "x$MIN_PASS_LEN" = x && MIN_PASS_LEN=$default_min_pass_len AC_DEFINE_UNQUOTED(MIN_PASS_LEN,${MIN_PASS_LEN},[The minimum accepted password length.]) AC_MSG_RESULT([Using MIN_PASS_LEN: (${MIN_PASS_LEN})]) dnl Command for making the server start at boot. default_sysinit_start_cmd="echo" test "x$SYSINIT_START_CMD" = x && SYSINIT_START_CMD=$default_sysinit_start_cmd AC_DEFINE_UNQUOTED(SYSINIT_START_CMD,"`eval echo "${SYSINIT_START_CMD}"`",[Command for making the server start at boot]) AC_MSG_RESULT([Using sysinit start command: (${SYSINIT_START_CMD})]) dnl Command for not making the server start at boot. default_sysinit_stop_cmd="echo" test "x$SYSINIT_STOP_CMD" = x && SYSINIT_STOP_CMD=$default_sysinit_stop_cmd AC_DEFINE_UNQUOTED(SYSINIT_STOP_CMD,"`eval echo "${SYSINIT_STOP_CMD}"`",[Command for not making the server start at boot]) AC_MSG_RESULT([Using sysinit stop command: (${SYSINIT_STOP_CMD})]) dnl Hardcoded application config directory. default_gp_appconfdir="/etc/gadmin-proftpd" test "x$GP_APPCONFDIR" = x && GP_APPCONFDIR=$default_gp_appconfdir AC_DEFINE_UNQUOTED(GP_APPCONFDIR,"`eval echo "${GP_APPCONFDIR}"`",[application config dir]) AC_MSG_RESULT([Using GP_APPCONFDIR: (${GP_APPCONFDIR})]) dnl Path to the backup proftpd.conf file. default_proftpd_conf_backup="${GP_APPCONFDIR}/proftpd.conf.old.gadmin-proftpd-${VERSION}" test "x$PROFTPD_CONF_BACKUP" = x && PROFTPD_CONF_BACKUP=$default_proftpd_conf_backup AC_DEFINE_UNQUOTED(PROFTPD_CONF_BACKUP,"`eval echo "${PROFTPD_CONF_BACKUP}"`",[Path to backup proftpd.conf]) AC_MSG_RESULT([Using backup proftpd.conf file: (${PROFTPD_CONF_BACKUP})]) dnl Here we hardcode passwd, shadow, group, gshadow, ftpusers and shutmsg. dnl This is how proftpd currently (1.2.9) handles this and why not. AC_DEFINE_UNQUOTED(GP_FTPUSERS,"`eval echo "/etc/ftpusers"`",[path to ftpusers]) AC_DEFINE_UNQUOTED(GP_SHELLS,"`eval echo "/etc/shells"`",[path to shells]) AC_DEFINE_UNQUOTED(GP_SHUTMSG,"`eval echo "/etc/shutmsg"`",[path to shutmsg]) AC_DEFINE_UNQUOTED(GP_PASSWD,"`eval echo "/etc/passwd"`",[path to passwd]) AC_DEFINE_UNQUOTED(GP_SHADOW,"`eval echo "/etc/shadow"`",[path to shadow]) AC_DEFINE_UNQUOTED(GP_GROUP,"`eval echo "/etc/group"`",[path to group]) AC_DEFINE_UNQUOTED(GP_GSHADOW,"`eval echo "/etc/gshadow"`",[path to gshadow]) AC_DEFINE_UNQUOTED(GP_VARDIR,"`eval echo "${localstatedir}"`",[var dir]) AC_OUTPUT([ Makefile src/Makefile po/Makefile.in ]) gadmin-proftpd-0.4.2/NEWS0000644000076400007640000000000011522367257014077 0ustar mangemangegadmin-proftpd-0.4.2/desktop/0000755000076400007640000000000010757352716015066 5ustar mangemangegadmin-proftpd-0.4.2/desktop/gadmin-proftpd.desktop0000644000076400007640000000106010757352716021371 0ustar mangemange[Desktop Entry] Encoding=UTF-8 Name=GADMIN-PROFTPD Name[de]=GADMIN-PROFTPD Name[es]=GADMIN-PROFTPD Name[fi]=GADMIN-PROFTPD Name[fr]=GADMIN-PROFTPD Name[ko]=GADMIN-PROFTPD Name[no]=GADMIN-PROFTPD Name[pt_BR]=GADMIN-PROFTPD Name[sl]=GADMIN-PROFTPD Name[sv]=GADMIN-PROFTPD Name[uk]=GADMIN-PROFTPD Name[ro]=GADMIN-PROFTPD Name[zh_TW]=GADMIN-PROFTPD GenericName=GADMIN-PROFTPD Comment=ProFTPD FTP server administration Exec=gadmin-proftpd Icon=gadmin-proftpd.png Terminal=false Type=Application Categories=Application;Network;X-Red-Hat-ServerConfig;X-Red-Hat-Base; gadmin-proftpd-0.4.2/Makefile.in0000644000000000000000000006115211566004351015201 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO config.guess config.sub depcomp install-sh missing \ mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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 config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck 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)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSCONFDIR = @SYSCONFDIR@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src po EXTRA_DIST = \ autogen.sh 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) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) 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) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 # 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): @fail= 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; \ ($(am__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" $(RECURSIVE_CLEAN_TARGETS): @fail= 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -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 $(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-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(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) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__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 \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__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 config.h installdirs: installdirs-recursive installdirs-am: 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: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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 pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am install-data-local: @$(NORMAL_INSTALL) if test -d $(srcdir)/pixmaps; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps/gadmin-proftpd; \ for pixmap in $(srcdir)/pixmaps/*; do \ if test -f $$pixmap; then \ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(datadir)/pixmaps/gadmin-proftpd; \ fi \ done \ fi; if test -d $(DESTDIR)$(datadir)/pixmaps; then \ cp pixmaps/gadmin-proftpd.png $(DESTDIR)$(datadir)/pixmaps/; \ fi; if test -f $(DESTDIR)$(bindir)/consolehelper && test ! -f $(DESTDIR)$(bindir)/gadmin-proftpd; then \ ln -s $(DESTDIR)$(bindir)/consolehelper $(DESTDIR)$(bindir)/gadmin-proftpd; \ fi; @echo "Failsafe for a mixed environment" if test -f $(DESTDIR)/usr/local/bin/consolehelper && test ! -f $(DESTDIR)/usr/local/bin/gadmin-proftpd; then \ ln -s $(DESTDIR)/usr/local/bin/consolehelper $(DESTDIR)/usr/local/bin/gadmin-proftpd; \ fi; if test -d $(DESTDIR)$(sysconfdir)/pam.d; then \ cp etc/pam.d/gadmin-proftpd $(DESTDIR)$(sysconfdir)/pam.d/; \ fi; if test -d $(DESTDIR)$(sysconfdir)/security/console.apps; then \ cp etc/security/console.apps/gadmin-proftpd $(DESTDIR)$(sysconfdir)/security/console.apps/; \ fi; if test -d $(DESTDIR)$(datadir)/applications; then \ cp desktop/gadmin-proftpd.desktop $(DESTDIR)$(datadir)/applications/; \ fi; if test -d $(DESTDIR)$(datadir)/gnome/apps/Internet; then \ cp desktop/gadmin-proftpd.desktop $(DESTDIR)$(datadir)/gnome/apps/Internet/; \ fi; if test ! -d $(DESTDIR)$(datadir)/doc/gadmin-proftpd; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/doc/gadmin-proftpd; \ cp AUTHORS $(DESTDIR)$(datadir)/doc/gadmin-proftpd/; \ cp README $(DESTDIR)$(datadir)/doc/gadmin-proftpd/; \ cp ChangeLog $(DESTDIR)$(datadir)/doc/gadmin-proftpd/; \ cp COPYING $(DESTDIR)$(datadir)/doc/gadmin-proftpd/; \ fi; if test ! -d $(DESTDIR)$(sysconfdir)/gadmin-proftpd; then \ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gadmin-proftpd; \ fi; if test ! -d $(DESTDIR)$(sysconfdir)/gadmin-proftpd; then \ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gadmin-proftpd; \ fi; @echo "" @echo "Start GAdmin-ProFTPD by typing gadmin-proftpd in a terminal" @echo "or start it from the menu." @echo "" @echo "Send bugreports, comments or questions to magnus-swe@telia.com" @echo "" dist-hook: if test -d pixmaps; then \ mkdir $(DESTDIR)$(distdir)/pixmaps; \ for pixmap in pixmaps/*; do \ if test -f $$pixmap; then \ cp -p $$pixmap $(DESTDIR)$(distdir)/pixmaps; \ fi \ done \ fi # 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: gadmin-proftpd-0.4.2/etc/0000755000076400007640000000000011024511045014144 5ustar mangemangegadmin-proftpd-0.4.2/etc/security/0000755000000000000000000000000007733307621015560 5ustar rootrootgadmin-proftpd-0.4.2/etc/security/console.apps/0000755000000000000000000000000010757353024020162 5ustar rootrootgadmin-proftpd-0.4.2/etc/security/console.apps/gadmin-proftpd0000644000000000000000000000007010757353024023015 0ustar rootrootUSER=root PROGRAM=/usr/sbin/gadmin-proftpd SESSION=true gadmin-proftpd-0.4.2/etc/pam.d/0000755000000000000000000000000010757352777014724 5ustar rootrootgadmin-proftpd-0.4.2/etc/pam.d/gadmin-proftpd0000644000000000000000000000021610635050042017530 0ustar rootroot#%PAM-1.0 auth include config-util account include config-util session include config-util gadmin-proftpd-0.4.2/pixmaps/0000755000076400007640000000000010757353141015067 5ustar mangemangegadmin-proftpd-0.4.2/pixmaps/gadmin-proftpd48.png0000644000076400007640000001153107611305442020661 0ustar mangemangePNG  IHDR0.nޚl pHYs  d_tIME1+|:IDATx͚Ydyukgg23wi9!-!6ı$yp$ oى!`"pFEZΐֳ6U^u䁣&|s|{RBsM5nYR nEgK@H( !~q/M~ddlzuq+Ct;ZZZl;W(<@4@0SO=hi⚒YY`cm,\˾}-WRo=I?ed^z?_8|d*Ab96A8r#LMΊ|TVJ=%l*LeD} ? t;/="p3:$ @hhImnZ8&Y,2|0H<GR^mYo>z߭(9%}ڨC.k`:ŜEr9ؙ,PCi&|.Scl0I$͏d<{Ͼ>#^Y=n,35=hcQJKH  P0m a㓢RhHD0H60=/{W/^*;Wҧ: #N@4]KX۱V,̏c:BؖFRBa*MdžC)e  `bbɧy_?uv^_GnmA$$A C'!x"33Y`jL\fRTrm q3.j-qs8|UQJu` ̳GlRhXnhy hC A)+Pa:(Ld@8#luP3>9[KN_[J yWƏH`Gq}um SķعzS1Njvp{v/}Q ;fBt).?͍ShQ_ݓȡ 혓}N]),; ]:B+'gL9E4m+O |u1q!rl!6pvn?ƈB*[[ {occ J<,fzr{=Q3J,3d]{7Rv<302"?8Fo?%0=&C8e.fi,/z]\;[wy,6L;/LÈ|$cq#6 6/MXp1aYT\XI &F q, 2,a6% d,@*zfNa/GFX,ekvu};K\fib)s:Pq.Yܜ:8 qysXhYs<8'qm-Y5ϡDFcۄ>i#Ơ$>&H@jxA] I gcf@;9JNјǏ8U{?/Ϣ"h&^_%>{47Vcwҷ ۭk7sřsg2 L7Z:dbNTK%,'M EB'(r&ԲR4N-gρ Au^8x*OH-jd,XNPlSu@uq%d6:rF$À ۸yLV 4M? F2G K<_ٴe0Aؐla7[K¯=1[SX $i*cPxJm%0:F`09f`;1RЭ "i@@P0 d*5AD" 22ZDP*R6S΅h"m"Y'#O˿͓0 $AJR"hI;Jާۄ ]:/ uEd {a%ᰧ60 P)Oꎝ#$I" V|u~^pMk;:׊dMu[&wϵ1L4Q !պ4S<*e]Uxh8zhqx#'1i"P(%^ym-N< G>Qe$B0'1DZ}!e7.L0m;o[y*:Zfx(^9~*OpVx)EP;3 ]F"Qۇآ~_4NE]3}^G5h"]b-KibwfٹsAsPB)z;Hy50J[Wd >MKu|?:G79c6d!?v9{i=Zȝ %$n76YxO5MDt!GDoyt7 QCma8"tQi+%0 (HHx$oK,SP(MhLV5י0m)֛:+ى!{Oj|΍,-^GQO5!^>~+NeCߔXHjml\mrL茘 \#c@i"$Q5av7#lȻ1jI%I<[77u+cŞ L]ꭕ.>/ bw8-Sɓ+یw q{b T*:J Y6K թt-;2FgprE 70i i(4l ,S`W%_;otP LnsV}7O|_ml]PNR8۶}˶?|K٠߶([J#5QcgZ[t6hN@7lpF=V=nTb.?{˅Ѩo.y`" (Y՘\,TJ_> VQxxonfde4м^Sԗ/#!7@eJsGhuVpZĥU!&Ϣ9EϠYt^s Mܝ yBw5]aTz\*}E)wl^\Cc:#{m#glS)¥kMnIx^"Eμ˵SQsDA6e2}|)4UF([I0 |vQ{:xmMvrt]~ܹ_%l}Vmj6sHFW$G$tz(,+os;:NR$I_[[cmm}їmwB֠%ސ$7oc89&2[oߺqu/_+j}sq;?M`em[W<:ـI*6 z#.wUyO k_y[Y]+۠ic8NXׂ 04y `>M \=#K0 (s8Ng? ܽ yfڧC7H}aVnUq.ݳc|q#9^.FǭVt( b4XR)7Agkk'x_kOjc=IENDB`gadmin-proftpd-0.4.2/pixmaps/gadmin-proftpd32.png0000644000076400007640000000505407611305442020655 0ustar mangemangePNG  IHDR Vό pHYs  #utIME2 w IDATxڭYd}.uo][/4L7xVaala)Jxd˖XyH %CDQ£%'QMJ!A`:ͳQtO/[UWխ{"D|oG>u}&tR@  $ρ}Dё; {KW{t5OgH$ jc=gxtdhPBܼzI..\kW[[ֿa 8@iJuۇ~{8p@ͤS"*\U7Ig ٯ*Q E"` H3'N<Ķeݬ06Z؛$IIJ:eBgRR$<kJk#Z/̾.R#SETH"`c{L10XFRYT0 <㧞|f%M%AǸD$eض$1qo}eϛ\ajOAt0\871511_x|Xm-$A7i-_}+QDlńB+Q ʥ C*#J& 繖qwè  |o|^9鑽DSқ5j͖G\id2:=9|jD>|DRD_G;qKѦH'\릙L%Rmqk4XЖnJѓ3Ȥ Ccee A62TA^"_]݀kwzuUoq ܣj_#DBl`X-!NU]۵d:zyVV7H)k;Zv=\jpZ7i{EN}?g8Hu8*FD^ڴZRQhu4 pbzb,/-ҵ%F:fo bUGY^|_~CBB{J=p[s*'E~^cD7Y'8 Kh`cNs܊Ƃ8s=3w9zPefsUB('w L;\+MvG5545qCD#ncQ,`u6B:/H*$2q&ݨ \gq-_:B^>'cS'А7#j @4۷#ږNtXۘm){#v# ;dK|e'F |  |sꁈ\V#bV7cZ]B*l{v'NmMU'ply]l{+BUǂp{7 q|6չ2_="?,N\ӡs68(<|&"l1=|+wo쉥hngS6w<8 K;Eel\*g0Eأ/SРH¡I8;\2x,3{dF~–"8J?(?>jnHJjIojeэTR Ʊ[BHElZA,c~/r7I\% yqꙩsׁDfc|nvJ(h``d|q~_9Tt,cuR&-f+rT~fCɅW_WݸJsmaQEQbbRʳ+Qjk)}6-%g8nVM;, nG# }\~/3s V)I%(Xd7rY]/_AЌr& Kn>o23("`yš4vՀDo|w3UEbi۶}TLRJq>'D2^UUo)l`nѺ1 c #606184", ", c #414053", "' c #202027", ") c #0C0C0E", "! c #575A67", "~ c #B1B5C9", "{ c #D9DDEE", "] c #CCD2E9", "^ c #ABB7DB", "/ c #AEBADA", "( c #A9B3D4", "_ c #8992BC", ": c #7378A0", "< c #666683", "[ c #424154", "} c #1A1A24", "| c #0A0B0C", "1 c #595E75", "2 c #878FD3", "3 c #A9AFE8", "4 c #DADDF3", "5 c #DFE3F2", "6 c #C8CEE8", "7 c #CED4EA", "8 c #C2CAE3", "9 c #B6C0DC", "0 c #A6B0CF", "a c #8B92B4", "b c #65688E", "c c #51506D", "d c #39384C", "e c #1F1F27", "f c #070707", "g c #4A4F5C", "h c #756475", "i c #7F585F", "j c #9A92AA", "k c #E3E4F2", "l c #E9EBF8", "m c #E4E7F5", "n c #DADEF0", "o c #CAD1E9", "p c #AEB8DD", "q c #A2B0D7", "r c #8F9ECB", "s c #7886B6", "t c #737A9D", "u c #545777", "v c #57566D", "w c #4A4A56", "x c #202024", "y c #050505", "z c #4B4D50", "A c #8B848E", "B c #965B44", "C c #914D2D", "D c #8D563F", "E c #C6BEC2", "F c #DBDDF1", "G c #DADDF4", "H c #DCDFF4", "I c #D9DCF1", "J c #CBD0EA", "K c #A8B3DD", "L c #96A4D3", "M c #98A7D2", "N c #B4BDD7", "O c #939AB4", "P c #7B7F93", "Q c #72737E", "R c #616168", "S c #424247", "T c #191A1C", "U c #7B7D87", "V c #AE9D9E", "W c #C58565", "X c #A27B6B", "Y c #8F7A73", "Z c #9D8F8E", "` c #A69292", " . c #BFBDD4", ".. c #C1C6EE", "+. c #CED2F2", "@. c #CDD1F0", "#. c #ACB5E5", "$. c #9BA6DB", "%. c #A5B1DC", "&. c #C7CEE6", "*. c #B7C0DB", "=. c #B6BCCC", "-. c #A3A5AD", ";. c #86878B", ">. c #6C6C72", ",. c #515157", "'. c #29292F", "). c #121215", "!. c #161717", "~. c #989AA1", "{. c #ADA7AD", "]. c #B87D61", "^. c #B58D7C", "/. c #A98474", "(. c #976853", "_. c #AB4E22", ":. c #9D8487", "<. c #BBBEDA", "[. c #B8BEE9", "}. c #ADB4E9", "|. c #AFB5E9", "1. c #969FE0", "2. c #A3ACDF", "3. c #B3BBE0", "4. c #CDD3E7", "5. c #DDE0ED", "6. c #D7D9E0", "7. c #B6B7BD", "8. c #8C8E94", "9. c #6D6D72", "0. c #4A4A52", "a. c #2E2E37", "b. c #131317", "c. c #060707", "d. c #191A1A", "e. c #838488", "f. c #947C75", "g. c #AE5D36", "h. c #BCB3BB", "i. c #C1C3D1", "j. c #AF9D9A", "k. c #B66F4E", "l. c #955A42", "m. c #927D81", "n. c #989DBD", "o. c #959ED5", "p. c #949CDC", "q. c #959CDF", "r. c #A8AEE5", "s. c #BDC3E7", "t. c #CDD1E9", "u. c #E2E4F1", "v. c #EAEDF4", "w. c #E5E7EC", "x. c #B8BAC0", "y. c #7B7E85", "z. c #595B64", "A. c #4F525D", "B. c #393B47", "C. c #2F2E2F", "D. c #342D0F", "E. c #544615", "F. c #51410D", "G. c #111213", "H. c #575961", "I. c #71544A", "J. c #9D5635", "K. c #C6C3CF", "L. c #BFC4DE", "M. c #A78781", "N. c #BF9383", "O. c #B1ADBA", "P. c #9D97A2", "Q. c #8B5948", "R. c #867682", "S. c #7C7EA5", "T. c #7D87C6", "U. c #979FD9", "V. c #BDC2E9", "W. c #D0D3EF", "X. c #E0E2F3", "Y. c #E7E8F1", "Z. c #CDCED2", "`. c #9A9CA0", " + c #8B8E94", ".+ c #858990", "++ c #787977", "@+ c #746D52", "#+ c #9D8C4C", "$+ c #D0BA65", "%+ c #E6CA61", "&+ c #CFAF39", "*+ c #816A17", "=+ c #2C2305", "-+ c #060607", ";+ c #292A35", ">+ c #4E4A5D", ",+ c #887B81", "'+ c #BFC3D4", ")+ c #B3B7CC", "!+ c #905C4B", "~+ c #AC7F71", "{+ c #C8CADE", "]+ c #BDB9C3", "^+ c #BD7A5C", "/+ c #9D5F45", "(+ c #894C34", "_+ c #85686F", ":+ c #9298C2", "<+ c #B3B8DD", "[+ c #D1D5EE", "}+ c #CED0E6", "|+ c #A9AAB0", "1+ c #95938D", "2+ c #99958B", "3+ c #89836C", "4+ c #8C7F4D", "5+ c #B39D4C", "6+ c #DCC25C", "7+ c #F6D96B", "8+ c #FCE177", "9+ c #F7DD76", "0+ c #D5BB55", "a+ c #8C751B", "b+ c #4B3C07", "c+ c #1D1703", "d+ c #07070C", "e+ c #23223B", "f+ c #5C5C81", "g+ c #9397B8", "h+ c #A2A8C3", "i+ c #82635F", "j+ c #974E2F", "k+ c #9A878F", "l+ c #9F959E", "m+ c #BC876F", "n+ c #ADA3A9", "o+ c #9C949D", "p+ c #8E5B47", "q+ c #907C81", "r+ c #B8BFD7", "s+ c #C7CBDD", "t+ c #8B8E96", "u+ c #726F63", "v+ c #84754A", "w+ c #93782C", "x+ c #B99422", "y+ c #E5BE3B", "z+ c #F9D359", "A+ c #FED963", "B+ c #FAD658", "C+ c #E1C148", "D+ c #AF993E", "E+ c #897724", "F+ c #766213", "G+ c #594C18", "H+ c #1C180A", "I+ c #000101", "J+ c #04070A", "K+ c #0A0C13", "L+ c #26243A", "M+ c #55527A", "N+ c #7879A3", "O+ c #7B7E9C", "P+ c #6C4E4C", "Q+ c #78554E", "R+ c #7B5C57", "S+ c #B16542", "T+ c #ADA4AF", "U+ c #BBC0D6", "V+ c #9E807A", "W+ c #A1786A", "X+ c #B9BECE", "Y+ c #8D9097", "Z+ c #42413B", "`+ c #413616", " @ c #89660E", ".@ c #D4960B", "+@ c #F8B612", "@@ c #FFC125", "#@ c #FDC233", "$@ c #EEB731", "%@ c #B59122", "&@ c #735E0F", "*@ c #77620F", "=@ c #816C1A", "-@ c #443F32", ";@ c #112162", ">@ c #040C2D", ",@ c #010101", "'@ c #0D141B", ")@ c #111B24", "!@ c #0D151D", "~@ c #0C121A", "{@ c #21212F", "]@ c #44415F", "^@ c #56527B", "/@ c #61628F", "(@ c #6F7698", "_@ c #845242", ":@ c #9E4115", "<@ c #9C5C42", "[@ c #A28A8A", "}@ c #B58876", "|@ c #B5968D", "1@ c #A0A3AD", "2@ c #7E8187", "3@ c #564F34", "4@ c #5A4709", "5@ c #614604", "6@ c #A56F06", "7@ c #E59A09", "8@ c #EA9F08", "9@ c #BE8408", "0@ c #765305", "a@ c #6F5507", "b@ c #957912", "c@ c #615524", "d@ c #152050", "e@ c #011A88", "f@ c #0020B1", "g@ c #031352", "h@ c #060606", "i@ c #020304", "j@ c #141C22", "k@ c #080805", "l@ c #010102", "m@ c #091017", "n@ c #141620", "o@ c #27243B", "p@ c #383263", "q@ c #484479", "r@ c #62444F", "s@ c #72504D", "t@ c #7A6B71", "u@ c #89523D", "v@ c #956557", "w@ c #908790", "x@ c #767985", "y@ c #6E7280", "z@ c #302E2B", "A@ c #3B310E", "B@ c #67500B", "C@ c #6B4E06", "D@ c #795505", "E@ c #7E5804", "F@ c #785705", "G@ c #9F780C", "H@ c #78611B", "I@ c #222953", "J@ c #041C90", "K@ c #001994", "L@ c #001EAD", "M@ c #001EA7", "N@ c #0F1C4F", "O@ c #1D180A", "P@ c #050501", "Q@ c #453B11", "R@ c #716222", "S@ c #191603", "T@ c #0C0C0C", "U@ c #080C11", "V@ c #0A111A", "W@ c #090B15", "X@ c #1F1C36", "Y@ c #35315A", "Z@ c #3F3B5F", "`@ c #494569", " # c #5C6083", ".# c #626681", "+# c #666D88", "@# c #5E6474", "## c #50545F", "$# c #4F5362", "%# c #141A34", "&# c #05114A", "*# c #181B32", "=# c #51400D", "-# c #7A600B", ";# c #A8840F", "># c #947415", ",# c #3F3830", "'# c #091B77", ")# c #001EB0", "!# c #001EB4", "~# c #001FB4", "{# c #011FAF", "]# c #2A3365", "^# c #987D23", "/# c #735C0C", "(# c #1C1701", "_# c #AB8B2B", ":# c #DDBC4E", "<# c #524715", "[# c #080806", "}# c #020303", "|# c #030507", "1# c #070B10", "2# c #050508", "3# c #12121E", "4# c #222136", "5# c #302D48", "6# c #383454", "7# c #363556", "8# c #414664", "9# c #424855", "0# c #474A56", "a# c #454955", "b# c #0F1840", "c# c #00188F", "d# c #001DA6", "e# c #05114D", "f# c #5C4A10", "g# c #B18D13", "h# c #393946", "i# c #00157C", "j# c #001FB6", "k# c #0024D4", "l# c #001B9E", "m# c #081F91", "n# c #3F3F4C", "o# c #BD981D", "p# c #F4C217", "q# c #A27F0E", "r# c #211801", "s# c #C49014", "t# c #F0BC27", "u# c #62500D", "v# c #030200", "w# c #090701", "x# c #060501", "y# c #070B0F", "z# c #06080A", "A# c #050506", "B# c #060609", "C# c #1B1A26", "D# c #312F45", "E# c #2C2945", "F# c #292747", "G# c #343649", "H# c #3A3D4E", "I# c #3B3E4B", "J# c #0C163C", "K# c #001888", "L# c #021679", "M# c #594A1C", "N# c #A68411", "O# c #2F3251", "P# c #001890", "Q# c #0023CF", "R# c #0120B8", "S# c #142061", "T# c #7F6A27", "U# c #E5B717", "V# c #FAC718", "W# c #F6C316", "X# c #9B780C", "Y# c #0E0900", "Z# c #A67202", "`# c #F1AC03", " $ c #513D02", ".$ c #1A1602", "+$ c #7F6E1D", "@$ c #695C1D", "#$ c #13160E", "$$ c #0A1119", "%$ c #030406", "&$ c #000000", "*$ c #0F0F17", "=$ c #29283D", "-$ c #302E48", ";$ c #2F2E45", ">$ c #2D2A42", ",$ c #2D2B38", "'$ c #262218", ")$ c #14182F", "!$ c #021670", "~$ c #001571", "{$ c #443B24", "]$ c #B59012", "^$ c #4C4643", "/$ c #001CA5", "($ c #0322BE", "_$ c #4A464F", ":$ c #BB971A", "<$ c #F9C71B", "[$ c #FDCE27", "}$ c #FDD021", "|$ c #E7BB18", "1$ c #755D0A", "2$ c #010100", "3$ c #342400", "4$ c #845B00", "5$ c #140E00", "6$ c #473B08", "7$ c #DBBD40", "8$ c #CDB446", "9$ c #383511", "0$ c #172837", "a$ c #111F2D", "b$ c #05090E", "c$ c #000001", "d$ c #050507", "e$ c #121218", "f$ c #23222E", "g$ c #282536", "h$ c #242022", "i$ c #4E3D0F", "j$ c #5D480E", "k$ c #352C14", "l$ c #080D29", "m$ c #2E2922", "n$ c #B69113", "o$ c #6A5B30", "p$ c #0B1C71", "q$ c #72622F", "r$ c #ECBC19", "s$ c #FDCB1E", "t$ c #FED747", "u$ c #FCE062", "v$ c #D6B93A", "w$ c #7D702A", "x$ c #27281A", "y$ c #050300", "z$ c #443504", "A$ c #E4B624", "B$ c #E1B929", "C$ c #3F3508", "D$ c #111D29", "E$ c #253B53", "F$ c #243C52", "G$ c #111C26", "H$ c #0D0C10", "I$ c #272530", "J$ c #221E1D", "K$ c #4C3A0A", "L$ c #78590A", "M$ c #795B0B", "N$ c #53420A", "O$ c #483A0C", "P$ c #907414", "Q$ c #8E7419", "R$ c #F0BF18", "S$ c #FECD23", "T$ c #FFD948", "U$ c #F8DD68", "V$ c #C6B665", "W$ c #B4AF8F", "X$ c #B6B9B6", "Y$ c #6D747C", "Z$ c #020201", "`$ c #231901", " % c #C79306", ".% c #D09D06", "+% c #261C01", "@% c #07080B", "#% c #263D53", "$% c #365572", "%% c #273F54", "&% c #090E14", "*% c #010202", "=% c #0F0E11", "-% c #141211", ";% c #2C2004", ">% c #604506", ",% c #7E5A07", "'% c #7E600B", ")% c #866C0F", "!% c #BA9512", "~% c #D9AD14", "{% c #EDBC16", "]% c #FCCB1B", "^% c #FCD73E", "/% c #E3CA58", "(% c #8D8348", "_% c #6F7571", ":% c #E3E5E6", "<% c #FAFBFB", "[% c #B6BBBF", "}% c #040300", "|% c #483400", "1% c #533D00", "2% c #1F1F1E", "3% c #262727", "4% c #04080B", "5% c #192836", "6% c #3C6080", "7% c #365775", "8% c #182737", "9% c #04070C", "0% c #03060A", "a% c #0C141C", "b% c #1A2323", "c% c #25210C", "d% c #4D3804", "e% c #795C0B", "f% c #896E0F", "g% c #B38F12", "h% c #E7B716", "i% c #F5BF15", "j% c #ECBE18", "k% c #AF931D", "l% c #484728", "m% c #334D63", "n% c #597690", "o% c #C9D1D8", "p% c #E0E1E2", "q% c #7C8B9D", "r% c #010000", "s% c #030302", "t% c #2C2B2B", "u% c #253D55", "v% c #365372", "w% c #2C4059", "x% c #23364B", "y% c #172636", "z% c #0F181F", "A% c #182426", "B% c #25312D", "C% c #3F3613", "D% c #725C0D", "E% c #9C7C10", "F% c #AE8710", "G% c #D6A713", "H% c #7F6917", "I% c #313B39", "J% c #3E6182", "K% c #48739A", "L% c #3A5A78", "M% c #38434F", "N% c #47494C", "O% c #020202", "P% c #161616", "Q% c #101A26", "R% c #243448", "S% c #203144", "T% c #030609", "U% c #040301", "V% c #050706", "W% c #1B2C39", "X% c #2D4253", "Y% c #333119", "Z% c #68530B", "`% c #4E3E0C", " & c #72693E", ".& c #8F9792", "+& c #708699", "@& c #4A6D8D", "#& c #0F171F", "$& c #222223", "%& c #050A10", "&& c #070B11", "*& c #171303", "=& c #5C511E", "-& c #494119", ";& c #121615", ">& c #344C68", ",& c #304559", "'& c #141919", ")& c #333738", "!& c #BDC2C2", "~& c #F5F7F7", "{& c #CBD1D7", "]& c #495868", "^& c #090E13", "/& c #2D2D2D", "(& c #4A400E", "_& c #C5AE4B", ":& c #AF9E4B", "<& c #312C0D", "[& c #233344", "}& c #39516A", "|& c #152334", "1& c #4E5863", "2& c #E8EAED", "3& c #F9FCFC", "4& c #BCBFD2", "5& c #252639", "6& c #020000", "7& c #57460E", "8& c #DCBB37", "9& c #CCB03A", "0& c #40350C", "a& c #121B26", "b& c #2A3C52", "c& c #121E2C", "d& c #36404F", "e& c #AAB1BA", "f& c #8FB8BA", "g& c #372901", "h& c #D6A108", "i& c #CF9C08", "j& c #302402", "k& c #090B0D", "l& c #10171D", "m& c #05080D", "n& c #0D121A", "o& c #1F2732", "p& c #0B0800", "q& c #805901", "r& c #8B6001", "s& c #110C00", "t& c #181713", "u& c #272725", "v& c #0A0700", "w& c #0D0900", "x& c #030201", "y& c #2C2A22", "z& c #3F3D39", "A& c #0E0D0B", "B& c #3D3B34", " ", " . + @ # $ ", " % & * = - ; > , ' ) ", " ! ~ { ] ^ / ( _ : < [ } | ", " 1 2 3 4 5 6 7 8 9 0 a b c d e f ", " g h i j k l m n o p q r s t u v w x y ", " z A B C D E F G H I J K L M N O P Q R S T ", " U V W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.). ", " !.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c. ", " d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F. ", " G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+%+&+*+=+ ", " -+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+ ", " d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+ ", " I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@ ", " ,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@ ", " i@j@k@l@m@!@n@o@p@q@r@s@t@u@v@w@x@y@z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@ ", " P@Q@R@S@T@U@V@W@X@Y@Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#!#~#{#]#^#/# ", " (#_#:#<#[#}#|#1#2#3#4#5#6#7#8#9#0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q# ", " r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K#L@L#M#N#O#P#Q#R#S#T#U#V#W#X# ", " Y#Z#`# $.$+$@$#$$$%$&$l@*$=$-$;$>$,$'$)$!$~${$]$^$/$($_$:$<$[$}$|$1$ ", " 2$3$4$5$6$7$8$9$0$a$b$c$&$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$ ", " 2$y$&$z$A$B$C$D$E$F$G$i@&$,@H$I$J$K$L$M$N$O$]$P$Q$R$S$T$U$V$W$X$Y$ ", " &$&$Z$`$ %.%+%@%G$#%$%%%&%*%,@=%-%;%>%,%'%)%!%~%{%]%^%/%(%_%:%<%[% ", " }%|%1%}%2%3%4%5%6%7%8%9%0%a%b%c%d%e%f%g%h%i%j%k%l%m%n%o%p%q% ", " &$r%r%s%t% I+&%u%v%w%x%y%z%A%B%C%D%E%F%G%H%I%J%K%L%M%N% ", " &$O%P% 0%Q%R%S%T%U%V%W%X%Y%Z%`% &.&+&@&$%#&i@$& ", " %&&&*&=&-&;&>&,&'&)&!&~&{&]&^&&$f /& ", " &$(&_&:&<&[&}&|&1&2&3&4&5& ", " 6&7&8&9&0&a&b&c&d&e&f& ", " &$g&h&i&j&k&l&m&n&o& ", " p&q&r&s&t&u&h@l@ ", " &$v&w&x&y&z& ", " &$,@A&B& ", " "}; gadmin-proftpd-0.4.2/pixmaps/gadmin-proftpd64.png0000644000076400007640000001731707611305442020667 0ustar mangemangePNG  IHDR@=obKGD pHYs  ~tIME%h\IDATxieYu|jnzl1m yEc[bɑlEb'?Dq1!C37K{[EFzqS  B=KKcg _dgYQF ^`B b|c<~yC_>|߯o0*i&p]I`<(b D!p\*~\,&m{Eʥ1Q{ҔǓ$xgeO`?9>>~~twS.L;TkZ *6K`#$SLN0L0-8ĩFJ98Ky/NǢ(O)ؾ{,!wU=XW8aoRLUF  x Q׎2\@iض00TrMc~{Ko U {bP?w|wrOs|8{e&T I5cb4a`{&I%TaSHr-( ЊzEQ(+~8(6l]|]ou=|׌V)_&^* bԡd$4YR1LIhaH CJF XtYs۶p\xI+17z~mi e[waa~.p.'B<ק?4#28YiJ, q #Eh%VKK>RBV-#HRHjcuf Q-ϳi`h:70{X& e /8U87u9SkUek'%2%iqRq ky9pW;xeI)%a.B-J#k^$|]ww=[h1xKQM~xgG,??76iJ| 4ݞT4A P4U!L+e $Jk(9Ji|L\mqV3`3}{[8z()X?< " E!6}+,QskLWȕzHl縎d0 EdaN/Ŷ^EyecZ si@f(4ΑҒ),{0@KL׀| 7F?w'ɲeu?n˜X`qڽU#c ;i0ւ 2E5df0TLT!Lp,ۖiG# IF$irp@L̘I2erG5G.sQR ̯_4 E%mZ)؅:*OvwU+"KA: R_iI+%qE)<\Wfog3 cQs8˸Rcg-'-Ewm'zsjhFig*`lv6H*R(ZĒ]fnL}"\xI&6dp'Lt$(l̞Kly61-ytY[[cu},KJM0HZzY`+'l;o.}5ċ/_kG!2_~d@KkؚM G挛>ʧoagqve}(י;tAz.էϰ>l0'o')A1 CI|0L)I lK ZWlP,9r0YhvZ?CؿJm[Mb\r1t$E(/krݝ@~ Xn znccRq-V`mH;C' 4 EvƾĶLLf8sdʴyW?un| fNf$Na_bi[2?[GJݽe6V/V >G'(S,ض4L10viu"K?-I?ԇ*2o4%qrwZ;R273>I%dY9J+9ۏNk^hLŬϑkg(P.;X0s3=MK]e7bĽ7Ûos>j !$|H#ַ3^8s\`٧^qdT/k2\k5EQǒ8#S+ibKnqy/f(:<ܝmLZ81@Fu5[JI1PQL;`|NɥvVBQ1f? lKDY\4}#~HJ[L0q =/gxf_Ip3STHr}6V?B#sxҐ/"\N_ʋ.4nd/=A&=7'ai 7F896{P*' :;R H.W|ʍGVaxG{?L*T8~?6[SО9+W\c߾N3~DiQOh4SA7\ytS)x}n;g=L'=Jf 7Q$IUk>84G´l_}5Y0l5Xk%J Uj5rS yʙХoﱏpSk&_Į0ަZG!B(&, VR#a04;&,J&+T)֚ghDpFY &gi N50(PE2TgjW+VXy14?b}Kc{0 (v ǚa>q+>&sh @V[^c:>CֆG O; _x5ee`iέ8mrI͓<\h,N@A ,ˑf.T߬ ֦.$9h!YdyΠ!%`"FyS"xkBK}%"0ayy0Øvͅ K,74)5lރ$o[<ɇ?agdν`N@8 =0'A5Yfqߦhvնk+S)o{VėauCS(Ұw2)a$5"~¾ * L^`0 #I"'.qe};ƼqfL&+ ?|'d'1RTuL@-j 3+^e_MJz{3Ő,tؐ?1`+BLMMm7=Lv$!s.Q' =~@١QТ zTsp8dccXf{!GXZn҅]*EZ*~}x>~u:=͟-o yff\yl9 y8q@'UoN=ͥFET=4o-ji<m7( S8BX6RHBc1a0mT~L[كvk1!b1, 'H qMe y@V=\%IØE:\S~.iҠG6I q0D/SLQLb;J<' #9+(UGETCj,A_N ȟy\o {4sG+,7!.p){d*MP LJ+c 5m zJ{]v0Lab$CZ Gq Y=VضM Zؠzoⴃ@*ӭ!m!yڣфS<~:A cV;͑A{ģ09w(s)b\xrS6Wc%hmAh\:mRmS*֐! (CjEt`̥{Y&͞D0Q:o%"3>UZX囑 +!y4Oj8r*)Y|wFFۄzQH/*!u/OLjgi7uyzJɲCGhL\]0ULC^tmi#D較=Ʊ}\d hidXٳ \L*ռ=G_֌u p4&NF>Cyb4 t/_Y:ϳ(s*e!y-qlILL.%,2!\ƶyOXqw!( ?&N‹g뭓,|+'e)omvl~vioa"a/$D&RhT&樌қ?3lnu~Jᰛ5Zu0L8 qMe PLYLTmN\hLyxEw8p 4F>G/?ЃǦ(/ΞڂH<Ϩ?p ڐRJ˲x񌢝If[-:KD6WįSg@ [ۨ,f Zk+"Neu{$q![j 4R r$dq֤ W@ҟ{4W<.__>Goy+o{T%|fo%B)CBpqVXYN4{T ˚9 sXRy̓PQ;Bej4MؠYG:a,A( cT01 je-$3?os1j237n<@_s(G^SJtOVMPiT/d%,g4~ ڣX_.XXXХRisg{뷓h8ۘmJò5$yLGqBJP3sT'. mV7bdP)4!pA|cjtфoo/h2sۻyA2(\:zǶ菾J|3BQ7e^ADMPS !4MI<lo\^GnǫP(S(U+Ҙ=H6V$"mXFY$s, ,S$0TTW?bc}E6YmrΝyGeأҧZciF)Q#ᇀ3S>f 4M>gt3hLަfP@`w/-mtO/~x nΤ!P}V  ya'a@{{JF3x~W}s~h{<'NCҬ+46U n!ܺ(FΫ__6.n|BKYmaZUc;J鏵/kw<(%J/恕=_?Tt)\JِBR>~-]*~]=.G|drLiqx0xu60:RMul\uS^7G[1 0^ۚav`8J Rk8LIENDB`gadmin-proftpd-0.4.2/pixmaps/gadmin-proftpd16.png0000644000076400007640000000145507611305442020660 0ustar mangemangePNG  IHDRsO/ pHYs  d_tIME0-BIDATxڍoSetNOGiK׮]eX3p 7{h^I0Y $M[dt?Lh{hwyy^ܾy)KqZ;EB<-/;62G ڝC~^\`u.-еwB믮CFQLszhdy1a|}H cl|re)%]уy2t ]Ǯ|#G)r0J~Zk~*ޗC7P@ lx?N(dIhҴ~#T۵gNmnm8, _&b(j q2ۖ6%1IGn12108}l7+)NQo_C+;Ҍ 'I$HZ~^ʇ}>._1b&Z ꟨cY`PLRߡfLq :~ڗs`*!Jc Bt[{c7˽ 8ߟ)>}tMв\,7NdI_K0딦LWZE"y7b #B0Vo;9fK&?-Qگs39 i}Z^/Gz` Pݾ tZi r_$IENDB`gadmin-proftpd-0.4.2/pixmaps/gadmin-proftpd.png0000644000000000000000000004632410367373004020244 0ustar rootrootPNG  IHDRZ= pHYs\F\FCA-iCCPPhotoshop ICC profilexc``2ptqre``+) rwRR`?> v^~^**`d`v D20\@J.(*(%8h]^Rgd$e@좐 g ͗a_ ' v@t0l-bVep/,L(Q0TpLOJU,.I-VK/*/J,IM ! A!h@es 8|  LƄ3H00/e``3e`X?!f o³OgAMAaLA cHRMz%RX:oZKIDATxb?(`xb Q0 ?ь> F4G( F3(#hF``@}h4Q0@fQ0 Fь> F4G( F3(#hF``@} ##h cϟ ?0#P#2@gN#'FbF?rl?h ߈AlFxA!7ҔĄA FlF?y)y]03_pf%}%bP aPa 2:#<031[eE#*@#*?z?3@242hҠ4[)!LLǰ31ӎ()L p/H__pۏ`o?A}ь>0032032313pLL`.A/tOH@G0 p2J肅Vݧ u.ZA3&*ZXOgA'g O:M K`34B?B#_㳰@2>'0Ӄ3>yj惚tR júk5CY43:(#eZ{Û|G3hezH\l @ iZwp$kjmB>А(4_1߀p= 3|G3(FͻC3;CA 6ݗu <(РؚA6PT{2K`sç7ࣀ}xPS65] P`&Ww}fvqat4هf(y;TdϿ@Ɖ ?hjwPA]6P} DetVX&=e@kwgvP谽/m p&mFGPLoA/h:nH5hˈ<(Ѐdtdh?h&%ywep~5tqq'.=>Tx| YJ3@l-50XF_2E hZ]3/tЈ=}?G젴 >:y oK.@@,l@OfFGG4 4"*gDA>9 G]ic쓃j;DoѠLHϳ^_T1"myj A#%@swcxx|9dI7'8O)*{ A:š?ԬAP@į+ܞWm| &߾)om*}@tt @ugV/p/> Lܠ>(c׷ ?aÏr`f~&f6`f`cv.AVPg !æoB : @1|#D}6?dhGɡTskhP5}x4$k|fv!.> N>qN^Qp >rAiT\T_1Pi$a%'\aG?O/{#(W_ŀȠ#~f4:Dզ7Ag v _>$ڔϮҬd=Jicv}3'Lvz(3, YẂv/an5kt]_O\O?2{~G)X26Hw4\FҠ(Pef|_tELXs3<3hejwX>F~ ~1\zmƿΑՄqZFy>P~p6}|}͓h/0ڣ}`2:40+ 3|b<(s Hkxq6nAV# :YMxP 47t#XcxVgrD-*%~ xq_epXB?0L/R> ` A N89UfBPzlفhfxPsT D펯 Nv^/JDq[&uPsUppȵw>cb38 P4#G T^< ڜ90fd\B@Ai05ف}jc4´Z&<(}1 ym&;hG}Lj3Upa+ҠL)#ߪ9Z\#er^(<ٹ$Ԥ ԁW97AcI?ekfPԄqkw9?ӫ ^.S%)fOP* >G}t6A<֒*0g4цf /7Y!z31*MxF_&Ю'/A;9kf/n0zW-?@P1&/$=&2; ϊṡ5;4ð f,@h%hTs3n0h?n[Dv vT~Ex0erZ/R Z{{hOPoH}Hqp:#R>и!i߿103h DJFlM; 7A+chz$2G"F3BoG;9js39r-)?BAXF3Шamv~ZyEjAq "~@< Jנ>?ήIJV} jջcg]_Iȵ8oa_p? p$ 0v7ڷ7U* Dh;@uƟLZ?~#>'AoS.A]~߼Jp$g_@π4J=9Gچvu~"uC9r:xL߿&xm >]#Yrz>@)!hRa% JNt}mNV& AWPqM9Z y~}Tل~1}f2VC.X31rHft.}७鷤drZ֯Gt]ږ 7b;UI&<#x ; Z- ^9.;Ό@D-th8`&HvDۇ _ݦ$ԣ`dvl*twp_< N`tl rZXK!"ֵAȁN Z>9$m7ͱGL> (Z J9``ZDOCW54 +>A[@[Nz^Eg}b@L=䣀ZEe ZmP> >Kۗ3 vFqQMOehM$>}_m:˻?SF3(f3v4]'x! T ^1cff /U۝w^'"FgQvP&rwzd0 N䣀 ]?|z~:lI,'f6X΃M_DTd_?x+N)5=4s6?" NfQ@nfG^X@htCvA@+@yq%BhFG}DL@@;(vJ 6_mA-BL> /BYjpP[ sZΉT'`F]t|9F7͛Dȫ#erL> Q0BלjsHkKh|;Y #< 9w"a>:8Mf;0 As>W2VS0|P#;A?8C@19rXpz$oŰw"Xϱ-{ joOi$ 6͑|tY(G#l Խ7YWEjw`?]D(aMwPF{l-L]tOm 68/4 ܖK&&X7ؤf{NȄ4 #>:wbtsAA[Q 9MxPәZ;k#,HR@V!s Q4ϳ{o>dR3@/ ygW?GgaE!8# @L^^ڎ`z~G?(Ѕ@A"8!CV38 RZiHw~:@LD04P?پ1́?#e|гVGf@:ZЦ;~:@죷>rj N5Pߜ.hy$lG\a6W Zm?z?pqWFg7_@(Ã?+,jtQo~Ƌh/(@E2<|΃ $3`0 n"_ !?hty|O @8L N2?? l-ѿA3;m.QMw9û@3HAwёkAl 27x>ğWK8Q`ZLCٰ{XoeP4ab԰:J@*CoGDBB6RgY arLC ޿?!;|' %sКrQw>Bt(AASk#NBȇ&0HlE7@ Ca206l5:|=P$7wސ3POfVпH`N^덂j.>#4DZW3BZSk8_o $X$yM@ֻ33 @,C ,3?|ͦA?10m??/+tCoje4?gqhJ¯tؿ? yAl~9(ьNE l1C i?` >:llvi4f> 1j##úk>j4jt$PpF}HꛃviQl@2# ߃t@ |=uvGW_Rp#(Blp YaNdB{GW 4J?FZwhA=T5:33 ])( ] GLr9ЈS+d:;X  <*Sbaa`ebCiTj8~ACFdϴ'#=R M#Ha{ ;e`LG #*Czv'&C_<\l ܜl ,-'u#0o6ۙWIJ{ ̀}cpBA'Z-| Ac;krf&H1Gق]v/31XgAtUc6%j8ܵ(qHN00 v 6,A>:mÀ?}0u'x_8h,a\9C | + ol x@61Zlqpj! 9E_ ~|v8^@83q s_-zK'jX;F].l6QW h{ߧ/? : Ϟ=_Vs \=🙙 \Bnd9AMT0A|0(Ču ΢!SGL.+h0ASl,~:TX\W T`=o^Co0|y~7|6hKGٸ#n`2etZ? Zc%$elaX@ БDf]9Y9yؾGj875÷>俾|I;&^Qp܁2C q~1ްZ>Ό4B&Np djqXMNaYXٸsꠁ9P$ȵ:1}|qS  <J Z =|ZwԠhA=7kc3?1:oF?8]v h] nCe@ kayâ\;COʀAa ga}}z5/,}6%6Ki2ڍ?pb@H ?zԣG?,UrOBcft)bY Vb9 b~;^/2qgdgLv[Ѭ^ ɵ`[Y~,*Kw/ZF uoT_^~ oJs3^Gi6bXyPR3v d_w3|A2\ 4 ;lkȍ/zl\`ѣ)0?=v r9O8pDXCP.9 | {evH|G?_DeAT_BP'`s ~Axoҧ,0|yD ϱey QC4 Z8X,S6{jyUq}24e;t`P T ~o߁ z#fP o~~y>${ozoѣَ܍*Q@H2?`Fңug)nA9N1w4r& P lRSJ BBBo>!_9AMwz4qDA :~o`/ |.Z_Wխo 6B=o2w_͇o /5+Wp} W6BG{t2F0~ @#&h@ @+s whx </v1֬0d 'Ry.ILLo?`x û9h(a~_e/H5Ѡk??l!(hGҢ &!|4%LC3NFA4y*PRA#񰩭!Mv )As_fx+&;vxe_2jkrp,(3v. *6Sw@젚m$ecgnGjnH{i8@7(A @-G/>ksЈ;*0|ya{>Y`U|(0ecԁL(%#%?#,cx'Os-qb/ K1<]PҺ RVoM.@CZr& P z30O?>*02O'xWw%}D$N#/rfk惖ӷ} @LDd~iW?a޵:}t$dvP->ދrD7h ~`xA&Q?C3G:Y]a T8ҳ#[1|~}&@RC?d 젓iY @}r %lA }39Ih"57& @2t Cx8 ^}\Gc]`/`}_@2;'8ӻg.v4(P& {d( aj?} k&鴧 ܣz @,$=PjuH- 9+?,ü : thvUHڣy]jP/`M!s z-څyɉoj~>Za x `~?wdrD ‘Z&@1HaSm@Gc E|btFI!\HZ栩͑39h`So?zp]i_[&Gi>U` %AdU@9##3#;5;_~[N'ׂJmA;xʣԠa @~Z?- ?T*z8c@v}Ej\` YCī{'[j9f9 fШ73H&AD|cY" -4& J2:J~RK$@70/Hdߥ،g[ꛁ2s9!aL`u`cSŚ!exfz؊6FF: r7AqE}h9e;[ d'IyrKqcxnzj80k![hXjsH \Diܿ@5940jwPV}e ĠZq;#x A.[|Ҁ^V17ROJmdl A|(0/v@NTkj1QHlD ?`35Vs`38j8~Ë _="*&IByޙծ }uШ;hp|7ˀ exPss2p3=7x )9G10g݅@j#rH ]@v??@kAW0@arЍ+Ǘ8"erP ܦ&zp22pdO i GP jtp#( I'xNU U+0 E겼.l P0 >t6h 4?@uBt%G֟9wPـ|h=/v=.&hI] &@jo>fR'"o7hb|5MMf'`whP4 *awࠂD8vCV;p#y@Q#v h70C֙ i3;raMZԬ`7A`2fc`7A?p`I>|$a̍_~ &O<-YMM8xH&aРՀ(@M/oop-g X Ԉ>x? /#KfǗA+(ӳ3kyXѠz0iVe~X͛TDD#qk#s`aP+0 gQ~[jZZVfiMs@/<`2=#GlpgccaMy4Hk84BO4l&^L~G{Oރ@M߾#,S*bPKvpfz}ojUJum9 _9LDo8Aܶ GP7ԘbM~H#hˏo}x>|F߁u8?B̠;h |%#6 +,A%4,)m@Q;c+_w">'z=4QF.8? eWHc5a XK㙠02EͦMPiƏfr~9l3 66o}u- gt ffl`f:هtD4z^qKJ4euQFׁ-R@&(;U Ns}hfBO9!h#@Sh>>{8Dˌ_}>3Gh|)L Cݷ+@:Ñ cL'^ ^XZu' Tt~43a54q@O5h4t39fNyVմGb@1TRm頝_ޠSY%XJDh2h +'6cec߭9yvLX)~MMM-}C-G\ DGF'مd&Ã37$f샣I tDW7> zerXF zet]PJk2nfp?O_%]h)?LdrQO LNV+'ALDόNtff`S[K@ %GC :v=&mAY} ̍)XPKhX–<2:@; a;; .sl@>+hNB ӫ {3v_:A~! *A'' ag@,*Mia "^ Si3:8(x$> @ĉ~1#`n耖y^Ϳ%hvwzdrXF2;^s1 bq`fo@X" l\K7}S-gCv G.$C=ɤuѠ<@ѱevjah.E%3A \4kfK'$ ߠer v(@gt)^RÏ O^u3꨿? epOg,ak δ=Ay CFG+8م] J 3|ep&w@^6<6ǥ H:O>ϯMsP}B6K-> Mul KFevVvhS)B𠦽0çbfxf4hul\ =zz(fzdp;Imf"gp[Qå Ǘ{U'oQuu-`١My^:af$lrڝٹX9Xهŵz%PX39%aw p(쾾{ ?ÐBVCܰ-`]$ X u=(ӳs ް3< h 6AQ#P;8q|+ Do7)"28,.55!@x2߃n8 ߀O`s " I u2:@ ֌)H\ZCk~2Z yyf|o_16R'3Ú{-p53a22fpP?t Z0$~~{ '4'| tS[Fћڝ aȘ YAM{f|'L2282r+#|?qx@gA-4``n_FѱlHqexZ` Ԍ/3{?siX\0~y A3,r3q*vgO烊sC3|"neBtN Лkd>2wX^, 64r'fGgE f(FXP#_h#C:!PѱexL\h[G&Tl7a`W2BɁvV$!!f8ʁvlH3*z) oH)Aj00 @y Xa}[f-aZ2>zMF;7Da6ÌQa`dE*[,̋_ ܨՒf<#$-"wy~ O7.@13JHMXVZ ORQMt\ y:7RSf#RAO …fF؃) ?,o$/;jo\ sFW3!exfQ!Hwj5%>\ 7Z8a{ClhufL͈%c8Eh_ }F4R2:Z%r|cDj G 5)I54#Tz h- 3GRF42:%@jh܄ 0oZ{zjh@qԝზ]GÔ&LZw0wF36@qb jQ! W 0 F(> F`h4Q0@fQ0 Fь> F4G( F3(#hF``@}h4Q0@fQ0 Fь> FDki  (h8"Ί:0T g$P|FCidbN5`% ݂O@7 v4z2wyx&X!N P{+c# PAq`OLr?f\dz@37!R-@1Q1@#DfrhD>@" "<@@C;GkMj}@,0Z o=((ZQBi29(ўt:G$hqZ-I gPجf\rA<48a AFR4J)i1@ Ay$liFaiƟ@@ abQILmh]m:!x*Xej4@d5ݡǓDh&.ģw Zper"h(FG S-7jhK _+h@Y@J3/b~QmfGZ @b8k#_h~Դ33R о>"15 /PIF N˚MJ|000C [~ Q 飓۟$TnWA3<E!-d7ُc@p rG2k=T/t\ė7"NCbtӢ"@P1_"ju"xV2H|Hg|)ݖ @Π 4{vPK pG kx֐vw Hd~ <G[F- C *͐ݕ' jfD(9;Ixd9n"өч$,$uG@fFS}>vQ0dh`(8 ч@h~4_ ,=XP9 F֬*(m^h8^p`.P: FiF#] q kXp@-AQ}P]@d=$2j ∏ T:JqFtA @ft\~j~ƁJZ7 #\1r Ddv|@\׌;h ]DNFǗ%@| HPL8 d dt-¸`2]0D? N 2O2ĵ̣m]0kP@^W|0"{"?k™B6AW*\{b@ѡKq6UDD ]^`8FӀG>P|G<66e!ceMsZ`D(Ǔ/@ו/@ODB jp0P?47`hUlİBW8@ |G}d tf$oS  0謱xcjA#Osk ~4W_ ׇ& {Ù΂ڜ8$ (:n#`zR20CDޟ*H"Ll.{C ` &*$bb3;V" KLQDp A{Qp @y"E^DD J0 H \3aZ$0\kA ő#7"5d%'@Q5#4:mt#{#-lф'4WfxR փ0VvHޠH)G ߦ f% ?Mt4p(#2(`b Q0 ?ь> F4G( F3(#hF``@}h4Q0@fQ0 Fь> F4G( F3(#hF``@}h4Q0@fQ0 Fь> F4G( F3(#hF``@}h4Q0@cZL3IENDB`gadmin-proftpd-0.4.2/config.guess0000755000076400007640000011315007615210750015724 0ustar mangemange#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-09-04' # This file 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. # # 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. # Written by Per Bothner . # Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c ; for c in cc gcc c89 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-unknown ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE}" in i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 2-1307) UNAME_MACHINE="alphaev68" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; sparc*:NetBSD:*) echo `uname -p`-unknown-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) case "${HPUX_REV}" in 11.[0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; esac ;; esac fi ;; esac if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in big) echo mips-unknown-linux-gnu && exit 0 ;; little) echo mipsel-unknown-linux-gnu && exit 0 ;; esac ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_supported_targets=`cd /; ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-pc-linux-gnu\n", argv[1]); # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gadmin-proftpd-0.4.2/autogen.sh0000755000076400007640000000770707676644452015440 0ustar mangemange#!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. DIE=0 if [ -n "$GNOME2_DIR" ]; then ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" PATH="$GNOME2_DIR/bin:$PATH" export PATH export LD_LIBRARY_PATH fi (test -f $srcdir/configure.in) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level package directory" exit 1 } (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1 } (grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && { (intltoolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`intltool' installed." echo "You can get it from:" echo " ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/" DIE=1 } } (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { (libtool --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtool' installed." echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" DIE=1 } } grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null && { grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`glib' installed." echo "You can get it from: ftp://ftp.gtk.org/pub/gtk" DIE=1 } } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`automake' installed." echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" DIE=1 NO_AUTOMAKE=yes } # if no automake, don't bother testing for aclocal test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: Missing \`aclocal'. The version of \`automake'" echo "installed doesn't appear recent enough." echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" DIE=1 } if test "$DIE" -eq 1; then exit 1 fi #if test -z "$*"; then # echo "**Warning**: I am going to run \`configure' with no arguments." # echo "If you wish to pass any to it, please specify them on the" # echo \`$0\'" command line." # echo #fi case $CC in xlc ) am_opt=--include-deps;; esac for coin in `find $srcdir -name configure.in -print` do dr=`dirname $coin` if test -f $dr/NO-AUTO-GEN; then echo skipping $dr -- flagged as no auto-gen else echo processing $dr ( cd $dr aclocalinclude="$ACLOCAL_FLAGS" if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 echo "Running glib-gettextize... Ignore non-fatal messages." echo "no" | glib-gettextize --force --copy echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 fi if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then echo "Running intltoolize..." intltoolize --copy --force --automake fi if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then if test -z "$NO_LIBTOOLIZE" ; then echo "Running libtoolize..." libtoolize --force --copy fi fi echo "Running aclocal $aclocalinclude ..." aclocal $aclocalinclude if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then echo "Running autoheader..." autoheader fi echo "Running automake --gnu $am_opt ..." automake --add-missing --gnu $am_opt echo "Running autoconf ..." autoconf ) fi done #conf_flags="--enable-maintainer-mode" #if test x$NOCONFIGURE = x; then # echo Running $srcdir/configure $conf_flags "$@" ... # $srcdir/configure $conf_flags "$@" \ # && echo Now type \`make\' to compile. || exit 1 #else # echo Skipping configure process. #fi gadmin-proftpd-0.4.2/src/0000755000076400007640000000000011566007413014172 5ustar mangemangegadmin-proftpd-0.4.2/src/widgets.c0000644000000000000000000000774411513432313015537 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include /* Make sure we have enough of these or itll borrow from the next widget-type and fail */ #define NUM_SERVERTAB_ENTRIES 25 #define NUM_SERVERTAB_SPINBUTTONS 13 #define NUM_SERVERTAB_COMBOS 18 #define NUM_USERTAB_ENTRIES 7 #define NUM_USERTAB_SPINBUTTONS 5 #define NUM_USERTAB_CHECKBUTTONS 3 #define NUM_USERTAB_COMBOS 1 typedef struct w { GtkWidget *main_window; GtkWidget *main_vbox; GtkWidget *notebook_vbox1; GtkWidget *notebook_vbox2; GtkWidget *notebook_vbox3; GtkWidget *notebook_vbox4; GtkWidget *notebook_vbox5; GtkWidget *notebook_vbox6; GtkWidget *notebook_vbox7; GtkWidget *status_label; GtkWidget *version_label; /* The server tab's widgets */ GtkWidget *server_treeview; GtkListStore *server_store; GtkWidget *server_settings_vbox; GtkWidget *server_settings_scrolled_window; GtkWidget *server_set_entry[NUM_SERVERTAB_ENTRIES]; GtkWidget *server_set_spinbutton[NUM_SERVERTAB_SPINBUTTONS]; GtkWidget *server_set_combo[NUM_SERVERTAB_COMBOS]; GtkWidget *srv_set_table; /* Enable virtual user management */ GtkWidget *server_set_check_virtual; /* The user tab's widgets */ GtkWidget *user_treeview; GtkListStore *user_store; GtkWidget *user_settings_vbox; GtkWidget *user_settings_scrolled_window; GtkWidget *user_set_entry[NUM_USERTAB_ENTRIES]; GtkWidget *user_set_spinbutton[NUM_USERTAB_SPINBUTTONS]; GtkWidget *user_set_checkbutton[NUM_USERTAB_CHECKBUTTONS]; GtkWidget *user_set_combo[NUM_USERTAB_COMBOS]; GtkWidget *gen_cert_progressbar; GtkWidget *usr_set_table; /* The add user widgets */ GtkWidget *user_button_box; GtkWidget *useradd_username_entry; GtkWidget *useradd_password_entry; GtkWidget *useradd_homedir_entry; GtkWidget *useradd_usercomment_entry; GtkWidget *useradd_shell_combo; GtkWidget *useradd_uploaddir_checkbutton; /* The user tab's directory treeview */ GtkWidget *directory_treeview; GtkListStore *directory_store; /* The delete system user question window */ GtkWidget *del_system_user_question_window; /* The add default configuration question window */ GtkWidget *default_conf_question_window; /* The transfer tabs widgets */ GtkWidget *transfer_treeview; GtkListStore *transfer_store; GtkWidget *total_bandwidth_label; GtkWidget *total_incoming_label; GtkWidget *total_outgoing_label; GtkWidget *kick_entry; GtkWidget *transfer_pid_checkbutton; /* The disc tabs widgets */ GtkWidget *disc_treeview; GtkListStore *disc_store; /* The file treeview */ GtkWidget *file_treeview; GtkListStore *file_store; /* The security tabs widgets */ GtkWidget *security_treeview; GtkListStore *security_store; /* The conf tabs textview */ GtkWidget *conf_textview; /* The import windows widgets */ GtkWidget *import_window; GtkWidget *import_treeview; GtkListStore *import_store; GtkWidget *import_home_entry; GtkWidget *import_with_username_checkbutton; /* The shutdown windows widgets */ GtkWidget *shutdown_window; GtkWidget *new_acc_disabled_entry; GtkWidget *existing_users_dc_entry; GtkWidget *real_shutdown_entry; GtkWidget *shutdown_msg_entry; }wid; gadmin-proftpd-0.4.2/src/make_settings_buttons.c0000644000000000000000000000463011513432313020473 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "gettext.h" #include "widgets.h" #include "make_settings_buttons.h" GtkWidget *make_button_with_entry(GtkTable *table, GtkWidget *entry, char icon_name[100], gchar *utf8_btn_txt, gchar *utf8_tip_txt, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint button_length) { GtkWidget *button = gtk_button_new(); GtkTooltips *tooltips = gtk_tooltips_new(); GtkWidget *alignment = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(button), alignment); GtkWidget *hbox = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment), hbox); GtkWidget *image = gtk_image_new_from_stock(icon_name, GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0); GtkWidget *label = gtk_label_new_with_mnemonic(utf8_btn_txt); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); gtk_tooltips_set_tip(tooltips, button, utf8_tip_txt, NULL); gtk_table_attach(table, button, left_attach, right_attach, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, entry, 1, 2, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_widget_show(button); gtk_widget_show(entry); return button; } gadmin-proftpd-0.4.2/src/populate_conf_tab.c0000644000000000000000000000376211513432313017551 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "support.h" #include #include #include #include #include "allocate.h" #include "widgets.h" #include "populate_conf_tab.h" //#include "show_info.h" void populate_conf_tab(struct w *widgets) { /* Show the configuration in the conf tab. */ FILE *fp; long conf_size; char *old_buffy, *new_buffy; GtkTextBuffer *conf_textbuffer; gchar *utf8=NULL; if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffy = allocate(conf_size+1024); new_buffy = allocate(conf_size+1024); if( conf_size > 1 ) while(fgets(old_buffy, conf_size, fp)!=NULL) { strcat(new_buffy, old_buffy); } fclose(fp); utf8 = g_locale_to_utf8(new_buffy, strlen(new_buffy), NULL, NULL, NULL); conf_textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widgets->conf_textview)); gtk_text_buffer_set_text(conf_textbuffer, utf8, strlen(utf8)); free(old_buffy); free(new_buffy); if( utf8!=NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/create_import_window.h0000644000000000000000000000202511513432312020304 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #ifndef create_import_window_H # define create_import_window_H extern struct w *widgets; void create_import_window(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_server_tab.h0000644000000000000000000000177011513432312017545 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef create_server_tab_H # define create_server_tab_H extern struct w *widgets; void create_server_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/apply_server_settings.c0000644000000000000000000010120311513432312020504 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include "widgets.h" #include "gettext.h" #include "reread_conf.h" #include "show_info.h" #include "apply_server_settings.h" #include "allocate.h" #include "populate_servers.h" #include "populate_server_settings.h" #include "select_first_server.h" #include "populate_conf_tab.h" extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_type[1024]; extern int activated; extern int use_tls; extern int use_ratio; extern int use_quota; void apply_server_settings(struct w *widgets) { /* Change the selected servers configuration. */ FILE *fp; long conf_size; int address_match = 0, port_match = 0; int configuration_changed = 0; gint active_index; gchar *address_line, *port_line, *info; gchar *virtual_users, *settings, *settings_conf; char *change_srv_ident; char *old_buffer, *config, *temp_server, *conf_line, *address_buffer, *port_buffer; gchar *old_server_ident; G_CONST_RETURN gchar *server_name; G_CONST_RETURN gchar *server_port; G_CONST_RETURN gchar *admin_email; G_CONST_RETURN gchar *passive_port_1; G_CONST_RETURN gchar *passive_port_2; G_CONST_RETURN gchar *masquerade_address; G_CONST_RETURN gchar *max_connect; G_CONST_RETURN gchar *idle_timeout; /* TimeoutIdle and TimeoutNoTransfer */ G_CONST_RETURN gchar *server_ident; G_CONST_RETURN gchar *server_user; G_CONST_RETURN gchar *server_group; G_CONST_RETURN gchar *fake_username; G_CONST_RETURN gchar *fake_groupname; G_CONST_RETURN gchar *max_login_attempts; G_CONST_RETURN gchar *login_timeout; G_CONST_RETURN gchar *upload_bandwidth; G_CONST_RETURN gchar *download_bandwidth; G_CONST_RETURN gchar *systemlog; G_CONST_RETURN gchar *default_username_length; G_CONST_RETURN gchar *default_password_length; G_CONST_RETURN gchar *default_html_path; /* TLS Entries */ G_CONST_RETURN gchar *tls_protocols = NULL; G_CONST_RETURN gchar *tls_logfile = NULL; G_CONST_RETURN gchar *tls_certfile = NULL; /* Get settings from the entries */ server_name = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[0])); server_ident = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[1])); masquerade_address = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[2])); admin_email = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[3])); default_html_path = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[6])); systemlog = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[8])); server_user = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[9])); server_group = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[10])); fake_username = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[11])); fake_groupname = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[12])); /* Get values from the spinbuttons */ server_port = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[0])); passive_port_1 = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[1])); passive_port_2 = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[2])); max_connect = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[3])); max_login_attempts = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[4])); login_timeout = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[5])); idle_timeout = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[6])); default_username_length = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[7])); default_password_length = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[8])); upload_bandwidth = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[9])); download_bandwidth = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[10])); /* Save the old server ident so we know if we should repopulate the server treeview */ old_server_ident = g_strdup_printf("%s", server_ident); /* First save the settings */ settings_conf = g_strdup_printf("%s/settings.conf", GP_APPCONFDIR); if((fp=fopen(settings_conf, "w+"))==NULL) { g_free(settings_conf); // Show popup return; } if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->server_set_check_virtual)) ) virtual_users = g_strdup_printf("on"); else virtual_users = g_strdup_printf("off"); settings = g_strconcat("\n", "certificate_directory ", GP_APPCONFDIR, "/certs\n", "random_username_length 6\n", "random_password_length 6\n", "randomize_case lower\n", "useradd_homedir_path /var/ftp\n", "html_path /var/www/html/ftp.htm\n", "welcome_name welcome.msg\n", "virtual_users ", virtual_users, "\n", "\n", NULL); fputs(settings, fp); fclose(fp); g_free(settings); g_free(settings_conf); g_free(virtual_users); if( use_tls ) { /* Get values from the TLS entries */ tls_protocols = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[13])); tls_logfile = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[14])); tls_certfile = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[15])); /* Should we change the certificate entries as well ? */ } address_buffer = allocate(8192+15); port_buffer = allocate(8192+3); if( strstr((char *)global_server_type, "Virtualhost") ) sprintf(address_buffer, "\n", global_server_address); sprintf(port_buffer, "Port %s\n", global_server_port); // use global_server_address if( strlen(address_buffer) == 0 && strstr((char *)global_server_type, "Virtualhost") ) { info = g_strdup_printf(_("Refusing to change a server without a specified name.\n")); show_info(info); g_free(info); free(address_buffer); free(port_buffer); g_free(old_server_ident); return; } // use < 8 or global_server_port if( strlen(port_buffer) == 0 ) { info = g_strdup_printf(_("Refusing to change a server without a specified port.\n")); show_info(info); g_free(info); free(address_buffer); free(port_buffer); g_free(old_server_ident); return; } /* Change the configuration for the selected server */ if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { info = g_strdup_printf(_("Cant open proftpd.conf here: \n%s\n"), PROFTPD_CONF); show_info(info); g_free(info); free(address_buffer); free(port_buffer); g_free(old_server_ident); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); config = allocate(conf_size+16384); /* Additional bytes */ old_buffer = allocate(conf_size); temp_server = allocate(conf_size); conf_line = allocate(8192); change_srv_ident = allocate(8192); /* ------------- Change the standard server ----------- */ if( strstr("Default server", (char *)global_server_type) ) { configuration_changed = 1; if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 4000 ) // 8000... { info = g_strdup_printf(_("A line with over 8000 chars is not valid in: %s\n"), PROFTPD_CONF); show_info(info); g_free(info); free(config); free(old_buffer); free(temp_server); free(conf_line); free(change_srv_ident); free(address_buffer); free(port_buffer); g_free(old_server_ident); fclose(fp); return; } /* Change matching server directives otherwise just gather them */ if( strstr(old_buffer, "server_set_combo[0])); if( active_index == 0 ) sprintf(conf_line, "ServerIdent on \"%s\"\n", server_ident); else sprintf(conf_line, "ServerIdent off \"%s\"\n", server_ident); strcat(config, conf_line); } else if( strstr(old_buffer, "MasqueradeAddress") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[1])); if( active_index == 0 && strlen(masquerade_address) > 4 ) sprintf(conf_line, "MasqueradeAddress %s\n", masquerade_address); else if( strlen(masquerade_address) > 4 ) sprintf(conf_line, "#MasqueradeAddress %s\n", masquerade_address); else sprintf(conf_line, "#MasqueradeAddress None\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "ServerAdmin") ) { sprintf(conf_line, "ServerAdmin %s\n", admin_email); strcat(config, conf_line); } else if( strstr(old_buffer, "Port") && old_buffer[4]==' ' ) { sprintf(conf_line, "Port %s\n", server_port); strcat(config, conf_line); } else if( strstr(old_buffer, "PassivePorts") ) { sprintf(conf_line, "PassivePorts %s %s\n", passive_port_1, passive_port_2); strcat(config, conf_line); } else if( strstr(old_buffer, "MaxInstances") ) { sprintf(conf_line, "MaxInstances %s\n", max_connect); strcat(config, conf_line); } else if( strstr(old_buffer, "TimeoutNoTransfer") ) { sprintf(conf_line, "TimeoutNoTransfer %s\n", idle_timeout); strcat(config, conf_line); } else if( strstr(old_buffer, "TimeoutIdle") ) { sprintf(conf_line, "TimeoutIdle %s\n", idle_timeout); strcat(config, conf_line); } else if( strstr(old_buffer, "AllowStoreRestart") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[10])); if( active_index == 0 ) sprintf(conf_line, "AllowStoreRestart on\n"); else sprintf(conf_line, "AllowStoreRestart off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "AllowRetrieveRestart") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[11])); if( active_index == 0 ) sprintf(conf_line, "AllowRetrieveRestart on\n"); else sprintf(conf_line, "AllowRetrieveRestart off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "TransferRate RETR") ) { sprintf(conf_line, "TransferRate RETR %s\n", download_bandwidth); strcat(config, conf_line); } else if( strstr(old_buffer, "TransferRate STOR") ) { sprintf(conf_line, "TransferRate STOR %s\n", upload_bandwidth); strcat(config, conf_line); } else if( strstr(old_buffer, "TransferRate STOU") ) { sprintf(conf_line, "TransferRate STOU %s\n", upload_bandwidth); strcat(config, conf_line); } else if( strstr(old_buffer, "TransferRate APPE") ) { sprintf(conf_line, "TransferRate APPE %s\n", upload_bandwidth); strcat(config, conf_line); } else if( strstr(old_buffer, "IdentLookups") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[2])); if( active_index == 0 ) sprintf(conf_line, "IdentLookups on\n"); else sprintf(conf_line, "IdentLookups off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "UseReverseDNS") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[3])); if( active_index == 0 ) sprintf(conf_line, "UseReverseDNS on\n"); else sprintf(conf_line, "UseReverseDNS off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "DefaultTransferMode") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[5])); if( active_index == 0 ) sprintf(conf_line, "DefaultTransferMode binary\n"); else sprintf(conf_line, "DefaultTransferMode ascii\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "User") && old_buffer[4]==' ' ) { sprintf(conf_line, "User %s\n", server_user); strcat(config, conf_line); } else if( strstr(old_buffer, "Group") && old_buffer[5]==' ' ) { sprintf(conf_line, "Group %s\n", server_group); strcat(config, conf_line); } else if( strstr(old_buffer, "DirFakeUser") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[8])); if( active_index == 0 ) sprintf(conf_line, "DirFakeUser on %s\n", fake_username); else sprintf(conf_line, "DirFakeUser off %s\n", fake_username); strcat(config, conf_line); } else if( strstr(old_buffer, "DirFakeGroup") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[9])); if( active_index == 0 ) sprintf(conf_line, "DirFakeGroup on %s\n", fake_groupname); else sprintf(conf_line, "DirFakeGroup off %s\n", fake_groupname); strcat(config, conf_line); } else if( strstr(old_buffer, "AllowForeignAddress") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[6])); if( active_index == 0 ) sprintf(conf_line, "AllowForeignAddress on\n"); else sprintf(conf_line, "AllowForeignAddress off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "TimesGMT") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[4])); if( active_index == 0 ) sprintf(conf_line, "TimesGMT on\n"); else sprintf(conf_line, "TimesGMT off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "MaxLoginAttempts") ) { sprintf(conf_line, "MaxLoginAttempts %s\n", max_login_attempts); strcat(config, conf_line); } else if( strstr(old_buffer, "TimeoutLogin") ) { sprintf(conf_line, "TimeoutLogin %s\n", login_timeout); strcat(config, conf_line); } else if( strstr(old_buffer, "DeleteAbortedStores") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[12])); if( active_index == 0 ) sprintf(conf_line, "DeleteAbortedStores on\n"); else sprintf(conf_line, "DeleteAbortedStores off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "SystemLog") ) { sprintf(conf_line, "SystemLog %s\n", systemlog); strcat(config, conf_line); } else /* If using TLS */ if( use_tls && strstr(old_buffer, "TLSEngine") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[13])); if( active_index == 0 ) sprintf(conf_line, "TLSEngine on\n"); else sprintf(conf_line, "TLSEngine off\n"); strcat(config, conf_line); } else if( use_tls && strstr(old_buffer, "TLSRequired") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[14])); if( active_index == 0 ) // sprintf(conf_line, "TLSRequired on\n"); It cant be more "on" then auth+data most likely. sprintf(conf_line, "TLSRequired auth+data\n"); else if( active_index == 1 ) sprintf(conf_line, "TLSRequired off\n"); else if( active_index == 2 ) sprintf(conf_line, "TLSRequired data\n"); else if( active_index == 3 ) sprintf(conf_line, "TLSRequired ctrl\n"); strcat(config, conf_line); } else if( use_tls && strstr(old_buffer, "TLSVerifyClient") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[15])); if( active_index == 0 ) sprintf(conf_line, "TLSVerifyClient on\n"); else sprintf(conf_line, "TLSVerifyClient off\n"); strcat(config, conf_line); } else if( use_tls && strstr(old_buffer, "TLSProtocol") ) { sprintf(conf_line, "TLSProtocol %s\n", tls_protocols); strcat(config, conf_line); } else if( use_tls && strstr(old_buffer, "TLSLog") ) { sprintf(conf_line, "TLSLog %s\n", tls_logfile); strcat(config, conf_line); } else /* If using Ratios */ if( use_ratio && strstr(old_buffer, "Ratios ") && ! strstr(old_buffer, "ave") ) /* Not SaveRatios */ { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[16])); if( active_index == 0 ) sprintf(conf_line, "Ratios on\n"); else sprintf(conf_line, "Ratios off\n"); strcat(config, conf_line); } else if( use_ratio && strstr(old_buffer, "SaveRatios ") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[17])); if( active_index == 0 ) sprintf(conf_line, "SaveRatios on\n"); else sprintf(conf_line, "SaveRatios off\n"); strcat(config, conf_line); } else strcat(config, old_buffer); /* Gather all other values */ } free(old_buffer); free(address_buffer); free(port_buffer); free(temp_server); free(conf_line); free(change_srv_ident); fclose(fp); /* Write the new config if any changes where made */ if( ! configuration_changed ) { g_free(old_server_ident); free(config); return; } /* Write the new conf */ if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { g_free(old_server_ident); free(config); return; } fputs(config, fp); fclose(fp); free(config); /* The server address, ident or port hasnt changed, dont populate server tab */ if( strcmp(global_server_address, server_name) == 0 && strcmp(old_server_ident, server_ident) == 0 && strcmp(global_server_port, server_port) == 0 ) {} else { /* Populate the server treeview */ populate_servers(widgets); /* Select the first server and set global server values */ select_first_server(widgets); } g_free(old_server_ident); /* Populate the server settings */ populate_server_settings(widgets); populate_conf_tab(widgets); /* Update the server */ reread_conf(widgets); return; } /* ----------------- End of default server changes ------------------ */ /* ------------ Change a virtualhost --------------- */ if( strstr("Virtualhost", (char *)global_server_type) ) { /* Setup the address and port lines to identify it with */ address_line = g_strdup_printf("\n", global_server_address); port_line = g_strdup_printf("Port %s\n", global_server_port); /* Look for these address and port lines, break if they are found */ if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strcmp(old_buffer, address_line) == 0 ) { address_match = 1; /* Save the old server name line */ snprintf(temp_server, 1024, "%s", old_buffer); /* Go to the next line where we expect Port to be */ while(fgets(old_buffer, conf_size, fp)!=NULL) break; if( address_match && strcmp(old_buffer, port_line) == 0 ) { port_match = 1; /* Put the new conf settings */ g_free(address_line); g_free(port_line); address_line = g_strdup_printf("\n", server_name); port_line = g_strdup_printf("Port %s\n", server_port); strcat(config, address_line); strcat(config, port_line); break; } else /* This was not the correct server */ { address_match = 0; port_match = 0; /* Put back the old server and port lines */ strcat(config, temp_server); strcat(config, old_buffer); } } else /* Put back all other lines */ strcat(config, old_buffer); } if( address_line !=NULL ) g_free(address_line); if( port_line !=NULL ) g_free(port_line); /* Couldnt find the server */ if( ! address_match || ! port_match ) { // Show info printf("The virtualhost was not found, no changes where made.\n"); fclose(fp); free(change_srv_ident); g_free(old_server_ident); free(config); return; } /* Change the rest of the values in this vhost */ if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 4000 ) continue; /* The end of what we want to change has been reached, * add this end line and everything else */ if( strstr(old_buffer, "server_set_combo[0])); if( active_index == 0 ) sprintf(conf_line, "ServerIdent on \"%s\"\n", server_ident); else sprintf(conf_line, "ServerIdent off \"%s\"\n", server_ident); strcat(config, conf_line); } else if( strstr(old_buffer, "MasqueradeAddress") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[1])); if( active_index == 0 && strlen(masquerade_address) > 4 ) sprintf(conf_line, "MasqueradeAddress %s\n", masquerade_address); else if( strlen(masquerade_address) > 4 ) sprintf(conf_line, "#MasqueradeAddress %s\n", masquerade_address); else sprintf(conf_line, "#MasqueradeAddress None\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "ServerAdmin") ) { sprintf(conf_line, "ServerAdmin %s\n", admin_email); strcat(config, conf_line); } else if( strstr(old_buffer, "PassivePorts") ) { sprintf(conf_line, "PassivePorts %s %s\n", passive_port_1, passive_port_2); strcat(config, conf_line); } else if( strstr(old_buffer, "MaxInstances") ) { sprintf(conf_line, "MaxInstances %s\n", max_connect); strcat(config, conf_line); } else if( strstr(old_buffer, "TimeoutNoTransfer") ) { sprintf(conf_line, "TimeoutNoTransfer %s\n", idle_timeout); strcat(config, conf_line); } else if( strstr(old_buffer, "TimeoutIdle") ) { sprintf(conf_line, "TimeoutIdle %s\n", idle_timeout); strcat(config, conf_line); } else if( strstr(old_buffer, "AllowStoreRestart") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[10])); if( active_index == 0 ) sprintf(conf_line, "AllowStoreRestart on\n"); else sprintf(conf_line, "AllowStoreRestart off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "AllowRetrieveRestart") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[11])); if( active_index == 0 ) sprintf(conf_line, "AllowRetrieveRestart on\n"); else sprintf(conf_line, "AllowRetrieveRestart off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "TransferRate RETR") ) { sprintf(conf_line, "TransferRate RETR %s\n", download_bandwidth); strcat(config, conf_line); } else if( strstr(old_buffer, "TransferRate STOR") ) { sprintf(conf_line, "TransferRate STOR %s\n", upload_bandwidth); strcat(config, conf_line); } else if( strstr(old_buffer, "TransferRate STOU") ) { sprintf(conf_line, "TransferRate STOU %s\n", upload_bandwidth); strcat(config, conf_line); } else if( strstr(old_buffer, "TransferRate APPE") ) { sprintf(conf_line, "TransferRate APPE %s\n", upload_bandwidth); strcat(config, conf_line); } else if( strstr(old_buffer, "IdentLookups") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[2])); if( active_index == 0 ) sprintf(conf_line, "IdentLookups on\n"); else sprintf(conf_line, "IdentLookups off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "UseReverseDNS") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[3])); if( active_index == 0 ) sprintf(conf_line, "UseReverseDNS on\n"); else sprintf(conf_line, "UseReverseDNS off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "DefaultTransferMode") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[5])); if( active_index == 0 ) sprintf(conf_line, "DefaultTransferMode binary\n"); else sprintf(conf_line, "DefaultTransferMode ascii\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "User") && old_buffer[4]==' ' ) { sprintf(conf_line, "User %s\n", server_user); strcat(config, conf_line); } else if( strstr(old_buffer, "Group") && old_buffer[5]==' ' ) { sprintf(conf_line, "Group %s\n", server_group); strcat(config, conf_line); } else if( strstr(old_buffer, "DirFakeUser") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[8])); if( active_index == 0 ) sprintf(conf_line, "DirFakeUser on %s\n", fake_username); else sprintf(conf_line, "DirFakeUser off %s\n", fake_username); strcat(config, conf_line); } else if( strstr(old_buffer, "DirFakeGroup") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[9])); if( active_index == 0 ) sprintf(conf_line, "DirFakeGroup on %s\n", fake_groupname); else sprintf(conf_line, "DirFakeGroup off %s\n", fake_groupname); strcat(config, conf_line); } else if( strstr(old_buffer, "AllowForeignAddress") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[6])); if( active_index == 0 ) sprintf(conf_line, "AllowForeignAddress on\n"); else sprintf(conf_line, "AllowForeignAddress off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "TimesGMT") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[4])); if( active_index == 0 ) sprintf(conf_line, "TimesGMT on\n"); else sprintf(conf_line, "TimesGMT off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "MaxLoginAttempts") ) { sprintf(conf_line, "MaxLoginAttempts %s\n", max_login_attempts); strcat(config, conf_line); } else if( strstr(old_buffer, "TimeoutLogin") ) { sprintf(conf_line, "TimeoutLogin %s\n", login_timeout); strcat(config, conf_line); } else if( strstr(old_buffer, "DeleteAbortedStores") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[12])); if( active_index == 0 ) sprintf(conf_line, "DeleteAbortedStores on\n"); else sprintf(conf_line, "DeleteAbortedStores off\n"); strcat(config, conf_line); } else if( strstr(old_buffer, "SystemLog") ) { sprintf(conf_line, "SystemLog %s\n", systemlog); strcat(config, conf_line); } else /* If using TLS */ if( use_tls && strstr(old_buffer, "TLSEngine") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[13])); if( active_index == 0 ) sprintf(conf_line, "TLSEngine on\n"); else sprintf(conf_line, "TLSEngine off\n"); strcat(config, conf_line); } else if( use_tls && strstr(old_buffer, "TLSRequired") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[14])); if( active_index == 0 ) // sprintf(conf_line, "TLSRequired on\n"); sprintf(conf_line, "TLSRequired auth+data\n"); else if( active_index == 1 ) sprintf(conf_line, "TLSRequired data\n"); else if( active_index == 2 ) sprintf(conf_line, "TLSRequired ctrl\n"); else if( active_index == 3 ) sprintf(conf_line, "TLSRequired off\n"); strcat(config, conf_line); } else if( use_tls && strstr(old_buffer, "TLSVerifyClient") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[15])); if( active_index == 0 ) sprintf(conf_line, "TLSVerifyClient on\n"); else sprintf(conf_line, "TLSVerifyClient off\n"); strcat(config, conf_line); } else if( use_tls && strstr(old_buffer, "TLSProtocol") ) { /* Remove TLSortocol from any vhost as its not allowed in this context. sprintf(conf_line, "TLSProtocol %s\n", tls_protocols); strcat(config, conf_line); */ } else if( use_tls && strstr(old_buffer, "TLSLog") ) { sprintf(conf_line, "TLSLog %s\n", tls_logfile); strcat(config, conf_line); } else /* If using Ratios */ if( use_ratio && strstr(old_buffer, "Ratios ") && ! strstr(old_buffer, "ave") ) /* Not SaveRatios */ { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[16])); if( active_index == 0 ) sprintf(conf_line, "Ratios on\n"); else sprintf(conf_line, "Ratios off\n"); strcat(config, conf_line); } else if( use_ratio && strstr(old_buffer, "SaveRatios ") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[17])); if( active_index == 0 ) sprintf(conf_line, "SaveRatios on\n"); else sprintf(conf_line, "SaveRatios off\n"); strcat(config, conf_line); } else strcat(config, old_buffer); /* Gather all other values */ } free(old_buffer); free(address_buffer); free(temp_server); free(port_buffer); free(change_srv_ident); free(conf_line); fclose(fp); /* Write the new config if any changes where made */ if( ! configuration_changed ) { g_free(old_server_ident); free(config); return; } if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { g_free(old_server_ident); free(config); return; } fputs(config, fp); fclose(fp); free(config); /* The server address, ident or port hasnt changed, dont populate_servers */ if( strcmp(global_server_address, server_name) == 0 && strcmp(old_server_ident, server_ident) == 0 && strcmp(global_server_port, server_port) == 0 ) { } else { /* Populate the server treeview */ populate_servers(widgets); /* Select the first server and set global server values */ select_first_server(widgets); } g_free(old_server_ident); /* Populate the server settings */ populate_server_settings(widgets); populate_conf_tab(widgets); /* Update the server */ reread_conf(widgets); } /* Vhost end */ } gadmin-proftpd-0.4.2/src/functions.h0000644000000000000000000000353411513432313016077 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef FUNCTIONS_H #define FUNCTIONS_H #include extern struct w *widgets; int cmplowercase(char *buf, char *cmpstring); gchar *get_user_setting(gchar *user, gchar *what); gchar *get_group_name(gchar *groupnr); char *encrypt_password(G_CONST_RETURN gchar *password); void password_virtual_user(G_CONST_RETURN gchar *username, G_CONST_RETURN gchar *password); void delete_virtual_user(G_CONST_RETURN gchar *username); void randomize_username(struct w *widgets); void randomize_password(struct w *widgets); char *random_string(int len); int fix_newlines_in_conf(); int user_exists(G_CONST_RETURN gchar *username); int group_exists(G_CONST_RETURN gchar *username); void password_virtual_user(G_CONST_RETURN gchar *username, G_CONST_RETURN gchar *password); void password_user(G_CONST_RETURN gchar *username, G_CONST_RETURN gchar *password); int is_banned(char *user); void exec_ssl(char *command, char descr[128]); void make_dir_chmod(gchar *directory, char perm[128]); #endif gadmin-proftpd-0.4.2/src/dir_treeview_funcs.h0000644000000000000000000000214511513432313017752 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ gboolean dirs_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets); gboolean num_rows_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets); void append_limit_cmds(); gadmin-proftpd-0.4.2/src/gadmin_proftpd.h0000644000000000000000000000176311513432313017066 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef HAVE_gadmin_proftpd_H # define HAVE_gadmin_proftpd_H extern struct w *widgets; int main(int argc, char *argv[]); #endif gadmin-proftpd-0.4.2/src/widgets.h0000644000000000000000000000166311513432313015536 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef widgets_H # define widgets_H #include "widgets.c" #endif gadmin-proftpd-0.4.2/src/file_chooser.c0000644000000000000000000000517011513432313016521 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include "gettext.h" gchar *get_dialog_path_selection(gchar *type, gchar *initial_dir, gchar *initial_file) { GtkWidget *dialog; gboolean ret = 0; int dlg_ret = 0; gchar *path = NULL; if( strstr(type, "DIR") ) { dialog = gtk_file_chooser_dialog_new(_("Select directory"), NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); /* Set initial directory. If it doesnt exist "/" is used. */ ret = gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), initial_dir); if( ! ret ) ret = gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), "/"); } else if( strstr(type, "FILE") ) { dialog = gtk_file_chooser_dialog_new(_("Select file"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, // GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); /* Set initial directory. If it doesnt exist "/" is used. */ ret = gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), initial_dir); if( ! ret ) ret = gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), "/"); /* It complains if the file doesnt exist, ignore it. */ gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), initial_file); } else { printf("Path selection: Input TYPE error.\n"); return NULL; } dlg_ret = gtk_dialog_run(GTK_DIALOG(dialog)); if( dlg_ret == GTK_RESPONSE_ACCEPT ) { path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); } if( dlg_ret == GTK_RESPONSE_CANCEL ) { printf("Path selection: Canceled.\n"); path = NULL; } gtk_widget_destroy(dialog); return path; } gadmin-proftpd-0.4.2/src/kick_ban_button_clicked.c0000644000000000000000000001063311513432313020672 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include "widgets.h" #include "allocate.h" #include "commands.h" #include "functions.h" #include "chars_are_digits.h" #include "kick_ban_button_clicked.h" extern int activated; extern int MAX_READ_POPEN; void kick_ban_button_clicked(struct w *widgets) { /* Ban a user then kick by name or pid */ FILE *fp; char *get_buffer, *kick_name, *kick_pid, *kick; int user_kick=0, pid_kick=0, was_kicked=0, was_banned=0; G_CONST_RETURN gchar *username; int avoid_warnings = 0; username = gtk_entry_get_text(GTK_ENTRY(widgets->kick_entry)); if( strlen(username) == 0 ) return; kick_name = allocate(4096); kick_pid = allocate(4096); if( activated ) { /* Get users pid and name */ if((fp=popen("ftpwho -v", "r"))==NULL) return; fflush(fp); get_buffer = allocate(MAX_READ_POPEN+1); while(fgets(get_buffer, MAX_READ_POPEN, fp)!=NULL) { kick_pid[0]='\0'; kick_name[0]='\0'; sscanf(get_buffer, "%s %s", kick_pid, kick_name); if( kick_name[strlen(kick_name)-1]=='\n' || kick_name[strlen(kick_name)-1]=='\r' ) kick_name[strlen(kick_name)-1]='\0'; /* kill this user by name */ if( strcmp(username, kick_name) == 0 && chars_are_digits(kick_pid) ) { user_kick=1; break; } /* Kill this user by pid */ if( strcmp(username, kick_pid) == 0 && chars_are_digits(kick_pid) ) { pid_kick=1; break; } } pclose(fp); free(get_buffer); } /* Put the user in ftpusers if its not banned already or is a pid */ if( ! is_banned((char *)username) ) { if((fp=fopen(GP_FTPUSERS, "a"))==NULL) { // sprintf(info_buffer, _("The user was not banned, could not write to:\n%s"), GP_FTPUSERS); // info_window = create_info_window(); // gtk_widget_show(info_window); } else if( user_kick || pid_kick ) { fputs("\n", fp); fputs(kick_name, fp); fclose(fp); was_banned=1; } else if( ! chars_are_digits((char *)username) ) { fputs("\n", fp); fputs(username, fp); fclose(fp); was_banned=1; } else { // strcpy(info_buffer, _("Cant ban a non active user by PID.\n")); // strcat(info_buffer, _("Misspelled maybe ?\n")); // info_window = create_info_window(); // gtk_widget_show(info_window); fclose(fp); } } else if( is_banned((char *)username) && ! chars_are_digits((char *)username) ) { // strcpy(info_buffer, _("The user was already banned.\n")); // info_window = create_info_window(); // gtk_widget_show(info_window); } free(kick_name); if( user_kick || pid_kick ) { /* Kill the the users pid */ kick = allocate(8192); sprintf(kick, "kill -15 %s", kick_pid); avoid_warnings = system(kick); free(kick); was_kicked = 1; } /* We want to be notified of additional success or failiures here */ if( was_banned && ! was_kicked ) { // strcpy(info_buffer, _("The user was not currently in the ftp.\n")); // strcat(info_buffer, _("The user was banned but not kicked.\n")); // info_window = create_info_window(); // gtk_widget_show(info_window); } else if( was_banned && was_kicked ) { // strcpy(info_buffer, _("The user was kicked and banned.\n")); // info_window = create_info_window(); // gtk_widget_show(info_window); } free(kick_pid); } gadmin-proftpd-0.4.2/src/delete_server.h0000644000000000000000000000175411513432313016721 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef delete_server_H # define delete_server_H extern struct w *widgets; void delete_server(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/commands.c0000644000000000000000000002044111513434103015656 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include #include #include "gettext.h" #include "widgets.h" #include "allocate.h" #include "show_info.h" #include "functions.h" #include "commented.h" extern int MAX_READ_POPEN; void run_command_show_err(gchar *command) { FILE *fp; char *line, *info; if((fp=popen(command, "r"))==NULL) { perror("popen"); return; } else { line = allocate(MAX_READ_POPEN+2); info = allocate(MAX_READ_POPEN+2); while(fgets(line, MAX_READ_POPEN, fp)!=NULL) strcat(info, line); pclose(fp); show_info(info); free(info); free(line); } } int run_command(gchar *command) { FILE *fp; int status=0, exit_status=0; if((fp=popen(command, "w"))==NULL) { perror("popen"); return 0; } status = pclose(fp); exit_status = WEXITSTATUS(status); if( exit_status == 1) exit_status = 0; else exit_status = 1; return exit_status; } void init_start(struct w *widgets) { gchar *cmd; cmd = g_strdup_printf("%s", SYSINIT_START_CMD); if( strlen(cmd) > 4 ) { if( ! run_command(cmd) ) { run_command_show_err(cmd); } } if( cmd!=NULL ) g_free(cmd); } void init_stop(struct w *widgets) { gchar *cmd; cmd = g_strdup_printf("%s", SYSINIT_STOP_CMD); if( strlen(cmd) > 4 ) { if( ! run_command(cmd) ) { run_command_show_err(cmd); } } if( cmd!=NULL ) g_free(cmd); } int file_exists(char *infile) { FILE *fp; if((fp=fopen(infile, "r"))==NULL) return 0; fclose(fp); return 1; } /* Get all ModulePath and LoadModule statements from an included file. */ char * get_included_dynamic_module_statements(char *path) { FILE *fp; char *line; long file_size = 0; char *included_options = NULL; if((fp=fopen(path, "r"))==NULL) { printf("Error reading: [%s]\n", path); return NULL; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); included_options = allocate(file_size+1); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( commented(line) ) continue; /* LoadModule ModuleName is found. */ if( cmplowercase(line, "modulepath ") || cmplowercase(line, "loadmodule ") ) { strcat(included_options, line); } } fclose(fp); free(line); return included_options; } /* Return any ModulePath and LoadModule statements from the current or included configurations or NULL */ char * get_dynamic_module_statements() { FILE *fp; char *line; long file_size = 0; int i = 0; char *includes = NULL, *include_path; char *sub_includes = NULL; if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { /* Report no error. */ return NULL; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); include_path = allocate(file_size+1); includes = allocate(file_size+1); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( commented(line) || strlen(line) < 5 ) continue; /* A ModulePath or LoadModule statement is found. */ if( cmplowercase(line, "modulepath ") || cmplowercase(line, "loadmodule ") ) { printf("ModulePath or LoadModule statement found.\n"); strcat(includes, line); } /* Get any included conf paths and get their ModulePath and Loadmodule statements. */ if( cmplowercase(line, "include ") && strstr(line, "/") ) { for(i=0; line[i]!='\0'; i++) if( line[i]=='/' ) break; snprintf(include_path, file_size, "%s", &line[i]); if( include_path[strlen(include_path)-1]=='\n' ) include_path[strlen(include_path)-1]='\0'; sub_includes = get_included_dynamic_module_statements(include_path); if( sub_includes != NULL ) { includes = realloc(includes, file_size+1+strlen(sub_includes)+1000); strcat(includes, sub_includes); free(sub_includes); } } } fclose(fp); free(line); free(include_path); return includes; } /* Is the requested module in the included path. */ int module_in_include_path(char *path, char module_name[1024]) { FILE *fp; char *line; long file_size = 0; int retval = 0; if((fp=fopen(path, "r"))==NULL) { printf("Error reading: [%s]\n", path); return 0; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( commented(line) ) continue; /* LoadModule ModuleName is found. */ if( cmplowercase(line, "loadmodule ") && cmplowercase(line, module_name) ) { retval = 1; break; } } fclose(fp); free(line); return retval; } /* If we have line: "LoadModule ModuleName.c" then the requested module is used. If an "Include /..../modules.conf" statement is encountered then read that included conf and look for LoadModule statements matching the requested module. */ int using_included_module(char module_name[1024]) { FILE *fp; char *line, *include_path; long file_size = 0; int i = 0, retval = 0; if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { printf("Error reading: [%s]\n", PROFTPD_CONF); return 0; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); include_path = allocate(file_size+1); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( commented(line) ) continue; /* LoadModule ModuleName is found. */ if( cmplowercase(line, "loadmodule ") && cmplowercase(line, module_name) ) { retval = 1; break; } /* Get any included conf paths and see if they load the requested module. */ if( cmplowercase(line, "include ") && strstr(line, "/") ) { for(i=0; line[i]!='\0'; i++) if( line[i]=='/' ) break; snprintf(include_path, file_size, "%s", &line[i]); if( include_path[strlen(include_path)-1]=='\n' ) include_path[strlen(include_path)-1]='\0'; if( module_in_include_path(include_path, module_name) ) { retval = 1; break; } } } fclose(fp); free(line); free(include_path); return retval; } /* Check if a module has been compiled in or is included via a LoadModule statement. */ int using_module(char module_name[1024]) { FILE *fp; int retval = 0; char *line; char modname_popen[1024]=""; gchar *cmd; /* Snip the last ".c". For "proftpd -V" search. */ snprintf(modname_popen, 1000, "%s", module_name); modname_popen[strlen(modname_popen)-2]='\0'; cmd = g_strdup_printf("%s -V", PROFTPD_BINARY); if((fp=popen(cmd,"r"))==NULL) { /* Locale trouble could be one cause so add TLS options */ retval = 1; } else { fflush(fp); line = allocate(MAX_READ_POPEN+1); while(fgets(line, MAX_READ_POPEN, fp)!=NULL) { if( strlen(line) > 4 && strstr(line, modname_popen) ) { retval = 1; break; } } free(line); pclose(fp); } g_free(cmd); /* A module is included by a LoadModule statement. */ if( using_included_module(module_name) ) retval = 1; return retval; } gadmin-proftpd-0.4.2/src/populate_gadmin_proftpd.c0000644000000000000000000000421411513432313020764 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "support.h" #include #include #include #include #include "allocate.h" #include "widgets.h" #include "populate_gadmin_proftpd.h" #include "populate_servers.h" #include "select_first_server.h" #include "populate_server_settings.h" #include "populate_users.h" #include "select_first_user.h" #include "populate_user_settings.h" #include "populate_disc_tab.h" #include "populate_file_tab.h" #include "populate_security_tab.h" #include "populate_conf_tab.h" void populate_gadmin_proftpd(struct w *widgets) { /* Populate the servers treeview */ populate_servers(widgets); /* Set the first server as selected */ select_first_server(widgets); /* Populate the server settings */ populate_server_settings(widgets); /* Populate the user tab */ populate_users(widgets); /* Set the first user as selected */ select_first_user(widgets); /* Populate the user settings */ populate_user_settings(widgets); /* Populate the disc tab */ populate_discs(widgets); /* Populate the file tab */ /* This can take a long time so we let the user do this manually populate_files(widgets); */ /* Populate the security tab */ populate_security(widgets); /* Populate the conf tab */ populate_conf_tab(widgets); } gadmin-proftpd-0.4.2/src/shutdown_ok_clicked.h0000644000000000000000000000177411513432313020115 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef shutdown_ok_clicked_H # define shutdown_ok_clicked_H extern struct w *widgets; void shutdown_ok_clicked(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/osx_functions.c0000644000000000000000000002715411513432313016767 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include "allocate.h" #include "chars_are_digits.h" /* This file will be created from nidump passwd / itll then be read * and removed (cant use /etc/passwd since its not kept current) */ #define GP_OSX_PASS_DUMP "/etc/gp_osx_passdump" int niutil_run_command(char *command) { /* Run a command */ FILE * fp; int i=0; if((fp=popen(command, "r"))==NULL) { printf("\nError running %s\n", command); } else { pclose(fp); i = 1; } return i; } int unlink_file(char *entity) { char *command; int unlink=0; if( ! file_exists(entity) ) { printf("Unlink: the file [%s] does not exist.\n", entity); unlink = 1; } else { command = allocate(8192); /* Remove the temporary file */ sprintf(command, "rm -f /etc/%s", entity); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); free(command); exit (1); } free(command); unlink = 1; } return unlink; } int niutil_user_exists(G_CONST_RETURN gchar *username) { /* Checks if the system user exists */ FILE *fp; long conf_size; int x, user_exists=0; char tempname[4096]=""; char *check_buffer, *command; command = allocate(8192); sprintf(command, "/usr/bin/nidump passwd / > %s", GP_OSX_PASS_DUMP); if( ! niutil_run_command(command) ) { free(command); return user_exists; } free(command); /* Checks if the user exists in passwd */ if((fp=fopen(GP_OSX_PASS_DUMP,"r"))==NULL) { printf("Cannot open the nidump:ed passwd file.\n"); return user_exists; } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); check_buffer = allocate(conf_size); while(fgets(check_buffer, conf_size, fp)!=NULL) { for(x=0; check_buffer[x]; x++) { if(check_buffer[x]==':') { sprintf(tempname, check_buffer); tempname[x]='\0'; if( strcmp(username, tempname) == 0 ) { user_exists=1; break; } } if( check_buffer[x]=='\0' || check_buffer[x]=='\n' ) break; } if( user_exists ) break; } free(check_buffer); fclose(fp); } unlink_file(GP_OSX_PASS_DUMP); return user_exists; } int niutil_get_free_uid_above_500_() { FILE *fp; int i=0, begin=0, end=0, colon=0; long length, uid=0, num=0; char *command, *buffy, *tempuid, *gp_err=NULL; command = allocate(8192); sprintf(command, "/usr/bin/nidump passwd / > %s", GP_OSX_PASS_DUMP); if( ! niutil_run_command(command) ) { free(command); return uid; } free(command); if( ! file_exists(GP_OSX_PASS_DUMP) ) { printf("\nError: passwd file not found: %s\n", GP_OSX_PASS_DUMP); unlink_file(GP_OSX_PASS_DUMP); return uid; } /* Determine what gid is free and above 500 */ if((fp=fopen(GP_OSX_PASS_DUMP, "r"))==NULL) { unlink_file(GP_OSX_PASS_DUMP); return uid; } fseek(fp, 0, SEEK_END); length=ftell(fp); rewind(fp); buffy = allocate(length); tempuid = allocate(8192); while(fgets(buffy, length, fp)!=NULL) { /* Dont acctept bad input */ if( strlen(buffy) < 3 || strlen(buffy) > 1024 ) continue; colon=0; num=0; begin=0; end=0; /* Get the beginning of the gid */ for(i=0; buffy[i]!='\0'; i++) { if( buffy[i]==':' ) colon++; /* We have found the beginning of the uid */ if( colon==2 ) { begin=++i; break; } } /* Get the end of the uid */ for(i=i; buffy[i]!='\0'; i++) { end++; if( buffy[i]==':' ) { --end; /* strncpy(tempgid, &buffy[begin], end); grr */ sprintf(tempuid, &buffy[begin]); /* Terminate it after the last digit */ tempuid[end]='\0'; /* Collect the greatest uid */ if( chars_are_digits(tempuid) ) { /* Conversion to a valid long uid_t */ num = (uid_t) strtol(tempuid, &gp_err, 10); if( gp_err && *gp_err ) printf("Error Converting a valid long uid\n"); else if( num > uid ) uid=num; if(LONG_MIN==num) printf("LONG_MIN Conversion for uid\n"); if(LONG_MAX==num) printf("LONG_MAX Conversion for uid\n"); if(errno==ERANGE) printf("Conversion out of range for uid\n"); } /* No need to report a non digit or a negative value */ break; } } } free(buffy); free(tempuid); unlink_file(GP_OSX_PASS_DUMP); /* Add 1 to uid */ uid++; if( uid <= 499 ) return 500; else return uid; } int niutil_get_free_gid_above_500_() { /* FIXME USE uid_t and gid_t */ FILE *fp; int i=0, begin=0, end=0, colon=0; long length, gid=0, num=0; char *command, *buffy, *tempgid, *gp_err=NULL; command = allocate(8192); sprintf(command, "/usr/bin/nidump passwd / > %s", GP_OSX_PASS_DUMP); if( ! niutil_run_command(command) ) { free(command); return gid; } free(command); if( ! file_exists(GP_OSX_PASS_DUMP) ) { printf("\nError: passwd file not found: %s\n", GP_OSX_PASS_DUMP); return gid; } /* Determine what gid is free and above 500 */ if((fp=fopen(GP_OSX_PASS_DUMP, "r"))==NULL) { return gid; } fseek(fp, 0, SEEK_END); length=ftell(fp); rewind(fp); buffy = allocate(length); tempgid = allocate(8192); while(fgets(buffy, length, fp)!=NULL) { /* Dont acctept bad input */ if( strlen(buffy) < 3 || strlen(buffy) > 1024 ) continue; colon=0; num=0; begin=0; end=0; /* Get the beginning of the gid */ for(i=0; buffy[i]!='\0'; i++) { if( buffy[i]==':' ) colon++; /* We have found the beginning of the gid */ if( colon==3 ) { begin=++i; break; } } /* Get the end of the gid */ for(i=i; buffy[i]!='\0'; i++) { end++; if( buffy[i]==':' ) { --end; sprintf(tempgid, &buffy[begin]); /* Terminate it after the last digit */ tempgid[end]='\0'; /* Collect the greatest gid */ if( chars_are_digits(tempgid) ) { /* Conversion to a valid long gid_t */ num = (gid_t) strtol(tempgid, &gp_err, 10); if( gp_err && *gp_err ) printf("Error Converting a valid long gid \n"); else if( num > gid ) gid=num; if(LONG_MIN==num) printf("LONG_MIN Conversion error for gid\n"); if(LONG_MAX==num) printf("LONG_MAX Conversion error for gid\n"); if(errno==ERANGE) printf("Conversion out of range for gid\n"); } /* No need to report a non digit or a negative value */ break; } } } free(buffy); free(tempgid); unlink_file(GP_OSX_PASS_DUMP); /* Add 1 to gid */ gid++; if( gid <= 499 ) return 500; else return gid; } int niutil_useradd(G_CONST_RETURN gchar *username, G_CONST_RETURN gchar *shell) { char *command; long uid=0, gid=0, gp_id=0; command = allocate(8192); /* Create the new users database record */ sprintf(command, "/usr/bin/niutil -create / /users/%s", username); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); free(command); exit (1); } /* Add a comment for this user */ sprintf(command, "/usr/bin/niutil -createprop / /users/%s realname %s", username, "ftp-user"); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); free(command); exit (1); } if( ! (gid=niutil_get_free_gid_above_500_()) ) { printf("\nError: get_free_gid\n"); free(command); exit (1); } if( ! (uid=niutil_get_free_uid_above_500_()) ) { printf("\nError: get_free_uid\n"); free(command); exit (1); } /* We want uid's and gid's to be the same */ if( uid > gid ) gp_id = uid; else gp_id = gid; /* Set this users gid */ sprintf(command, "/usr/bin/niutil -createprop / /users/%s gid %li", username, gp_id); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); free(command); exit (1); } /* Set this users uid */ sprintf(command, "/usr/bin/niutil -createprop / /users/%s uid %li", username, gp_id); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); free(command); exit (1); } /* Set this users homedirectory to /dev/null */ sprintf(command, "/usr/bin/niutil -createprop / /users/%s home %s", username, "/dev/null"); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); free(command); exit (1); } /* Set the name of the user */ sprintf(command, "/usr/bin/niutil -createprop / /users/%s name %s", username, username); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); free(command); exit (1); } /* Set the users shell */ sprintf(command, "/usr/bin/niutil -createprop / /users/%s shell %s", username, shell); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); free(command); exit (1); } /* /usr/bin/niutil -createprop . /users/username change changetime */ /* /usr/bin/niutil -createprop . /users/username expire expiretime */ free(command); /* Return true if the user exists */ return niutil_user_exists(username); } int niutil_userdel(G_CONST_RETURN gchar *username) { int i=0; char *command; /* Verify that the user really exists */ if( ! niutil_user_exists(username) ) return i; command = allocate(8192); sprintf(command, "/usr/bin/niutil -destroy / /users/%s", username); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); } else i = 1; free(command); return i; } int niutil_password_user(G_CONST_RETURN gchar *username, G_CONST_RETURN gchar *password) { /* Password a user */ int i=0; char *command, *encrypted_pass; /* Verify that the user really exists */ if( ! niutil_user_exists(username) ) return i; /* Crypt return value should not be freed */ encrypted_pass = encrypt_password(password); if( encrypted_pass == NULL ) { printf("\nCrypt failed.\n"); exit (1); } command = allocate(8192); /* 'Encrypted Password' otherwise the shell might swallow it */ sprintf(command, "/usr/bin/niutil -createprop / /users/%s passwd '%s'", username, encrypted_pass); if( ! niutil_run_command(command) ) { printf("Error running: %s\n", command); free(command); exit (1); } else i = 1; free(command); return i; } gadmin-proftpd-0.4.2/src/system_defines.h0000644000000000000000000000171011513432313017102 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef system_defines_H # define system_defines_H #include "system_defines.c" #endif gadmin-proftpd-0.4.2/src/status_update.h0000644000000000000000000000205511513432313016751 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef status_update_H # define status_update_H extern struct w *widgets; char * get_process_pid(char process[1024], char extmatch[1024]); int status_update(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/clear_file_tab.c0000644000000000000000000000246511513432312016776 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include #include "gettext.h" #include "widgets.h" #include "allocate.h" #include "clear_file_tab.h" #include "populate_file_tab.h" void clear_file_tab(struct w *widgets) { /* Clear the xferlog */ FILE *fp; if((fp=fopen(XFER_LOG, "w+"))==NULL) return; fclose(fp); populate_files(widgets); } gadmin-proftpd-0.4.2/src/add_server.h0000644000000000000000000000174311513432312016204 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef add_server_H # define add_server_H extern struct w *widgets; void add_server(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_security_tab.c0000644000000000000000000000742611513432312020105 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "create_security_tab.h" #include "populate_security_tab.h" #include "clear_security_tab.h" /* Wether or not to let the security section expand */ #define EXPAND_SECURITY_SECTION TRUE void create_security_tab(struct w *widgets) { GtkCellRenderer *security_cell_renderer; GtkWidget *security_treeview_hbox; GtkWidget *security_scrolled_window; gchar *utf8=NULL; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* Create the security treeview in a scrolled window */ security_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox6), security_treeview_hbox, EXPAND_SECURITY_SECTION, TRUE, 0); security_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(security_treeview_hbox), security_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(security_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); widgets->security_store = gtk_list_store_new(6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); widgets->security_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->security_treeview), GTK_TREE_MODEL(widgets->security_store)); gtk_container_add(GTK_CONTAINER(security_scrolled_window), widgets->security_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->security_treeview), TRUE); /* Set the column labels in the treeview */ security_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *username_col = gtk_tree_view_column_new_with_attributes(_("Security information"), security_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->security_treeview), GTK_TREE_VIEW_COLUMN(username_col)); /* The update file button */ GtkWidget *security_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox6), security_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(security_button_box), GTK_BUTTONBOX_SPREAD); GtkWidget *clear_security_button = gtk_button_new_from_stock(GTK_STOCK_DELETE); gtk_box_pack_start(GTK_BOX(security_button_box), clear_security_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(clear_security_button), "clicked", G_CALLBACK(clear_security_tab), widgets); GtkWidget *update_security_button = gtk_button_new_from_stock(GTK_STOCK_REFRESH); gtk_box_pack_start(GTK_BOX(security_button_box), update_security_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(update_security_button), "clicked", G_CALLBACK(populate_security), widgets); gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/delete_user.c0000644000000000000000000002324411513432313016362 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include "widgets.h" #include "gettext.h" #include "allocate.h" #include "commands.h" #include "show_info.h" #include "delete_user.h" #include "functions.h" #include "system_defines.h" #include "create_del_system_user_question.h" #include "populate_users.h" #include "populate_user_settings.h" #include "populate_conf_tab.h" #include "select_first_user.h" #include "reread_conf.h" #ifdef USE_DARWIN #include "osx_functions.h" #endif extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_type[1024]; extern char global_user_name[1024]; extern int activated; void delete_user(struct w *widgets) { /* Deletes the user settings from the selected server and asks to delete the system user as well */ FILE *fp; long conf_size; char *config; char *user_settings; char *UserUsername, *AllowuserName; char *old_buffer, *address_buffer, *port_buffer; int length=0, user_deleted=0, found_server=0; G_CONST_RETURN gchar *username; gchar *info; username = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[0])); /* If the namefield in username is empty inform that we refuse to do anything */ length = strlen(username); if( length == 0 ) { info = g_strdup_printf(_("Could not delete the user, select a user first.\n")); show_info(info); g_free(info); return; } /* Dont ever delete the root user, it cant be added in the gui but could be added by the user */ if( username[0]=='r' && username[1]=='o' && username[2]=='o' && username[3]=='t' && strlen(username)==4 ) { info = g_strdup_printf(_("User root can not be deleted.\n")); show_info(info); g_free(info); return; } /* Delete the configuration for the deleted user in the correct server */ if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { info = g_strdup_printf(_("proftpd.conf was not found here:\n%s\n"), PROFTPD_CONF); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); UserUsername = allocate(4096); strcpy(UserUsername, "User "); strcat(UserUsername, username); /* Avoid similar user deletion */ strcat(UserUsername, "\n"); AllowuserName = allocate(4096); strcpy(AllowuserName, "AllowUser "); strcat(AllowuserName, username); /* Avoid similar user deletion */ strcat(AllowuserName, "\n"); config = allocate(conf_size); old_buffer = allocate(conf_size); user_settings = allocate(conf_size); address_buffer = allocate(8192+15); port_buffer = allocate(8192+3); /* Get everything except the selected users settings and allowuser in the selected server */ if( strstr((char *)global_server_type, "Virtualhost") ) sprintf(address_buffer, "", global_server_address); else sprintf(address_buffer, global_server_address); sprintf(port_buffer, "Port %s", global_server_port); /* Standard server selected, delete the selected user in this (first) server */ if( ! strstr((char *)global_server_type, "Virtualhost") ) found_server = 1; if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { /* Is this the correct server to delete the user from.. */ if( strstr("Virtualhost", (char *)global_server_type) && ! found_server && strstr(old_buffer, address_buffer) ) { strcat(config, old_buffer); /* Lets see if its the same port as the selected one */ /* If this server has the same port its the correct server .. the end. */ while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) continue; /* This will expect the servers port on the second line ! * else itll miss some values .. */ if( strstr(old_buffer, "Port") && strstr(old_buffer, port_buffer) ) { found_server = 1; strcat(config, old_buffer); break; } else strcat(config, old_buffer); if( strstr(old_buffer, "") ) break; } } else strcat(config, old_buffer); /* Continue until we find the selected server */ if( found_server ) break; } if( ! found_server ) { fclose(fp); free(old_buffer); free(address_buffer); free(port_buffer); free(config); free(user_settings); free(UserUsername); free(AllowuserName); info = g_strdup_printf(_("Could not find the server, user not deleted\n")); show_info(info); g_free(info); return; } /* We have collected everything up to * * Port PORTNR */ if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp) !=NULL) { /* Skip the Allowuser line in the LIMIT context */ if( strstr(old_buffer, AllowuserName) ) continue; /* If this is this users settings, dont copy it */ if( strstr(old_buffer, "") ) break; } /* Get every other users settings */ if( ! user_deleted ) strcat(config, user_settings); } else { /* Delete extra whitespace between the users settings and * get everything but the this users settings. */ if( strlen(old_buffer) > 3 ) strcat(config, old_buffer); } } fclose(fp); free(old_buffer); free(address_buffer); free(port_buffer); free(UserUsername); free(AllowuserName); free(user_settings); /* Write the new config without the deleted users settings */ if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { printf("Error Writing configuration here: %s\n", PROFTPD_CONF); return; } fputs(config, fp); fclose(fp); free(config); fix_newlines_in_conf(); if( user_exists(username) ) { /* Virtual users */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->server_set_check_virtual)) ) { delete_virtual_user(username); populate_users(widgets); select_first_user(widgets); populate_user_settings(widgets); populate_conf_tab(widgets); } else { create_del_system_user_question(widgets); gtk_widget_show_all(widgets->del_system_user_question_window); /* Repopulations are done in the (do or dont) functions below */ } } } void dont_delete_system_user(struct w *widgets) { gtk_widget_destroy(widgets->del_system_user_question_window); /* Update users, user settings and the conf tab */ populate_users(widgets); select_first_user(widgets); populate_user_settings(widgets); populate_conf_tab(widgets); /* Update the server */ reread_conf(widgets); } void do_delete_system_user(GtkButton *button, struct w *widgets) { /* Deletes the system user */ #ifndef USE_DARWIN /* Avoid unused warning */ char *command; #endif int deleted = 0; int length = 0; gchar *utf8 = NULL; gchar *info; char *username; gtk_widget_destroy(widgets->del_system_user_question_window); username = allocate(1024); snprintf(username, 1000, "%s", global_user_name); if( username == NULL ) { info = g_strdup_printf(_("No username specified.\n")); show_info(info); g_free(info); return; } /* If the username field is empty inform that this cant be done. */ length = strlen(username); if( length == 0 ) { info = g_strdup_printf(_("No username specified.\n")); show_info(info); g_free(info); return; } if( username[0]=='r' && username[1]=='o' && username[2]=='o' && username[3]=='t' && strlen(username) == 4 ) { info = g_strdup_printf(_("The root user can not be deleted.\n")); show_info(info); g_free(info); return; } #ifndef USE_DARWIN if( user_exists(username) ) { command = allocate(4096); snprintf(command, 4000, "%s %s", DELUSER, username); if( run_command(command) ) deleted = 1; free(command); } #elif USE_DARWIN if( niutil_user_exists(username) ) { if( niutil_userdel(username) ) deleted = 1; } #endif if( ! deleted ) { info = g_strdup_printf(_("Failed deleting user: %s\n"), username); show_info(info); g_free(info); } if( utf8!=NULL ) g_free(utf8); /* Update users, user settings and the conf tab */ populate_users(widgets); select_first_user(widgets); populate_user_settings(widgets); populate_conf_tab(widgets); /* Update the server */ reread_conf(widgets); } gadmin-proftpd-0.4.2/src/chars_are_digits.c0000644000000000000000000000245611513432312017355 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ int chars_are_digits(char *buf) { int i=0, match=0; for(i=0; buf[i]!='\0'; i++) { if( buf[i]=='\n' || buf[i]=='\r') { i--; break; } if( buf[i]=='0' || buf[i]=='1' || buf[i]=='2' || buf[i]=='3' || buf[i]=='4' || buf[i]=='5' || buf[i]=='6' || buf[i]=='7' || buf[i]=='8' || buf[i]=='9' ) match++; } if( match && match==i ) { return 1; } else return 0; } gadmin-proftpd-0.4.2/src/status_update.c0000644000000000000000000003050111522366663016757 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "support.h" #include #include #include #include #include "allocate.h" #include "widgets.h" #include #include "chars_are_digits.h" #include "commands.h" #include "status_update.h" #include "show_info.h" extern int activated; extern int MAX_READ_POPEN; char * get_process_pid(char process[1024], char extmatch[1024]) { FILE *fp; long num, file_size = 4000; char *line, *sub_proc_path, *pid; int x=0; struct dirent **namelist; pid = allocate(1024); strcpy(pid, "0"); sub_proc_path = allocate(1024); num = scandir(PROC_PATH, &namelist, 0, alphasort); if( num < 0 ) { perror("scandir"); return pid; } else { /* List all directories in PROC_PATH */ for(x=0; xd_name); if((fp=fopen(sub_proc_path, "r"))==NULL) { free(namelist[x]); continue; } line = allocate(file_size+1); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { /* If the following strings are detected in this file its running */ if( strstr(line, process) && strstr(line, extmatch) ) { snprintf(pid, 1000, "%s", namelist[x]->d_name); break; } } fclose(fp); free(line); free(namelist[x]); } } free(namelist); free(sub_proc_path); return pid; } int status_update(struct w *widgets) { /* Status update for ftpwho, total transfer rates and activated/deactivated status. */ FILE *fp; GtkTreeIter iter; long i=0, in_val=0, out_val=0, inxfer=0, outxfer=0, totalxfer=0; int incoming=0, outgoing=0; char *line, *tmp; gchar *info, *path, *cmd, *utf8=NULL; char *pid; GdkColor color; pid = get_process_pid("proftpd", "accepting connections"); if( strcmp(pid, "0") == 0 ) { activated = 0; info = g_strdup_printf(_("Status: Deactivated")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->status_label), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); /* Set status color */ gdk_color_parse("red", &color); gtk_widget_modify_fg(widgets->status_label, GTK_STATE_NORMAL, &color); /* Show non ftp usage */ info = g_strdup_printf(_("The server is deactivated.\n")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); if( info!=NULL ) g_free(info); if( utf8!=NULL ) g_free(utf8); free(pid); return (TRUE); } else { activated = 1; /* printf("Proftpd is running as pid: %s\n", pid); */ info = g_strdup_printf(_("Status: Activated")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->status_label), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); /* Set status color */ gdk_color_parse("dark green", &color); gtk_widget_modify_fg(widgets->status_label, GTK_STATE_NORMAL, &color); } free(pid); /* The server is activated, insert ftpwho information in the treeview */ /* Add the scoreboard file if its missing to avoid missing message's */ path = g_strdup_printf("%s/%s", GP_VARDIR, "run/proftpd"); if( file_exists(path) ) { g_free(path); path = g_strdup_printf("%s/%s", GP_VARDIR, "run/proftpd/proftpd.scoreboard"); if( ! file_exists(path) ) { cmd = g_strdup_printf("echo \"NOTHING\" > %s/%s", GP_VARDIR, "run/proftpd/proftpd.scoreboard"); run_command(cmd); g_free(cmd); } } g_free(path); /* Again in another common location */ path = g_strdup_printf("%s/%s", GP_VARDIR, "proftpd"); if( file_exists(path) ) { g_free(path); path = g_strdup_printf("%s/%s", GP_VARDIR, "proftpd/proftpd.scoreboard"); if( ! file_exists(path) ) { cmd = g_strdup_printf("echo \"NOTHING\" > %s/%s", GP_VARDIR, "proftpd/proftpd.scoreboard"); run_command(cmd); g_free(cmd); } } g_free(path); /* FTP who update and total xferrates */ gtk_list_store_clear(GTK_LIST_STORE(widgets->transfer_store)); cmd = g_strdup_printf("%s -v", FTPWHO_BINARY); if((fp=popen(cmd, "r"))==NULL) { /* Show ftpwho error information in the textview */ info = g_strdup_printf(_("Error running ftpwho -v.\n")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(cmd); if( info!=NULL ) g_free(info); if( utf8!=NULL ) g_free(utf8); return(TRUE); } g_free(cmd); fflush(fp); line = allocate(MAX_READ_POPEN+1); tmp = allocate(MAX_READ_POPEN+20000); /* +20000 for translations and filenames */ while(fgets(line, MAX_READ_POPEN, fp)!=NULL) { if( line==NULL || strlen(line) < 10 || strstr(line, "FTP daemon [") || strstr(line, "up for") || strstr(line, "Service class") || strstr(line, "no users connected") ) continue; if( strstr(line, " idle") /* idle is located at the end of the line */ || strstr(line, " STOR ") || strstr(line, " STOU ") || strstr(line, " APPE ") || strstr(line, " DELE ") || strstr(line, " RETR ") ) { gtk_list_store_append(GTK_LIST_STORE(widgets->transfer_store), &iter); /* The line looks like this: 7154 test [ 0m27s] (n/a) APPE 05 - Soundfile.ogg */ /* Insert PID */ sscanf(line, "%s", tmp); utf8 = g_locale_to_utf8(tmp, strlen(tmp), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->transfer_store), &iter, 0, utf8, -1); if( utf8!=NULL ) g_free(utf8); /* Insert Username */ sscanf(line, "%*s %s", tmp); utf8 = g_locale_to_utf8(tmp, strlen(tmp), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->transfer_store), &iter, 1, utf8, -1); if( utf8!=NULL ) g_free(utf8); /* Insert Action */ if( strstr(line, " idle") ) snprintf(tmp, 100, "%s", _("Idle")); if( strstr(line, " APPE ") || strstr(line, " STOR ") || strstr(line, " STOU ") ) snprintf(tmp, 100, "%s", _("Uploading")); if( strstr(line, " RETR ") ) snprintf(tmp, 100, "%s", _("Downloading")); if( strstr(line, " DELE ") ) snprintf(tmp, 100, "%s", _("Deleting")); utf8 = g_locale_to_utf8(tmp, strlen(tmp), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->transfer_store), &iter, 2, utf8, -1); if( utf8!=NULL ) g_free(utf8); /* Insert filename and handle split filenames */ if( ! strstr(line, " idle") ) for(i=0; line[i]!='\0'; i++) { if( line[i]=='A' && line[i+1]=='P' && line[i+2]=='P' && line[i+3]=='E' ) { snprintf(tmp, 16384, "%s", &line[i+5]); break; } if( line[i]=='S' && line[i+1]=='T' && line[i+2]=='O' && line[i+3]=='R' ) { snprintf(tmp, 16384, "%s", &line[i+5]); break; } if( line[i]=='S' && line[i+1]=='T' && line[i+2]=='O' && line[i+3]=='U' ) { snprintf(tmp, 16384, "%s", &line[i+5]); break; } if( line[i]=='R' && line[i+1]=='E' && line[i+2]=='T' && line[i+3]=='R' ) { snprintf(tmp, 16384, "%s", &line[i+5]); break; } if( line[i]=='D' && line[i+1]=='E' && line[i+2]=='L' && line[i+3]=='E' ) { snprintf(tmp, 16384, "%s", &line[i+5]); break; } } if( strstr(line, " idle") ) snprintf(tmp, 16384, "%s", "None"); if( tmp[strlen(tmp)-1]=='\n' ) tmp[strlen(tmp)-1]='\0'; utf8 = g_locale_to_utf8(tmp, strlen(tmp), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->transfer_store), &iter, 5, utf8, -1); if( utf8!=NULL ) g_free(utf8); } /* Total Xferrates incoming/outgoing/total bandwidth usage */ /* Assumes that the ftpwho output shows stor retr appe and on the next line KB/s */ /* Incoming transfers */ if( strstr(line, "KB/s: ") && incoming == 1 && ! strstr(line, "inf") && ! strstr(line, "nan") ) { if( chars_are_digits(&line[7]) ) { sscanf(line, "%*s %li", &in_val); } if( in_val > 0 ) { inxfer = inxfer+in_val; totalxfer = totalxfer+in_val; } } if( strstr(line, "KB/s: ") && ! strstr(line, "inf") && ! strstr(line, "nan") ) { /* Insert KB/s */ snprintf(tmp, 100, "%s", &line[7]); if( tmp[strlen(tmp)-1]=='\n' ) tmp[strlen(tmp)-1]='\0'; utf8 = g_locale_to_utf8(tmp, strlen(tmp), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->transfer_store), &iter, 3, utf8, -1); if( utf8!=NULL ) g_free(utf8); } if( strstr(line, "client: ") ) { /* Insert Client address */ sscanf(line, "%*s %s", tmp); utf8 = g_locale_to_utf8(tmp, strlen(tmp), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->transfer_store), &iter, 6, utf8, -1); if( utf8!=NULL ) g_free(utf8); } if( strstr(line, "server: ") ) { /* Insert Server address */ sscanf(line, "%*s %s", tmp); utf8 = g_locale_to_utf8(tmp, strlen(tmp), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->transfer_store), &iter, 7, utf8, -1); if( utf8!=NULL ) g_free(utf8); } /* Insert directory path */ if( strstr(line, "location: ") ) { /* Scroll to the beginning of the path */ for(i=0; line[i]!='\0' && i<16384; i++) if( line[i]!=' ' ) break; for(i=i; line[i]!='\0' && i<16384; i++) if( line[i]==' ' ) break; for(i=i; line[i]!='\0' && i<16384; i++) if( line[i]!=' ' ) break; snprintf(tmp, 16384, "%s", &line[i]); if( tmp[strlen(tmp)-1]=='\n' ) tmp[strlen(tmp)-1]='\0'; utf8 = g_locale_to_utf8(tmp, strlen(tmp), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->transfer_store), &iter, 4, utf8, -1); if( utf8!=NULL ) g_free(utf8); } if( strstr(line, " STOR ") || strstr(line, " STOU ") || strstr(line, " APPE ") ) incoming++; else incoming = 0; /* Outgoing transfers */ if( strstr(line, "KB/s: ") && outgoing == 1 && ! strstr(line, "inf") && ! strstr(line, "nan") ) { if( chars_are_digits(&line[7]) ) sscanf(line, "%*s %li", &out_val); if( out_val > 0 ) { outxfer = outxfer+out_val; totalxfer = totalxfer+out_val; } } if( strstr(line, " RETR ") ) outgoing++; else outgoing = 0; } pclose(fp); free(line); free(tmp); /* Total bandwidth usage */ if( totalxfer >= 0 ) { info = g_strdup_printf(" %s %li", _("Total Kbytes/sec:"), totalxfer); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->total_bandwidth_label), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); } /* Total incoming xfers */ if( inxfer >= 0 ) { info = g_strdup_printf("\t %s %li", _("Incoming Kbytes/sec:"), inxfer); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->total_incoming_label), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); } /* Total outgoing xfers */ if( outxfer >= 0 ) { info = g_strdup_printf("\t %s %li ", _("Outgoing Kbytes/sec:"), outxfer); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->total_outgoing_label), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); } return(TRUE); } gadmin-proftpd-0.4.2/src/make_settings_spinbuttons.c0000644000000000000000000001620711513432313021370 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "make_settings_spinbuttons.h" GtkWidget *make_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint spinbutton_length) { GtkWidget *spinbutton; gdouble min = 0; /* minimum value */ gdouble max = 999999; /* max value */ gdouble step = 1; /* Steps per click */ GtkWidget *label; label = gtk_label_new(label_text); spinbutton = gtk_spin_button_new_with_range(min, max, step); gtk_table_attach(table, label, left_attach, right_attach, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, spinbutton, left_attach + 1, right_attach + 1, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 2); gtk_widget_set_size_request(spinbutton, spinbutton_length, -1); gtk_widget_show(spinbutton); gtk_widget_show(label); return spinbutton; } GtkWidget *make_padded_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint spinbutton_length) { GtkWidget *spinbutton; gdouble min = 0; /* minimum value */ gdouble max = 999999; /* max value */ gdouble step = 1; /* Steps per click */ /* This function is only needed to make the passive port range from spinbutton a bit smaller */ GtkWidget *label, *padlabel; GtkWidget *hbox; label = gtk_label_new(label_text); padlabel = gtk_label_new(""); hbox = gtk_hbox_new(TRUE, 0); spinbutton = gtk_spin_button_new_with_range(min, max, step); gtk_table_attach(table, label, left_attach, right_attach, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, hbox, left_attach + 1, right_attach + 1, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_box_pack_start(GTK_BOX(hbox), padlabel, TRUE, TRUE, 0); gtk_widget_set_size_request(padlabel, -1, -1); gtk_box_pack_start(GTK_BOX(hbox), spinbutton, TRUE, TRUE, 0); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 2); gtk_widget_set_size_request(spinbutton, spinbutton_length, -1); gtk_widget_show(spinbutton); gtk_widget_show(label); return spinbutton; } GtkWidget *make_short_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint spinbutton_length) { GtkWidget *spinbutton; gdouble min = 0; /* minimum value */ gdouble max = 999999; /* max value */ gdouble step = 1; /* Steps per click */ GtkWidget *label; label = gtk_label_new(label_text); spinbutton = gtk_spin_button_new_with_range(min, max, step); gtk_table_attach(table, label, left_attach, right_attach, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, spinbutton, left_attach + 2, right_attach + 2, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 2); gtk_widget_set_size_request(spinbutton, spinbutton_length, -1); gtk_widget_show(spinbutton); gtk_widget_show(label); return spinbutton; } GtkWidget *make_shortleft_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint spinbutton_length) { GtkWidget *spinbutton; gdouble min = 0; /* minimum value */ gdouble max = 999999; /* max value */ gdouble step = 1; /* Steps per click */ GtkWidget *label, *padlabel; GtkWidget *hbox; label = gtk_label_new(label_text); padlabel = gtk_label_new(""); hbox = gtk_hbox_new(TRUE, 0); spinbutton = gtk_spin_button_new_with_range(min, max, step); gtk_table_attach(table, label, left_attach, right_attach, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, hbox, left_attach + 1, right_attach + 1, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_box_pack_start(GTK_BOX(hbox), spinbutton, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), padlabel, TRUE, TRUE, 0); gtk_widget_set_size_request(padlabel, -1, -1); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 2); gtk_widget_set_size_request(spinbutton, spinbutton_length, -1); gtk_widget_show(spinbutton); gtk_widget_show(label); return spinbutton; } GtkWidget *make_spinbutton(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint spinbutton_length) { GtkWidget *spinbutton; gdouble min = 0; /* minimum value */ gdouble max = 999999; /* max value */ gdouble step = 1; /* Steps per click */ spinbutton = gtk_spin_button_new_with_range(min, max, step); gtk_table_attach(table, spinbutton, left_attach + 2, right_attach + 2, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_widget_set_size_request(spinbutton, spinbutton_length, -1); gtk_widget_show(spinbutton); return spinbutton; } gadmin-proftpd-0.4.2/src/create_server_tab.c0000644000000000000000000001765411513432312017550 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "server_treeview_row_clicked.h" #include "add_server.h" #include "delete_server.h" #include "apply_server_settings.h" #include "create_import_window.h" /* Wether or not to let the server section expand */ #define EXPAND_SERVER_SECTION FALSE /* Wether or not to let the server settings section expand */ #define EXPAND_SERVER_SETTINGS_SECTION TRUE void create_server_tab(struct w *widgets) { GtkCellRenderer *server_cell_renderer; GtkWidget *server_treeview_hbox, *settings_treeview_hbox; GtkWidget *server_scrolled_window; GtkWidget *frame; gchar *utf8=NULL; GtkWidget *import_alignment; GtkWidget *import_hbox; GtkWidget *import_image; GtkWidget *import_label; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* Create the domain treeview in a scrolled window */ server_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox1), server_treeview_hbox, EXPAND_SERVER_SECTION, TRUE, 0); server_scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(server_treeview_hbox), server_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(server_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(server_scrolled_window, -1, 100); widgets->server_store = gtk_list_store_new(4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); widgets->server_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->server_treeview), GTK_TREE_MODEL(widgets->server_store)); gtk_container_add(GTK_CONTAINER(server_scrolled_window), widgets->server_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->server_treeview), TRUE); /* Set the column labels in the treeview */ server_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *address_col = gtk_tree_view_column_new_with_attributes(_("Server address"), server_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->server_treeview), GTK_TREE_VIEW_COLUMN(address_col)); GtkTreeViewColumn *port_col = gtk_tree_view_column_new_with_attributes(_("Port"), server_cell_renderer, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->server_treeview), GTK_TREE_VIEW_COLUMN(port_col)); GtkTreeViewColumn *server_name_col = gtk_tree_view_column_new_with_attributes(_("Server name"), server_cell_renderer, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->server_treeview), GTK_TREE_VIEW_COLUMN(server_name_col)); GtkTreeViewColumn *server_type_col = gtk_tree_view_column_new_with_attributes(_("Server type"), server_cell_renderer, "text", 3, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->server_treeview), GTK_TREE_VIEW_COLUMN(server_type_col)); g_signal_connect((gpointer)widgets->server_treeview, "button_press_event", G_CALLBACK(server_treeview_row_clicked), widgets); /* The import, add, delete and change server entries and buttons */ // Address, port, name(doesnt matter), (type is always vhost) GtkWidget *server_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox1), server_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(server_button_box), GTK_BUTTONBOX_SPREAD); /* The import users button with its non stock label and image */ GtkWidget *import_users_button = gtk_button_new(); gtk_box_pack_start(GTK_BOX(server_button_box), import_users_button, FALSE, FALSE, 0); import_alignment = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (import_alignment); gtk_container_add(GTK_CONTAINER(import_users_button), import_alignment); import_hbox = gtk_hbox_new (FALSE, 2); gtk_widget_show (import_hbox); gtk_container_add(GTK_CONTAINER(import_alignment), import_hbox); import_image = gtk_image_new_from_stock("gtk-convert", GTK_ICON_SIZE_BUTTON); gtk_widget_show (import_image); gtk_box_pack_start(GTK_BOX(import_hbox), import_image, FALSE, FALSE, 0); import_label = gtk_label_new_with_mnemonic(_("Import")); gtk_widget_show (import_label); gtk_box_pack_start(GTK_BOX(import_hbox), import_label, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(import_label), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(G_OBJECT(import_users_button), "clicked", G_CALLBACK(create_import_window), widgets); /* The delete server button */ GtkWidget *delete_server_button = gtk_button_new_from_stock(GTK_STOCK_DELETE); gtk_box_pack_start(GTK_BOX(server_button_box), delete_server_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(delete_server_button), "clicked", G_CALLBACK(delete_server), widgets); /* The add server button */ GtkWidget *add_server_button = gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start(GTK_BOX(server_button_box), add_server_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(add_server_button), "clicked", G_CALLBACK(add_server), widgets); /* The Apply server button */ GtkWidget *apply_server_button = gtk_button_new_from_stock(GTK_STOCK_APPLY); gtk_box_pack_start(GTK_BOX(server_button_box), apply_server_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(apply_server_button), "clicked", G_CALLBACK(apply_server_settings), widgets); /* Create the server settings in a table inside a scrolled window */ settings_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox1), settings_treeview_hbox, EXPAND_SERVER_SETTINGS_SECTION, TRUE, 0); widgets->server_settings_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(settings_treeview_hbox), widgets->server_settings_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widgets->server_settings_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(widgets->server_settings_scrolled_window, -1, 100); /* Add a vbox to the scrolled window */ widgets->server_settings_vbox = gtk_vbox_new(TRUE, 0); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(widgets->server_settings_scrolled_window), widgets->server_settings_vbox); /* Add a frame */ frame = gtk_frame_new(_("Settings")); /* Add a table with for the settings with 3 columns */ widgets->srv_set_table = gtk_table_new(NUM_SERVERTAB_ENTRIES+NUM_SERVERTAB_SPINBUTTONS+NUM_SERVERTAB_COMBOS, 3, FALSE); gtk_box_pack_start(GTK_BOX(widgets->server_settings_vbox), frame, TRUE, TRUE, 1); gtk_container_add(GTK_CONTAINER(frame), widgets->srv_set_table); gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/make_settings_entries.h0000644000000000000000000000274711513432313020462 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef gadmin_proftpd_make_settings_entries_H # define gadmin_proftpd_make_settings_entries_H GtkWidget *make_entry_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_long_entry_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); #endif gadmin-proftpd-0.4.2/src/make_settings_combos.c0000644000000000000000000001337511513432313020265 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "make_settings_combos.h" GtkWidget *make_combo_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint combo_length) { GtkWidget *combo; GtkWidget *label; label = gtk_label_new(label_text); combo = gtk_combo_box_new_text(); gtk_table_attach(table, label, 0, 0+1, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, combo, left_attach + 1, right_attach + 1, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 0); // gtk_widget_set_size_request(combo, combo_length, -1); // gtk_widget_set_size_request(combo, combo_length, -1); gtk_widget_show(combo); gtk_widget_show(label); return combo; } GtkWidget *make_short_combo_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint combo_length) { GtkWidget *combo; GtkWidget *label; label = gtk_label_new(label_text); combo = gtk_combo_box_new_text(); gtk_table_attach(table, label, 0, 0+1, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, combo, left_attach + 2, right_attach + 2, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 0); gtk_widget_set_size_request(combo, combo_length, -1); gtk_widget_show(combo); gtk_widget_show(label); return combo; } GtkWidget *make_label_combo_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint combo_length) { GtkWidget *label, *pad_label; GtkWidget *combo; GtkWidget *hbox; hbox = gtk_hbox_new(FALSE, 2); label = gtk_label_new(label_text); combo = gtk_combo_box_new_text(); pad_label = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(hbox), combo, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), pad_label, FALSE, FALSE, 0); gtk_table_attach(table, label, 0, 1, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, hbox, 1, 2, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 0); gtk_widget_show(label); gtk_widget_show(combo); gtk_widget_show(pad_label); return combo; } /* A clone of the above but with a text entry combo for shells etc */ GtkWidget *make_label_textcombo_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint combo_length) { GtkWidget *label, *pad_label; GtkWidget *combo; GtkWidget *hbox; hbox = gtk_hbox_new(FALSE, 2); label = gtk_label_new(label_text); combo = gtk_combo_box_entry_new_text(); pad_label = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(hbox), combo, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), pad_label, FALSE, FALSE, 0); gtk_table_attach(table, label, 0, 1, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, hbox, 1, 2, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 0); gtk_widget_show(label); gtk_widget_show(combo); gtk_widget_show(pad_label); return combo; } GtkWidget *make_combo(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint combo_length) { GtkWidget *combo; combo = gtk_combo_box_new_text(); gtk_table_attach(table, combo, left_attach + 1, right_attach + 1, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_widget_set_size_request(combo, combo_length, -1); gtk_widget_show(combo); return combo; } gadmin-proftpd-0.4.2/src/create_user_settings.h0000644000000000000000000000200111513432312020273 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef create_user_settings_H # define create_user_settings_H extern struct w *widgets; void create_user_settings(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_disc_tab.h0000644000000000000000000000176211513432312017162 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef create_disc_tab_H # define create_disc_tab_H extern struct w *widgets; void create_disc_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_transfer_tab.h0000644000000000000000000000177511513432312020070 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef create_transfer_tab_H # define create_transfer_tab_H extern struct w *widgets; void create_transfer_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/make_settings_hseparators.h0000644000000000000000000000221611513432313021333 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef gadmin_proftpd_make_settings_hseparators_H # define gadmin_proftpd_make_settings_hseparators_H void make_3columns_hseparator(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach); #endif gadmin-proftpd-0.4.2/src/create_transfer_tab.c0000644000000000000000000002320711513432312020055 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "create_transfer_tab.h" #include "kick_button_clicked.h" #include "kick_ban_button_clicked.h" #define EXPAND_TRANSFER_SECTION 1 void transfer_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, struct w *widgets) { gchar *pid, *username; GtkTreeIter iter; GtkTreePath *path; GtkTreeModel *list_store; GtkTreeSelection *selection; /* The left button is pressed */ if( ! event->type == GDK_BUTTON_PRESS || ! event->button == 1 ) return; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); if( gtk_tree_selection_count_selected_rows(selection) <= 1 ) { /* Get the treepath for the row that was clicked */ if( gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), event->x, event->y, &path, NULL, NULL, NULL)) { gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); list_store = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(list_store, &iter, path); gtk_tree_model_get(list_store, &iter, 0, &pid, -1); gtk_tree_model_get(list_store, &iter, 1, &username, -1); /* Insert pid or username */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->transfer_pid_checkbutton)) ) gtk_entry_set_text(GTK_ENTRY(widgets->kick_entry), pid); else gtk_entry_set_text(GTK_ENTRY(widgets->kick_entry), username); g_free(pid); g_free(username); gtk_tree_path_free(path); } } } void create_transfer_tab(struct w *widgets) { GtkCellRenderer *transfer_cell_renderer; GtkWidget *transfer_treeview_hbox; GtkWidget *transfer_scrolled_window; gchar *utf8 = NULL; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* Create the transfer treeview in a scrolled window */ transfer_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox3), transfer_treeview_hbox, EXPAND_TRANSFER_SECTION, TRUE, 0); transfer_scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(transfer_treeview_hbox), transfer_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(transfer_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); widgets->transfer_store = gtk_list_store_new(8, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); widgets->transfer_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->transfer_treeview), GTK_TREE_MODEL(widgets->transfer_store)); gtk_container_add(GTK_CONTAINER(transfer_scrolled_window), widgets->transfer_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->transfer_treeview), TRUE); /* Set the column labels in the treeview */ transfer_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *pid_col = gtk_tree_view_column_new_with_attributes(_("PID"), transfer_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->transfer_treeview), GTK_TREE_VIEW_COLUMN(pid_col)); GtkTreeViewColumn *username_col = gtk_tree_view_column_new_with_attributes(_("User"), transfer_cell_renderer, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->transfer_treeview), GTK_TREE_VIEW_COLUMN(username_col)); GtkTreeViewColumn *action_col = gtk_tree_view_column_new_with_attributes(_("Action"), transfer_cell_renderer, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->transfer_treeview), GTK_TREE_VIEW_COLUMN(action_col)); GtkTreeViewColumn *speed_col = gtk_tree_view_column_new_with_attributes(_("KiloBytes/sec"), transfer_cell_renderer, "text", 3, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->transfer_treeview), GTK_TREE_VIEW_COLUMN(speed_col)); GtkTreeViewColumn *dir_col = gtk_tree_view_column_new_with_attributes(_("Directory"), transfer_cell_renderer, "text", 4, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->transfer_treeview), GTK_TREE_VIEW_COLUMN(dir_col)); GtkTreeViewColumn *file_col = gtk_tree_view_column_new_with_attributes(_("File"), transfer_cell_renderer, "text", 5, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->transfer_treeview), GTK_TREE_VIEW_COLUMN(file_col)); GtkTreeViewColumn *client_col = gtk_tree_view_column_new_with_attributes(_("Client"), transfer_cell_renderer, "text", 6, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->transfer_treeview), GTK_TREE_VIEW_COLUMN(client_col)); GtkTreeViewColumn *server_col = gtk_tree_view_column_new_with_attributes(_("Server"), transfer_cell_renderer, "text", 7, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->transfer_treeview), GTK_TREE_VIEW_COLUMN(server_col)); /* Treeview clicked callback */ g_signal_connect((gpointer)widgets->transfer_treeview, "button_press_event", G_CALLBACK(transfer_treeview_row_clicked), widgets); /* Add a speed hbox */ GtkWidget *speed_hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox3), speed_hbox, FALSE, FALSE, 0); /* Transfer speed labels. Text and speeds are added in status_update. */ widgets->total_bandwidth_label = gtk_label_new(""); widgets->total_incoming_label = gtk_label_new(""); widgets->total_outgoing_label = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(speed_hbox), widgets->total_bandwidth_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(speed_hbox), widgets->total_incoming_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(speed_hbox), widgets->total_outgoing_label, FALSE, FALSE, 0); /* Add a kick hbox */ GtkWidget *kick_hbox1 = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox3), kick_hbox1, FALSE, FALSE, 0); GtkWidget *kick_entry_label = gtk_label_new("Username or PID to kick or kickban:"); widgets->kick_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(kick_hbox1), kick_entry_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(kick_hbox1), widgets->kick_entry, FALSE, FALSE, 0); /* Togglebutton for selecting pid instead of user */ GtkWidget *selection_label = gtk_label_new(_("Select PID:")); widgets->transfer_pid_checkbutton = gtk_check_button_new(); gtk_box_pack_start(GTK_BOX(kick_hbox1), selection_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(kick_hbox1), widgets->transfer_pid_checkbutton, FALSE, FALSE, 0); /* Add a kick/kickban button box */ GtkWidget *transfer_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox3), transfer_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(transfer_button_box), GTK_BUTTONBOX_SPREAD); /* Add kick/kickban buttons and callbacks */ GtkWidget *kick_button = gtk_button_new(); GtkWidget *kick_alignment = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(kick_button), kick_alignment); GtkWidget *kick_hbox = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(kick_alignment), kick_hbox); GtkWidget *kick_image = gtk_image_new_from_stock("gtk-apply", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(kick_hbox), kick_image, FALSE, FALSE, 0); GtkWidget *kick_label = gtk_label_new_with_mnemonic(_("Kick")); gtk_box_pack_start(GTK_BOX(kick_hbox), kick_label, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(kick_label), GTK_JUSTIFY_LEFT); gtk_box_pack_start(GTK_BOX(transfer_button_box), kick_button, FALSE, FALSE, 0); g_signal_connect_swapped(GTK_OBJECT(kick_button), "clicked", G_CALLBACK(kick_button_clicked), widgets); GtkWidget *kickban_button = gtk_button_new(); GtkWidget *kickban_alignment = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(kickban_button), kickban_alignment); GtkWidget *kickban_hbox = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(kickban_alignment), kickban_hbox); GtkWidget *kickban_image = gtk_image_new_from_stock("gtk-delete", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(kickban_hbox), kickban_image, FALSE, FALSE, 0); GtkWidget *kickban_label = gtk_label_new_with_mnemonic(_("Kickban")); gtk_box_pack_start(GTK_BOX(kickban_hbox), kickban_label, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(kickban_label), GTK_JUSTIFY_LEFT); gtk_box_pack_start(GTK_BOX(transfer_button_box), kickban_button, FALSE, FALSE, 0); g_signal_connect_swapped(GTK_OBJECT(kickban_button), "clicked", G_CALLBACK(kick_ban_button_clicked), widgets); if( utf8 != NULL ) g_free(utf8); gtk_widget_show_all(widgets->main_window); } gadmin-proftpd-0.4.2/src/credits_window.h0000644000000000000000000000173511513432312017113 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef HAVE_credits_window_H #define HAVE_credits_window_H #include void show_credits(); #endif gadmin-proftpd-0.4.2/src/show_shutdown.h0000644000000000000000000000175211513432313017002 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef show_shutdown_H # define show_shutdown_H extern struct w *widgets; void show_shutdown(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/functions.c0000644000000000000000000006207711513432313016101 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "support.h" #include #include #include #include #include #include #include "widgets.h" #include "chars_are_digits.h" #include "allocate.h" #include "functions.h" #include "show_info.h" #include "system_defines.h" #include "commands.h" #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE #endif #if ! defined USE_DARWIN #ifndef _CRYPT_H #include #endif #endif /* Settings value. Written on apply server settings. */ extern int use_virtual_users; extern gchar *GP_PASSWD_BUF; extern gchar *GP_SHADOW_BUF; extern gchar *GP_GROUP_BUF; extern gchar *GP_GSHADOW_BUF; /* Compare strings in lower case */ int cmplowercase(char *buf, char *cmpstring) { char *p, *newbuf; int retval = 0; if( buf==NULL ) return retval; /* Ignore single newline chars */ if( strlen(buf) < 2 ) return retval; newbuf = allocate(strlen(buf)+1); /* Exists if it cant allocate */ sprintf(newbuf, "%s", buf); for(p = newbuf; *p!='\0'; ++p) *p = tolower(*p); if( strstr(newbuf, cmpstring) ) retval = 1; free(newbuf); return retval; } int user_exists(G_CONST_RETURN gchar *username) { /* Checks if the system user exists */ FILE *fp; long conf_size; int x, user_exists = 0; char tempname[4096]=""; char *check_buffer; /* Checks if the user exists in passwd */ if((fp=fopen(GP_PASSWD_BUF,"r"))==NULL) { /* Dont show anything */ } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); check_buffer = allocate(conf_size); if( conf_size > 1 ) while(fgets(check_buffer, conf_size, fp)!=NULL) { for(x=0; check_buffer[x]; x++) { if(check_buffer[x]==':') { sprintf(tempname, "%s", check_buffer); tempname[x]='\0'; if( strcmp(username, tempname) == 0 ) { user_exists = 1; break; } } if( check_buffer[x]=='\0' || check_buffer[x]=='\n' ) break; } } free(check_buffer); } fclose(fp); /* Checks if the user exists in shadow */ if((fp=fopen(GP_SHADOW_BUF,"r"))==NULL) { /* Dont show anything */ } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); check_buffer = allocate(conf_size); if( conf_size > 1 ) while(fgets(check_buffer, conf_size, fp)!=NULL) { for(x=0; check_buffer[x]; x++) { if(check_buffer[x]==':') { sprintf(tempname, "%s", check_buffer); tempname[x]='\0'; if( strstr(username, tempname) && strlen(username) == strlen(tempname) ) { user_exists = 1; break; } } if( check_buffer[x]=='\0' || check_buffer[x]=='\n' ) break; } } free(check_buffer); fclose(fp); } return user_exists; } int group_exists(G_CONST_RETURN gchar *groupname) { /* Checks if the system group already exists */ FILE *fp; long conf_size; int x, group_exists=0; char tempname[4096]=""; char *check_buffer; /* Checks if the group exists in group */ if((fp=fopen(GP_GROUP_BUF,"r"))==NULL) { /* Dont show anything */ } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); check_buffer = allocate(conf_size); if( conf_size > 1 ) while(fgets(check_buffer, conf_size, fp)!=NULL) { for(x=0; check_buffer[x]; x++) { if(check_buffer[x]==':') { sprintf(tempname, "%s", check_buffer); tempname[x]='\0'; if( strcmp(groupname, tempname) == 0 ) { group_exists = 1; break; } } if( check_buffer[x]=='\0' || check_buffer[x]=='\n' ) break; } } free(check_buffer); fclose(fp); } /* Checks if the group exists in gshadow */ if((fp = fopen(GP_GSHADOW_BUF,"r"))==NULL) { /* Dont show anything */ } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); check_buffer = allocate(conf_size); if( conf_size > 1 ) while(fgets(check_buffer, conf_size, fp)!=NULL) { for(x=0; check_buffer[x]; x++) { if(check_buffer[x]==':') { sprintf(tempname, "%s", check_buffer); tempname[x]='\0'; if( strstr(groupname, tempname) && strlen(groupname)==strlen(tempname) ) { group_exists = 1; break; } } if( check_buffer[x]=='\0' || check_buffer[x]=='\n' ) break; } } free(check_buffer); fclose(fp); } return group_exists; } gchar *get_user_setting(gchar *user, gchar *what) { /* Gets the a specific users setting from passwd */ FILE *fp; long conf_size; int x=0, y=0, found_user=0, found_val=0, count=0; char *tempname; char *check_buffer; gchar *groupnumber; gchar *retval = NULL; gint val_pos = 0; /* This is the group number */ if( strstr(what, "group") ) val_pos = 3; if( strstr(what, "comment") ) val_pos = 4; if( strstr(what, "homedir") ) val_pos = 5; if( strstr(what, "shell") ) val_pos = 6; tempname = allocate(4096); if((fp=fopen(GP_PASSWD_BUF,"r"))==NULL) { retval = g_strdup_printf(_("User setting not found")); free(tempname); return retval; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); check_buffer = allocate(conf_size); if( conf_size > 1 ) while(fgets(check_buffer, conf_size, fp)!=NULL) { for(x=0; check_buffer[x]; x++) { if(check_buffer[x]==':') { snprintf(tempname, 4000, "%s", check_buffer); tempname[x]='\0'; if( strcmp(user, tempname) == 0 ) { found_user = 1; break; } } if( check_buffer[x]=='\0' || check_buffer[x]=='\n' ) break; } if( found_user ) break; } fclose(fp); /* If the user is found, get the specified section */ if( found_user ) for(x=0; check_buffer[x]; x++) { if( check_buffer[x]=='\0' || check_buffer[x]=='\n' ) break; if(check_buffer[x]==':') { count++; /* The val_pos colon is found, beginning of the value to get */ if( count == val_pos ) { snprintf(tempname, 4000, "%s", &check_buffer[x+1]); break; } } } free(check_buffer); /* Snip at value end, shell comes last and should be newline terminated */ if( found_user ) for(y=0; tempname[y]; y++) { if( (tempname[y]==':' && y > 0) || (tempname[y]=='\n' && y > 0) ) { tempname[y]='\0'; /* Atleast one char in the value and max 350 */ if( strlen(tempname) < 351 && ! strstr(tempname, ":") ) { /* Convert the groupnumber to groupname */ if( strstr(what, "group") ) { groupnumber = g_strdup_printf("%s", tempname); retval = get_group_name(groupnumber); g_free(groupnumber); } else retval = g_strdup_printf("%s", tempname); found_val = 1; break; } } } free(tempname); /* g_free'd after the return */ if( found_val ) return retval; retval = g_strdup_printf(_("No value has been set")); return retval; } gchar *get_group_name(gchar *groupnr) { /* Gets the system group name from the system group number */ FILE *fp; long conf_size; int x=0, y=0, found_group_number=0; int count=0, found_group_name=0; char *line, *temp; gchar *retval = NULL; gint val_pos = 0; /* position of the group number (name is always first) */ val_pos = 2; temp = allocate(4096); if((fp=fopen(GP_GROUP_BUF,"r"))==NULL) { retval = g_strdup_printf(_("Group file not found")); free(temp); return retval; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { count = 0; for(x=0; line[x]!='\0'; x++) { if( line[x]==':' ) count++; if( count == val_pos ) break; } snprintf(temp, 4000, "%s", &line[x+1]); /* Snip an extra ":" at the end */ for(y=strlen(temp)-1; temp[y]; y--) { if( temp[y]==':' ) { temp[y]='\0'; break; } } if( strcmp(groupnr, temp) == 0 ) { found_group_number = 1; break; } } fclose(fp); count = 0; /* Get the name of this group */ if( found_group_number ) for(y=strlen(line)-1; line[y]!='\0'; y--) { if( line[y]==':' && x < 4000 ) count++; if( count == 3 ) { found_group_name = 1; snprintf(temp, y+1, "%s", line); break; } } free(line); /* g_free'd after the return */ if( found_group_name ) { retval = g_strdup_printf("%s", temp); free(temp); return retval; } free(temp); retval = g_strdup_printf(_("Group name not found")); return retval; } void password_virtual_user(G_CONST_RETURN gchar *username, G_CONST_RETURN gchar *password) { FILE *fp; long file_size = 0; long i = 0, count = 0; int match = 0; char *line, *tmp, *part, *new_conf; gchar *user_line; const char *encrypted_password; encrypted_password = encrypt_password(password); /* Locate the user, get everything but the first parts (username:password:) */ if((fp=fopen(GP_PASSWD_BUF, "r"))==NULL) { printf("Error reading: %s\n", GP_PASSWD_BUF); return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); part = allocate(file_size+1); tmp = allocate(file_size+1); new_conf = allocate(file_size+1024); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( strlen(line) < 10 ) continue; count = 0; match = 0; for(i=0; line[i]!='\0'; i++) if( line[i]==':' ) { count++; /* See if this is the correct username */ if( count == 1 ) { snprintf(tmp, file_size, "%s", line); tmp[i]='\0'; /* Do they match */ if( strcmp(username, tmp) == 0 ) { match = 1; } break; } } for(i=i; line[i]!='\0'; i++) if( line[i]==':' ) { count++; if( match && count == 3 ) { snprintf(part, file_size, "%s", &line[i+1]); break; } } if( count == 3 && match ) { user_line = g_strdup_printf("%s:%s:%s", username, encrypted_password, part); strcat(new_conf, user_line); } else strcat(new_conf, line); } fclose(fp); free(line); free(tmp); free(part); /* Write the new and changed virtual password file */ if((fp=fopen(GP_PASSWD_BUF, "w+"))==NULL) { printf("Error reading: %s\n", GP_PASSWD_BUF); return; } fputs(new_conf, fp); fclose(fp); free(new_conf); } void delete_virtual_user(G_CONST_RETURN gchar *username) { FILE *fp; long file_size = 0; long i = 0, count = 0; int match = 0; char *line, *tmp, *part, *new_conf; /* Locate the user and remove it */ if((fp=fopen(GP_PASSWD_BUF, "r"))==NULL) { printf("Error reading: %s\n", GP_PASSWD_BUF); return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); part = allocate(file_size+1); tmp = allocate(file_size+1); new_conf = allocate(file_size+1024); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( strlen(line) < 10 ) continue; count = 0; match = 0; for(i=0; line[i]!='\0'; i++) if( line[i]==':' ) { count++; /* See if this is the correct username */ if( count == 1 ) { snprintf(tmp, file_size, "%s", line); tmp[i]='\0'; /* Do they match */ if( strcmp(username, tmp) == 0 ) { match = 1; } break; } } for(i=i; line[i]!='\0'; i++) if( line[i]==':' ) { count++; if( match && count == 3 ) { snprintf(part, file_size, "%s", &line[i+1]); break; } } if( count == 3 && match ) { /* Skip this user line */ } else strcat(new_conf, line); } fclose(fp); free(line); free(tmp); free(part); /* Write the new and changed virtual password file */ if((fp=fopen(GP_PASSWD_BUF, "w+"))==NULL) { printf("Error reading: %s\n", GP_PASSWD_BUF); return; } fputs(new_conf, fp); fclose(fp); free(new_conf); } void password_user(G_CONST_RETURN gchar *username, G_CONST_RETURN gchar *password) { FILE *fp; char *user_pass, *encrypted_pass; if( ! user_exists(username) ) { // sprintf(info_buffer, _("User: %s could not be found in passwd or shadow.\n"), username); // strcat(info_buffer, _("The password was not changed.\n")); // info_window=create_info_window(); // gtk_widget_show(info_window); return; } user_pass = allocate(8192); /* Crypt returns a pointer to a static buffer do not free it */ encrypted_pass = encrypt_password(password); if( encrypted_pass == NULL ) { /* Using unencrypted passwords */ printf("Crypt error: using the chpass(wd) program instead\n"); #if defined USE_LINUX sprintf(user_pass, "echo %s:%s | chpasswd", username, password); #endif #if defined USE_OPENBSD || USE_NETBSD || USE_FREEBSD sprintf(user_pass, "echo %s:%s | chpass", username, password); #endif #if defined USE_DARWIN /* Someone who knows what can be used .. niutil lines ? */ printf("Darwin functions are defined in osx_functions, this is a bug\n"); sprintf(user_pass, "echo passwd/username %s:%s", username, password); #endif } else { /* Using encrypted passwords */ #if defined USE_LINUX sprintf(user_pass, "usermod -p '%s' %s", encrypted_pass, username); #endif #if defined USE_OPENSBD || USE_NETBSD || USE_FREEBSD || USE_AIX || USE_HPUX sprintf(user_pass, "pw usermod -p '%s' %s", encrypted_pass, username); #endif #if defined USE_DARWIN sprintf(user_pass, "echo manually change the password: passwd/username '%s' %s", encrypted_pass, username); #endif } /* Now we have the correct password changing string, change it */ if((fp=popen(user_pass,"w"))==NULL) { perror("popen"); // sprintf(info_buffer, _("Error changing password for user: %s\n"), username); // info_window=create_info_window(); // gtk_widget_show(info_window); } else pclose(fp); #if defined USE_DARWIN printf("Send me a mail describing your systems way of changing a users password\n"); printf("Then i can fix it.\n"); #endif free(user_pass); } char *encrypt_password(G_CONST_RETURN gchar *password) { /* Make an encrypted password using the MD5 algoritm */ int i=0, where=0, randlen=8; /* The max MD5 random stringsize is 8 */ char *rnd_string; char salt[13]=""; /* The total salt length is 12 */ /* 64 chars */ char *arr[]={"A","B","C","D","E","F","G","H","I","J","K", "L","M","N","O","P","Q","R","S","T","U","V", "W","X","Y","Z","a","b","c","d","e","f","g", "h","i","j","k","l","m","n","o","p","q","r", "s","t","u","v","w","x","y","z","0","1","2", "3","4","5","6","7","8","9",".","/"}; srand((unsigned)time(NULL)); rnd_string = allocate(9); while( i < randlen ) { where=rand()%64; strcat(rnd_string, arr[where]); i++; } #if defined HAVE_CRYPT /* For this to work it must have linked with -lcrypt */ sprintf(salt, "$1$%s$", rnd_string); #else /* We cant use MD5 salting and the salt can only be 2 chars */ sprintf(salt, "%s", &rnd_string[6]); #endif free(rnd_string); return crypt(password, salt); } int is_banned(char *user) { /* Is this user banned */ FILE *fp; char *old_buffer, *user_buffer; int ret=0, i=0; long conf_size; if((fp=fopen(GP_FTPUSERS, "r"))==NULL) { /* if there is no ftpusers the user isnt banned */ return 0; } fseek(fp, 0, SEEK_END); conf_size=ftell(fp); rewind(fp); user_buffer = allocate(8192); old_buffer = allocate(conf_size); if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strstr(old_buffer, user) ) { sscanf(old_buffer, "%s", user_buffer); for(i=0; user_buffer[i]!='\0'; i++) { if( user_buffer[i]=='\n' || user_buffer[i]=='\r' ) user_buffer[i]='\0'; } if( strcmp(user_buffer, user) == 0 ) { ret = 1; break; } } } free(old_buffer); free(user_buffer); fclose(fp); return ret; } void make_dir_chmod(gchar *directory, char perm[128]) { gchar *command; command = g_strdup_printf("mkdir -p '%s' && chmod %s '%s'", directory, perm, directory); if( ! run_command(command) ) printf("Error running command: %s\n", command); g_free(command); } int fix_newlines_in_conf() { /* Strip all newlines between directives */ /* * then add newlines before 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( old_buffer[0]=='\n' || old_buffer[0]=='\r' ) { /* Dont collect these lines */ } else strcat(new_buffer, old_buffer); if( strstr(old_buffer, " 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strstr(old_buffer, "server_set_spinbutton[7])); if( chars_are_digits((char *)default_username_length) ) { if( strlen((char *)default_username_length) < 4 ) len = atoi((char *)default_username_length); else { info = g_strdup_printf(_("Max randomize username length is 999\n")); show_info(info); g_free(info); return; } } else { info = g_strdup_printf(_("Randomize username length can only contain digits\n")); show_info(info); g_free(info); return; } rnd_string = random_string(len); /* Insert the randomized username in the username entry */ utf8 = g_locale_to_utf8(rnd_string, strlen(rnd_string), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[0]), utf8); if( utf8!=NULL ) g_free(utf8); free(rnd_string); } void randomize_password(struct w *widgets) { char *rnd_string; int len; gchar *info; gchar *utf8=NULL; G_CONST_RETURN gchar *default_password_length; default_password_length = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[8])); if( chars_are_digits((char *)default_password_length) ) { if( strlen((char *)default_password_length) < 4 ) len = atoi((char *)default_password_length); else { info = g_strdup_printf(_("Max randomize password length is 999\n")); show_info(info); g_free(info); return; } } else { info = g_strdup_printf(_("Randomize password length can only contain digits\n")); show_info(info); g_free(info); return; } rnd_string = random_string(len); /* Insert the randomized password in the password entry */ utf8 = g_locale_to_utf8(rnd_string, strlen(rnd_string), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[1]), utf8); if( utf8!=NULL ) g_free(utf8); free(rnd_string); } char *random_string(int len) { /* Returns a randomized string in upper or lower case * depending on what is selected */ char *rnd_string; gchar *info; int upper_case = 0; int where = 0; int i = 0; if( len > 256 ) { info = g_strdup_printf(_("Randomize length too long, changed it to 256.\n")); show_info(info); g_free(info); len = 256; } /* 256 is the max allowed */ rnd_string = allocate(300); /* Uppercase array 106 chars */ char *u_arr[]={"A","B","C","D","E","F","G","H","I", "J","K","L","M","N","O","P","Q","R", "S","T","U","V","W","X","Y","Z", "a","b","c","d","e","f","g","h","i", "j","k","l","m","n","o","p","q","r", "s","t","u","v","w","x","y","z", "1","2","3","4","5","6","7","8","9", "1","2","3","4","5","6","7","8","9", "1","2","3","4","5","6","7","8","9", "1","2","3","4","5","6","7","8","9", "1","2","3","4","5","6","7","8","9", "1","2","3","4","5","6","7","8","9"}; /* Lowercase array 53 chars */ char *l_arr[]={"a","b","c","d","e","f","g","h","i", "j","k","l","m","n","o","p","q","r", "s","t","u","v","w","x","y","z", "1","2","3","4","5","6","7","8","9", "1","2","3","4","5","6","7","8","9", "1","2","3","4","5","6","7","8","9"}; /* Give "deep thought" some time to come up with the number "42" :) */ usleep(300000); /* Make the first random nondigit */ srand((unsigned)time(NULL)); while(1) { if( upper_case ) { where = rand() % 106; if( ! chars_are_digits(u_arr[where]) ) { strcpy(rnd_string, u_arr[where]); break; } } if( ! upper_case ) { where = rand() % 53; if( ! chars_are_digits(l_arr[where]) ) { strcpy(rnd_string, l_arr[where]); break; } } } where = 0; i = 1; usleep(300000); srand((unsigned)time(NULL)); while( i < len ) { if( upper_case ) { where = rand() % 106; strcat(rnd_string, u_arr[where]); } if( ! upper_case ) { where = rand() % 53; strcat(rnd_string, l_arr[where]); } i++; } return rnd_string; } void exec_ssl(char *command, char descr[128]) { FILE *fp; if((fp=popen(command, "r"))==NULL) { perror("popen"); printf("Error description: %s\n", descr); printf("Error command: %s\n", command); return; } pclose(fp); } gadmin-proftpd-0.4.2/src/select_first_user.h0000644000000000000000000000177011513432313017613 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef select_first_user_H # define select_first_user_H extern struct w *widgets; void select_first_user(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/show_info.c0000644000000000000000000000762311513432313016060 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" extern int info_window_exit_main; void info_set_exit(gchar *content) { /* 2 means break the non-root wait loop in main() */ info_window_exit_main = 2; } void show_info(gchar *content) { gchar *utf8=NULL; GtkTextBuffer *text_buffer; gchar *info; GtkWidget *info_window, *info_vbox, *info_textview; GtkWidget *info_viewport, *scrolled_info_window; if( content == NULL ) { printf("show_info recieved null content\n"); return; } if( strlen(content) < 5 ) { printf("show_info recieved < 5 chars of content\n"); return; } info_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(info_window, 630, 350); gtk_window_set_position(GTK_WINDOW (info_window), GTK_WIN_POS_CENTER); /* Set window information */ info = g_strdup_printf(_("GADMIN-PROFTPD %s Information"), VERSION); gtk_window_set_title(GTK_WINDOW(info_window), info); g_free(info); info_vbox = gtk_vbox_new(FALSE, 0); gtk_container_add (GTK_CONTAINER (info_window), info_vbox); /* Put a scrolled window in the vbox */ scrolled_info_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(info_vbox), scrolled_info_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_info_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); info_viewport = gtk_viewport_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(scrolled_info_window), info_viewport); info_textview = gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(info_viewport), info_textview); //FIXME add GTK_TEXT_VIEW to the other apps also gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(info_textview), GTK_WRAP_WORD); GtkWidget *close_info_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); gtk_box_pack_start(GTK_BOX(info_vbox), close_info_button, FALSE, TRUE, 0); /* Used with main() and closing the non-root timer */ if( info_window_exit_main ) { g_signal_connect_swapped((gpointer) close_info_button, "clicked", G_CALLBACK(info_set_exit), info_window); g_signal_connect(GTK_WINDOW(info_window), "delete_event", GTK_SIGNAL_FUNC(info_set_exit), info_window); } /* Regular close info window hookups */ if( ! info_window_exit_main ) { g_signal_connect_swapped((gpointer) close_info_button, "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(info_window)); g_signal_connect(GTK_WINDOW(info_window), "delete_event", G_CALLBACK(gtk_widget_destroy), NULL); } text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(info_textview)); utf8 = g_locale_to_utf8(content, strlen(content), NULL, NULL, NULL); if( utf8!=NULL ) { /* Strlen error on NULL, thats why.. */ gtk_text_buffer_set_text(text_buffer, utf8, strlen(utf8)); g_free(utf8); } gtk_widget_show_all(info_window); } gadmin-proftpd-0.4.2/src/create_conf_tab.c0000644000000000000000000001301511513432312017152 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "create_conf_tab.h" #include "save_conf_tab.h" #include "standard_conf.h" /* Wether or not to let the conf section expand */ #define EXPAND_CONF_SECTION TRUE void create_conf_tab(struct w *widgets) { GtkWidget *conf_textview_hbox; GtkWidget *conf_scrolled_window; GtkWidget *conf_label1, *conf_alignment1; GtkWidget *conf_image1, *conf_hbox1; GtkWidget *conf_label2, *conf_alignment2; GtkWidget *conf_image2, *conf_hbox2; GtkWidget *conf_label3, *conf_alignment3; GtkWidget *conf_image3, *conf_hbox3; gchar *utf8=NULL; /* Create the conf textview in a scrolled window */ conf_textview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox7), conf_textview_hbox, EXPAND_CONF_SECTION, TRUE, 0); conf_scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(conf_textview_hbox), conf_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(conf_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); widgets->conf_textview = gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(conf_scrolled_window), widgets->conf_textview); /* Create a button box */ GtkWidget *conf_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox7), conf_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(conf_button_box), GTK_BUTTONBOX_SPREAD); /* Add standard conf button */ GtkWidget *standard_conf_button = gtk_button_new(); gtk_box_pack_start(GTK_BOX(conf_button_box), standard_conf_button, FALSE, FALSE, 0); conf_alignment1 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(standard_conf_button), conf_alignment1); conf_hbox1 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(conf_alignment1), conf_hbox1); conf_image1 = gtk_image_new_from_stock("gtk-convert", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(conf_hbox1), conf_image1, FALSE, FALSE, 0); conf_label1 = gtk_label_new_with_mnemonic(_("Standard")); gtk_box_pack_start(GTK_BOX(conf_hbox1), conf_label1, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(conf_label1), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(G_OBJECT(standard_conf_button), "clicked", G_CALLBACK(create_standard_conf_question), widgets); /* Restore conf button */ GtkWidget *restore_conf_button = gtk_button_new(); gtk_box_pack_start(GTK_BOX(conf_button_box), restore_conf_button, FALSE, FALSE, 0); conf_alignment2 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(restore_conf_button), conf_alignment2); conf_hbox2 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(conf_alignment2), conf_hbox2); conf_image2 = gtk_image_new_from_stock("gtk-convert", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(conf_hbox2), conf_image2, FALSE, FALSE, 0); conf_label2 = gtk_label_new_with_mnemonic(_("Restore")); gtk_box_pack_start(GTK_BOX(conf_hbox2), conf_label2, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(conf_label2), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(G_OBJECT(restore_conf_button), "clicked", G_CALLBACK(restore_configuration), widgets); /* Backup conf button */ GtkWidget *backup_conf_button = gtk_button_new(); gtk_box_pack_start(GTK_BOX(conf_button_box), backup_conf_button, FALSE, FALSE, 0); conf_alignment3 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(backup_conf_button), conf_alignment3); conf_hbox3 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(conf_alignment3), conf_hbox3); conf_image3 = gtk_image_new_from_stock("gtk-apply", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(conf_hbox3), conf_image3, FALSE, FALSE, 0); conf_label3 = gtk_label_new_with_mnemonic(_("Backup")); gtk_box_pack_start(GTK_BOX(conf_hbox3), conf_label3, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(conf_label3), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(G_OBJECT(backup_conf_button), "clicked", G_CALLBACK(force_configuration_backup), widgets); GtkWidget *save_conf_button = gtk_button_new_from_stock(GTK_STOCK_SAVE); gtk_box_pack_start(GTK_BOX(conf_button_box), save_conf_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(save_conf_button), "clicked", G_CALLBACK(save_conf_tab), widgets); gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/populate_servers.h0000644000000000000000000000173011513432313017465 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef populate_servers_H # define populate_servers_H void populate_servers(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_main_window.h0000644000000000000000000000172111513432312017720 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include extern struct w *widgets; GtkWidget *create_main_window(struct w *widgets); gadmin-proftpd-0.4.2/src/make_settings_combos.h0000644000000000000000000000426011513432313020263 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef make_settings_combos_H # define make_settings_combos_H GtkWidget *make_combo_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_short_combo_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_label_combo_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); /* The shell combo */ GtkWidget *make_label_textcombo_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_combo(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); #endif gadmin-proftpd-0.4.2/src/create_conf_tab.h0000644000000000000000000000176211513432312017165 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef create_conf_tab_H # define create_conf_tab_H extern struct w *widgets; void create_conf_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/populate_shell_combo.c0000644000000000000000000000762211513432313020263 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include "widgets.h" #include "gettext.h" #include "allocate.h" #include "commands.h" #include "show_info.h" #include "populate_shell_combo.h" void populate_shell_combo(GtkWidget *shell_combo) { FILE *fp; long conf_size; int shell_found = 0; char *old_buffy, *new_buffy; gchar *utf8=NULL; gchar *combo_text=NULL; gchar *null_shell, *info; null_shell = g_strdup_printf("/dev/null"); if( file_exists(null_shell) ) { /* Append /dev/null as the first shell and set is as the active shell */ combo_text = g_strdup_printf("/dev/null"); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(shell_combo), utf8); gtk_combo_box_set_active(GTK_COMBO_BOX(shell_combo), 0); g_free(combo_text); shell_found = 1; } g_free(null_shell); if((fp=fopen(GP_SHELLS, "r"))==NULL) { info = g_strdup_printf(_("Cant find the shells file here:\n%s\n"), GP_SHELLS); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffy = allocate(conf_size+1024); new_buffy = allocate(conf_size+1024); if( conf_size > 1 ) while(fgets(old_buffy, conf_size, fp)!=NULL) { if( strstr(old_buffy, "/dev/null") && ! strstr(old_buffy, "#") ) shell_found = 1; /* Append the /bin/false or /usr/local/bin/false or /usr/bin/false etc shell */ if( strstr(old_buffy, "false") && ! strstr(old_buffy, "#") ) { shell_found = 1; strcpy(new_buffy, old_buffy); utf8 = g_locale_to_utf8(new_buffy, strlen(new_buffy)-1, NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(shell_combo), utf8); break; } /* Append the /sbin/nologin or /usr/sbin/nologin or /usr/local/sbin/nologin etc shell */ if( strstr(old_buffy, "nologin") && ! strstr(old_buffy, "#") ) { shell_found = 1; strcpy(new_buffy, old_buffy); utf8 = g_locale_to_utf8(new_buffy, strlen(new_buffy)-1, NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(shell_combo), utf8); break; } } rewind(fp); /* No false or nologin shell found */ if( ! shell_found ) { info = g_strdup_printf(_("Warning: could not find a false or no login shell here:\n%s\nAppending the other shells."), GP_SHELLS); show_info(info); g_free(info); } /* Append the rest of the shells */ if( conf_size > 1 ) while(fgets(old_buffy, conf_size, fp)!=NULL) { /* Append every shell but the /bin/false shell */ if( ! strstr(old_buffy, "/dev/null") && ! strstr(old_buffy, "nologin") && ! strstr(old_buffy, "false") && ! strstr(old_buffy, "#") && strlen(old_buffy) > 7 ) { strcpy(new_buffy, old_buffy); utf8 = g_locale_to_utf8(new_buffy, strlen(new_buffy)-1, NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(shell_combo), utf8); } } fclose(fp); free(old_buffy); free(new_buffy); if( utf8!=NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/select_first_user.c0000644000000000000000000000315611513432313017606 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "select_first_user.h" extern char global_user_name[1024]; void select_first_user(struct w *widgets) { GtkTreePath *path; GtkTreeIter iter; GtkTreeModel *list_store; gchar *user=NULL; path = gtk_tree_path_new_first(); list_store = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->user_treeview)); if( ! gtk_tree_model_get_iter(list_store, &iter, path) ) { gtk_tree_path_free(path); strcpy(global_user_name, ""); return; } gtk_tree_model_get(list_store, &iter, 0, &user, -1); sprintf(global_user_name, "%s", (gchar *)user?user:"None"); gtk_tree_path_free(path); g_free(user); } gadmin-proftpd-0.4.2/src/populate_disc_tab.h0000644000000000000000000000172211513432313017545 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef populate_discs_H # define populate_discs_H void populate_discs(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/dir_treeview_funcs.c0000644000000000000000000002107511513432313017750 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include "widgets.h" #include "gettext.h" #include "allocate.h" #include "functions.h" #include "show_info.h" #include "dir_treeview_funcs.h" /* Temporary for option deprecations */ extern char global_version[1024]; /* The current directory beeing added and limited. */ gchar *dir; /* If row_pos=0 then this toplevel ftp directory is set */ extern gchar *homedir; /* Wether theres a problem with directory additions. */ extern int global_dir_error; /* The 18 checkbox values */ gchar *dir_val[19]; /* The users profile to be appended */ extern char *user_profile; extern long num_rows; extern int row_pos; /* Get the number of rows in the treeview */ gboolean num_rows_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets) { num_rows++; return FALSE; } void append_limit_cmds() { int i = 0, has_limit = 0; /* Set AllowOverwrite before the directory limits */ if( dir_val[6] ) strcat(user_profile, "AllowOverwrite on\n"); else strcat(user_profile, "AllowOverwrite off\n"); /* ALLOW CMDs. Iter the 18 checkboxes */ strcat(user_profile, "\n AllowAll\n\n"); /* DENY CMDs. Iter the 18 checkboxes */ has_limit = 0; strcat(user_profile, "\n DenyAll\n\n"); } /* For each in the directory treeview */ gboolean dirs_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets) { gchar *info = NULL; int i = 0; /* Iter the 18 checkboxes on each row and save the values */ for(i=1; i<19; i++) gtk_tree_model_get(model, iter, i, &dir_val[i], -1); /* Get the directory on this row */ gtk_tree_model_get(model, iter, 0, &dir, -1); /* Dont add directories with lengths < 5 */ if( dir == NULL || strlen((char *)dir) < 5 ) { if( strlen((char *)dir) < 1 ) info = g_strdup_printf(_("Invalid directory path: NONE")); else info = g_strdup_printf(_("Invalid directory path: %s"), dir); show_info(info); g_free(info); if( dir !=NULL ) g_free(dir); global_dir_error = 1; /* Return true so it stops iterating */ return TRUE; } /* This is the first toplevel home directory */ if( row_pos == 0 ) { row_pos++; /* Set homedir globally */ homedir = g_strdup_printf("%s", dir); /* Need write: 1 2 4 5 6 7 8 10 */ if( dir_val[1] || dir_val[2] || dir_val[4] || dir_val[5] || dir_val[6] || dir_val[7] || dir_val[8] || dir_val[10] ) make_dir_chmod(dir, "0777"); /* Does mkdir -p, no need to check if it exists */ else make_dir_chmod(dir, "0777"); /* 0755 Noone else can write either... limited by the server. */ if( dir !=NULL ) g_free(dir); /* Return true so it stops iterating */ return TRUE; } row_pos++; /* Ignore the first/home dir */ if( row_pos > 2 ) { /* Add the rest of the users directories */ /* Need write: 1 2 4 5 6 7 8 10 */ if( dir_val[1] || dir_val[2] || dir_val[4] || dir_val[5] || dir_val[6] || dir_val[7] || dir_val[8] || dir_val[10] ) make_dir_chmod(dir, "0777"); /* Does mkdir -p, no need to check if it exists */ else make_dir_chmod(dir, "0777"); /* 0755 Noone else can write either... limited by the server. */ strcat(user_profile, "\n"); append_limit_cmds(); strcat(user_profile, "\n"); } if( dir !=NULL ) g_free(dir); /* Return false to keep foreach func going */ return FALSE; } gadmin-proftpd-0.4.2/src/chars_are_digits.h0000644000000000000000000000172111513432312017354 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef chars_are_digits_H # define chars_are_digits_H int chars_are_digits(char *buf); #endif gadmin-proftpd-0.4.2/src/Makefile.in0000644000000000000000000006364011566004351015774 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = gadmin-proftpd$(EXEEXT) gprostats$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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 = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_gadmin_proftpd_OBJECTS = gadmin_proftpd.$(OBJEXT) \ populate_gadmin_proftpd.$(OBJEXT) widgets.$(OBJEXT) \ support.$(OBJEXT) create_main_window.$(OBJEXT) \ create_server_tab.$(OBJEXT) populate_servers.$(OBJEXT) \ server_treeview_row_clicked.$(OBJEXT) add_server.$(OBJEXT) \ delete_server.$(OBJEXT) create_server_settings.$(OBJEXT) \ populate_server_settings.$(OBJEXT) \ apply_server_settings.$(OBJEXT) select_first_server.$(OBJEXT) \ create_user_tab.$(OBJEXT) file_chooser.$(OBJEXT) \ populate_users.$(OBJEXT) user_treeview_row_clicked.$(OBJEXT) \ populate_shell_combo.$(OBJEXT) add_user.$(OBJEXT) \ dir_treeview_funcs.$(OBJEXT) create_user_settings.$(OBJEXT) \ populate_user_settings.$(OBJEXT) select_first_user.$(OBJEXT) \ apply_user.$(OBJEXT) delete_user.$(OBJEXT) \ create_del_system_user_question.$(OBJEXT) \ make_settings_entries.$(OBJEXT) make_settings_combos.$(OBJEXT) \ make_settings_spinbuttons.$(OBJEXT) \ make_settings_buttons.$(OBJEXT) \ make_settings_checkbuttons.$(OBJEXT) \ make_settings_progressbars.$(OBJEXT) \ make_settings_labels.$(OBJEXT) \ make_settings_hseparators.$(OBJEXT) \ create_transfer_tab.$(OBJEXT) kick_button_clicked.$(OBJEXT) \ kick_ban_button_clicked.$(OBJEXT) status_update.$(OBJEXT) \ create_disc_tab.$(OBJEXT) populate_disc_tab.$(OBJEXT) \ create_file_tab.$(OBJEXT) populate_file_tab.$(OBJEXT) \ clear_file_tab.$(OBJEXT) create_security_tab.$(OBJEXT) \ populate_security_tab.$(OBJEXT) clear_security_tab.$(OBJEXT) \ create_conf_tab.$(OBJEXT) populate_conf_tab.$(OBJEXT) \ save_conf_tab.$(OBJEXT) set_version.$(OBJEXT) \ reread_conf.$(OBJEXT) apply_button_clicked.$(OBJEXT) \ commands.$(OBJEXT) generate_cert.$(OBJEXT) functions.$(OBJEXT) \ commented.$(OBJEXT) credits_window.$(OBJEXT) \ activate_button_clicked.$(OBJEXT) \ deactivate_button_clicked.$(OBJEXT) show_info.$(OBJEXT) \ chars_are_digits.$(OBJEXT) allocate.$(OBJEXT) \ system_defines.$(OBJEXT) create_import_window.$(OBJEXT) \ import_functions.$(OBJEXT) show_shutdown.$(OBJEXT) \ shutdown_ok_clicked.$(OBJEXT) standard_conf.$(OBJEXT) \ add_standard_users.$(OBJEXT) show_help.$(OBJEXT) gadmin_proftpd_OBJECTS = $(am_gadmin_proftpd_OBJECTS) gadmin_proftpd_DEPENDENCIES = am_gprostats_OBJECTS = gprostats.$(OBJEXT) chars_are_digits.$(OBJEXT) \ allocate.$(OBJEXT) gprostats_OBJECTS = $(am_gprostats_OBJECTS) gprostats_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gadmin_proftpd_SOURCES) $(gprostats_SOURCES) DIST_SOURCES = $(gadmin_proftpd_SOURCES) $(gprostats_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSCONFDIR = @SYSCONFDIR@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ gadmin_proftpd_SOURCES = \ gadmin_proftpd.c gadmin_proftpd.h \ populate_gadmin_proftpd.c populate_gadmin_proftpd.h \ widgets.c widgets.h \ support.c support.h \ create_main_window.c create_main_window.h \ create_server_tab.c create_server_tab.h \ populate_servers.c populate_servers.h \ server_treeview_row_clicked.c server_treeview_row_clicked.h \ add_server.c add_server.h \ delete_server.c delete_server.h \ create_server_settings.c create_server_settings.h \ populate_server_settings.c populate_server_settings.h \ apply_server_settings.c apply_server_settings.h \ select_first_server.c select_first_server.h \ create_user_tab.c create_user_tab.h \ file_chooser.c file_chooser.h \ populate_users.c populate_users.h \ user_treeview_row_clicked.c user_treeview_row_clicked.h \ populate_shell_combo.c populate_shell_combo.h \ add_user.c add_user.h \ dir_treeview_funcs.c dir_treeview_funcs.h \ create_user_settings.c create_user_settings.h \ populate_user_settings.c populate_user_settings.h \ select_first_user.c select_first_user.h \ apply_user.c apply_user.h \ delete_user.c delete_user.h \ create_del_system_user_question.c create_del_system_user_question.h \ make_settings_entries.c make_settings_entries.h \ make_settings_combos.c make_settings_combos.h \ make_settings_spinbuttons.c make_settings_spinbuttons.h \ make_settings_buttons.c make_settings_buttons.h \ make_settings_checkbuttons.c make_settings_checkbuttons.h \ make_settings_progressbars.c make_settings_progressbars.h \ make_settings_labels.c make_settings_labels.h \ make_settings_hseparators.c make_settings_hseparators.h \ create_transfer_tab.c create_transfer_tab.h \ kick_button_clicked.c kick_button_clicked.h \ kick_ban_button_clicked.c kick_ban_button_clicked.h \ status_update.c status_update.h \ create_disc_tab.c create_disc_tab.h \ populate_disc_tab.c populate_disc_tab.h \ create_file_tab.c create_file_tab.h \ populate_file_tab.c populate_file_tab.h \ clear_file_tab.c clear_file_tab.h \ create_security_tab.c create_security_tab.h \ populate_security_tab.c populate_security_tab.h \ clear_security_tab.c clear_security_tab.h \ create_conf_tab.c create_conf_tab.h \ populate_conf_tab.c populate_conf_tab.h \ save_conf_tab.c save_conf_tab.h \ set_version.c set_version.h \ reread_conf.c reread_conf.h \ apply_button_clicked.c apply_button_clicked.h \ commands.c commands.h \ generate_cert.c generate_cert.h \ functions.c functions.h \ commented.c commented.h \ credits_window.c credits_window.h \ activate_button_clicked.c activate_button_clicked.h \ deactivate_button_clicked.c deactivate_button_clicked.h \ show_info.c show_info.h \ chars_are_digits.c chars_are_digits.h \ allocate.c allocate.h \ system_defines.c system_defines.h \ create_import_window.c create_import_window.h \ import_functions.c import_functions.h \ show_shutdown.c show_shutdown.h \ shutdown_ok_clicked.c shutdown_ok_clicked.h \ standard_conf.c standard_conf.h \ add_standard_users.c add_standard_users.h \ show_help.c show_help.h gprostats_SOURCES = \ gprostats.c \ chars_are_digits.c chars_are_digits.h \ allocate.c allocate.h gadmin_proftpd_LDADD = @PACKAGE_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__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 $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) gadmin-proftpd$(EXEEXT): $(gadmin_proftpd_OBJECTS) $(gadmin_proftpd_DEPENDENCIES) @rm -f gadmin-proftpd$(EXEEXT) $(LINK) $(gadmin_proftpd_OBJECTS) $(gadmin_proftpd_LDADD) $(LIBS) gprostats$(EXEEXT): $(gprostats_OBJECTS) $(gprostats_DEPENDENCIES) @rm -f gprostats$(EXEEXT) $(LINK) $(gprostats_OBJECTS) $(gprostats_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activate_button_clicked.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_standard_users.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_user.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apply_button_clicked.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apply_server_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apply_user.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chars_are_digits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clear_file_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clear_security_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commands.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commented.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_conf_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_del_system_user_question.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_disc_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_file_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_import_window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_main_window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_security_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_server_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_server_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_transfer_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_user_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_user_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/credits_window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deactivate_button_clicked.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete_user.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir_treeview_funcs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_chooser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/functions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gadmin_proftpd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_cert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gprostats.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/import_functions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kick_ban_button_clicked.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kick_button_clicked.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_settings_buttons.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_settings_checkbuttons.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_settings_combos.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_settings_entries.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_settings_hseparators.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_settings_labels.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_settings_progressbars.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_settings_spinbuttons.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_conf_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_disc_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_file_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_gadmin_proftpd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_security_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_server_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_servers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_shell_combo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_user_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_users.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reread_conf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save_conf_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select_first_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select_first_user.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server_treeview_row_clicked.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/show_help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/show_info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/show_shutdown.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shutdown_ok_clicked.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standard_conf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status_update.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system_defines.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user_treeview_row_clicked.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widgets.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-sbinPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-sbinPROGRAMS # 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: gadmin-proftpd-0.4.2/src/create_user_tab.h0000644000000000000000000000602311513432312017211 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef create_user_tab_H # define create_user_tab_H extern struct w *widgets; void create_user_tab(struct w *widgets); void directory_cell_edited(GtkCellRendererText *cell, gchar *path_string, gchar *new_text, struct w *widgets); void toggle_button_1_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_2_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_3_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_4_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_5_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_6_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_7_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_8_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_9_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_10_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_11_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_12_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_13_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_14_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_15_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_16_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_17_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void toggle_button_18_clicked(GtkCellRendererToggle *cell_renderer, gchar *path, struct w *widgets); void add_directory(gchar *dir, struct w *widgets); void select_directory_clicked(struct w *widgets); void del_directory(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/clear_security_tab.h0000644000000000000000000000177311513432312017734 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef clear_security_tab_H # define clear_security_tab_H extern struct w *widgets; void clear_security_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/populate_security_tab.c0000644000000000000000000001237611513432313020474 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "support.h" #include #include #include #include #include "allocate.h" #include "widgets.h" #include "populate_security_tab.h" #include "show_info.h" // Hmm,,, this is an extern!!! #define MAX_READ_POPEN 16384 void populate_security(struct w *widgets) { /* Lists security entries in the security treeview, denials first */ FILE *fp; long file_size; char *buffy; GtkTreeIter iter; GtkTreePath *path; gboolean edit=0; int found = 0; gchar *utf8=NULL; gchar *info=NULL; /* Default to the configured security log */ gchar *secure_log; secure_log = g_strdup_printf("%s", SECURE_LOG); /* Use the server settings security log if its set */ if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { /* Do nothing */ } else { fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); buffy = allocate(file_size+1024); if( file_size > 1 ) while(fgets(buffy, file_size, fp)!=NULL) { if( ! strstr(buffy, "SystemLog ") || strstr(buffy, "#") ) continue; if( strlen(buffy) < 12 ) continue; /* We have a valid security logfile (doesnt have to exist yet) */ g_free(secure_log); secure_log = g_strdup_printf("%s", &buffy[10]); if( secure_log[strlen(secure_log)-1]=='\n' ) secure_log[strlen(secure_log)-1]='\0'; break; } free(buffy); } gtk_list_store_clear(widgets->security_store); if((fp=fopen(secure_log, "r"))==NULL) { info = g_strdup_printf(_("Cant open the security log here:\n%s\n"), secure_log); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); buffy = allocate(file_size+1024); if( file_size > 1 ) while(fgets(buffy, file_size, fp)!=NULL) { if( ! strstr(buffy, "proftpd") ) continue; if( strstr(buffy, "Login failed") ) { found = 1; gtk_list_store_append(GTK_LIST_STORE(widgets->security_store), &iter); utf8 = g_locale_to_utf8(buffy, strlen(buffy)-1, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->security_store), &iter, 0, utf8, -1); } if( strstr(buffy, "refused") ) { found = 1; gtk_list_store_append(GTK_LIST_STORE(widgets->security_store), &iter); utf8 = g_locale_to_utf8(buffy, strlen(buffy)-1, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->security_store), &iter, 0, utf8, -1); } if( strstr(buffy, "no such user") ) { found = 1; gtk_list_store_append(GTK_LIST_STORE(widgets->security_store), &iter); utf8 = g_locale_to_utf8(buffy, strlen(buffy)-1, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->security_store), &iter, 0, utf8, -1); } if( strstr(buffy, "Maximum login attempts") ) { found = 1; gtk_list_store_append(GTK_LIST_STORE(widgets->security_store), &iter); utf8 = g_locale_to_utf8(buffy, strlen(buffy)-1, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->security_store), &iter, 0, utf8, -1); } if( strstr(buffy, "SECURITY VIOLATION") ) { found = 1; gtk_list_store_append(GTK_LIST_STORE(widgets->security_store), &iter); utf8 = g_locale_to_utf8(buffy, strlen(buffy)-1, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->security_store), &iter, 0, utf8, -1); } } rewind(fp); memset(buffy, 0, file_size); if( file_size > 1 ) while(fgets(buffy, file_size, fp)!=NULL) { if( ! strstr(buffy, "proftpd") ) continue; if( strstr(buffy, "Login successful") ) { found = 1; gtk_list_store_append(GTK_LIST_STORE(widgets->security_store), &iter); utf8 = g_locale_to_utf8(buffy, strlen(buffy)-1, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->security_store), &iter, 0, utf8, -1); } } fclose(fp); free(buffy); g_free(secure_log); if(utf8!=NULL) g_free(utf8); /* Cant set treepath if there arent any rows, then itll crash */ if( ! found ) return; path = gtk_tree_path_new_first(); gtk_tree_view_set_cursor(GTK_TREE_VIEW(widgets->security_treeview), path, NULL, edit); gtk_tree_path_free(path); } gadmin-proftpd-0.4.2/src/standard_conf.c0000644000000000000000000004340011513432313016663 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "gettext.h" #include #include #include #include "allocate.h" #include "widgets.h" #include "functions.h" #include "commands.h" #include "standard_conf.h" #include "populate_gadmin_proftpd.h" #include "file_chooser.h" #include "show_info.h" #include "commented.h" /* Temporary for option deprecations */ extern char global_version[1024]; void new_tls_module_conf() { FILE *fp; long file_size = 0; char *line, *new_conf; gchar *info, *module_conf; if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { info = g_strdup_printf("Error adding new TLS module configuration.\n"); show_info(info); g_free(info); return; } module_conf = g_strconcat("\n", "\n", "TLSEngine off\n", "TLSRequired auth+data\n", "TLSVerifyClient off\n", "TLSProtocol SSLv23\n", "TLSLog ", GP_VARDIR, "/log/proftpd_tls.log\n", "TLSRSACertificateFile ", GP_APPCONFDIR, "/certs/cert.pem\n", "TLSRSACertificateKeyFile ", GP_APPCONFDIR, "/certs/key.pem\n", "TLSCACertificateFile ", GP_APPCONFDIR, "/certs/cacert.pem\n", "TLSRenegotiate required off\n", "TLSOptions AllowClientRenegotiation\n", "\n", NULL); fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); new_conf = allocate(file_size+16384); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( commented(line) ) continue; if( cmplowercase(line, "ifmodule") && cmplowercase(line, "mod_tls.c") && strstr(line, "<") && strstr(line, ">") ) { while(fgets(line, file_size, fp)!=NULL) if( cmplowercase(line, "ifmodule") && strstr(line, "<") && strstr(line, ">") ) { strcat(new_conf, module_conf); break; } } else strcat(new_conf, line); } g_free(module_conf); free(line); fclose(fp); /* Write the new configuration */ if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { info = g_strdup_printf("Error writing new TLS module configuration.\n"); show_info(info); g_free(info); g_free(new_conf); return; } fputs(new_conf, fp); fclose(fp); free(new_conf); info = g_strconcat("Successfully added new TLS module configuration.\n\n", "GAdmin-PRoFTPd now supports explicit/total FTP encryption.\n\n", "New signed certificates needs to be generated.\n", "Press the generate button and then turn on secure communications\n\n", "Clients that supports explicit FTP encryption can be used.\n", NULL); show_info(info); g_free(info); } int conf_ok(gchar *file_path) { FILE *fp; long conf_size; char *line; int retval = 0; int good_conf = 0; if((fp=fopen(file_path, "r"))==NULL) { return retval; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { /* Dont allow excessively long lines */ if( strlen(line) > 500 ) { fclose(fp); free(line); return 0; } if( commented(line) ) continue; /* Finding these options or contexts first means that the configuration is not ok */ if( cmplowercase(line, "") ) good_conf++; /* We handle "standalone". Refuse to use inetd. */ if( cmplowercase(line, "servertype standalone") ) good_conf++; if( cmplowercase(line, "transferrate retr") ) good_conf++; if( cmplowercase(line, "transferrate stor") ) good_conf++; if( cmplowercase(line, "transferrate stou") ) good_conf++; if( cmplowercase(line, "transferrate appe") ) good_conf++; if( cmplowercase(line, "passiveports ") ) good_conf++; if( cmplowercase(line, "defaulttransfermode ") ) good_conf++; } fclose(fp); free(line); if( good_conf >= 7 ) retval = 1; return retval; } /* Automated configuration backups for new versions */ void backup_configuration(struct w *widgets) { gchar *cmd, *info; if( ! file_exists(PROFTPD_CONF_BACKUP) && file_exists(PROFTPD_CONF) ) { cmd = g_strdup_printf("cp %s %s", PROFTPD_CONF, PROFTPD_CONF_BACKUP); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error: Could not backup the current configuration:\n%s\n"), PROFTPD_CONF); show_info(info); g_free(info); } else { info = g_strdup_printf(_("The configuration was backed up here for safety:\n%s\n"), PROFTPD_CONF_BACKUP); show_info(info); g_free(info); } g_free(cmd); } } /* Backup button in the configuration tab backs up the conf with an added "-gadmin-backup" tag to it */ /* Manual backups are not automatically overwritten then. */ void force_configuration_backup(struct w *widgets) { gchar *cmd, *info; if( file_exists(PROFTPD_CONF) ) { cmd = g_strdup_printf("cp %s %s-gadmin-backup", PROFTPD_CONF, PROFTPD_CONF_BACKUP); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error: Could not backup the current configuration:\n%s\n"), PROFTPD_CONF); show_info(info); g_free(info); } else { info = g_strdup_printf(_("The configuration was backed up here for safety:\n%s%s\n"), PROFTPD_CONF_BACKUP, "-admin-backup"); show_info(info); g_free(info); } g_free(cmd); } } /* Restore and use another proftpd.conf file */ void restore_configuration(struct w *widgets) { gchar *info=NULL, *cmd=NULL, *path=NULL; path = get_dialog_path_selection("FILE", GP_APPCONFDIR, "None"); /* conf_ok() also checks that the configuration lines have valid length */ if( path!=NULL && strlen(path) > 8 && conf_ok(path) ) { cmd = g_strdup_printf("cp %s %s", path, PROFTPD_CONF); if( ! run_command(cmd) ) { info = g_strdup_printf(_("The configuration file could not be restored.\n")); show_info(info); g_free(info); } g_free(cmd); g_free(path); path = NULL; } else { info = g_strdup_printf(_("The configuration file could not be restored.\n")); show_info(info); g_free(info); } if( path!=NULL ) g_free(path); populate_gadmin_proftpd(widgets); } /* Adds a default/standard configuration and also adds any ModulePath and LoadModule statements from the old conf if any, for included DSO's. */ void add_standard_conf(struct w *widgets) { FILE *fp; char *includes = NULL; gchar *info, *config; /* First backup/copy the old configuration */ backup_configuration(widgets); /* Get ModulePath and LoadModule statements from included configurations. */ includes = get_dynamic_module_statements(); if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { info = g_strdup_printf(_("Cant write a new proftpd.conf here:\n%s\n"), PROFTPD_CONF); show_info(info); g_free(info); if( includes!=NULL ) free(includes); return; } /* Add any Include lines we found at the top of the conf. */ if( includes!=NULL ) { fputs(includes, fp); free(includes); fputs("\n", fp); } /* Note: inetd functions would limit the servers usability */ config = g_strconcat( "ServerType standalone\n", "DefaultServer on\n", "Umask 022\n", "ServerName \"0.0.0.0\"\n", "ServerIdent on \"My FTP Server\"\n", "ServerAdmin email@example.org\n", "IdentLookups off\n", "UseReverseDNS off\n", "Port 21\n", "PassivePorts 49152 65534\n", "#MasqueradeAddress None\n", "TimesGMT off\n", "MaxInstances 30\n", "MaxLoginAttempts 3\n", "TimeoutLogin 300\n", "TimeoutNoTransfer 120\n", "TimeoutIdle 120\n", "DisplayLogin ", WELCOME_MESSAGE, "\n", "DisplayChdir .message\n" "User ", SERVER_USER, "\n", "Group ", SERVER_GROUP, "\n", "DirFakeUser off ", SERVER_USER, "\n", "DirFakeGroup off ", SERVER_GROUP, "\n", "DefaultTransferMode binary\n", "AllowForeignAddress off\n", "AllowRetrieveRestart on\n", "AllowStoreRestart on\n", "DeleteAbortedStores off\n", "TransferRate RETR 220\n", "TransferRate STOR 250\n", "TransferRate STOU 250\n", "TransferRate APPE 250\n", "SystemLog ", GP_VARDIR, "/log/secure\n", "RequireValidShell off\n\n", #ifdef CAN_BE_ANNOYING_FOR_USERS "\n" "DelayEngine on\n" "\n\n" #endif "\n", "TLSEngine off\n", "TLSRequired off\n", "TLSVerifyClient off\n", "TLSProtocol SSLv23\n", "TLSLog ", GP_VARDIR, "/log/proftpd_tls.log\n", "TLSRSACertificateFile ", GP_APPCONFDIR, "/certs/cert.pem\n", "TLSRSACertificateKeyFile ", GP_APPCONFDIR, "/certs/key.pem\n", "TLSCACertificateFile ", GP_APPCONFDIR, "/certs/cacert.pem\n", "TLSRenegotiate required off\n", "TLSOptions AllowClientRenegotiation\n", "\n\n", "\n", "Ratios off\n", "SaveRatios off\n", "RatioFile \"/restricted/proftpd_ratios\"\n", "RatioTempFile \"/restricted/proftpd_ratios_temp\"\n", "CwdRatioMsg \"Please upload first!\"\n", "FileRatioErrMsg \"FileRatio limit exceeded, upload something first...\"\n", "ByteRatioErrMsg \"ByteRatio limit exceeded, upload something first...\"\n", "LeechRatioMsg \"Your ratio is unlimited.\"\n", "\n\n", "\n", " DenyALL\n", "\n\n", NULL); fputs(config, fp); fclose(fp); g_free(config); if( GTK_IS_WINDOW(widgets->default_conf_question_window) ) gtk_widget_destroy(widgets->default_conf_question_window); populate_gadmin_proftpd(widgets); } void dont_add_standard_conf(struct w *widgets) { if( GTK_IS_WINDOW(widgets->default_conf_question_window) ) gtk_widget_destroy(widgets->default_conf_question_window); populate_gadmin_proftpd(widgets); } void create_standard_conf_question(struct w *widgets) { FILE *fp; long file_size = 0; int found_conf_question = 0; char *conf, *line; gchar *cmd, *info, *utf8, *settings_conf; GtkWidget *vbox18, *label182; GtkWidget *scrolledwindow; GtkWidget *default_question_textview; GtkWidget *hbuttonbox11; GtkWidget *yes_default_question_button; GtkWidget *alignment44, *hbox98; GtkWidget *image44, *label184; GtkWidget *no_default_question_button; GtkWidget *alignment45, *hbox99; GtkWidget *image45, *label185; widgets->default_conf_question_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(widgets->default_conf_question_window, -1, -1); gtk_window_set_title(GTK_WINDOW(widgets->default_conf_question_window), _("GADMIN-PROFTPD Question")); gtk_window_set_position(GTK_WINDOW(widgets->default_conf_question_window), GTK_WIN_POS_CENTER); vbox18 = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(widgets->default_conf_question_window), vbox18); label182 = gtk_label_new (""); gtk_box_pack_start(GTK_BOX(vbox18), label182, FALSE, FALSE, 0); gtk_widget_set_size_request(label182, -1, 20); gtk_label_set_justify(GTK_LABEL(label182), GTK_JUSTIFY_LEFT); scrolledwindow = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(vbox18), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_NEVER); default_question_textview = gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(scrolledwindow), default_question_textview); gtk_text_view_set_editable(GTK_TEXT_VIEW(default_question_textview), FALSE); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(default_question_textview), FALSE); gtk_text_view_set_pixels_above_lines(GTK_TEXT_VIEW(default_question_textview), 3); gtk_text_view_set_left_margin(GTK_TEXT_VIEW(default_question_textview), 30); gtk_text_view_set_right_margin(GTK_TEXT_VIEW(default_question_textview), 30); info = g_strconcat("\n\n", _("GADMIN-PROFTPD could not find the proftpd configuration\n"), _("or you are using a basic configuration that doesnt have\n"), _("all the features that this program requires.\n\n\n"), _("Do you want to overwrite your current proftpd configuration\n"), _("with a suitable standard configuration for gadmin-proftpd ?\n\n"), _("\t\t\t(If you dont know then press yes)\n"), NULL); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW (default_question_textview)), utf8, -1); if( info!=NULL ) g_free(info); if( utf8!=NULL ) g_free(utf8); hbuttonbox11 = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(vbox18), hbuttonbox11, FALSE, FALSE, 0); gtk_widget_set_size_request(hbuttonbox11, -1, 40); gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox11), GTK_BUTTONBOX_SPREAD); yes_default_question_button = gtk_button_new(); gtk_container_add(GTK_CONTAINER(hbuttonbox11), yes_default_question_button); GTK_WIDGET_SET_FLAGS(yes_default_question_button, GTK_CAN_DEFAULT); alignment44 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(yes_default_question_button), alignment44); hbox98 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment44), hbox98); image44 = gtk_image_new_from_stock("gtk-yes", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(hbox98), image44, FALSE, FALSE, 0); label184 = gtk_label_new_with_mnemonic(_("Yes")); gtk_box_pack_start(GTK_BOX(hbox98), label184, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label184), GTK_JUSTIFY_LEFT); no_default_question_button = gtk_button_new(); gtk_container_add(GTK_CONTAINER(hbuttonbox11), no_default_question_button); GTK_WIDGET_SET_FLAGS(no_default_question_button, GTK_CAN_DEFAULT); alignment45 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(no_default_question_button), alignment45); hbox99 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment45), hbox99); image45 = gtk_image_new_from_stock("gtk-no", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(hbox99), image45, FALSE, FALSE, 0); label185 = gtk_label_new_with_mnemonic(_("No")); gtk_box_pack_start(GTK_BOX(hbox99), label185, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label185), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(G_OBJECT(yes_default_question_button), "clicked", G_CALLBACK(add_standard_conf), widgets); g_signal_connect_swapped(G_OBJECT(no_default_question_button), "clicked", G_CALLBACK(dont_add_standard_conf), widgets); gtk_widget_show_all(widgets->default_conf_question_window); /* Create gadmin-proftpds settings directory if it doesnt exist. */ if( ! file_exists(GP_APPCONFDIR) ) { cmd = g_strdup_printf("mkdir -p %s", GP_APPCONFDIR); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error: cant create the settings directory here:\n%s\n"), GP_APPCONFDIR); show_info(info); g_free(info); g_free(cmd); return; } g_free(cmd); } settings_conf = g_strdup_printf("%s/settings.conf", GP_APPCONFDIR); /* The settings file doesnt exist, create and write the setting to it */ if( ! file_exists(settings_conf) ) { if((fp=fopen(settings_conf, "w+"))==NULL) { info = g_strdup_printf(_("Error: cant write the settings file here:\n%s\n"), settings_conf); show_info(info); g_free(info); return; } fputs("show_conf_question: false\n", fp); fclose(fp); g_free(settings_conf); return; } /* Gather old values and re/write 'show_conf_question: false' to gadmin-proftpds settings */ if((fp=fopen(settings_conf, "r"))==NULL) { info = g_strdup_printf(_("Error: cant write the settings file here:\n%s\n"), settings_conf); show_info(info); g_free(info); g_free(settings_conf); return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); conf = allocate(file_size+1024); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( strlen(line) > 5 ) { if( strstr(line, "show_conf_question:") ) { found_conf_question = 1; strcat(conf, "show_conf_question: false\n"); break; } else strcat(conf, line); } } fclose(fp); free(line); /* If theres no 'show_conf_question: false' line, add one */ if( ! found_conf_question ) strcat(conf, "show_conf_question: false\n"); /* Write the altered conf */ if((fp=fopen(settings_conf, "w+"))==NULL) { info = g_strdup_printf(_("Error: cant write the settings file here:\n%s\n"), settings_conf); show_info(info); g_free(info); free(conf); return; } fputs(conf, fp); fclose(fp); free(conf); g_free(settings_conf); } gadmin-proftpd-0.4.2/src/create_security_tab.h0000644000000000000000000000177611513432312020114 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef create_security_tab_H # define create_security_tab_H extern struct w *widgets; void create_security_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/kick_ban_button_clicked.h0000644000000000000000000000201211513432313020667 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef kick_ban_button_clicked_H # define kick_ban_button_clicked_H extern struct w *widgets; void kick_ban_button_clicked(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/deactivate_button_clicked.h0000644000000000000000000000202011513432312021235 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef deactivate_button_clicked_H # define deactivate_button_clicked_H extern struct w *widgets; void deactivate_button_clicked(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/populate_server_settings.c0000644000000000000000000006717711513432313021236 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include "gettext.h" #include "widgets.h" #include "allocate.h" #include "chars_are_digits.h" #include "populate_server_settings.h" #include "functions.h" #include "get_option_pos.h" extern gulong virtual_users_toggled_signal; extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_type[1024]; extern int use_tls; extern int use_ratio; extern int use_quota; extern gchar *GP_PASSWD_BUF; extern gchar *GP_SHADOW_BUF; extern gchar *GP_GROUP_BUF; extern gchar *GP_GSHADOW_BUF; void populate_server_settings(struct w *widgets) { /* Lists the values for the selected server in the server tab */ FILE *fp; int x = 0, val = 0, found = 0; int found_maskaddr = 0; long conf_size; char *old_buffer, *port_buffer, *new_buffer, *address_buffer, *openssl_conf; gchar *settings_conf, *path, *utf8 = NULL; if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size+1); new_buffer = allocate(conf_size+1); address_buffer = allocate(8192+15); if( strstr(global_server_type, "Virtualhost") ) sprintf(address_buffer, "", global_server_address); else sprintf(address_buffer, global_server_address); port_buffer = allocate(8192+3); sprintf(port_buffer, "Port %s", global_server_port); if( ! strstr((char *)global_server_type, "Virtualhost") ) found = 1; if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) { fclose(fp); free(old_buffer); free(new_buffer); free(address_buffer); free(port_buffer); return; } /* We have all the values for the selected default server */ if( cmplowercase(old_buffer, " 8000 ) continue; /* This will expect the servers port on the second line ! * else itll miss some vaules .. */ if( cmplowercase(old_buffer, "port ") && strstr(old_buffer, port_buffer) ) { found = 1; break; } if( cmplowercase(old_buffer, "") ) break; } } /* Continue until we find the selected server */ if( ! found ) continue; /* Read and insert the selected servers values in the servers tab */ /* If its the default server we stop listing the values when a vhost or anonymous is found */ if( ! strstr("Virtualhost", (char *)global_server_type) && ( cmplowercase(old_buffer, "server_set_entry[0]), utf8); } if( cmplowercase(old_buffer, "serverident") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( old_buffer[x]=='"' ) break; } x++; if( old_buffer[x]!='\0' ) snprintf(new_buffer, 1000, "%s", &old_buffer[x]); for(x=0; new_buffer[x]!='\0'; x++) { if( new_buffer[x]=='"' || new_buffer[x]=='\n' ) { new_buffer[x]='\0'; break; } } utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[1]), utf8); if( cmplowercase(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[0]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[0]), 1); } if( cmplowercase(old_buffer, "masqueradeaddress") ) { new_buffer[0]='\0'; sscanf(old_buffer, "%*s %s", new_buffer); if( strlen(new_buffer) > 3 ) { if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[2]), utf8); } if( strstr(old_buffer, "#") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[1]), 1); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[1]), 0); found_maskaddr = 1; } if( cmplowercase(old_buffer, "serveradmin") ) { snprintf(new_buffer, 1000, "%s", &old_buffer[12]); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[3]), utf8); } if( cmplowercase(old_buffer, "identlookups") ) { if( cmplowercase(old_buffer, "identlookups on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[2]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[2]), 1); } if( cmplowercase(old_buffer, "usereversedns") ) { if( cmplowercase(old_buffer, "usereversedns on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[3]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[3]), 1); } /* Off is local time */ if( cmplowercase(old_buffer, "timesgmt") ) { if( strstr(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[4]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[4]), 1); } /* Dont match passiveports */ if( cmplowercase(old_buffer, "port") && old_buffer[4]==' ' && ! strstr(old_buffer, "passiveports") ) { sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[0]), val); } } if( cmplowercase(old_buffer, "passiveports") ) { new_buffer[0]='\0'; sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[1]), val); } new_buffer[0]='\0'; sscanf(old_buffer, "%*s %*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer)) { val=atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[2]), val); } } /* Maximum simoultaneous connections */ if( cmplowercase(old_buffer, "maxinstances") ) { new_buffer[0]='\0'; sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[3]), val); } } /* Max login attempts */ if( cmplowercase(old_buffer, "maxloginattempts") ) { new_buffer[0]='\0'; sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[4]), val); } } /* Login timeout */ if( cmplowercase(old_buffer, "timeoutlogin") ) { new_buffer[0]='\0'; sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[5]), val); } } /* Idle timeout */ if( cmplowercase(old_buffer, "timeoutnotransfer") ) { new_buffer[0]='\0'; sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[6]), val); } } /* Upload speed */ if( cmplowercase(old_buffer, "transferrate stor") ) { new_buffer[0]='\0'; sscanf(old_buffer, "%*s %*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[9]), val); } } /* Dowonload speed */ if( cmplowercase(old_buffer, "transferrate retr") ) { new_buffer[0]='\0'; sscanf(old_buffer, "%*s %*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[10]), val); } } /* Transfer mode */ if( cmplowercase(old_buffer, "defaulttransfermode") ) { if( strstr(old_buffer, "binary") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[5]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[5]), 1); } /* FXP transfers */ if( cmplowercase(old_buffer, "allowforeignaddress") ) { if( strstr(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[6]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[6]), 1); } /* Server user */ if( cmplowercase(old_buffer, "user") && old_buffer[4]==' ' ) { sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[9]), utf8); } /* Server group */ if( cmplowercase(old_buffer, "group") && old_buffer[5]==' ' ) { sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[10]), utf8); } if( cmplowercase(old_buffer, "dirfakeuser") ) { /* Show the fake username */ sscanf(old_buffer, "%*s %*s %s", new_buffer); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[11]), utf8); /* Show fake user on - off */ sscanf(old_buffer, "%*s %s", new_buffer); if( strstr(new_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[8]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[8]), 1); } if( cmplowercase(old_buffer, "dirfakegroup") ) { /* Show the fake groupname */ sscanf(old_buffer, "%*s %*s %s", new_buffer); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[12]), utf8); /* Show fake group on - off */ sscanf(old_buffer, "%*s %s", new_buffer); if( strstr(new_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[9]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[9]), 1); } if( cmplowercase(old_buffer, "allowstorerestart") ) { sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( strstr(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[10]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[10]), 1); } if( cmplowercase(old_buffer, "allowretrieverestart") ) { sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( strstr(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[11]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[11]), 1); } if( cmplowercase(old_buffer, "deleteabortedstores") ) { if( strstr(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[12]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[12]), 1); } if( cmplowercase(old_buffer, "systemlog") && strlen(old_buffer) > 9 ) { sprintf(new_buffer, &old_buffer[10]); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[8]), utf8); } if( use_tls ) { if( cmplowercase(old_buffer, "tlsengine") ) { if( cmplowercase(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[13]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[13]), 1); } /* On(Both), Off, Data, Control, */ if( cmplowercase(old_buffer, "tlsrequired") ) { if( cmplowercase(old_buffer, "on") || cmplowercase(old_buffer, "auth+data") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[14]), 0); else if( cmplowercase(old_buffer, "off") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[14]), 1); else if( cmplowercase(old_buffer, "data") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[14]), 2); else if( cmplowercase(old_buffer, "ctrl") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[14]), 3); } if( cmplowercase(old_buffer, "tlsverifyclient") ) { if( cmplowercase(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[15]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[15]), 1); } if( cmplowercase(old_buffer, "tlsprotocol") ) { sprintf(new_buffer, "%s", &old_buffer[12]); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[13]), utf8); } if( cmplowercase(old_buffer, "tlslog") ) { sprintf(new_buffer, &old_buffer[7]); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[14]), utf8); } } if( use_ratio ) { /* Ratio on or off SaveRatios "ave" */ if( cmplowercase(old_buffer, "ratios ") && ! cmplowercase(old_buffer, "ave") ) { if( cmplowercase(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[16]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[16]), 1); } /* Save Ratios on or off */ if( cmplowercase(old_buffer, "saveratios ") ) { if( cmplowercase(old_buffer, "on") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[17]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[17]), 1); } } /* If use_ratio end */ /* Fixme QUOTA */ if( use_quota ) { } } fclose(fp); free(old_buffer); free(new_buffer); free(address_buffer); free(port_buffer); /* Set MasqueradeAddress to off if not found */ if( ! found_maskaddr ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[1]), 1); /* Add settings.conf values to the server settings. */ settings_conf = g_strdup_printf("%s/settings.conf", GP_APPCONFDIR); if((fp=fopen(settings_conf, "r"))==NULL) { g_free(settings_conf); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size+1); new_buffer = allocate(conf_size+1); if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( cmplowercase(old_buffer, "certificate_directory") && use_tls ) { sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[15]), utf8); } if( cmplowercase(old_buffer, "random_username_length") ) { sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[7]), val); } } if( cmplowercase(old_buffer, "random_password_length") ) { sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[8]), val); } } if( cmplowercase(old_buffer, "randomize_case") ) { if( cmplowercase(old_buffer, "upper") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[7]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[7]), 1); } if( cmplowercase(old_buffer, "html_path") ) { sscanf(old_buffer, "%*s %s", new_buffer); if( new_buffer[strlen(new_buffer)-1]=='\n' || new_buffer[strlen(new_buffer)-1]=='\r' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[6]), utf8); } /* Virtual users: If "on" switch to virtual users and groups else system users and groups */ if( cmplowercase(old_buffer, "virtual_users") ) { /* Free paths first */ g_free(GP_PASSWD_BUF); g_free(GP_SHADOW_BUF); g_free(GP_GROUP_BUF); g_free(GP_GSHADOW_BUF); /* Block the togglebuttons signal */ g_signal_handler_block(GTK_WIDGET(widgets->server_set_check_virtual), virtual_users_toggled_signal); if( cmplowercase(old_buffer, "on") ) { gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->server_set_check_virtual), TRUE); path = g_strdup_printf("%s/users", GP_APPCONFDIR); make_dir_chmod(path, "0700"); g_free(path); GP_PASSWD_BUF = g_strdup_printf("%s/users/proftpd.passwd", GP_APPCONFDIR); GP_GROUP_BUF = g_strdup_printf("%s/users/proftpd.group", GP_APPCONFDIR); GP_SHADOW_BUF = g_strdup_printf("%s/users/shadow_NOT_USED", GP_APPCONFDIR); GP_GSHADOW_BUF = g_strdup_printf("%s/users/gshadow_NOT_USED", GP_APPCONFDIR); } else { gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->server_set_check_virtual), FALSE); GP_PASSWD_BUF = g_strdup_printf("%s", GP_PASSWD); GP_SHADOW_BUF = g_strdup_printf("%s", GP_SHADOW); GP_GROUP_BUF = g_strdup_printf("%s", GP_GROUP); GP_GSHADOW_BUF = g_strdup_printf("%s", GP_GSHADOW); } /* Unblock the togglebuttons signal*/ g_signal_handler_unblock(GTK_WIDGET(widgets->server_set_check_virtual), virtual_users_toggled_signal); } } fclose(fp); free(old_buffer); free(new_buffer); g_free(settings_conf); /* If we have the TLS module then list the values for it from gadmin-proftpd-openssl.conf. */ /* These are generated by gadmin-proftpd so theres no need to use cmplowercase */ if( use_tls ) { openssl_conf = g_strdup_printf("%s/certs/gadmin-proftpd-openssl.conf", GP_APPCONFDIR); if((fp=fopen(openssl_conf, "r"))==NULL) { g_free(openssl_conf); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size+1); new_buffer = allocate(conf_size+1); if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { /* Server address */ if( strstr(old_buffer, "commonName = ") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( x >= 2 && old_buffer[x-2]=='=' ) { snprintf(new_buffer, old_buffer[x]+x, old_buffer+x); new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[16]), utf8); break; } } } /* Email address */ if( strstr(old_buffer, "emailAddress = ") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( x >= 2 && old_buffer[x-2]=='=' ) { snprintf(new_buffer, old_buffer[x]+x, old_buffer+x); new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[17]), utf8); break; } } } /* State or province */ if( strstr(old_buffer, "stateOrProvinceName = ") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( x >= 2 && old_buffer[x-2]=='=' ) { snprintf(new_buffer, old_buffer[x]+x, old_buffer+x); new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[18]), utf8); break; } } } /* City or town */ if( strstr(old_buffer, "localityName = ") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( x >= 2 && old_buffer[x-2]=='=' ) { snprintf(new_buffer, old_buffer[x]+x, old_buffer+x); new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[19]), utf8); break; } } } /* Organization */ if( strstr(old_buffer, "organizationName = ") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( x >= 2 && old_buffer[x-2]=='=' ) { snprintf(new_buffer, old_buffer[x]+x, old_buffer+x); new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[20]), utf8); break; } } } /* Organizational unit */ if( strstr(old_buffer, "organizationalUnitName = ") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( x >= 2 && old_buffer[x-2]=='=' ) { snprintf(new_buffer, old_buffer[x]+x, old_buffer+x); new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[21]), utf8); break; } } } /* Default certificate bits */ if( strstr(old_buffer, "default_bits = ") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( x >= 2 && old_buffer[x-2]=='=' ) { snprintf(new_buffer, old_buffer[x]+x, old_buffer+x); new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[11]), val); break; } } } } /* Default days valid */ if( strstr(old_buffer, "default_days = ") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( x >= 2 && old_buffer[x-2]=='=' ) { snprintf(new_buffer, old_buffer[x]+x, old_buffer+x); new_buffer[strlen(new_buffer)-1]='\0'; if( chars_are_digits(new_buffer) ) { val = atoi(new_buffer); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[12]), val); break; } } } } /* Country code */ if( strstr(old_buffer, "countryName = ") ) { for(x=0; old_buffer[x]!='\0'; x++) { if( x >= 2 && old_buffer[x-2]=='=' ) { snprintf(new_buffer, old_buffer[x]+x, old_buffer+x); new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[24]), utf8); break; } } } } fclose(fp); g_free(openssl_conf); free(new_buffer); free(old_buffer); } if( utf8!=NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/create_user_settings.c0000644000000000000000000002537511513432312020311 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include "gettext.h" #include "widgets.h" #include "create_user_settings.h" #include "populate_shell_combo.h" #include "make_settings_buttons.h" #include "make_settings_entries.h" #include "make_settings_combos.h" #include "make_settings_spinbuttons.h" #include "make_settings_checkbuttons.h" #include "delete_user.h" #include "show_info.h" #include "apply_user.h" #include "functions.h" extern int use_ratio; extern int use_quota; int user_profiling_info_shown = 0; /* Clears the user settings, sets default values and shows some info. */ void new_user(struct w *widgets) { gchar *info; /* Clear the directory treeview */ gtk_list_store_clear(GTK_LIST_STORE(widgets->directory_store)); /* User */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[0]), "user1"); /* Password */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[1]), ""); /* Group */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[2]), "group1"); /* Comment */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[3]), "User 1"); /* Shell */ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->user_set_combo[0]), 0); /* Require password */ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[1]), TRUE); /* Show user in statistics */ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[2]), TRUE); /* Max logins, set to 10 */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[0]), 10); /* Allow logins from */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[5]), "All"); /* Ratio defaults to disabled */ if( use_ratio ) { /* Byte ratio */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[1]), 0); /* Byte ratio credit */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[2]), 0); /* File ratio */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[3]), 0); /* File ratio credit */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[4]), 0); } /* Fixme, Quota */ if( use_quota ) { } /* Only show profiling info once */ if( user_profiling_info_shown ) return; else user_profiling_info_shown = 1; info = g_strconcat( _("Write the new users name and other settings in the user profile below.\n"), _("Press apply to add this new user with the selected settings.\n\n"), _("You can also skip this step and directly alter an existing users name and\n"), _("settings and then press apply. This can save administration time.\n"), NULL); show_info(info); if( info!=NULL ) g_free(info); } void create_user_settings(struct w *widgets) { GtkTooltips *tooltips; GtkWidget *hbuttonbox; GtkWidget *delete_user_button; GtkWidget *new_user_button; GtkWidget *apply_user_button; int a = 0; int b = 1; int ent = 0; int comb = 0; int check = 0; int spin = 0; /* For the custom new user button */ GtkWidget *new_user_hbox; GtkWidget *new_user_image; GtkWidget *new_user_label; GtkWidget *new_user_alignment; tooltips = gtk_tooltips_new(); hbuttonbox = gtk_hbutton_box_new(); /* The delete, new user and apply user buttons */ delete_user_button = gtk_button_new_from_stock(GTK_STOCK_DELETE); /* Custom new user button begin */ new_user_button = gtk_button_new(); new_user_alignment = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(new_user_button), new_user_alignment); new_user_hbox = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(new_user_alignment), new_user_hbox); new_user_image = gtk_image_new_from_stock("gtk-add", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(new_user_hbox), new_user_image, FALSE, FALSE, 0); new_user_label = gtk_label_new_with_mnemonic(_("New user")); gtk_box_pack_start(GTK_BOX(new_user_hbox), new_user_label, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(new_user_label), GTK_JUSTIFY_LEFT); /* Custom new user button end */ apply_user_button = gtk_button_new_from_stock(GTK_STOCK_APPLY); /* Add the buttons to the user_button_box created in create_user_tab.c */ gtk_box_pack_start(GTK_BOX(widgets->user_button_box), delete_user_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(widgets->user_button_box), new_user_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(widgets->user_button_box), apply_user_button, FALSE, FALSE, 0); /* Align the buttonbox to the left */ // gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_SPREAD); //START); g_signal_connect_swapped(G_OBJECT(delete_user_button), "clicked", G_CALLBACK(delete_user), widgets); g_signal_connect_swapped(G_OBJECT(new_user_button), "clicked", G_CALLBACK(new_user), widgets); g_signal_connect_swapped(G_OBJECT(apply_user_button), "clicked", G_CALLBACK(apply_user), widgets); // g_signal_connect_swapped(G_OBJECT(add_user_button), "clicked", // G_CALLBACK(add_user), widgets); gtk_table_attach(GTK_TABLE(widgets->usr_set_table), hbuttonbox, 0, 3, a, b, 0, 0, 5, 5); a++; b++; /* Username */ /* Max length and input 350 chars */ GtkWidget *username_button; widgets->user_set_entry[ent] = gtk_entry_new(); username_button = make_button_with_entry(GTK_TABLE(widgets->usr_set_table), widgets->user_set_entry[ent], "gtk-refresh", _("Username:"), _("Create a randomized username"), 0,1,a,b,350); a++; b++; ent++; g_signal_connect_swapped(G_OBJECT(username_button), "clicked", G_CALLBACK(randomize_username), widgets); /* Password */ GtkWidget *password_button; widgets->user_set_entry[ent] = gtk_entry_new(); password_button = make_button_with_entry(GTK_TABLE(widgets->usr_set_table), widgets->user_set_entry[ent], "gtk-refresh", _("Password:"), _("Create a randomized password"), 0,1,a,b,350); a++; b++; ent++; g_signal_connect_swapped(G_OBJECT(password_button), "clicked", G_CALLBACK(randomize_password), widgets); /* Group */ widgets->user_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->usr_set_table), _("Group:"), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->user_set_entry[ent], _("The group the user belongs to"), NULL); a++; b++; ent++; /* Comment */ widgets->user_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->usr_set_table), _("Comment:"), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->user_set_entry[ent], _("A comment about the user"), NULL); a++; b++; ent++; a++; b++; ent++; // Let this be for now /* Shell combo */ widgets->user_set_combo[comb] = make_label_textcombo_label(GTK_TABLE(widgets->usr_set_table), _("Shell:"), 0,1,a,b, 80); populate_shell_combo(widgets->user_set_combo[comb]); a++; b++; comb++; /* Account locked checkbutton */ widgets->user_set_checkbutton[check] = make_checkbutton_with_label(GTK_TABLE(widgets->usr_set_table), _("Account locked:"), 0,1,a,b); a++; b++; check++; /* Require password */ widgets->user_set_checkbutton[check] = make_checkbutton_with_label(GTK_TABLE(widgets->usr_set_table), _("Require password:"), 0,1,a,b); a++; b++; check++; /* Show user in statistics */ widgets->user_set_checkbutton[check] = make_checkbutton_with_label(GTK_TABLE(widgets->usr_set_table), _("Show user in statistics:"), 0,1,a,b); a++; b++; check++; /* Max logins */ widgets->user_set_spinbutton[spin] = make_shortleft_spinbutton_with_label(GTK_TABLE(widgets->usr_set_table),_("Maximum logins:") , 0,1,a,b,80); gtk_tooltips_set_tip(tooltips, widgets->user_set_spinbutton[spin], _("Maximum number of simultaneous logins this user can make"), NULL); a++; b++; spin++; /* Allow logins from */ widgets->user_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->usr_set_table), _("Allow logins from:"), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->user_set_entry[ent], _("All, None, IP, DNS name or CIDR-Address"), NULL); a++; b++; ent++; /* Ratio settings */ if( use_ratio ) { /* Byte ratio */ widgets->user_set_spinbutton[spin] = make_shortleft_spinbutton_with_label(GTK_TABLE(widgets->usr_set_table),_("Byte ratio:") , 0,1,a,b,80); gtk_tooltips_set_tip(tooltips, widgets->user_set_spinbutton[spin], _("If set to 3 then the ratio is 3:1. 0 means unlimited."), NULL); a++; b++; spin++; /* Byte ratio credit */ widgets->user_set_spinbutton[spin] = make_shortleft_spinbutton_with_label(GTK_TABLE(widgets->usr_set_table),_("Byte ratio credit:") , 0,1,a,b,80); gtk_tooltips_set_tip(tooltips, widgets->user_set_spinbutton[spin], _("If set to 6 then the the user can download 6 times the byte ratio before uploading. 0 means no credit."), NULL); a++; b++; spin++; /* File ratio */ widgets->user_set_spinbutton[spin] = make_shortleft_spinbutton_with_label(GTK_TABLE(widgets->usr_set_table),_("File ratio:") , 0,1,a,b,80); gtk_tooltips_set_tip(tooltips, widgets->user_set_spinbutton[spin], _("If set to 9 then 9 files can be downloaded for every 1 file uploaded. 0 means unlimited."), NULL); a++; b++; spin++; /* File ratio credit */ widgets->user_set_spinbutton[spin] = make_shortleft_spinbutton_with_label(GTK_TABLE(widgets->usr_set_table),_("File ratio credit:") , 0,1,a,b,80); gtk_tooltips_set_tip(tooltips, widgets->user_set_spinbutton[spin], _("If set to 12 then then the user can download 12 times the file ratio before uploading. 0 means no credit."), NULL); a++; b++; spin++; } /* Fixme, Quota */ if( use_quota ) { } gtk_widget_show_all(widgets->main_window); } gadmin-proftpd-0.4.2/src/populate_shell_combo.h0000644000000000000000000000175311513432313020267 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef populate_shell_combo_H # define populate_shell_combo_H void populate_shell_combo(GtkWidget *shell_combo); #endif gadmin-proftpd-0.4.2/src/shutdown_ok_clicked.c0000644000000000000000000000365411513432313020107 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "../config.h" #include "support.h" #include "gettext.h" #include #include "widgets.h" #include "shutdown_ok_clicked.h" void shutdown_ok_clicked(struct w *widgets) { /* Shutdown the server (create the shutmsg file) */ FILE *fp; gchar *shutdown; G_CONST_RETURN gchar *new_logins_dc; G_CONST_RETURN gchar *existing_users_dc; G_CONST_RETURN gchar *real_shutdown; G_CONST_RETURN gchar *shut_msg; new_logins_dc = gtk_entry_get_text(GTK_ENTRY(widgets->new_acc_disabled_entry)); existing_users_dc = gtk_entry_get_text(GTK_ENTRY(widgets->existing_users_dc_entry)); real_shutdown = gtk_entry_get_text(GTK_ENTRY(widgets->real_shutdown_entry)); shut_msg = gtk_entry_get_text(GTK_ENTRY(widgets->shutdown_msg_entry)); shutdown = g_strdup_printf("ftpshut -l %s -d %s %s \"%s\"", new_logins_dc, existing_users_dc, real_shutdown, shut_msg); fp = popen(shutdown, "r"); pclose(fp); g_free(shutdown); gtk_widget_destroy(widgets->shutdown_window); } gadmin-proftpd-0.4.2/src/populate_security_tab.h0000644000000000000000000000173311513432313020474 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef populate_security_H # define populate_security_H void populate_security(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/kick_button_clicked.c0000644000000000000000000000571611513432313020060 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include "widgets.h" #include "allocate.h" #include "commands.h" #include "chars_are_digits.h" #include "kick_button_clicked.h" extern int activated; extern int MAX_READ_POPEN; void kick_button_clicked(struct w *widgets) { /* Kick a user by name or pid */ FILE *fp; char *get_buffer, *kick_name, *kick_pid, *kick; int user_kick=0, pid_kick=0; G_CONST_RETURN gchar *username; int avoid_warnings = 0; if( ! activated ) return; username = gtk_entry_get_text(GTK_ENTRY(widgets->kick_entry)); if( strlen(username) == 0 ) return; /* Get users pid and name */ if((fp=popen("ftpwho -v", "r"))==NULL) return; fflush(fp); kick_name = allocate(4096); kick_pid = allocate(4096); get_buffer = allocate(MAX_READ_POPEN+1); while(fgets(get_buffer, MAX_READ_POPEN, fp)!=NULL) { kick_pid[0]='\0'; kick_name[0]='\0'; sscanf(get_buffer, "%s %s", kick_pid, kick_name); if( kick_name[strlen(kick_name)-1]=='\n' || kick_name[strlen(kick_name)-1]=='\r' ) kick_name[strlen(kick_name)-1]='\0'; /* kill this user by name */ if( strcmp(username, kick_name) == 0 && chars_are_digits(kick_pid) ) { user_kick=1; break; } /* Kill this user by pid (supplied number is the same as any left most word in the output) */ if( strcmp(username, kick_pid) == 0 && chars_are_digits(kick_pid) ) { pid_kick=1; break; } } pclose(fp); free(get_buffer); free(kick_name); if( user_kick ) { /* Kill the the users pid */ kick = allocate(8192); sprintf(kick, "kill -15 %s", kick_pid); avoid_warnings = system(kick); free(kick); } else if( pid_kick ) { /* Kill the the users pid */ kick = allocate(8192); sprintf(kick, "kill -15 %s", username); avoid_warnings = system(kick); free(kick); } else { // strcpy(info_buffer, _("User or pid not found.\n")); // info_window = create_info_window(); // gtk_widget_show(info_window); } free(kick_pid); } gadmin-proftpd-0.4.2/src/populate_server_settings.h0000644000000000000000000000201511513432313021217 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef populate_server_settings_H # define populate_server_settings_H extern struct w *widgets; void populate_server_settings(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/populate_file_tab.c0000644000000000000000000001753011513432313017541 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include "support.h" #include "gettext.h" #include #include "support.h" #include #include #include #include #include "allocate.h" #include "widgets.h" #include "populate_file_tab.h" #include "show_info.h" void populate_files(struct w *widgets) { /* Lists files in the file treeview */ FILE *fp; GtkTreeIter iter; GtkTreePath *path; gboolean edit=0; gchar *utf8=NULL; char *old_buffer, *new_buffer; long file_size; int begin=0, end=0, i=0, count=0, found=0; int max_line_len=1024, max_username_len=40; gtk_list_store_clear(widgets->file_store); if((fp=fopen(XFER_LOG, "r"))==NULL) { /* A popup here is just annoying */ return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); old_buffer = allocate(file_size); /* Min allocate + 1024 */ new_buffer = allocate(max_line_len+1024); while(fgets(old_buffer, file_size, fp)!=NULL) { if( strlen(old_buffer) < 10 ) continue; /* Add a row */ gtk_list_store_append(GTK_LIST_STORE(widgets->file_store), &iter); /* ------------- Username ----------- */ count=0; begin=0; end=0; for(i=strlen(old_buffer)-1; old_buffer[i]!='\0'; i--) { if( old_buffer[i]==' ' && old_buffer[i+1]!=' ') count++; if( count == 5 ) { begin = i; break; } } for(i=begin+1; old_buffer[i]!='\0'; i++) { if( old_buffer[i]==' ' && old_buffer[i+1]!=' ') { end = i; break; } } memset(new_buffer, 0, max_line_len+1024); if( end-begin > max_username_len ) { while( end-begin > max_username_len ) end--; strncat(new_buffer, &old_buffer[begin], end); } else strncat(new_buffer, &old_buffer[begin], end); if( new_buffer[strlen(new_buffer)-1]!='\0' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, end-begin, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->file_store), &iter, 0, utf8, -1); /* ------------- Username End ----------- */ /* ------------- Action (upload/download/delete) ----------------- */ count = 0; begin = 0; end = 0; for(i=strlen(old_buffer)-1; old_buffer[i]!='\0'; i--) { if( old_buffer[i]==' ' && old_buffer[i+1]!=' ') count++; if( count == 7 ) { begin = i+1; break; } } snprintf(new_buffer, 3, "%s", &old_buffer[begin]); if( new_buffer[strlen(new_buffer)-1]!='\0' ) new_buffer[strlen(new_buffer)-1]='\0'; if( strcmp(new_buffer, "i") == 0 ) sprintf(new_buffer, "%s", _("uploaded")); else if( strcmp(new_buffer, "o") == 0 ) sprintf(new_buffer, "%s", _("downloaded")); else if( strcmp(new_buffer, "d") == 0 ) sprintf(new_buffer, "%s", _("deleted")); else sprintf(new_buffer, "%s", _("split filename ?")); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->file_store), &iter, 1, utf8, -1); /* ------------- Action End ------------- */ /* ------------- Bytes ----------- */ count = 0; for(i=0; old_buffer[i]!='\0'; i++) { if( old_buffer[i]==' ' && old_buffer[i+1]!=' ') { count++; begin = i; } if( count == 7 ) break; } count = 0; for(i=begin+1; old_buffer[i]!='\0'; i++) { if( old_buffer[i]==' ' && old_buffer[i+1]!=' ') { end = i; break; } } memset(new_buffer, 0, max_line_len+1024); if( end-begin > max_line_len ) { while( end-begin > max_line_len ) end--; strncat(new_buffer, &old_buffer[begin], end); } else strncat(new_buffer, &old_buffer[begin], end); if( new_buffer[strlen(new_buffer)-1]!='\0' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, end-begin, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->file_store), &iter, 2, utf8, -1); /* ------------- Bytes End ----------- */ /* ------------- FILES ------------ */ /* If we find a / then heres where the filepath begins 8 spaces from the start */ /* Theres no problem with split filenames because a file called "this is my file" is logged as "this_is_my_file" */ for(i=0; old_buffer[i]!='\0'; i++) { if( old_buffer[i]=='/' ) { begin=i; break; } } /* The file end is 9 spaces from the end */ count = 0; for(i=strlen(old_buffer)-1; old_buffer[i]!='\0'; i--) { if( old_buffer[i]==' ' && old_buffer[i+1]!=' ') count++; if( count == 9 ) { end = i; break; } } memset(new_buffer, 0, max_line_len+1024); if( end-begin > max_line_len ) { while( end-begin > max_line_len ) end--; strncat(new_buffer, &old_buffer[begin], end); } else strncat(new_buffer, &old_buffer[begin], end); if( new_buffer[strlen(new_buffer)-1]!='\0' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, end-begin, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->file_store), &iter, 3, utf8, -1); /* ------------- FILES END ------------ */ /* ------------- Host ----------- */ count = 0; for(i=0; old_buffer[i]!='\0'; i++) { if( old_buffer[i]==' ' && old_buffer[i+1]!=' ') { count++; begin = i; } if( count == 6 ) break; } count = 0; for(i=begin+1; old_buffer[i]!='\0'; i++) { if( old_buffer[i]==' ' && old_buffer[i+1]!=' ') { end = i; break; } } memset(new_buffer, 0, max_line_len+1024); if( end-begin > max_line_len ) { while( end-begin > max_line_len ) end--; strncat(new_buffer, &old_buffer[begin], end); } else strncat(new_buffer, &old_buffer[begin], end); if( new_buffer[strlen(new_buffer)-1]!='\0' ) new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, end-begin, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->file_store), &iter, 4, utf8, -1); /* ------------- Host End ----------- */ /* ------------- Start Date ----------- */ count = 0; for(i=0; old_buffer[i]!='\0'; i++) { /* Day can be " 2" or "20" etc */ if( old_buffer[i]==' ' && old_buffer[i+1]!=' ') { count++; end = i; } if( count == 5 ) break; } if( end <= max_line_len ) { utf8 = g_locale_to_utf8(old_buffer, end, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->file_store), &iter, 5, utf8, -1); } /* ------------- Start Date End ----------- */ found = 1; } fclose(fp); free(old_buffer); free(new_buffer); if(utf8 !=NULL) g_free(utf8); /* Cant set treepath if there arent any files/rows, then itll crash */ if( ! found ) return; path = gtk_tree_path_new_first(); gtk_tree_view_set_cursor(GTK_TREE_VIEW(widgets->file_treeview), path, NULL, edit); gtk_tree_path_free(path); } gadmin-proftpd-0.4.2/src/import_functions.h0000644000000000000000000000241311513432313017464 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #ifndef import_functions_H #define import_functions_H extern struct w *widgets; void populate_import_window(struct w *widgets); void import_button_clicked(GtkButton *button, struct w *widgets); void import_upload_checkbutton_toggled(GtkToggleButton *togglebutton, struct w *widgets); void import_namebased_checkbutton_toggled(GtkToggleButton *togglebutton, struct w *widgets); #endif gadmin-proftpd-0.4.2/src/gprostats.c0000644000000000000000000004507111522562703016121 0ustar rootroot/* GADMIN-PROFTPD - GProStats - Statistics generator. * Copyright 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * This is how it works: * ------------------------------ * Takes all users in proftpd.conf and if one if those users exists * in the xferlog those ul/dl stats gets added to that user. * The statistics are sorted by top 10 ul and dl. * It can generate html output and welcome messages for all users * that are currently listed like this in proftpd.conf: * * User UserName * .... * * */ #include "../config.h" #include #include #include "chars_are_digits.h" /* Solaris issue */ #ifdef HAVE_STDINT_H #include #else #include #endif #include #include #include #include "allocate.h" struct user_stats { char user[8192]; char dir[8192]; int ul_flag; int dl_flag; int update; uint64_t ul; uint64_t dl; }; void show_usage(char conf[8192], char xferlog[8192]) { printf("\nGProStats Usage:\n\n"); printf("-help Show this help.\n"); printf("-c %s\n", conf); printf("-x %s\n", xferlog); printf("-w Make welcome messages for all ftpusers with this name.\n"); printf("-html Make a html ftp statistics page in the specified location.\n"); printf("\tIE: [/var/www/html/ftp.htm]\n\n"); printf("The default paths are [/etc/proftpd.conf] and [/var/log/xferlog]\n"); printf("The default welcome for gadmin-proftpd is [welcome.msg]\n\n"); printf("If neither of the -w or -html flags are used it will just print the results to the screen.\n"); printf("Only uploads and downloads above 1023 Bytes are counted.\n\n"); } int main(int argc, char *argv[]) { FILE *fp; struct user_stats * userlist; long conf_size; uint64_t file_size; char *old_buffer, *user, *dir, *action, *file, *datestamp, *welcome, *welcome1, *temp, *convert; /* Filepaths (limited to max 8000) */ char conf[8192]="", xferlog[8192]="", html[8192]="", welcome_name[8192]=""; /* Path to the users directory (+20 for welcome.msg and '/') (8192/8192+20) */ char user_welcome[16384+20]=""; /* The name of the server */ char server_name[8192]=""; /* HTML Part 1 (the lengths are max input from the entries) */ /* Can contain: static HTML(16384), username(128)*20 (2560), ul/dl KB(50)*20 (1000), * server name (1000), datestamp (100) and html_welcome1 */ char html_welcome[30000]=""; /* HTML Part 2 (the lengths are max input from the entries) * Can contain: static HTML(3000), username(128)*10 (1280), dl KB(50)*10 (500) */ char html_welcome1[5000]=""; int row=0, old_row=0, max_rows=0, count=0; int x=0, z=0, top_ul=0, top_dl=0, timez=0, timex=0, once=0; int conf_changed=0, xferlog_changed=0; int found_virtualhost = 0; /* Default settings */ strcpy(conf, PROFTPD_CONF); strcpy(xferlog, XFER_LOG); /* Check length of arguments */ for(x=0; argv[x]!=NULL; x++) { if( strlen(argv[x]) > 8000 ) { printf("\nGProStats error: supplied argument is too long\n"); show_usage(conf, xferlog); exit(1); } if( x > 1000 ) { printf("\nGProStats error: Max argument reached at 1000\n"); show_usage(conf, xferlog); exit(1); } if( strstr(argv[x], "%") ) { printf("\nGProStats error: supplied percent char in argument is invalid.\n"); show_usage(conf, xferlog); exit(1); } if( strstr(argv[x], "0x") ) { printf("\nGProStats error: supplied 0x chars in argument in invalid.\n"); show_usage(conf, xferlog); exit(1); } } printf("\n"); /* Check for user-supplied args */ for(x=0; xx+1 ) if( strstr(argv[x], "-c") && strstr(argv[x+1], "/") ) { conf_changed = 1; printf("Using supplied conf path: %s\n", argv[x+1]); strcpy(conf, argv[x+1]); } if( argc>x+1 ) if( strstr(argv[x], "-x") && strstr(argv[x+1], "/") ) { xferlog_changed = 1; printf("Using supplied xferlog path: %s\n", argv[x+1]); strcpy(xferlog, argv[x+1]); } if( argc>x+1 ) if( strstr(argv[x], "-w") && strlen(argv[x+1])>0 ) { printf("Creating welcome messages as: %s\n", argv[x+1]); strcpy(welcome_name, argv[x+1]); } if( argc>x+1 ) if( strstr(argv[x], "-html") && strstr(argv[x+1], "/") ) { printf("Making a html statistics page here: %s\n", argv[x+1]); strcpy(html, argv[x+1]); } } /* Show the paths if new paths wherent supplied */ if( ! conf_changed ) printf("Using config path: %s\n", conf); if( ! xferlog_changed ) printf("Using xferlog path: %s\n", xferlog); printf("\n"); /* Get usernames and homedirectories */ if((fp=fopen(conf, "r"))==NULL) { printf("\nproftpd.conf could not be found here: %s\n", conf); show_usage(conf, xferlog); return 0; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size); if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) continue; if( strstr(old_buffer, " 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) continue; if( strstr(old_buffer, "') { dir[x]='\0'; break; } } snprintf(userlist[row].dir, 8000, "%s", dir); while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) continue; if( strstr(old_buffer, "") ) break; /* Username */ if( strstr(old_buffer, "User ") && ! strstr(old_buffer, "DirFakeUser") && ! strstr(old_buffer, "AllowUser") && ! strstr(old_buffer, "DenyUser") ) { sscanf(old_buffer, "%*s %s", user); /* Trim off browser added '@' char if any */ if( user[strlen(user)-1]=='@' ) user[strlen(user)-1]='\0'; snprintf(userlist[row].user, 8000, "%s", user); /* Init all to be updated */ userlist[row].update = 1; /* Locked .. dont update the welcome message */ while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) continue; if( strstr(old_buffer, "#gplockstats") ) { userlist[row].update = 0; row--; } if( strstr(old_buffer, "") ) break; } row++; break; } } } } fclose(fp); free(old_buffer); /* Add users ul/dl statistics to the array */ action = allocate(8192); file = allocate(8192); datestamp = allocate(8192); temp = allocate(8192); if((fp=fopen(xferlog, "r")) == NULL) { printf("\nThe xferlog could not be found here: %s\n", xferlog); show_usage(conf, xferlog); return 0; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size); if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL ) { if( strlen(old_buffer) > 8000 ) continue; /* DateStamp, 1-5 in the xferlog on the first line that has content */ if( ! once && strlen(old_buffer) > 5 ) { for(x=0; old_buffer[x]!='\n'; x++) { if( x > 100 ) { printf("Date is not in the correct place in the xferlog: %s\n", &old_buffer[0]); break; } if(old_buffer[x]==' ' && old_buffer[x+1]!=' ') z++; if( z == 5 ) { /* Security bug fixed thanks to Tavis Ormandy */ snprintf(datestamp, x+1, "%s", old_buffer); once = 1; break; } } } strcpy(user, ""); file_size = 0; /* User */ sscanf(old_buffer, "%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %s", user); /* Trim off browser added '@' char if any */ if( user[strlen(user)-1]=='@' ) user[strlen(user)-1]='\0'; /* Size */ strcpy(temp, ""); sscanf(old_buffer, "%*s %*s %*s %*s %*s %*s %*s %s", temp); if( chars_are_digits(temp) ) sscanf(old_buffer, "%*s %*s %*s %*s %*s %*s %*s %llu", &file_size); /* UL or DL */ sscanf(old_buffer, "%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %s", action); /* File */ sscanf(old_buffer, "%*s %*s %*s %*s %*s %*s %*s %*s %s", file); /* Go thru the array looking for this user and add its ul/dl stats */ row = 0; while( row < max_rows ) { if( strcmp(userlist[row].user, user) == 0 ) { /* Upload */ if( strstr(action, "i") ) userlist[row].ul=userlist[row].ul+file_size/1024; /* Download */ if( strstr(action, "o") ) userlist[row].dl=userlist[row].dl+file_size/1024; } row++; } } fclose(fp); free(old_buffer); free(temp); free(user); free(dir); free(action); free(file); welcome = allocate(16384); welcome1 = allocate(16384); strcpy(welcome, "Welcome to "); strcat(welcome, server_name); strcat(welcome, " \%U\n\n"); strcat(welcome, "You are user \%N out of a maximum of \%M authorized logins.\n"); strcat(welcome, "Current time is \%T.\n"); strcat(welcome, "The administrator can be reached here: \%E\n"); if( strlen(datestamp) > 3 && strlen(datestamp) < 100 ) { strcat(welcome, "\nStatistics since: "); strcat(welcome, datestamp); } strcat(welcome, "\n\nTop 10 Uploaders:\n_________________\n"); /* Generate html statistics */ if( strlen(html) > 1 ) { /* The page and the top 10 ul */ strcpy(html_welcome, "\n"); strcpy(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "GADMIN-PROFTPD statistics\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "
Statistics for "); strcat(html_welcome, server_name); if( strlen(datestamp) > 3 && strlen(datestamp) < 100 ) { strcat(html_welcome, " since: "); strcat(html_welcome, datestamp); } strcat(html_welcome, "\n
\n"); strcat(html_welcome, "
\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); /* The top 10 dl section */ strcat(html_welcome1, "
Top 10 uploaders
\n"); strcat(html_welcome1, "\n"); strcat(html_welcome1, "\n"); strcat(html_welcome1, "\n"); } free(datestamp); /* Calculate top 10 UL and top 10 DL */ x=0; z=0; row=0; count=0; old_row=0; convert = allocate(8192); while( 1 ) { if( row > max_rows-1 ) row = 0; if( count >= max_rows * max_rows ) break; old_row = 0; timez = 0; timex = 0; while( 1 ) { /* Greater or equal UL then any user in the list thats not flagged */ if( userlist[row].ul >= userlist[old_row].ul && ! userlist[row].ul_flag && ! userlist[old_row].ul_flag ) { top_ul = row; timez++; } /* Greater or equal DL then any user in the list thats not flagged */ if( userlist[row].dl >= userlist[old_row].dl && ! userlist[row].dl_flag && ! userlist[old_row].dl_flag ) { top_dl = row; timex++; } /* .. Or if the user is flagged */ if( userlist[old_row].ul_flag ) timez++; if( userlist[old_row].dl_flag ) timex++; /* TOP UPLOAD */ if( timez > max_rows-1 && userlist[top_ul].ul !=0 && userlist[top_ul].ul_flag !=1 ) { z++; if( z <= 10 ) { userlist[top_ul].ul_flag = 1; strcat(welcome, userlist[top_ul].user); strcat(welcome, ": "); sprintf(convert, "%llu", userlist[top_ul].ul); strcat(welcome, convert); strcat(welcome, " KB\n"); /* Generate html */ if( strlen(html) > 1 ) { strcat(html_welcome, "\n"); strcat(html_welcome, "\n"); } } } /* TOP Download */ if( timex > max_rows-1 && userlist[top_dl].dl !=0 && userlist[top_dl].dl_flag !=1 ) { x++; if( x<=10 ) { userlist[top_dl].dl_flag = 1; strcat(welcome1, userlist[top_dl].user); strcat(welcome1, ": "); sprintf(convert, "%llu", userlist[top_dl].dl); strcat(welcome1, convert); strcat(welcome1, " KB\n"); /* Generate html */ if( strlen(html) > 1 ) { strcat(html_welcome1, "\n"); strcat(html_welcome1, "\n"); } } } if( old_row < max_rows-1 ) old_row++; else break; } count++; row++; } free(convert); strcat(welcome, "\nTop 10 Downloaders:\n"); strcat(welcome, "___________________\n"); strcat(welcome, welcome1); strcat(welcome, "\n"); /* Get todays date */ datestamp = allocate(8192); if((fp=popen("date", "r"))==NULL) { printf("Pipe Fork error [get date 2]\n"); return 0; } fflush(fp); while(fgets(datestamp, 8192, fp)!=NULL) { if( strlen(datestamp) > 3 && strlen(datestamp) < 100 ) { strcat(welcome, "\nGenerated on "); strcat(welcome, datestamp); strcat(welcome, "\n"); break; } } pclose(fp); printf("\n%s\n", welcome); /* Add welcome messages for all ftp users in proftpd.conf that should be updated */ if( strlen(welcome_name) > 1 ) { row = 0; while(1) { if( strlen(userlist[row].dir) > 0 ) { /* Minimize writing to the same file */ if( row > 0 && row < max_rows-1 ) { if( strcmp(userlist[row].dir, userlist[row-1].dir) == 0 ) { row++; continue; } } /* Dont write a welcome.msg if theres a "gplock" lockfile present */ if( userlist[row].update ) { /* Write the welcome.msg */ strcpy(user_welcome, userlist[row].dir); if( user_welcome[strlen(user_welcome)-1]!='/' ) strcat(user_welcome, "/"); strcat(user_welcome, welcome_name); if((fp=fopen(user_welcome, "w+"))==NULL) { printf("\nSomething is wrong with proftpd.conf, could not write to this dir:\n%s\n", userlist[row].dir); } else { fputs(welcome, fp); fclose(fp); } } } if( row < max_rows-1 ) row++; else break; } } /* Output generated html */ if( strlen(html) > 1 ) { strcat(html_welcome, "
Top 10 downloaders
"); strcat(html_welcome, userlist[top_ul].user); strcat(html_welcome, ""); sprintf(convert, "%llu", userlist[top_ul].ul); strcat(html_welcome, convert); strcat(html_welcome, " KB\n"); strcat(html_welcome, "
"); strcat(html_welcome1, userlist[top_dl].user); strcat(html_welcome1, ""); sprintf(convert, "%llu", userlist[top_dl].dl); strcat(html_welcome1, convert); strcat(html_welcome1, " KB\n"); strcat(html_welcome1, "

\n"); strcat(html_welcome, html_welcome1); strcat(html_welcome, "

\n"); if( strlen(datestamp) > 3 && strlen(datestamp) < 100 ) { strcat(html_welcome, "
Statistics generated by GAdmin-PRoFTPD on \n"); strcat(html_welcome, datestamp); strcat(html_welcome, "
\n"); } strcat(html_welcome, "\n"); if((fp=fopen(html, "w+")) == NULL) { printf("\nCould not write: %s\n", html); show_usage(conf, xferlog); return 0; } else { printf("Adding html statistics to: %s\n", html); fputs(html_welcome, fp); fclose(fp); } } free(welcome); free(welcome1); free(datestamp); /* Free the struct */ free(userlist); if( argc < 2 ) { printf("\nThe output shown was never written to any file.\n\n"); printf("Use \"-w welcome.msg\" to write welcome messages for all users.\n"); printf("Use \"-html /var/www/html/ftp.htm\" to write statistics to a html page.\n"); printf("Both can be used at the same time.\n"); printf("Use --help for help.\n\n"); } return 0; } gadmin-proftpd-0.4.2/src/server_treeview_row_clicked.h0000644000000000000000000000211011513432313021641 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef server_treeview_row_clicked_H # define server_treeview_row_clicked_H extern struct w *widgets; void server_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, gpointer data); #endif gadmin-proftpd-0.4.2/src/populate_users.c0000644000000000000000000002012711513432313017131 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "support.h" #include #include #include #include #include "allocate.h" #include "widgets.h" #include "functions.h" #include "populate_users.h" #include "show_info.h" #include "commands.h" extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_name[1024]; extern char global_server_type[1024]; extern char global_user_name[1024]; void populate_users(struct w *widgets) { /* Lists all the users in the userlist */ FILE *fp; GtkTreeIter iter; GtkTreePath *path; GtkTreeModel *list_store; char *old_buffer, *new_buffer, *address_buffer, *port_buffer, *translate; long i=0, conf_size=0; gboolean edit=0; int found_user=0, found_server=0; gchar *user, *user_comment; gchar *utf8=NULL; gtk_list_store_clear(widgets->user_store); /* Populate the userlist from proftpd.conf */ if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { /* Dont show a popup */ printf("Error opening: [%s] for listing users\n", PROFTPD_CONF); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size); new_buffer = allocate(conf_size+8192); address_buffer = allocate(8192+15); port_buffer = allocate(8192+3); if( strstr((char *)global_server_type, "Virtualhost") ) sprintf(address_buffer, "\n", global_server_address); else sprintf(address_buffer, global_server_address); sprintf(port_buffer, "Port %s\n", global_server_port); if( strstr((char *)global_server_type, "Virtualhost") ) { if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { /* If its the correct address */ if( strcmp(old_buffer, address_buffer) == 0 ) { while(fgets(old_buffer, conf_size, fp)!=NULL) { /* List only one Vhost */ if( strstr(old_buffer, "") ) break; if( strcmp(old_buffer, port_buffer) == 0 ) { found_server = 1; /* Scroll past some stuff to 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { /* break if the selected server is a vhost and the next vhost is found */ if( strstr((char *)global_server_type, "Virtualhost") && strstr(old_buffer, "' ) break; new_buffer[i]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->user_store), &iter); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 3, utf8, -1); while(fgets(old_buffer, conf_size, fp)!=NULL) { /* Insert username, comment and banned status */ if( strstr(old_buffer, "User ") && ! strstr(old_buffer, "DirFakeUser") ) { sscanf(old_buffer, "%*s %s", new_buffer); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 0, utf8, -1); /* Insert user comment */ user_comment = get_user_setting(new_buffer, "comment"); utf8 = g_locale_to_utf8(user_comment, strlen(user_comment), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 2, utf8, -1); if( user_comment!=NULL ) g_free(user_comment); translate = allocate(4096); /* Insert banned status */ if( is_banned(new_buffer) ) { sprintf(translate, _("yes")); utf8 = g_locale_to_utf8(translate, strlen(translate), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 5, utf8, -1); } else { sprintf(translate, _("no")); utf8 = g_locale_to_utf8(translate, strlen(translate), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 5, utf8, -1); } free(translate); } /* Insert group */ if( strstr(old_buffer, "Group ") && ! strstr(old_buffer, "DirFakeGroup") ) { sscanf(old_buffer, "%*s %s", new_buffer); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 1, utf8, -1); } /* Insert require password */ if( strstr(old_buffer, "AnonRequirePassword ") ) { sscanf(old_buffer, "%*s %s", new_buffer); translate = allocate(4096); if( strstr(new_buffer, "on") ) { sprintf(translate, _("yes")); utf8 = g_locale_to_utf8(translate, strlen(translate), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 4, utf8, -1); } else { sprintf(translate, _("no")); utf8 = g_locale_to_utf8(translate, strlen(translate), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 4, utf8, -1); } free(translate); } /* Insert maximum connections */ if( strstr(old_buffer, "MaxClients ") ) { sscanf(old_buffer, "%*s %s", new_buffer); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 6, utf8, -1); } if( strstr(old_buffer, "
") ) break; } } } fclose(fp); free(old_buffer); free(new_buffer); free(address_buffer); free(port_buffer); if( utf8 !=NULL ) g_free(utf8); /* Cant set treepath if there arent any users/rows, then itll crash */ /* Also unset global_user_name */ if( ! found_user ) { strcat(global_user_name, ""); return; } path = gtk_tree_path_new_first(); gtk_tree_view_set_cursor(GTK_TREE_VIEW(widgets->user_treeview), path, NULL, edit); /* Set this user as globally selected */ list_store = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->user_treeview)); gtk_tree_model_get_iter(list_store, &iter, path); gtk_tree_model_get(list_store, &iter, 0, &user, -1); sprintf(global_user_name, "%s", (gchar *)user?user:"None"); g_free(user); gtk_tree_path_free(path); } gadmin-proftpd-0.4.2/src/populate_servers.c0000644000000000000000000001524611513432313017467 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "support.h" #include #include #include #include #include "allocate.h" #include "widgets.h" #include "commented.h" #include "populate_servers.h" #include "show_info.h" #include "functions.h" #include "get_option_pos.h" extern char global_server_port[1024]; extern char global_server_name[1024]; extern char global_server_type[1024]; void populate_servers(struct w *widgets) { /* Lists servers in the serverlist */ FILE *fp; GtkTreeIter iter; GtkTreePath *path; char *line, *new_buffer; long file_size; gboolean edit=0; int i=0, found=0; gchar *utf8=NULL; gtk_list_store_clear(widgets->server_store); /* Populate the serverlist */ if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { /* Dont show annoying popup */ return; } fseek(fp, 0, SEEK_END); file_size=ftell(fp); rewind(fp); line = allocate(file_size); new_buffer = allocate(file_size); /* Add a row */ gtk_list_store_append(GTK_LIST_STORE(widgets->server_store), &iter); /* Always append this for the default server */ utf8 = g_locale_to_utf8("All interfaces", 14, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 0, utf8, -1); /* List the default server first */ if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( commented(line) ) continue; if( cmplowercase(line, "server_store), &iter, 1, utf8, -1); /* Insert the type */ utf8 = g_locale_to_utf8("Default server", 14, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 3, utf8, -1); } if( strstr(line, "ServerName ") || strstr(line, "ServerIdent on ") ) { //Fixme: utf8 utf8 = g_locale_to_utf8("Default server", 14, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 3, utf8, -1); if( strstr(line, "ServerIdent on ") ) { for(i=16; line[i]!='\0'; i++) if( line[i]!='"' && line[i]!=' ' && line[i]!='\n' && line[i]!='\t' ) break; sprintf(new_buffer, "%s", &line[i]); new_buffer[strlen(new_buffer)-2]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 2, utf8, -1); } if( strstr(line, "ServerName ") ) { for(i=12; line[i]!='\0'; i++) if( line[i]!='"' && line[i]!=' ' && line[i]!='\n' && line[i]!='\t' ) break; sprintf(new_buffer, "%s", &line[i]); new_buffer[strlen(new_buffer)-2]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 2, utf8, -1); } } } /* End of listing the default server */ /* List the VirtualHosts */ found = 0; rewind(fp); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( commented(line) ) continue; if( strstr(line, "server_store), &iter); /* Insert the ipaddress or hostname */ sprintf(new_buffer, "%s", &line[13]); new_buffer[strlen(new_buffer)-2]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 0, utf8, -1); utf8 = g_locale_to_utf8("Virtualhost", 11, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 3, utf8, -1); found = 1; } if( ! found ) continue; if( strstr(line, "Port ") && ! strstr(line, "PassivePorts ") && ! strstr(line, "standard ") ) { /* Insert the ipaddress or hostname */ sprintf(new_buffer, "%s", &line[5]); new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 1, utf8, -1); } if( strstr(line, "ServerName ") ) { for(i=12; line[i]!='\0'; i++) if( line[i]!='"' && line[i]!=' ' && line[i]!='\n' && line[i]!='\t' ) break; /* Insert the ipaddress or hostname */ sprintf(new_buffer, "%s", &line[i]); new_buffer[strlen(new_buffer)-2]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 2, utf8, -1); } if( strstr(line, "ServerIdent on ") ) { for(i=16; line[i]!='\0'; i++) if( line[i]!='"' && line[i]!=' ' && line[i]!='\n' && line[i]!='\t' ) break; /* Insert the ipaddress or hostname */ sprintf(new_buffer, "%s", &line[i]); new_buffer[strlen(new_buffer)-2]='\0'; utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->server_store), &iter, 2, utf8, -1); } } fclose(fp); free(line); free(new_buffer); if( utf8 !=NULL ) g_free(utf8); /* We always append a line for the default server first.. so this wont crash */ path = gtk_tree_path_new_first(); gtk_tree_view_set_cursor(GTK_TREE_VIEW(widgets->server_treeview), path, NULL, edit); gtk_tree_path_free(path); } gadmin-proftpd-0.4.2/src/populate_users.h0000644000000000000000000000175511513432313017144 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef populate_users_H # define populate_users_H extern struct w *widgets; void populate_users(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/save_conf_tab.c0000644000000000000000000000414411513432313016651 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "support.h" #include #include #include #include #include "allocate.h" #include "widgets.h" #include "save_conf_tab.h" #include "populate_servers.h" #include "populate_server_settings.h" #include "populate_users.h" #include "populate_user_settings.h" #include "reread_conf.h" void save_conf_tab(struct w *widgets) { /* Save the configuration in the conf tab to PROFTPD_CONF. */ FILE *fp; GtkTextBuffer *conf_textbuffer; GtkTextIter start, end; gchar *conf = NULL; gchar *utf8 = NULL; conf_textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widgets->conf_textview)); gtk_text_buffer_get_bounds(conf_textbuffer, &start, &end); conf = gtk_text_iter_get_text(&start, &end); if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { return; } fputs(conf, fp); fclose(fp); /* Update the server tabs */ populate_servers(widgets); populate_server_settings(widgets); /* Update the user tabs */ populate_users(widgets); populate_user_settings(widgets); /* Dont update the conf tab */ if( conf!=NULL ) g_free(conf); if( utf8!=NULL ) g_free(utf8); reread_conf(widgets); } gadmin-proftpd-0.4.2/src/save_conf_tab.h0000644000000000000000000000175411513432313016662 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef save_conf_tab_H # define save_conf_tab_H extern struct w *widgets; void save_conf_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/allocate.h0000644000000000000000000000174311513432312015652 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef gadmin_proftpd_ALLOCATE_H # define gadmin_proftpd_ALLOCATE_H char * allocate(long allocate_size); #endif gadmin-proftpd-0.4.2/src/support.h0000644000000000000000000000524711513432313015606 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifdef HAVE_CONFIG_H # include #endif #include /* * Standard gettext macros. */ #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif /* * Public Functions. */ /* Return the selected combo index (for on/off etc) */ int combo_selection(GtkWidget *combo); /* * This function returns a widget in a component created by Glade. * Call it with the toplevel widget in the component (i.e. a window/dialog), * or alternatively any widget in the component, and the name of the widget * you want returned. */ GtkWidget* lookup_widget(GtkWidget *widget, const gchar *widget_name); /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory); /* * Private Functions. */ /* This is used to create the pixmaps used in the interface. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename); /* This is used to create the pixbufs used in the interface. */ GdkPixbuf* create_pixbuf (const gchar *filename); /* This is used to set ATK action descriptions. */ void glade_set_atk_action_description (AtkAction *action, const gchar *action_name, const gchar *description); gadmin-proftpd-0.4.2/src/make_settings_progressbars.c0000644000000000000000000000475511513432313021521 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "make_settings_progressbars.h" GtkWidget *make_progressbar_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint bar_length) { GtkWidget *progressbar; GtkWidget *label; label = gtk_label_new(label_text); progressbar = gtk_progress_bar_new(); gtk_table_attach(table, label, 0, 0+1, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, progressbar, left_attach + 1, right_attach + 1, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 0); gtk_widget_set_size_request(progressbar, bar_length, -1); gtk_widget_show(progressbar); gtk_widget_show(label); return progressbar; } GtkWidget *make_button(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint button_length) { GtkWidget *button; button = gtk_button_new_from_stock(GTK_STOCK_APPLY); gtk_table_attach(table, button, left_attach + 2, right_attach + 2, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_widget_show(button); return button; } gadmin-proftpd-0.4.2/src/select_first_server.h0000644000000000000000000000177611513432313020151 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef select_first_server_H # define select_first_server_H extern struct w *widgets; void select_first_server(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/make_settings_checkbuttons.c0000644000000000000000000000360011513432313021465 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "make_settings_checkbuttons.h" GtkWidget *make_checkbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach) { GtkWidget *checkbutton; GtkWidget *label; label = gtk_label_new(label_text); checkbutton = gtk_check_button_new(); gtk_table_attach(table, label, left_attach, right_attach, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, checkbutton, left_attach + 1, right_attach + 1, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 2); // gtk_widget_set_size_request(spinbutton, spinbutton_length, -1); gtk_widget_show(checkbutton); gtk_widget_show(label); return checkbutton; } gadmin-proftpd-0.4.2/src/generate_cert.h0000644000000000000000000000175211513432313016676 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef generate_cert_H # define generate_cert_H extern struct w *widgets; void generate_cert(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/gettext.h0000644000000000000000000000272511513432313015554 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifdef HAVE_CONFIG_H # include #endif #include /* * Standard gettext macros. */ #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif gadmin-proftpd-0.4.2/src/make_settings_entries.c0000644000000000000000000000573611513432313020456 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "make_settings_entries.h" GtkWidget *make_entry_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length) { GtkWidget *entry; GtkWidget *label; label = gtk_label_new(label_text); entry = gtk_entry_new(); gtk_table_attach(table, label, left_attach, right_attach, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, entry, left_attach + 1, right_attach + 1, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 2); gtk_entry_set_max_length(GTK_ENTRY(entry), entry_length); gtk_widget_set_size_request(entry, entry_length, -1); gtk_widget_show(entry); gtk_widget_show(label); return entry; } GtkWidget *make_long_entry_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length) { GtkWidget *entry; GtkWidget *label; label = gtk_label_new(label_text); entry = gtk_entry_new(); gtk_table_attach(table, label, left_attach, right_attach, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 2, 2); gtk_table_attach(table, entry, left_attach + 1, right_attach + 2, top_attach, bottom_attach, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label), 2, 2); gtk_entry_set_max_length(GTK_ENTRY(entry), entry_length); gtk_widget_set_size_request(entry, entry_length, -1); gtk_widget_show(entry); gtk_widget_show(label); return entry; } gadmin-proftpd-0.4.2/src/add_server.c0000644000000000000000000000673311513432312016203 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include "widgets.h" #include "gettext.h" #include "allocate.h" #include "add_server.h" #include "show_info.h" #include "populate_servers.h" #include "populate_conf_tab.h" void add_server(struct w *widgets) { FILE *fp; gchar *vhost_config; if((fp=fopen(PROFTPD_CONF, "a"))==NULL) { printf("Cant write to: %s\n", PROFTPD_CONF); return; } /* The vhost server configuration to be added */ vhost_config = g_strconcat("", "\n\n", "Port 65535\n", "ServerName \"localhost\"\n", "ServerIdent on \"Vhost server\"\n", "PassivePorts 49152 65534\n", "#MasqueradeAddress None\n", "ServerAdmin Admin@example.org\n", "Umask 022\n", "TimesGMT off\n", "MaxLoginAttempts 3\n", "TimeoutLogin 300\n", "TimeoutNoTransfer 120\n", "TimeoutIdle 120\n", "User ", SERVER_USER, "\n", "Group ", SERVER_GROUP, "\n", "DirFakeUser on ", SERVER_USER, "\n", "DirFakeGroup on ", SERVER_GROUP, "\n", "DefaultTransferMode binary\n", "AllowForeignAddress off\n", "DeleteAbortedStores off\n", "AllowRetrieveRestart on\n", "AllowStoreRestart on\n", "TransferRate RETR 142\n", "TransferRate STOR 142\n", "TransferRate STOU 142\n", "TransferRate APPE 142\n", "RequireValidShell off\n", "\n", "TLSEngine off\n", "TLSRequired off\n", "TLSVerifyClient off\n", "TLSLog ", GP_VARDIR, "/log/proftpd_tls.log\n", "TLSRSACertificateFile ", GP_APPCONFDIR, "/certs/cert.pem\n", "TLSRSACertificateKeyFile ", GP_APPCONFDIR, "/certs/key.pem\n", "TLSCACertificateFile ", GP_APPCONFDIR, "/certs/cacert.pem\n", "TLSRenegotiate required off\n", "\n\n", "\n", "Ratios off\n", "SaveRatios off\n", "RatioFile \"/restricted/proftpd_ratios\"\n", "RatioTempFile \"/restricted/proftpd_ratios_temp\"\n", "CwdRatioMsg \"Please upload first!\"\n", "FileRatioErrMsg \"FileRatio limit exceeded, upload something first...\"\n", "ByteRatioErrMsg \"ByteRatio limit exceeded, upload something first...\"\n", "LeechRatioMsg \"Your ratio is unlimited.\"\n", "\n\n", "\n", " DenyAll\n", "\n", "\n\n", NULL); fputs(vhost_config, fp); fclose(fp); g_free(vhost_config); /* Repopulate the affected parts of the gui */ populate_servers(widgets); populate_conf_tab(widgets); /* Dont update the server, itll be updated when a user is added */ } gadmin-proftpd-0.4.2/src/apply_server_settings.h0000644000000000000000000000200211513432312020506 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef apply_server_settings_H # define apply_server_settings_H extern struct w *widgets; void apply_server_settings(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/apply_button_clicked.h0000644000000000000000000000174411513432312020265 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef apply_button_clicked_H # define apply_button_clicked_H void apply_button_clicked(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/show_info.h0000644000000000000000000000171211513432313016056 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef HAVE_show_info_H # define HAVE_show_info_H void show_info(gchar *content); #endif gadmin-proftpd-0.4.2/src/standard_conf.h0000644000000000000000000000241711513432313016673 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #ifndef standard_conf_H # define standard_conf_H extern struct w *widgets; int conf_ok(gchar *file_path); void create_standard_conf_question(struct w *widgets); void backup_configuration(struct w *widgets); void force_configuration_backup(struct w *widgets); void restore_configuration(struct w *widgets); void add_standard_conf(struct w *widgets); void new_tls_module_conf(); #endif gadmin-proftpd-0.4.2/src/select_first_server.c0000644000000000000000000000410111513432313020125 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "select_first_server.h" extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_type[1024]; void select_first_server(struct w *widgets) { GtkTreePath *path; GtkTreeIter iter; GtkTreeModel *list_store; gchar *address=NULL, *port=NULL, *type=NULL; path = gtk_tree_path_new_first(); list_store = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->server_treeview)); if( ! gtk_tree_model_get_iter(list_store, &iter, path) ) { gtk_tree_path_free(path); return; } gtk_tree_model_get(list_store, &iter, 0, &address, -1); gtk_tree_model_get(list_store, &iter, 1, &port, -1); gtk_tree_model_get(list_store, &iter, 3, &type, -1); if( address==NULL || address==NULL || type==NULL ) { gtk_tree_path_free(path); return; } sprintf(global_server_address, "%s", (gchar *)address?address:"None"); sprintf(global_server_port, "%s", (gchar *)port?port:"21"); sprintf(global_server_type, "%s", (gchar *)type?type:"None"); g_free(address); g_free(port); g_free(type); } gadmin-proftpd-0.4.2/src/make_settings_labels.h0000644000000000000000000000227211513432313020244 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef gadmin_proftpd_make_settings_labels_H # define gadmin_proftpd_make_settings_labels_H void make_3columns_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach); #endif gadmin-proftpd-0.4.2/src/make_settings_checkbuttons.h0000644000000000000000000000364211513432313021500 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef make_settings_checkbuttons_H # define make_settings_checkbuttons_H GtkWidget *make_checkbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach); /* GtkWidget *make_padded_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_short_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_spinbutton(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); */ #endif gadmin-proftpd-0.4.2/src/apply_user.c0000644000000000000000000003755611566007142016266 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include "widgets.h" #include "gettext.h" #include "functions.h" #include "reread_conf.h" #include "show_info.h" #include "add_user.h" #include "apply_user.h" #include "allocate.h" #include "populate_users.h" #include "populate_user_settings.h" #include "populate_conf_tab.h" #include "dir_treeview_funcs.h" extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_type[1024]; extern int activated; extern int use_ratio; extern int use_quota; /* Temporary for option deprecations */ extern char global_version[1024]; /* The current directory beeing added and limited */ extern gchar *homedir; /* The directory checkbox values */ gchar *dir_val[19]; extern long num_rows; extern int row_pos; char *user_profile; /* Check if the user exists in the selected server */ int user_exists_in_selected_server(struct w *widgets, gchar *username) { FILE *fp; long file_size = 0; char *line, *user_check; char *address_buffer, *port_buffer; int found_server=0, standard_server=0; if((fp=fopen(PROFTPD_CONF,"r"))==NULL) { return 0; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size); address_buffer = allocate(8192+15); port_buffer = allocate(8192+3); user_check = allocate(4096); snprintf(user_check, 4000, "User %s\n", username); if( strstr((char *)global_server_type, "Virtualhost") ) sprintf(address_buffer, "\n", global_server_address); else standard_server = 1; sprintf(port_buffer, "Port %s\n", global_server_port); /* Scroll to the correct vhost */ if( ! standard_server && file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { /* The correct server address is found */ if( ! found_server && strcmp(line, address_buffer) == 0 ) { /* Lets see if its the same port as the selected one */ while(fgets(line, file_size, fp)!=NULL) { if( strstr(line, "Port") && strcmp(line, port_buffer) == 0 ) { found_server = 1; break; } /* End of vhost, break and check the next vhost */ if( strstr(line, "") ) break; } } /* This vhost has the correct address and port */ if( found_server ) break; } /* The selected vhost was not found */ if( ! standard_server && ! found_server ) { fclose(fp); free(user_check); free(line); free(address_buffer); free(port_buffer); return 0; } /* We have begun at the top for the standard server or scrolled to the selected vhost. */ /* Check if the user exists in this selected vhost or standard server */ if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( strcmp(line, user_check) == 0 && ! strstr(line, "AllowUser") && ! strstr(line, "FakeUser") ) { fclose(fp); free(user_check); free(line); free(address_buffer); free(port_buffer); return 1; } /* End the search if we are looking for a standard user and the end of the standard server is found */ if( standard_server && strstr(line, "user_set_entry[0])); password = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[1])); groupname = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[2])); comment = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[3])); login_from = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[5])); max_logins = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[0])); /* Ratios */ if( use_ratio ) { br = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[1])); brc = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[2])); fr = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[3])); frc = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[4])); } if( password!=NULL ) password_length = strlen(password); /* If the user has written a password thats less then MIN_PASS_LEN chars long */ if( password_length > 0 && password_length < MIN_PASS_LEN ) { info = g_strdup_printf(_("The minimum password length is %d.\n"), MIN_PASS_LEN); show_info(info); g_free(info); return; } /* Set global num_rows */ num_rows = 0; gtk_tree_model_foreach(GTK_TREE_MODEL(widgets->directory_store), (GtkTreeModelForeachFunc) num_rows_func, widgets); /* There must be atleast one directory */ if( num_rows < 1 ) { info = g_strdup_printf(_("Missing ftp home directory. Scroll down and add one first.\n")); show_info(info); g_free(info); return; } if( ! user_exists_in_selected_server(widgets, (gchar *)username) ) { /* Add a new user */ add_user(widgets); return; } /* (Global char) Statics + entries + number of rows (dirlen + APPE STOR STOU etc) */ profile_size = 16384 + 1400 + (num_rows * 16384); /* Allocate the user profile */ user_profile = allocate(profile_size); /* Set the users home dir and its values globally */ row_pos = 0; /* Only get the home directory */ gtk_tree_model_foreach(GTK_TREE_MODEL(widgets->directory_store), (GtkTreeModelForeachFunc) dirs_foreach, widgets); /* Create the user profile... */ /* Home directory */ snprintf(user_profile, 16384, "\n\n", homedir); /* Username */ strcat(user_profile, "User "); strcat(user_profile, username); strcat(user_profile, "\n"); /* Groupname */ strcat(user_profile, "Group "); strcat(user_profile, groupname); strcat(user_profile, "\n"); /* Require password */ if( ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[1])) ) strcat(user_profile, "AnonRequirePassword off\n"); else strcat(user_profile, "AnonRequirePassword on\n"); /* Maximum logins */ strcat(user_profile, "MaxClients "); strcat(user_profile, max_logins); strcat(user_profile, " \""); strcat(user_profile, "The server is full, hosting %m users"); strcat(user_profile, "\"\n"); /* Static Welcome and chdir msgs */ strcat(user_profile, "DisplayLogin welcome.msg\n"); strcat(user_profile, "DisplayChdir .msg\n"); /* Ratio Module (reversed br/fr order in the gui) */ if( use_ratio ) { /* Ratios have been turned on in the global settings */ active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[16])); if( active_index == 0 ) { strcat(user_profile, "UserRatio "); strcat(user_profile, username); strcat(user_profile, " "); strcat(user_profile, fr); strcat(user_profile, " "); strcat(user_profile, frc); strcat(user_profile, " "); strcat(user_profile, br); strcat(user_profile, " "); strcat(user_profile, brc); strcat(user_profile, "\n"); } } /* Logins from, if nothing is specified we allow everything */ if( login_from == NULL || strlen(login_from) < 3 ) { strcat(user_profile, "\n"); strcat(user_profile, "Allow from all\nDeny from all\n"); strcat(user_profile, "\n"); } else { strcat(user_profile, "\n"); strcat(user_profile, "Allow from "); strcat(user_profile, login_from); strcat(user_profile, "\nDeny from all\n"); strcat(user_profile, "\n"); } /* Append the Limit CMDs for the home directory */ append_limit_cmds(); /* Append all other directories to the user profile */ row_pos = 1; gtk_tree_model_foreach(GTK_TREE_MODEL(widgets->directory_store), (GtkTreeModelForeachFunc) dirs_foreach, widgets); /* If not checked, dont show this user in the statistics (picked up by gprostats) */ if( ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[2])) ) strcat(user_profile, "#gplockstats\n"); /* Profile end */ strcat(user_profile, "\n"); if( homedir!=NULL ) g_free(homedir); /* We have the new profile, insert it where the old user was located in the selected server */ UserUsername = g_strdup_printf("User %s\n", username); address_buffer = allocate(8192+15); port_buffer = allocate(8192+3); if( strstr((char *)global_server_type, "Virtualhost") ) sprintf(address_buffer, "\n", global_server_address); else sprintf(address_buffer, global_server_address); sprintf(port_buffer, "Port %s\n", global_server_port); /* Make changes for this users settings */ if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { free(address_buffer); free(port_buffer); return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+3); config = allocate(file_size+profile_size+3); /* If the selected server is a vhost we collect everything up to the first vhost with the same name as the selected one */ if( strstr((char *)global_server_type, "Virtualhost") ) { if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { strcat(config, line); /* If its the correct address */ if( strcmp(line, address_buffer) == 0 ) { while(fgets(line, file_size, fp)!=NULL) { strcat(config, line); /* This server was not the right one */ if( strstr(line, "") ) break; if( strcmp(line, port_buffer) == 0 ) { found = 1; break; } } } if( found ) break; } } /* We have scrolled to the correct VirtualHost or its the default server */ new_buffer = allocate(8192); /* Change the selected users settings */ if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( strstr(line, " 0 ) { strcat(config, new_buffer); new_buffer[0]='\0'; } strcat(config, line); break; } } } else strcat(config, line); } free(line); free(new_buffer); g_free(UserUsername); fclose(fp); free(address_buffer); free(port_buffer); free(user_profile); if( ! user_changed ) { info = g_strdup_printf(_("Error: user not found, couldnt change its settings.\n")); show_info(info); g_free(info); free(config); return; } /* Write the new config with the changed users settings */ if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { free(config); return; } fputs(config, fp); fclose(fp); free(config); /* Ban or unban the user in ftpusers depending on the selection */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0])) ) { /* Ban the user */ if( ! is_banned((char *)username) ) { if((fp=fopen(GP_FTPUSERS, "a"))==NULL) { } else { fputs("\n", fp); fputs(username, fp); fputs("\n", fp); fclose(fp); } } } else { /* Remove the user from ftpusers if its there */ if( is_banned((char *)username) ) { if((fp=fopen(GP_FTPUSERS, "r"))==NULL) { } else { fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); config = allocate(file_size+4096); line = allocate(file_size+4096); temp_user = allocate(8192); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { sscanf(line, "%s", temp_user); if( strcmp(temp_user, username) == 0 ) { /* Remove it */ } else strcat(config, line); } fclose(fp); free(line); free(temp_user); if((fp=fopen(GP_FTPUSERS, "w+"))==NULL) { } else { fputs(config, fp); fclose(fp); } free(config); } } } /* Change the users password if its >= MIN_PASS_LEN */ if( password_length >= MIN_PASS_LEN ) { /* Virtual users */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->server_set_check_virtual)) ) { /* Change the virtual users password */ if( user_exists(username) ) { password_virtual_user(username, password); } else printf("Virtual user doesnt exist: %s\n", username); } else /* System users */ { #ifndef USE_DARWIN if( user_exists(username) ) #elif USE_DARWIN if( niutil_user_exists(username) ) #endif { #ifndef USE_DARWIN password_user(username, password); #elif USE_DARWIN niutil_password_user(username, password); #endif info = g_strdup_printf(_("\nThe Password was changed.\n")); show_info(info); g_free(info); } else { info = g_strdup_printf(_("The password was not changed.\nThe user didnt exist in shadow or passwd.\n")); show_info(info); g_free(info); } } } fix_newlines_in_conf(); /* Update the userlist */ populate_users(widgets); /* Populate the user settings (it also populates the directories) */ populate_user_settings(widgets); /* Populate the conf tab */ populate_conf_tab(widgets); /* Update the server */ reread_conf(widgets); } gadmin-proftpd-0.4.2/src/make_settings_buttons.h0000644000000000000000000000236411513432313020502 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef make_settings_buttons_H # define make_settings_buttons_H GtkWidget *make_button_with_entry(GtkTable *table, GtkWidget *entry, char icon_name[100], gchar *utf8_btn_txt, gchar *utf8_tip_txt, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint button_length); #endif gadmin-proftpd-0.4.2/src/clear_file_tab.h0000644000000000000000000000175711513432312017006 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef clear_file_tab_H # define clear_file_tab_H extern struct w *widgets; void clear_file_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/support.c0000644000000000000000000001132111513432313015567 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include "support.h" int combo_selection(GtkWidget *combo) { GList *selected = NULL; GtkWidget* item = NULL; gint row_index; selected = GTK_LIST(GTK_COMBO(combo)->list)->selection; if( selected ) { item = GTK_WIDGET(selected->data); row_index = gtk_list_child_position(GTK_LIST(GTK_COMBO(combo)->list), item); return row_index; } /* Return is the first choice */ return 0; } GtkWidget* lookup_widget(GtkWidget *widget, const gchar *widget_name) { GtkWidget *parent, *found_widget; for (;;) { if (GTK_IS_MENU (widget)) parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); else parent = widget->parent; if (!parent) parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey"); if (parent == NULL) break; widget = parent; } found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget), widget_name); if (!found_widget) g_warning ("Widget not found: %s", widget_name); return found_widget; } static GList *pixmaps_directories = NULL; /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory) { pixmaps_directories = g_list_prepend (pixmaps_directories, g_strdup (directory)); } /* This is an internally used function to find pixmap files. */ static gchar* find_pixmap_file (const gchar *filename) { GList *elem; /* We step through each of the pixmaps directory to find it. */ elem = pixmaps_directories; while (elem) { gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data, G_DIR_SEPARATOR_S, filename); if (g_file_test (pathname, G_FILE_TEST_EXISTS)) return pathname; g_free (pathname); elem = elem->next; } return NULL; } /* This is an internally used function to create pixmaps. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename) { gchar *pathname = NULL; GtkWidget *pixmap; if (!filename || !filename[0]) return gtk_image_new (); pathname = find_pixmap_file (filename); if (!pathname) { g_warning (_("Couldn't find pixmap file: %s"), filename); return gtk_image_new (); } pixmap = gtk_image_new_from_file (pathname); g_free (pathname); return pixmap; } /* This is an internally used function to create pixmaps. */ GdkPixbuf* create_pixbuf (const gchar *filename) { gchar *pathname = NULL; GdkPixbuf *pixbuf; GError *error = NULL; if (!filename || !filename[0]) return NULL; pathname = find_pixmap_file (filename); if (!pathname) { g_warning (_("Couldn't find pixmap file: %s"), filename); return NULL; } pixbuf = gdk_pixbuf_new_from_file (pathname, &error); if (!pixbuf) { fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", pathname, error->message); g_error_free (error); } g_free (pathname); return pixbuf; } /* This is used to set ATK action descriptions. */ void glade_set_atk_action_description (AtkAction *action, const gchar *action_name, const gchar *description) { gint n_actions, i; n_actions = atk_action_get_n_actions (action); for (i = 0; i < n_actions; i++) { if (!strcmp (atk_action_get_name (action, i), action_name)) atk_action_set_description (action, i, description); } } gadmin-proftpd-0.4.2/src/populate_file_tab.h0000644000000000000000000000172211513432313017542 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef populate_files_H # define populate_files_H void populate_files(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/add_user.c0000644000000000000000000005310711566007035015660 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include "widgets.h" #include "gettext.h" #include "allocate.h" #include "commands.h" #include "show_info.h" #include "add_user.h" #include "functions.h" #include "chars_are_digits.h" #include "dir_treeview_funcs.h" #include "system_defines.h" #include "populate_users.h" #include "populate_user_settings.h" #include "populate_conf_tab.h" #include "select_first_user.h" #include "reread_conf.h" #ifdef USE_DARWIN #include "osx_functions.h" #endif extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_type[1024]; extern int use_ratio; extern int use_quota; extern long num_rows; extern int row_pos; /* Used globally with dir_treeview_funcs.c */ char *user_profile; /* Set in dir_treeview_funcs.c */ extern gchar *homedir; /* Declared in gadmin-proftpd.c and set in treeview_dir_funcs */ extern int global_dir_error; /* Temporary, for option deprecations in proftpd */ extern char global_version[1024]; extern gchar *GP_PASSWD_BUF; extern gchar *GP_GROUP_BUF; /* Get the highest virtual user number +1 */ long get_virtual_hnumber() { FILE *fp; char *line, *buf, *tmp; gchar *info; long file_size = 0; long count = 0, tmpnumber = 0, hnumber = 0; if((fp=fopen(GP_PASSWD_BUF, "r"))==NULL) { info = g_strdup_printf(_("Failed reading file: %s\n"), GP_PASSWD_BUF); show_info(info); g_free(info); return 1001; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); buf = allocate(file_size+1); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { if( strlen(line) < 3 ) continue; /* Get value from 3:rd or 4:th section */ tmp = strtok(line, ":"); count = 0; tmpnumber = 0; while( tmp!=NULL ) { count++; if( chars_are_digits(tmp) && (count == 3 || count == 4) ) { tmpnumber = atoi(tmp); if( tmpnumber > hnumber ) hnumber = tmpnumber + 1; } tmp = strtok(NULL, ":"); } } fclose(fp); if( hnumber < 1000 ) hnumber = 1000; return hnumber+1; } void add_user(struct w *widgets) { /* Adds a new user to the selected server */ FILE *fp; long hnumber = 0, file_size = 0; long profile_size = 0; char *line, *new_buffer; char *address_buffer=NULL, *port_buffer=NULL; const char *encrypted_pass; int length=0, limit_access=0, user_added=0; int found_server=0, standard_server=0; gchar *utf8=NULL; gchar *info, *cmd, *restricted_dir=NULL; gint active_index = 0; G_CONST_RETURN gchar *username; G_CONST_RETURN gchar *password; G_CONST_RETURN gchar *group; G_CONST_RETURN gchar *comment; G_CONST_RETURN gchar *shell; G_CONST_RETURN gchar *login_from; G_CONST_RETURN gchar *max_logins; G_CONST_RETURN gchar *br=NULL, *brc=NULL, *fr=NULL, *frc=NULL; username = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[0])); password = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[1])); group = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[2])); comment = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[3])); /* Shell is a gtk_combo_box_entry_new_text */ shell = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(widgets->user_set_combo[0])->child)); /* If the shell is false it will add the users directory as /dev/null and the specified false shell. * If the shell is real it will add the users directory as /USERSHOME/username and the specified real shell. * The ftp directory will be located where specified in the application. * This is done so that no user gets sshd/etc access unless the admin wants to. */ login_from = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[5])); max_logins = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[0])); /* Ratios */ if( use_ratio ) { br = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[1])); brc = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[2])); fr = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[3])); frc = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_spinbutton[4])); } /* If the username field is empty inform that this cant be done. */ length = strlen(username); if( length == 0 ) { info = g_strdup_printf(_("You must specify a username.\n")); show_info(info); g_free(info); return; } if( username[0]=='0'||username[0]=='1'||username[0]=='2'||username[0]=='3'||username[0]=='4' || username[0]=='5'||username[0]=='6'||username[0]=='7'||username[0]=='8'||username[0]=='9') { info = g_strdup_printf(_("Failed adding user: %s\nA user name can not begin with a number.\n"), username); show_info(info); g_free(info); return; } if( username[0]=='r' && username[1]=='o' && username[2]=='o' && username[3]=='t' && strlen(username) == 4 ) { info = g_strdup_printf(_("Failed adding user: %s\nThe user root can not be added for security reasons.\n"), username); show_info(info); g_free(info); return; } if( strstr((char *)username, "<") || strstr((char *)username, ">") ) { info = g_strdup_printf(_("Failed adding user: %s\nchars \"<\" and \">\" arent allowed.\n"), username); show_info(info); g_free(info); return; } /* If the password field has less then 6 chars we inform that this cant be done */ length = strlen(password); if( length < 6 ) { info = g_strdup_printf(_("Failed adding user: %s\nA minimum password length of 6 chars is required.\n"), username); show_info(info); g_free(info); return; } /* If the group filed has less then 3 chars we inform that this cant be done */ length = strlen(group); if( length == 0 ) { info = g_strdup_printf(_("Failed adding user: %s\nNo group specified.\n"), username); show_info(info); g_free(info); return; } /* If the shell field has less then 3 chars we inform that this cant be done */ length = strlen(shell); if( length < 3 ) { info = g_strdup_printf(_("Failed adding user: %s\nNo shell specified.\n"), username); show_info(info); g_free(info); return; } /* A comment is required */ length = strlen(comment); if( length == 0 ) { info = g_strdup_printf(_("A comment is required to add a user.\n")); show_info(info); g_free(info); return; } /* Virtual users */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->server_set_check_virtual)) ) { if( ! strstr(GP_PASSWD_BUF, "/users/") ) { printf("add_user.c: Safeguard activated. Virtual user path must contain: .../users/...\n"); return; } if( ! file_exists(GP_PASSWD_BUF) ) { cmd = g_strdup_printf("touch %s", GP_PASSWD_BUF); if( ! run_command(cmd) ) printf("Error running command: %s\n", cmd); g_free(cmd); } if( ! file_exists(GP_GROUP_BUF) ) { cmd = g_strdup_printf("touch %s", GP_GROUP_BUF); if( ! run_command(cmd) ) printf("Error running command: %s\n", cmd); g_free(cmd); } /* Chown /etc/gadmin-proftpd so that the server user/group has access */ cmd = g_strdup_printf("chown %s:%s %s", SERVER_USER, SERVER_GROUP, GP_APPCONFDIR); if( ! run_command(cmd) ) printf("Error running command: %s\n", cmd); g_free(cmd); /* Chown /etc/gadmin-proftpd and /etc/gadmin-proftpd/users directories */ cmd = g_strdup_printf("chown %s:%s %s/users", SERVER_USER, SERVER_GROUP, GP_APPCONFDIR); if( ! run_command(cmd) ) printf("Error running command: %s\n", cmd); g_free(cmd); /* Append a user line to proftpd.passwd name:$1$5GQxXfZ3$4NcgFKj7M9UxbEGZEdAH8.:1002:1002::/home/name:shell */ encrypted_pass = encrypt_password(password); if( encrypted_pass == NULL ) { printf("Crypt error\n"); // FIXME: free some return; } hnumber = get_virtual_hnumber(); info = g_strdup_printf("%s:%s:%ld:%ld:%s:%s:%s\n", username, encrypted_pass, hnumber, hnumber, comment, "/dev/null", shell); if((fp=fopen(GP_PASSWD_BUF, "a+"))==NULL) { info = g_strdup_printf(_("Failed adding user: %s\n"), username); show_info(info); g_free(info); return; } fputs(info, fp); fclose(fp); g_free(info); /* Append to proftpd.group / group:x:1001 */ info = g_strdup_printf("%s:x:%ld\n", group, hnumber); if((fp=fopen(GP_GROUP_BUF, "a+"))==NULL) { info = g_strdup_printf(_("Failed adding group: %s\n"), username); show_info(info); g_free(info); return; } fputs(info, fp); fclose(fp); g_free(info); } else /* End virtual users */ { /* Begin system users */ /* The selected shell is false, add the group and the user with a false shell and home /dev/null */ if( strstr(shell, "nologin") || strstr(shell, "false") || strstr(shell, "dev/null") ) { /* All supported systems but darwin */ #ifndef USE_DARWIN /* Add the group if it doesnt exist */ if( ! group_exists(group) ) { cmd = g_strdup_printf("%s '%s'", ADDGROUP, group); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error adding group: %s\n"), group); show_info(info); g_free(info); } g_free(cmd); } /* Add the user to this group if it doesnt exist */ if( ! user_exists(username) ) { cmd = g_strdup_printf("%s '%s' -g '%s' -d /dev/null -c '%s' -s %s", ADDUSER, username, group, comment, shell); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Failed adding user: %s\n"), username); show_info(info); g_free(info); } else user_added = 1; g_free(cmd); } #elif USE_DARWIN /* Add the false user using darwins niutil commands (Darwin is out of sync) */ if( ! niutil_user_exists(username) ) { if( ! niutil_useradd(username, shell) ) { info = g_strdup_printf(_("Failed adding user: %s\n"), username); show_info(info); g_free(info); } else user_added = 1; } #endif } else { /* The selected shell is not false add a real user account */ #ifndef USE_DARWIN /* Add the group if it doesnt exist */ if( ! group_exists(group) ) { cmd = g_strdup_printf("%s '%s'", ADDGROUP, group); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Failed adding group: %s\n"), group); show_info(info); g_free(info); } g_free(cmd); } /* Add the user to this group if it doesnt exist */ if( ! user_exists(username) ) { /* Add the user with a real shell to /USERSHOME/ UserName (was: -m -s) */ cmd = g_strdup_printf("%s '%s' -g '%s' -d '%s%s' -c '%s' -s %s", ADDUSER, username, group, USERSHOME, username, comment, shell); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Failed adding user: %s\n"), username); show_info(info); g_free(info); } else user_added = 1; g_free(cmd); } #elif USE_DARWIN /* Add a real darwin user using the niutil commands (Darwin is out of sync) */ if( ! niutil_user_exists(username) ) { if( ! niutil_useradd(username, shell) ) { info = g_strdup_printf(_("Failed adding user: %s\n"), username); show_info(info); g_free(info); } else user_added = 1; } #endif } /* Dont add anything if we couldnt add the system user */ #ifndef USE_DARWIN if( ! user_exists(username) ) #elif USE_DARWIN if( ! niutil_user_exists(username) ) #endif { info = g_strdup_printf(_("The system user was not added because uppercase\nor language specific letters are not allowed.\n")); show_info(info); g_free(info); return; } } /* End of adding system or virtual users */ /* Setup the users profile and create its directories */ /* Set the homedir globally from the first row in the treeview using row_pos=0 */ num_rows = 0; /* Set global num_rows */ gtk_tree_model_foreach(GTK_TREE_MODEL(widgets->directory_store), (GtkTreeModelForeachFunc) num_rows_func, widgets); if( num_rows < 1 ) { info = g_strdup_printf(_("Missing ftp home directory. Scroll down and add one first.\n")); show_info(info); g_free(info); return; } /* (Global) Statics + entries + (number of rows * dirlen + APPE STOR STOU etc) */ profile_size = 16384 + 1400 + (num_rows * 16384); /* Allocate the user profile */ user_profile = allocate(profile_size+1); /* Set the users home dir and its access settings globally */ row_pos = 0; /* Only get the home directory */ gtk_tree_model_foreach(GTK_TREE_MODEL(widgets->directory_store), (GtkTreeModelForeachFunc) dirs_foreach, widgets); /* Bad directory name or no directory at all */ if( global_dir_error ) { /* Info is shown in the foreach function */ global_dir_error = 0; free(user_profile); if( homedir!=NULL ) g_free(homedir); return; } /* If ratios is used it needs a restricted toplevel directory and a block all .ftpaccess file in this toplevel directory */ if( use_ratio ) { /* Make the restricted directory under each users chroot directory */ restricted_dir = g_strdup_printf("%s/%s", homedir, "restricted"); make_dir_chmod((gchar *)restricted_dir, "0777"); /* Must be like this */ /* Add a block all .ftpaccess file to this directory */ cmd = g_strdup_printf("echo \"DenyAll\n\" > '%s/.ftpaccess'", restricted_dir); if( ! run_command(cmd) ) { printf("Error creating .ftpaccess file here: %s/.ftpaccess\n", restricted_dir); /* Fixme, popup */ } g_free(cmd); /* Add the ratio files */ cmd = g_strdup_printf("touch '%s/proftpd_ratios' '%s/proftpd_ratios_temp'", restricted_dir, restricted_dir); if( ! run_command(cmd) ) { printf("Error creating the ratio files here: %s\n", restricted_dir); /* Fixme, popup */ } g_free(cmd); /* Chmod a+rw on the ratio files (must be a+rw) */ cmd = g_strdup_printf("chmod a+rw '%s/proftpd_ratios' '%s/proftpd_ratios_temp'", restricted_dir, restricted_dir); if( ! run_command(cmd) ) { printf("Error chmodding the ratio files here: %s\n", restricted_dir); /* Fixme, popup */ } g_free(cmd); /* Chown ratio files to SERVERUSER:SERVERGROUP */ cmd = g_strdup_printf("chown %s:%s '%s/proftpd_ratios' '%s/proftpd_ratios_temp'", SERVER_USER, SERVER_GROUP, restricted_dir, restricted_dir); if( ! run_command(cmd) ) { printf("Error chmodding the ratio files here: %s\n", restricted_dir); /* Fixme, popup */ } g_free(cmd); g_free(restricted_dir); } /* The users configuration profile */ strcpy(user_profile, "\n\n"); strcat(user_profile, "User "); strcat(user_profile, username); strcat(user_profile, "\nGroup "); strcat(user_profile, group); strcat(user_profile, "\n"); /* Require password */ if( ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[1])) ) strcat(user_profile, "AnonRequirePassword off\n"); else strcat(user_profile, "AnonRequirePassword on\n"); /* Maximum logins */ strcat(user_profile, "MaxClients "); strcat(user_profile, max_logins); strcat(user_profile, " \""); strcat(user_profile, "The server is full, hosting %m users"); strcat(user_profile, "\"\n"); strcat(user_profile, "DisplayLogin welcome.msg\n"); strcat(user_profile, "DisplayChdir .msg\n"); /* Ratio Module has been found (reversed br/fr order in the gui) */ if( use_ratio ) { /* Ratios have been turned on in the global settings */ active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[16])); if( active_index == 0 ) { strcat(user_profile, "UserRatio "); strcat(user_profile, username); strcat(user_profile, " "); strcat(user_profile, fr); strcat(user_profile, " "); strcat(user_profile, frc); strcat(user_profile, " "); strcat(user_profile, br); strcat(user_profile, " "); strcat(user_profile, brc); strcat(user_profile, "\n"); } } /* Logins from, if nothing is specified we allow everything */ if( login_from == NULL || strlen(login_from) < 3 ) { strcat(user_profile, "\n"); strcat(user_profile, "Allow from all\nDeny from all\n"); strcat(user_profile, "\n"); } else { strcat(user_profile, "\n"); strcat(user_profile, "Allow from "); strcat(user_profile, login_from); strcat(user_profile, "\nDeny from all\n"); strcat(user_profile, "\n"); } append_limit_cmds(); /* Also adds AllowOverwrite on/off */ row_pos = 1; /* Append and create the rest of the directories */ gtk_tree_model_foreach(GTK_TREE_MODEL(widgets->directory_store), (GtkTreeModelForeachFunc) dirs_foreach, widgets); strcat(user_profile, "\n"); if( homedir!=NULL ) g_free(homedir); /* Add the new user settings and AllowUser to the correct server */ found_server = 0; /* Standard server selected, start adding users directly */ if( standard_server ) found_server = 1; /* Add AllowUser UserName to the selected server */ if((fp=fopen(PROFTPD_CONF,"r"))==NULL) { free(user_profile); return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); new_buffer = allocate(file_size+8192); address_buffer = allocate(1024); port_buffer = allocate(1024); if( strstr((char *)global_server_type, "Virtualhost") ) sprintf(address_buffer, "\n", global_server_address); else { standard_server = 1; found_server = 1; } sprintf(port_buffer, "Port %s\n", global_server_port); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { strcat(new_buffer, line); if( ! standard_server && ! found_server && strcmp(line, address_buffer) == 0 ) { /* Lets see if this is the selected server */ while(fgets(line, file_size, fp)!=NULL) { strcat(new_buffer, line); /* This will expect the servers port on the second line ! * else itll miss some vaules .. */ if( strstr(line, "Port") && strcmp(line, port_buffer) == 0 ) { found_server = 1; break; } if( strstr(line, "") ) break; } } /* Continue until we find the selected server */ if( ! found_server ) continue; /* Add AllowUser Username .. to this server only */ if( strstr(line, " */ while(fgets(line, file_size, fp)!=NULL) { strcat(new_buffer, line); if( strstr(line, "server_set_check_virtual)) ) { /* Password the user if it didnt exist before */ if( user_added ) { #ifndef USE_DARWIN password_user(username, password); #elif USE_DARWIN niutil_password_user(username, password); #endif } else { info = g_strdup_printf(_("The system user \"%s\" already exists.\nThe user was added to this server but the password was not changed.\n"), username); show_info(info); g_free(info); } } /* Write the new configuration if the user profile was added. * Since the user could have already existed we use limit_access */ if( limit_access ) { if((fp=fopen(PROFTPD_CONF,"w+"))==NULL) { info = g_strdup_printf(_("Could not write the new user configuration to:\n%s\nRun gadmin-proftpd as root\n"), PROFTPD_CONF); show_info(info); g_free(info); free(new_buffer); return; } else { fputs(new_buffer, fp); fclose(fp); } } free(new_buffer); fix_newlines_in_conf(); /* Update the user list and the user settings */ populate_users(widgets); select_first_user(widgets); populate_user_settings(widgets); populate_conf_tab(widgets); /* Update the server */ reread_conf(widgets); if( utf8!=NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/delete_user.h0000644000000000000000000000216111513432313016362 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #ifndef delete_user_H # define delete_user_H extern struct w *widgets; void delete_user(struct w *widgets); void do_delete_system_user(GtkButton *button, struct w *widgets); void dont_delete_system_user(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/show_help.c0000644000000000000000000002011511513432313016044 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "../config.h" #include "support.h" #include "gettext.h" #include "widgets.h" void show_help() { gchar *help_text; GtkWidget *help_window, *vbox15, *scrolledwindow16; GtkWidget *help_textview, *close_help_button; GtkWidget *alignment19, *hbox52, *image19, *label109; help_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_name (help_window, "help_window"); gtk_widget_set_size_request (help_window, 650, 350); gtk_window_set_title (GTK_WINDOW (help_window), _("GADMIN-PROFTPD Help")); gtk_window_set_position (GTK_WINDOW (help_window), GTK_WIN_POS_CENTER); vbox15 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox15, "vbox15"); gtk_widget_show (vbox15); gtk_container_add (GTK_CONTAINER (help_window), vbox15); scrolledwindow16 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow16, "scrolledwindow16"); gtk_widget_show (scrolledwindow16); gtk_box_pack_start (GTK_BOX (vbox15), scrolledwindow16, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow16), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); help_textview = gtk_text_view_new (); gtk_widget_set_name (help_textview, "help_textview"); gtk_widget_show (help_textview); gtk_container_add (GTK_CONTAINER (scrolledwindow16), help_textview); gtk_text_view_set_editable (GTK_TEXT_VIEW (help_textview), FALSE); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (help_textview), FALSE); gtk_text_view_set_left_margin (GTK_TEXT_VIEW (help_textview), 30); gtk_text_view_set_right_margin (GTK_TEXT_VIEW (help_textview), 10); help_text = g_strconcat( _("\n\nAdding users:\n\n"), _("When adding a user you can randomize its username and password or use your own.\n"), _("You can also select its login shell, group, comment and ftp home directory.\n"), _("Press add when you are satisfied with the users settings and permissions.\n\n"), _("Any other directories added must be located below the ftp home directory for this user.\n\n"), _("If you need to add more users with similar settings you can simply change a current users\n"), _("username, password and then press the add button.\n\n"), _("\nTypical setups:\n\n"), _("Users needs upload access to a http servers directory:\n\n"), _("Set the users home directory to the webserver's root directory IE:\n"), _("/var/www/html or /var/www/html/UserName for a private homepage.\n"), _("Press add when you are satisfied with the users settings and permissions.\n\n"), _("\nAdding anonymous access to a directory:\n\n"), _("Type anonymous in the username field.\n"), _("Press the password randomize button or type a password longer then 5 chars.\n"), _("Type anonymous as group and comment.\n"), _("Select /dev/null shell.\n"), _("Set require password to off.\n"), _("Type this users home directory IE: /var/ftp/anonymous.\n"), _("Press add to add this anonymous user.\n\n"), _("You can now login as anonymous with no password or get in directly with a web browser.\n\n"), _("If the selected shell is false or null the user can only login to this FTP server otherwise\n"), _("that user gets a private home directory as well as its FTP directory and can login via ssh\n"), _("etc if that server allows the user to do so.\n\n"), _("You can easily add more virtual servers to run on different interfaces and ports.\n"), _("The same users can have different directories and settings in different servers.\n"), _("When a user connects to one address and port it gets access according to that servers\n"), _("configuration for that user.\n"), _("If you want to turn a server off without deleting it you can set its port value to 0\n\n"), _("If this Proftpd server is behind a NAT router you should specify the routers\n"), _("external DNS name or IP-address as the \"NAT router\" option and then turn it on.\n\n"), _("If you want to add directories thats not under the users home directory you can do this:\n\n"), _("Linux (as of kernel 2.4.0):\n"), _("mount --bind /some/directory/to/share /var/ftp/make_this_directory_first\n\n"), _("BSD (as of 4.4BSD):\nmount_null /var/data /var/ftp/make_this_directory_first\n\n"), _("Solaris:\nmount -F lofs /var/data /var/ftp/make_this_directory_first\n\n"), _("Statistics:\n\n"), _("Pressing the generate welcome statistics button in the file tab will create\n"), _("welcome messages for all users in this FTP server.\n"), _("Pressing generate HTML statistics in the file tab creates top 10\n"), _("upload and download statistics as a webpage IE: /var/www/html/ftp.htm\n\n"), _("With crond and gprostats you can do this to have it automatically update the statistics:\n"), _("gprostats -html /path/to/output.html\ngprostats -w welcome.msg\n"), _("or both at the same time: gprostats -html /path/to/output.html -w welcome.msg\n"), _("Use -c /path/to/proftpd.conf -x /path/to/xferlog if you need to.\n\n"), _("If you have made customized welcome messages and dont want them overwritten by gprostats\n"), _("you can configure this by selecting a user and unchecking \"show user in statistics\" and\n"), _("then pressing the apply button, this will also exclude the user from the html output.\n\n"), _("If you copy or move a file directly to the ftpservers directory you may need to\n"), _("chmod it with 644 and chmod directories to 755 so that the directory and file can be accessed.\n\n"), _("This is one way of chmodding all files recursively in the directory /var/ftp:\n"), _("find /var/ftp -type f -exec chmod 644 -v {} \\;\n\n"), _("Upload directories should have a chmod of 777 and this can be used for /var/ftp/upload\n"), _("find /var/ftp/upload -type d -exec chmod 777 -v {} \\;\n\n\n"), _("For more detailed information about the server and its configuration directives visit:\n"), _("http://www.proftpd.org\n"), NULL); gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (help_textview)), help_text, -1); if( help_text!=NULL ) g_free(help_text); close_help_button = gtk_button_new (); gtk_widget_set_name (close_help_button, "close_help_button"); gtk_widget_show (close_help_button); gtk_box_pack_start (GTK_BOX (vbox15), close_help_button, FALSE, FALSE, 0); alignment19 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_set_name (alignment19, "alignment19"); gtk_widget_show (alignment19); gtk_container_add (GTK_CONTAINER (close_help_button), alignment19); hbox52 = gtk_hbox_new (FALSE, 2); gtk_widget_set_name (hbox52, "hbox52"); gtk_widget_show (hbox52); gtk_container_add (GTK_CONTAINER (alignment19), hbox52); image19 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_BUTTON); gtk_widget_set_name (image19, "image19"); gtk_widget_show (image19); gtk_box_pack_start (GTK_BOX (hbox52), image19, FALSE, FALSE, 0); label109 = gtk_label_new_with_mnemonic (_("Close")); gtk_widget_set_name (label109, "label109"); gtk_widget_show (label109); gtk_box_pack_start (GTK_BOX (hbox52), label109, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label109), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(close_help_button, "clicked", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (help_window)); gtk_widget_show_all(help_window); } gadmin-proftpd-0.4.2/src/clear_security_tab.c0000644000000000000000000000555211513432312017726 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include #include "gettext.h" #include "widgets.h" #include "allocate.h" #include "clear_security_tab.h" #include "populate_security_tab.h" void clear_security_tab(struct w *widgets) { /* Clears the proftpd entries in the security log */ FILE *fp; long file_size; char *old_buffy, *new_buffy; /* Default to the configured security log */ gchar *secure_log; secure_log = g_strdup_printf("%s", SECURE_LOG); /* Use the server settings security log if its set */ if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { /* Do nothing */ } else { fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); old_buffy = allocate(file_size+1024); if( file_size > 1 ) while(fgets(old_buffy, file_size, fp)!=NULL) { if( ! strstr(old_buffy, "SystemLog ") || strstr(old_buffy, "#") ) continue; if( strlen(old_buffy) < 12 ) continue; /* We have a valid security logfile (doesnt have to exist yet) */ g_free(secure_log); secure_log = g_strdup_printf("%s", &old_buffy[10]); if( secure_log[strlen(secure_log)-1]=='\n' ) secure_log[strlen(secure_log)-1]='\0'; break; } free(old_buffy); } if((fp=fopen(secure_log, "r"))==NULL) { return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); old_buffy = allocate(file_size+1024); new_buffy = allocate(file_size+1024); /* Get all lines that doesnt have the string proftpd in them */ if( file_size > 1 ) while(fgets(old_buffy, file_size, fp)!=NULL) { if( strstr(old_buffy, "proftpd") ) continue; strcat(new_buffy, old_buffy); } free(old_buffy); fclose(fp); if((fp=fopen(secure_log, "w+"))==NULL) { free(new_buffy); return; } fputs(new_buffy, fp); fclose(fp); free(new_buffy); populate_security(widgets); } gadmin-proftpd-0.4.2/src/add_standard_users.c0000644000000000000000000000624611513432312017715 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include "gettext.h" #include "widgets.h" #include "commands.h" #include "add_standard_users.h" #include "functions.h" #include "show_info.h" int add_standard_users(struct w *widgets) { /* The SERVER_USER and SERVER_GROUP must exist so add them if they are missing */ gchar *cmd, *info, *user, *group; /* Dont add standard users if virtual users are used. */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->server_set_check_virtual)) ) return 0; group = g_strdup_printf("%s", SERVER_GROUP); /* Add the systems SERVER_GROUP if it doesnt exist */ if( ! group_exists(group) ) { cmd = g_strdup_printf("%s %s", "groupadd", group); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Failed adding the system group:\n%s\n"), group); show_info(info); g_free(info); g_free(cmd); g_free(group); return 0; } g_free(cmd); } /* Add the SERVER_USER to SERVER_GROUP if it doesnt exist */ user = g_strdup_printf("%s", SERVER_USER); if( ! user_exists(user) ) { /* Add the SERVER_USER to the SERVER_GROUP and lock the account */ cmd = g_strdup_printf("%s '%s' -l -d '/dev/null' -c '%s' -s '/dev/null' -g '%s'", "useradd", user, user, group); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Failed adding the system user:\n%s\n"), user); show_info(info); g_free(info); g_free(cmd); g_free(user); g_free(group); return 0; } g_free(cmd); /* To be really sure we check it again with the same function */ if( ! user_exists(user) ) { info = g_strdup_printf(_("Failed adding the system user:\n%s\n"), user); show_info(info); g_free(info); g_free(user); g_free(group); return 0; } else { /* Let the user know that we added a locked system user */ info = g_strdup_printf(_("Added this locked and false shelled system user:\n%s\n"), user); show_info(info); g_free(info); } } g_free(user); g_free(group); return 1; } gadmin-proftpd-0.4.2/src/allocate.c0000644000000000000000000000225111513432312015640 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include char * allocate(long allocate_size) { char *ret; ret = malloc(allocate_size); if( ret == NULL ) { printf("Cant allocate enough ram, exiting\n"); exit(1); } memset(ret, 0, allocate_size); return ret; } gadmin-proftpd-0.4.2/src/generate_cert.c0000644000000000000000000003247711513432313016701 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include "gettext.h" #include "widgets.h" #include "allocate.h" #include "show_info.h" #include "commands.h" #include "generate_cert.h" #include "reread_conf.h" /* Support Explicit FTP */ void generate_cert(struct w *widgets) { FILE *fp; gchar *cmd, *openssl_config_path, *config; gchar *openssl_script, *script_path, *passfile, *info; gdouble val=0.0; int i = 0; G_CONST_RETURN gchar *hostname; G_CONST_RETURN gchar *email; G_CONST_RETURN gchar *bits; G_CONST_RETURN gchar *password; G_CONST_RETURN gchar *days; G_CONST_RETURN gchar *country; G_CONST_RETURN gchar *state; G_CONST_RETURN gchar *city; G_CONST_RETURN gchar *org; G_CONST_RETURN gchar *org_unit; G_CONST_RETURN gchar *cert_dir; cert_dir = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[15])); hostname = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[16])); email = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[17])); state = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[18])); city = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[19])); org = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[20])); org_unit = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[21])); password = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[22])); country = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[24])); bits = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[11])); days = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[12])); /* Reset progress bar */ val=0.0; gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), val); while(gtk_events_pending()) gtk_main_iteration(); /* Show error if a value is missing */ if( strlen(hostname) == 0 || strlen(email) == 0 || strlen(bits) == 0 || strlen(password) == 0 || strlen(days) == 0 || strlen(country) == 0 || strlen(country) > 2 || strlen(state) == 0 || strlen(city) == 0 || strlen(org) == 0 || strlen(org_unit) == 0 || strlen(cert_dir) < 7 ) { info = g_strdup_printf(_("Every certificate field must be filled in.\n")); show_info(info); g_free(info); return; } /* The password field cant contain spaces */ for(i=0; password[i]!='\0'; i++) if( password[i]==' ' || password[i]=='\n' || password[i]=='\r' || password[i]=='\t' ) { info = g_strdup_printf(_("The password field cant contain any spaces or newline chars.\n")); show_info(info); g_free(info); return; } /* Create and secure the certificate directory */ cmd = g_strdup_printf("mkdir -p %s && chmod 700 %s", cert_dir, cert_dir); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Can not create secure certificate directory with command:\n%s\n"), cmd); show_info(info); g_free(info); g_free(cmd); return; } g_free(cmd); val=0.1; /* Can take some time depending on the selected number of bits */ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), _("Setting up environment")); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), val); while(gtk_events_pending()) gtk_main_iteration(); sleep(1); /* Create a new gadmin-proftpd-openssl.conf with selected values. */ openssl_config_path = g_strdup_printf("%s/gadmin-proftpd-openssl.conf", cert_dir); if((fp=fopen(openssl_config_path, "w+"))==NULL) { info = g_strdup_printf(_("Error writing gadmin-proftpd-openssl.conf here: \n%s\n"), openssl_config_path); show_info(info); g_free(info); g_free(openssl_config_path); return; } fclose(fp); /* Secure the file */ cmd = g_strdup_printf("chmod 600 %s", openssl_config_path); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error: Could not chmod:\n%s\n"), openssl_config_path); show_info(info); g_free(info); g_free(cmd); g_free(openssl_config_path); return; } g_free(cmd); /* Write the file contents */ if((fp=fopen(openssl_config_path, "w"))==NULL) { info = g_strdup_printf(_("Error writing gadmin-proftpd-openssl.conf here: \n%s\n"), openssl_config_path); show_info(info); g_free(info); g_free(openssl_config_path); return; } config = g_strconcat("\n", "dir = ", cert_dir, "\n", "[ ca ]\n", "default_ca = CA_default\n\n", "[ CA_default ]\n", "serial = $dir/serial\n", "database = $dir/index.txt\n", "new_certs_dir = $dir\n", "certificate = $dir/cacert.pem\n", "private_key = $dir/cakey.pem\n", "default_days = ", days, "\n", "default_md = md5\n", "preserve = no\n", "email_in_dn = no\n", "nameopt = default_ca\n", "certopt = default_ca\n", "policy = policy_match\n\n", "[ policy_match ]\n", "countryName = match\n", "stateOrProvinceName = match\n", "organizationName = match\n", "organizationalUnitName = optional\n", "commonName = supplied\n", "emailAddress = optional\n\n", "[ req ]\n", "default_bits = ", bits, "\n", "default_keyfile = key.pem\n", "default_md = md5\n", "string_mask = nombstr\n", "distinguished_name = req_distinguished_name\n", "req_extensions = v3_req\n\n", "[ req_distinguished_name ]\n", "0.organizationName = ", org, "\n", "organizationalUnitName = ", org_unit, "\n", "emailAddress = ", email, "\n", "emailAddress_max = 80\n", "localityName = ", city, "\n", "stateOrProvinceName = ", state, "\n", "countryName = ", country, "\n", "countryName_min = 2\n", "countryName_max = 2\n", "commonName = ", hostname, "\n", "commonName_max = 64\n\n", "0.organizationName_default = ", org, "\n", "emailAddress_default = ", email, "\n", "localityName_default = ", city, "\n", "stateOrProvinceName_default = ", state, "\n", "countryName_default = ", country, "\n", "commonName_default = ", hostname, "\n\n", "[ v3_ca ]\n", "basicConstraints = CA:TRUE\n", "subjectKeyIdentifier = hash\n", "authorityKeyIdentifier = keyid:always,issuer:always\n\n", "[ v3_req ]\n", "basicConstraints = CA:FALSE\n", "subjectKeyIdentifier = hash\n\n", NULL); fputs(config, fp); fclose(fp); /* Create the input and output password file. */ passfile = g_strdup_printf("%s/passfile", cert_dir); if((fp=fopen(passfile, "w+"))==NULL) { info = g_strdup_printf(_("Error writing openssl password file here:\n%s\n"), passfile); show_info(info); g_free(info); g_free(passfile); g_free(openssl_config_path); return; } fclose(fp); /* Secure the password file. */ /* cmd = g_strdup_printf("chmod 750 %s", passfile); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error: Could not chmod:\n%s\n"), openssl_config_path); show_info(info); g_free(info); g_free(cmd); g_free(passfile); g_free(openssl_config_path); return; } g_free(cmd); */ if((fp=fopen(passfile, "w"))==NULL) { info = g_strdup_printf(_("Error writing openssl password file here:\n%s\n"), passfile); show_info(info); g_free(info); g_free(passfile); g_free(openssl_config_path); return; } fputs(password, fp); fputs("\n", fp); fputs(password, fp); fputs("\n", fp); fclose(fp); /* The last openssl command requires openssl conf to be in the same work dir. */ if( chdir(cert_dir) != 0 ) { info = g_strdup_printf(_("Error changing to certificate directory: \n%s\n"), cert_dir); show_info(info); g_free(info); return; } /* Create the first openssl script */ script_path = g_strdup_printf("%s/create_certs.sh", cert_dir); if((fp=fopen(script_path, "w+"))==NULL) { info = g_strdup_printf(_("Error writing gadmin-proftpd-openssl.conf here: \n%s\n"), script_path); show_info(info); g_free(info); g_free(script_path); return; } openssl_script = g_strconcat("", "#!/bin/bash\n\n", "rm -f index*\n", "touch index.txt\n", "rm -f serial*\n", "echo '01' > serial\n", "rm -f *.pem\n", "openssl req -new -x509 -days ", days, " -extensions v3_ca -keyout cakey.pem -out cacert.pem -config ", openssl_config_path, " -batch -passout file:", passfile,"\n\n", NULL); fputs(openssl_script, fp); fclose(fp); g_free(openssl_script); /* Creating certificate authority */ val=0.3; /* Can take some time depending on the selected number of bits */ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), _("Creating certificate authority")); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), val); while(gtk_events_pending()) gtk_main_iteration(); sleep(1); /* Run the first openssl script */ cmd = g_strdup_printf("chmod 755 %s && %s", script_path, script_path); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error running openssl script 1:\n%s\n"), script_path); show_info(info); g_free(info); g_free(script_path); g_free(cmd); return; } g_free(cmd); /* Create the second openssl script */ if((fp=fopen(script_path, "w+"))==NULL) { info = g_strdup_printf(_("Error writing gadmin-proftpd-openssl.conf here: \n%s\n"), script_path); show_info(info); g_free(info); g_free(script_path); return; } openssl_script = g_strconcat("", "#!/bin/bash\n\n", "openssl req -new -nodes -out req.pem -config ", openssl_config_path, " -batch -passout file:", passfile, "\n\n", NULL); fputs(openssl_script, fp); fclose(fp); g_free(openssl_script); /* Creating client certificate... */ val=0.6; gtk_progress_bar_set_text(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), _("Creating client certificate")); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), val); while(gtk_events_pending()) gtk_main_iteration(); sleep(1); /* Run the second openssl script */ cmd = g_strdup_printf("chmod 755 %s && %s", script_path, script_path); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error running openssl script 2:\n%s\n"), script_path); show_info(info); g_free(info); g_free(script_path); g_free(cmd); return; } g_free(cmd); /* Create the third openssl script */ if((fp=fopen(script_path, "w+"))==NULL) { info = g_strdup_printf(_("Error writing gadmin-proftpd-openssl.conf here: \n%s\n"), script_path); show_info(info); g_free(info); g_free(script_path); return; } openssl_script = g_strconcat("", "#!/bin/bash\n\n", "openssl ca -out cert.pem -config ", openssl_config_path, " -batch -passin file:", passfile, " -infiles req.pem\n\n", "rm -f index*\n", "rm -f serial*\n", NULL); fputs(openssl_script, fp); fclose(fp); g_free(openssl_script); /* Signing client certificate... */ val=0.8; gtk_progress_bar_set_text(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), _("Signing client certificate")); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), val); while(gtk_events_pending()) gtk_main_iteration(); sleep(1); /* Run the third openssl script */ cmd = g_strdup_printf("chmod 755 %s && %s", script_path, script_path); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error running openssl script 3:\n%s\n"), script_path); show_info(info); g_free(info); g_free(script_path); g_free(cmd); return; } g_free(cmd); /* Remove the script and passfile */ unlink(script_path); unlink(passfile); g_free(script_path); g_free(passfile); val=1.0; gtk_progress_bar_set_text(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), "Certificate creation successful"); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), val); while(gtk_events_pending()) gtk_main_iteration(); info = g_strconcat( "\n", _("The certificates have been created successfully.\n"), _("They will be used by new secure FTP logins.\n"), "\n", NULL); show_info(info); g_free(info); /* Error text val=0.0; gtk_progress_bar_set_text(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), "Certificate creation failed"); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), val); while(gtk_events_pending()) gtk_main_iteration(); info = g_strdup_printf(_("The certificate has not been created, something went wrong.\n")); show_info(info); g_free(info); */ reread_conf(widgets); } gadmin-proftpd-0.4.2/src/populate_conf_tab.h0000644000000000000000000000177011513432313017553 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef populate_conf_tab_H # define populate_conf_tab_H extern struct w *widgets; void populate_conf_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_server_settings.c0000644000000000000000000007461611566006657020664 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include "gtk/gtk.h" #include #include #include #include "gettext.h" #include "widgets.h" #include "allocate.h" #include "show_info.h" #include "make_settings_entries.h" #include "make_settings_combos.h" #include "make_settings_spinbuttons.h" #include "make_settings_progressbars.h" #include "make_settings_checkbuttons.h" #include "make_settings_labels.h" #include "make_settings_hseparators.h" #include "generate_cert.h" #include "create_server_settings.h" #include "populate_conf_tab.h" #include "functions.h" extern int use_tls; extern int use_ratio; gulong virtual_users_toggled_signal; /* Block or allow pam logins for system users 1 to add restriction, 0 to remove the restriction. */ void restrict_pam_conf(int add_del) { FILE *fp; long file_size = 0; char *line, *new_conf; gchar *pam_module_off; if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { /* We dont want to add anything unless the conf exists. */ return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); new_conf = allocate(file_size+1024); pam_module_off = g_strconcat("\n", "\n", "AuthPAM off\n", "\n\n", NULL); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { /* Remove the pam restriction */ if( line!=NULL && strstr(line, "") && add_del == 0 ) { while(fgets(line, file_size, fp)!=NULL) if( line!=NULL && strstr(line, "") ) break; } else /* Add pam restriction before the tls module */ if( line!=NULL && strstr(line, "") && add_del == 1 ) { strcat(new_conf, pam_module_off); strcat(new_conf, line); } else strcat(new_conf, line); } fclose(fp); free(line); g_free(pam_module_off); /* Write the new conf */ if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { free(new_conf); return; } fputs(new_conf, fp); fclose(fp); free(new_conf); } /* Add or remove AuthUserFile and AuthGroupFile directives. 1 to add, 0 to remove the directives. */ void virtual_user_directives(int add_del) { FILE *fp; long file_size = 0; char *line, *new_conf; gchar *directives; gchar *auth_user_file, *auth_group_file; if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { /* We dont want to add anything unless the conf exists. */ return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); new_conf = allocate(file_size+1024); auth_user_file = g_strdup_printf("%s/users/proftpd.passwd", GP_APPCONFDIR); auth_group_file = g_strdup_printf("%s/users/proftpd.group", GP_APPCONFDIR); directives = g_strconcat( "AuthUserFile ", auth_user_file, "\n", "AuthGroupFile ", auth_group_file, "\n\n", NULL); if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { /* Remove the directives */ if( (cmplowercase(line, "authuserfile ") || cmplowercase(line, "authgroupfile ")) && add_del == 0 ) { continue; } else /* Add the directives before the tls module */ if( strstr(line, "") && add_del == 1 ) { strcat(new_conf, directives); strcat(new_conf, line); } else strcat(new_conf, line); } fclose(fp); free(line); g_free(directives); /* Write the new conf */ if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { free(new_conf); return; } fputs(new_conf, fp); fclose(fp); free(new_conf); } void virtual_users_toggled(GtkToggleButton *togglebutton, struct w *widgets) { gchar *info; if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(togglebutton)) ) { info = g_strconcat("\n", _("Virtual user management activated.\n\n"), _("Any system users you have created will no longer be able to log in.\n"), _("\nIf you also want to let system users login then remove entire\n"), _("newly added AuthPAM off module restriction lines in the configuration tab.\n"), _("\nPress apply if this is what you want.\n\n"), _("Switch back if this is not what you want.\n"), NULL); show_info(info); g_free(info); /* Restrict PAM authentications. */ restrict_pam_conf(1); /* Add virtual AuthUserFile and AuthGroupFile statements .*/ virtual_user_directives(1); populate_conf_tab(widgets); } else { info = g_strconcat("\n", _("Virtual user management deactivated.\n\n"), _("Any virtual users you have created will no longer be able to log in.\n"), _("Press apply if this is what you want.\n\n"), _("Switch back if this is not what you want.\n"), NULL); show_info(info); g_free(info); /* Remove PAM Authentication restriction. */ restrict_pam_conf(0); /* Remove AuthUserFile and AuthGroupFile statements. */ virtual_user_directives(0); populate_conf_tab(widgets); } } void create_server_settings(struct w *widgets) { GtkTooltips *tooltips; GtkWidget *gen_cert_button; gchar *utf8 = NULL; gdouble progress_val = 1.0; gchar *combo_text; /* Counters for the widgets and positions in the table */ int a = 0; int b = 1; int ent = 0; int spin = 0; int comb = 0; /* Max lengths and input */ int entry_size = 100; int combo_size = 100; tooltips = gtk_tooltips_new(); /* The server address */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Server address:"), 0,1,a,b,entry_size); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("ftp.mydomain.org, 192.168.0.100 or 0.0.0.0 which means listen to all network interfaces"), NULL); a++; b++; ent++; /* Server name / Alternative server ident Label+Entry+Combo */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Server name:"), 0,1,a,b,entry_size); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("My FTP server or set it to off to have the server use its own name and version"), NULL); widgets->server_set_combo[comb] = make_combo(GTK_TABLE(widgets->srv_set_table), 1,2,a,b,combo_size); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; ent++; comb++; /* Port */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Server port:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("A port the server listens on. 21 is the standard port. 0 means that the server is deactivated"), NULL); a++; b++; spin++; /* Nat router Label+Entry+Combo */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("NAT router:"), 0,1,a,b,entry_size); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The external IP address or DNS name of the NAT router."), NULL); widgets->server_set_combo[comb] = make_combo(GTK_TABLE(widgets->srv_set_table), 1,2,a,b,combo_size); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; ent++; comb++; /* Email */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Admin email:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The administrators email address"), NULL); a++; b++; ent++; /* Identity lookups */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Identity lookups:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Reverse lookups */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Reverse lookups:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Time standard */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table),_("Time standard:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_combo[comb], _("GMT or local time"), NULL); combo_text = g_strdup_printf(_("GMT")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Local time")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Passive ports */ widgets->server_set_spinbutton[spin] = make_padded_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table), _("Passive port range:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("From this port"), NULL); spin++; widgets->server_set_spinbutton[spin] = make_spinbutton(GTK_TABLE(widgets->srv_set_table), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("To this port"), NULL); a++; b++; spin++; /* Max connections */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Max connections:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("The maximum simoultaneous connections for this server"), NULL); a++; b++; spin++; /* Maximum logins */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Max login attempts:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("The maximum number of logins attempts a user can fail before disconnected"), NULL); a++; b++; spin++; /* Login timeout */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Login timeout:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("The maximum time a user can spend authenticating"), NULL); a++; b++; spin++; /* Idle timeout */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Idle timeout:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("The time it takes before an idle user is thrown out in seconds"), NULL); a++; b++; spin++; /* Transfer mode */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Transfer mode:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("Binary")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Ascii")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* FXP transfers */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("FXP transfers:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; // The following should be added to a settings window.... /* Randomized username length */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Username length:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("The length of the randomized usernames"), NULL); a++; b++; spin++; /* Randomized password length */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Password length:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("The length of the randomized passwords"), NULL); a++; b++; spin++; /* Randomize case */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Randomized letters:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("Upper")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Lower")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); /* Leave these for now */ a++; b++; comb++; a++; b++; ent++; a++; b++; ent++; /* Enable or disable virtual users */ widgets->server_set_check_virtual = make_checkbutton_with_label(GTK_TABLE(widgets->srv_set_table), _("Enable virtual users:"), 0,1,a,b); a++; b++; /* Add a callback that switches to / from virtual user paths and repopulates */ virtual_users_toggled_signal = g_signal_connect(GTK_TOGGLE_BUTTON(widgets->server_set_check_virtual), "toggled", G_CALLBACK(virtual_users_toggled), widgets); /* Statistics file */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("HTML statistics:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Generated HTML statistics file, IE: /var/www/ftp.htm"), NULL); a++; b++; ent++; ent++; // Leave this, deleted the welcome entry /* The systems security logfile */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Security log:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("IE: /var/log/secure"), NULL); a++; b++; ent++; /* The server runs as this user */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Server user:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The server drops its privileges and runs as this user, nobody is often used"), NULL); a++; b++; ent++; /* The server runs as this group */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Server group:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The server drops its privileges and runs as this group, nobody is often used"), NULL); a++; b++; ent++; /* This fake user owns all files Label+Entry+Combo */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Fake file user:"), 0,1,a,b,entry_size); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("It will look like this fake user owns all files.\nIt does not have to be an existing user"), NULL); widgets->server_set_combo[comb] = make_combo(GTK_TABLE(widgets->srv_set_table), 1,2,a,b,combo_size); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; ent++; comb++; /* This fake group owns all files Label+Entry+Combo */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Fake file group:"), 0,1,a,b,entry_size); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("It will look like this fake group owns all files.\nIt does not have to be an existing group"), NULL); widgets->server_set_combo[comb] = make_combo(GTK_TABLE(widgets->srv_set_table), 1,2,a,b,combo_size); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; ent++; comb++; /* Upload speed */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Upload speed:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Total upload speed shared by all clients in KiloBytes/sec"), NULL); a++; b++; spin++; /* Download speed */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Download speed:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Total download speed shared by all clients in KiloBytes/sec"), NULL); a++; b++; spin++; /* Resume broken uploads */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Resume uploads:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Resume broken downloads */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Resume downloads:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Remove aborted uploads */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Remove aborted uploads:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* TLS Module settings begins here */ if( use_tls ) { /* A hseparator */ make_3columns_hseparator(GTK_TABLE(widgets->srv_set_table), 0,1,a,b); a++; b++; /* Secure communications label */ make_3columns_label(GTK_TABLE(widgets->srv_set_table), _("Secure communications:"), 0,1,a,b); a++; b++; /* Use secure communication */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Use secure communication:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Require encryption on channels */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Require for channels:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("Both")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Data")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Control")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Verify clients */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Verify clients:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Use these protocols */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Use these protocols:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("IE: SSLv23 or TLSv1"), NULL); a++; b++; ent++; /* The TLS log */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("TLS log:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("IE: /var/log/gadmin-proftpd_tls.log"), NULL); a++; b++; ent++; /* A hseparator */ make_3columns_hseparator(GTK_TABLE(widgets->srv_set_table), 0,1,a,b); a++; b++; /* The signed certificate settings */ make_3columns_label(GTK_TABLE(widgets->srv_set_table), _(" Signed certificate settings: "), 0,1,a,b); a++; b++; /* The certificate directory */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Certificate directory:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("IE: /etc/gadmin-proftpd/certs"), NULL); a++; b++; ent++; /* This servers DNS name or IP-Address */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Server address:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("This servers DNS name or IP address"), NULL); a++; b++; ent++; /* Email address */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Email address:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The administrators email address"), NULL); a++; b++; ent++; /* Country */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Country:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("A country"), NULL); a++; b++; ent++; /* City or town */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("City or town:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("A city or a town"), NULL); a++; b++; ent++; /* Organization */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Organization:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Some organization"), NULL); a++; b++; ent++; /* Organizational unit */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Organizational unit:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Accounting"), NULL); a++; b++; ent++; /* Password */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Password:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("A password"), NULL); a++; b++; ent++; /* Was challenge password, let it be for now */ a++; b++; ent++; /* Encryption bits (Min value = 384) */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Encryption bits:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Number of bits in the generated certificate"), NULL); gtk_spin_button_set_range(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[spin]), 384, 999999); a++; b++; spin++; /* Number of days the certificate is valid */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_("Days valid:"), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Number of days the certificate is valid"), NULL); a++; b++; spin++; /* Countrycode */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _("Country code:"), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The country code, IE: SV, DK, EN, US, etc"), NULL); a++; b++; ent++; /* A progress bar */ widgets->gen_cert_progressbar = make_progressbar_with_label(GTK_TABLE(widgets->srv_set_table), _("Generate new certificates:"), 0,1,a,b,210); gtk_widget_set_sensitive(widgets->gen_cert_progressbar, FALSE); /* The progress bar looks nicer if its blue from start */ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->gen_cert_progressbar), progress_val); /* An apply button for the progress bar (make_button is in make_settings_progressbars.c) */ gen_cert_button = make_button(GTK_TABLE(widgets->srv_set_table), 0,1,a,b,200); a++; b++; g_signal_connect_swapped(G_OBJECT(gen_cert_button), "clicked", G_CALLBACK(generate_cert), widgets); } /* RATIO Module settings begins here */ if( use_ratio ) { /* A hseparator */ make_3columns_hseparator(GTK_TABLE(widgets->srv_set_table), 0,1,a,b); a++; b++; /* Ratio label */ make_3columns_label(GTK_TABLE(widgets->srv_set_table), _("Ratios for uploads and downloads:"), 0,1,a,b); a++; b++; /* Use Ratios */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Use ratios:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Save Ratios */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _("Save ratios:"), 0,1,a,b,50); combo_text = g_strdup_printf(_("On")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("Off")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->server_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; } gtk_widget_show_all(widgets->main_window); } gadmin-proftpd-0.4.2/src/populate_user_settings.h0000644000000000000000000000200711513432313020670 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef populate_user_settings_H # define populate_user_settings_H extern struct w *widgets; void populate_user_settings(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_main_window.c0000644000000000000000000003057611513432312017725 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include "gettext.h" #include "support.h" #include "widgets.h" #include "credits_window.h" #include "activate_button_clicked.h" #include "deactivate_button_clicked.h" #include "apply_button_clicked.h" #include "show_shutdown.h" #include "show_help.h" void create_main_window(struct w *widgets) { gchar *info, *utf8, *pixmap_directory; GtkCellRenderer *pixbuf_cell_renderer; GdkPixbuf *pixbuf; /* Create the main window */ widgets->main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_position(GTK_WINDOW (widgets->main_window), GTK_WIN_POS_CENTER); gtk_widget_set_size_request(widgets->main_window, -1 , 500); /* Set window information */ info = g_strdup_printf("GADMIN-PROFTPD %s", VERSION); gtk_window_set_title(GTK_WINDOW(widgets->main_window), info); g_free(info); /* Set the main window icon */ pixmap_directory = g_strdup_printf("%s/pixmaps/gadmin-proftpd", PACKAGE_DATA_DIR); add_pixmap_directory(pixmap_directory); g_free(pixmap_directory); pixbuf_cell_renderer = gtk_cell_renderer_pixbuf_new(); pixbuf = create_pixbuf("gadmin-proftpd.png"); g_object_set(pixbuf_cell_renderer, "pixbuf", pixbuf, NULL); gtk_window_set_icon(GTK_WINDOW(widgets->main_window), pixbuf); gdk_pixbuf_unref(pixbuf); widgets->main_vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(widgets->main_window), widgets->main_vbox); /* Hboxes (down) */ GtkWidget *toolbar_hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(widgets->main_vbox), toolbar_hbox, FALSE, FALSE, 0); GtkWidget *status_hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(widgets->main_vbox), status_hbox, FALSE, FALSE, 0); GtkWidget *status_hsep_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->main_vbox), status_hsep_hbox, FALSE, TRUE, 0); GtkWidget *notebook_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->main_vbox), notebook_hbox, TRUE, TRUE, 0); /* Create the main toolbar */ GtkWidget *main_toolbar = gtk_toolbar_new(); gtk_box_pack_start(GTK_BOX(toolbar_hbox), main_toolbar, TRUE, TRUE, 0); gtk_toolbar_set_style(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_BOTH); /* Activate button */ info = g_strdup_printf(_("Activate")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *toolbar_icon_yes = gtk_image_new_from_stock("gtk-yes", gtk_toolbar_get_icon_size(GTK_TOOLBAR(main_toolbar))); GtkWidget *activate_button = gtk_toolbar_append_element(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, utf8, NULL, NULL, toolbar_icon_yes, NULL, NULL); g_signal_connect_swapped(G_OBJECT(activate_button), "clicked", G_CALLBACK(activate_button_clicked), widgets); if( utf8!=NULL ) g_free(utf8); /* Deactivate button */ info = g_strdup_printf(_("Deactivate")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *toolbar_icon_no = gtk_image_new_from_stock("gtk-no", gtk_toolbar_get_icon_size(GTK_TOOLBAR(main_toolbar))); GtkWidget *deactivate_button = gtk_toolbar_append_element(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, utf8, NULL, NULL, toolbar_icon_no, NULL, NULL); g_signal_connect_swapped(G_OBJECT(deactivate_button), "clicked", G_CALLBACK(deactivate_button_clicked), widgets); if( utf8!=NULL ) g_free(utf8); /* Shutdown button */ info = g_strdup_printf(_("Shutdown")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *toolbar_icon_stop = gtk_image_new_from_stock("gtk-stop", gtk_toolbar_get_icon_size(GTK_TOOLBAR(main_toolbar))); GtkWidget *shutdown_button = gtk_toolbar_append_element(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, utf8, NULL, NULL, toolbar_icon_stop, NULL, NULL); g_signal_connect_swapped(G_OBJECT(shutdown_button), "clicked", G_CALLBACK(show_shutdown), widgets); if( utf8!=NULL ) g_free(utf8); /* Apply button */ /* info = g_strdup_printf(_("Apply")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *toolbar_icon_apply = gtk_image_new_from_stock("gtk-apply", gtk_toolbar_get_icon_size(GTK_TOOLBAR(main_toolbar))); GtkWidget *apply_button = gtk_toolbar_append_element(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, utf8, NULL, NULL, toolbar_icon_apply, NULL, NULL); g_signal_connect_swapped(G_OBJECT(apply_button), "clicked", G_CALLBACK(apply_button_clicked), widgets); if( utf8!=NULL ) g_free(utf8); */ /* Help button */ info = g_strdup_printf(_("Help")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *toolbar_icon_help = gtk_image_new_from_stock("gtk-help", gtk_toolbar_get_icon_size(GTK_TOOLBAR(main_toolbar))); GtkWidget *help_button = gtk_toolbar_append_element(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, utf8, NULL, NULL, toolbar_icon_help, NULL, NULL); g_signal_connect_swapped(G_OBJECT(help_button), "clicked", G_CALLBACK(show_help), widgets); if( utf8!=NULL ) g_free(utf8); /* About button */ info = g_strdup_printf(_("About")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *toolbar_icon_about = gtk_image_new_from_stock("gtk-about", gtk_toolbar_get_icon_size(GTK_TOOLBAR(main_toolbar))); GtkWidget *about_button = gtk_toolbar_append_element(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, utf8, NULL, NULL, toolbar_icon_about, NULL, NULL); g_signal_connect_swapped(G_OBJECT(about_button), "clicked", G_CALLBACK(show_credits), widgets); if( utf8!=NULL ) g_free(utf8); /* Quit button */ info = g_strdup_printf(_("Quit")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *toolbar_icon_quit = gtk_image_new_from_stock("gtk-quit", gtk_toolbar_get_icon_size(GTK_TOOLBAR(main_toolbar))); GtkWidget *quit_button = gtk_toolbar_append_element(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, utf8, NULL, NULL, toolbar_icon_quit, NULL, NULL); g_signal_connect_swapped(G_OBJECT(quit_button), "clicked", G_CALLBACK(gtk_main_quit), NULL); if( utf8!=NULL ) g_free(utf8); /* The notebook */ GtkWidget *notebook_vbox = gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(notebook_hbox), notebook_vbox, TRUE, TRUE, 0); widgets->notebook_vbox1 = gtk_vbox_new(FALSE, 0); widgets->notebook_vbox2 = gtk_vbox_new(FALSE, 0); widgets->notebook_vbox3 = gtk_vbox_new(FALSE, 0); widgets->notebook_vbox4 = gtk_vbox_new(FALSE, 0); widgets->notebook_vbox5 = gtk_vbox_new(FALSE, 0); widgets->notebook_vbox6 = gtk_vbox_new(FALSE, 0); widgets->notebook_vbox7 = gtk_vbox_new(FALSE, 0); GtkWidget *main_notebook = gtk_notebook_new(); gtk_box_pack_start(GTK_BOX(notebook_vbox), main_notebook, TRUE, TRUE, 0); gtk_notebook_set_show_border(GTK_NOTEBOOK(main_notebook), TRUE); info = g_strdup_printf(_("Servers")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *server_label = gtk_label_new(utf8); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("Users")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *user_label = gtk_label_new(utf8); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("Transfers")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *transfer_label = gtk_label_new(utf8); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("Disc")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *disc_label = gtk_label_new(utf8); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("Files")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *file_label = gtk_label_new(utf8); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("Security")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *security_label = gtk_label_new(utf8); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("Configuration")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); GtkWidget *conf_label = gtk_label_new(utf8); if( utf8!=NULL ) g_free(utf8); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox1, server_label, 0); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox2, user_label, 1); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox3, transfer_label, 2); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox4, disc_label, 3); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox5, file_label, 4); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox6, security_label, 5); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox7, conf_label, 6); /* Set version and status labels */ info = g_strdup_printf(_("Information: cant read version")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); widgets->version_label = gtk_label_new(utf8); gtk_box_pack_start(GTK_BOX(status_hbox), widgets->version_label, FALSE, FALSE, 0); gtk_misc_set_alignment(GTK_MISC(widgets->version_label), 0, 0); if( utf8!=NULL ) g_free(utf8); GtkWidget *status_spacer_label = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(status_hbox), status_spacer_label, TRUE, TRUE, 0); gtk_misc_set_alignment (GTK_MISC (status_spacer_label), 0, 0); info = g_strdup_printf(_("Status: unknown")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); g_free(info); widgets->status_label = gtk_label_new(_("Status: unknown")); gtk_box_pack_start(GTK_BOX(status_hbox), widgets->status_label, FALSE, FALSE, 0); gtk_misc_set_alignment(GTK_MISC(widgets->status_label), 0, 0); if( utf8!=NULL ) g_free(utf8); GtkWidget *status_hseparator = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(status_hsep_hbox), status_hseparator, TRUE, TRUE, 0); gtk_widget_set_size_request(status_hseparator, 10, 10); gtk_widget_show_all(widgets->main_window); } gadmin-proftpd-0.4.2/src/create_del_system_user_question.h0000644000000000000000000000207011513432312022540 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #ifndef create_del_system_user_question_H # define create_del_system_user_question_H extern struct w *widgets; void create_del_system_user_question(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/server_treeview_row_clicked.c0000644000000000000000000000536111513432313021647 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "populate_server_settings.h" #include "populate_users.h" #include "select_first_user.h" #include "populate_user_settings.h" extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_type[1024]; void server_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, gpointer data) { gchar *address, *port, *type; GtkTreeIter iter; GtkTreePath *path; GtkTreeModel *list_store; GtkTreeSelection *selection; /* The left button is pressed */ if( ! event->type == GDK_BUTTON_PRESS || ! event->button == 1 ) return; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); if( gtk_tree_selection_count_selected_rows(selection) <= 1 ) { /* Get the treepath for the row that was clicked */ if( gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), event->x, event->y, &path, NULL, NULL, NULL)) { gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); list_store = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(list_store, &iter, path); gtk_tree_model_get(list_store, &iter, 0, &address, -1); gtk_tree_model_get(list_store, &iter, 1, &port, -1); gtk_tree_model_get(list_store, &iter, 3, &type, -1); sprintf(global_server_address, "%s", address?address:"None"); sprintf(global_server_port, "%s", port?port:"21"); sprintf(global_server_type, "%s", type?type:"None"); g_free(address); g_free(port); g_free(type); gtk_tree_path_free(path); populate_server_settings(data); populate_users(data); select_first_user(data); populate_user_settings(data); } } } gadmin-proftpd-0.4.2/src/activate_button_clicked.c0000644000000000000000000000535411513432312020734 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "gettext.h" #include #include #include #include #include "widgets.h" #include "show_info.h" #include "activate_button_clicked.h" #include "commands.h" extern int use_tls; extern int activated; void activate_button_clicked(struct w *widgets) { gchar *info, *start, *test, *cert_path; G_CONST_RETURN gchar *cert_dir; gint active_index = 0; /* Remove the shutdown file if it exists */ unlink(GP_SHUTMSG); if( activated ) return; /* If certs are required but have not been generated we inform the user */ if( use_tls ) { /* Check if secure FTP is enabled in the combo. If so, require certificates before start. */ active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[14])); if( active_index != 1 ) /* '1' is Off. (Proftpd wants the file even though the module is not on ?) */ { cert_dir = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[15])); cert_path = g_strdup_printf("%s/cert.pem", cert_dir); if( ! file_exists(cert_path) ) { info = g_strdup_printf(_("You need to generate certificates before you can start the server.\n")); show_info(info); g_free(info); g_free(cert_path); return; } g_free(cert_path); } } /* Start the server */ start = g_strdup_printf("%s -c %s", PROFTPD_BINARY, PROFTPD_CONF); if( ! run_command(start) ) { printf("Starting proftpd failed using this command: %s\n", start); test = g_strdup_printf("%s -c %s 2>&1", PROFTPD_BINARY, PROFTPD_CONF); run_command_show_err(test); g_free(test); /* No sence in starting a malfunctioning server at system boot */ init_stop(widgets); /* It would be very annoying to tell the user its going to start at the next boot */ } else init_start(widgets); g_free(start); } gadmin-proftpd-0.4.2/src/set_version.h0000644000000000000000000000200411513432313016416 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef gadmin_proftpd_set_version_H # define gadmin_proftpd_set_version_H extern struct w *widgets; void set_version(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_file_tab.h0000644000000000000000000000176211513432312017157 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef create_file_tab_H # define create_file_tab_H extern struct w *widgets; void create_file_tab(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_server_settings.h0000644000000000000000000000200711513432312020631 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef create_server_settings_H # define create_server_settings_H extern struct w *widgets; void create_server_settings(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/user_treeview_row_clicked.h0000644000000000000000000000210211513432313021312 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef user_treeview_row_clicked_H # define user_treeview_row_clicked_H extern struct w *widgets; void user_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, gpointer data); #endif gadmin-proftpd-0.4.2/src/add_standard_users.h0000644000000000000000000000177211513432312017721 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef add_standard_users_H # define add_standard_users_H extern struct w *widgets; int add_standard_users(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/create_disc_tab.c0000644000000000000000000001075311513432312017155 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "create_disc_tab.h" #include "populate_disc_tab.h" /* Wether or not to let the disc section expand */ #define EXPAND_DISC_SECTION TRUE void create_disc_tab(struct w *widgets) { GtkCellRenderer *disc_cell_renderer; GtkWidget *disc_treeview_hbox; GtkWidget *disc_scrolled_window; gchar *utf8=NULL; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* Create the disc treeview in a scrolled window */ disc_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox4), disc_treeview_hbox, EXPAND_DISC_SECTION, TRUE, 0); disc_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(disc_treeview_hbox), disc_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(disc_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); widgets->disc_store = gtk_list_store_new(6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); widgets->disc_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->disc_treeview), GTK_TREE_MODEL(widgets->disc_store)); gtk_container_add(GTK_CONTAINER(disc_scrolled_window), widgets->disc_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->disc_treeview), TRUE); /* Set the column labels in the treeview */ disc_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *mount_col = gtk_tree_view_column_new_with_attributes(_("Mounted on"), disc_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->disc_treeview), GTK_TREE_VIEW_COLUMN(mount_col)); GtkTreeViewColumn *free_space_col = gtk_tree_view_column_new_with_attributes(_("Free space"), disc_cell_renderer, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->disc_treeview), GTK_TREE_VIEW_COLUMN(free_space_col)); GtkTreeViewColumn *used_space_col = gtk_tree_view_column_new_with_attributes(_("Used space"), disc_cell_renderer, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->disc_treeview), GTK_TREE_VIEW_COLUMN(used_space_col)); GtkTreeViewColumn *total_space_col = gtk_tree_view_column_new_with_attributes(_("Total space"), disc_cell_renderer, "text", 3, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->disc_treeview), GTK_TREE_VIEW_COLUMN(total_space_col)); GtkTreeViewColumn *used_percent_col = gtk_tree_view_column_new_with_attributes(_("Percent used"), disc_cell_renderer, "text", 4, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->disc_treeview), GTK_TREE_VIEW_COLUMN(used_percent_col)); GtkTreeViewColumn *device_col = gtk_tree_view_column_new_with_attributes(_("Device"), disc_cell_renderer, "text", 5, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->disc_treeview), GTK_TREE_VIEW_COLUMN(device_col)); /* The update disc button */ GtkWidget *disc_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox4), disc_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(disc_button_box), GTK_BUTTONBOX_SPREAD); GtkWidget *update_disc_button = gtk_button_new_from_stock(GTK_STOCK_REFRESH); gtk_box_pack_start(GTK_BOX(disc_button_box), update_disc_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(update_disc_button), "clicked", G_CALLBACK(populate_discs), widgets); gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/import_functions.c0000644000000000000000000003177011522563053017475 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include "support.h" #include "allocate.h" #include "widgets.h" #include "functions.h" #include "commands.h" #include "show_info.h" #include "import_functions.h" #include "system_defines.h" #include "populate_users.h" #include "select_first_user.h" #include "populate_user_settings.h" #include "populate_conf_tab.h" #include "reread_conf.h" #define GP_OSX_PASS_DUMP "/etc/gp_osx_passdump" extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_type[1024]; extern char global_user_name[1024]; extern int activated; /* Temporary for option deprecations */ extern char global_version[1024]; /* Fixme: Set at import_button_pressed */ char import_root_dir[8192]=""; long num_imported = 0; void add_import_users(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets) { FILE *fp; long conf_size; char *user_settings, *user_check, *old_buffer=NULL, *new_buffer=NULL; char *address_buffer, *port_buffer; int limit_access=0, found_server=0; gchar *username, *groupname, *directory; gchar *info; gtk_tree_model_get(model, iter, 0, &username, -1); gtk_tree_model_get(model, iter, 1, &groupname, -1); /* local_username = g_locale_from_utf8(username, -1, NULL, NULL, NULL); */ /* If theres no username */ if( strlen(username) == 0 ) { printf("The username length was too short (0)\n"); return; } if( strlen(groupname) == 0 ) { printf("The groupname length was too short (0)\n"); return; } if( username[0]=='0' || username[0]=='1' || username[0]=='2' || username[0]=='3' || username[0]=='4' || username[0]=='5' || username[0]=='6' || username[0]=='7' || username[0]=='8' || username[0]=='9') { printf("Usernames cant have a digit first\n"); return; } if( username[0]=='r' && username[1]=='o' && username[2]=='o' && username[3]=='t' && strlen(username)==4 ) { printf("Refusing to add user root\n"); return; } if( groupname[0]=='r' && groupname[1]=='o' && groupname[2]=='o' && groupname[3]=='t' && strlen(groupname)==4 ) { printf("Refusing to add group root\n"); return; } if( strstr((char *)username, "<") || strstr((char *)username, ">") ) { printf("A username containing < or > is not allowed.\n"); return; } if( strstr((char *)groupname, "<") || strstr((char *)groupname, ">") ) { printf("A username containing < or > is not allowed.\n"); return; } /* If the directory field has less then 3 chars we inform that this cant be done */ if( strlen(import_root_dir) < 6 ) { printf("The minimum directory path length is 5 chars.\n"); return; } address_buffer = allocate(8192+15); port_buffer = allocate(8192+3); if( strstr((char *)global_server_type, "Virtualhost") ) sprintf(address_buffer, "\n", global_server_address); else sprintf(address_buffer, "%s", global_server_address); sprintf(port_buffer, "Port %s\n", global_server_port); /* Checks if the user exists in proftpd.conf, if so just shows a popup */ if((fp=fopen(PROFTPD_CONF,"r"))==NULL) { free(address_buffer); free(port_buffer); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size); user_check = allocate(4096); snprintf(user_check, 4000, "%s\n", username); /* Standard server selected, start checking users directly */ if( ! strstr((char *)global_server_type, "Virtualhost") ) found_server = 1; if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) { fclose(fp); free(old_buffer); free(user_check); free(address_buffer); free(port_buffer); return; } if( strstr("Virtualhost", (char *)global_server_type) && ! found_server && strcmp(old_buffer, address_buffer) == 0 ) { /* Lets see if its the same port as the selected one */ /* If this server has the same port its the correct server */ while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) { fclose(fp); free(old_buffer); free(user_check); free(address_buffer); free(port_buffer); return; } /* This will expect the servers port on the second line ! * else itll miss some vaules .. */ if( strstr(old_buffer, "Port") && strcmp(old_buffer, port_buffer) == 0 ) { found_server = 1; break; } if( strstr(old_buffer, "") ) break; } } /* Continue until we find the selected server */ if( ! found_server ) continue; if( found_server ) break; /* Dont change AllowFrom... */ if( strstr(old_buffer, " 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) { fclose(fp); free(old_buffer); free(user_check); free(address_buffer); free(port_buffer); return; } /* Does this user exist in this server... */ if( strcmp(old_buffer, user_check) == 0 && ! strstr(old_buffer, "AllowUser") ) { info = g_strdup_printf(_("The user: \"%s\" was not imported\nbecause it already existed in this server.\n"), username); show_info(info); g_free(info); free(old_buffer); free(user_check); free(address_buffer); free(port_buffer); fclose(fp); return; } /* Dont match users in vhosts for the defualt server */ if( ! strstr((char *)global_server_type, "Virtualhost") ) { if( strstr(old_buffer, "") ) break; } free(user_check); free(old_buffer); fclose(fp); /* Make the users ftp home directory and chmod it to 0755 if it doesnt exist */ if( ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->import_with_username_checkbutton)) ) directory = g_strdup_printf("%s", import_root_dir); else directory = g_strdup_printf("%s/%s", import_root_dir, username); if( ! file_exists((gchar *)directory) ) make_dir_chmod((gchar *)directory, "0755"); /* Create the users profile */ user_settings = allocate(16384); strcpy(user_settings, "\n\n"); strcat(user_settings, "User "); strcat(user_settings, username); strcat(user_settings, "\nGroup "); strcat(user_settings, groupname); strcat(user_settings, "\n"); strcat(user_settings, "AnonRequirePassword on\n"); strcat(user_settings, "MaxClients 3 \"The server is full, hosting %m users\"\n"); strcat(user_settings, "DisplayLogin welcome.msg\n"); strcat(user_settings, "DisplayChdir .msg\n"); strcat(user_settings, "AllowOverwrite off\n"); strcat(user_settings, "\n"); strcat(user_settings, " Allow from all\n"); strcat(user_settings, " Deny from all\n"); strcat(user_settings, "\n"); strcat(user_settings, "\n"); strcat(user_settings, " AllowAll\n"); strcat(user_settings, "\n"); strcat(user_settings, "\n"); strcat(user_settings, " DenyAll\n"); strcat(user_settings, "\n"); strcat(user_settings, "\n"); g_free(directory); /* Add the new user settings to proftpd.conf in the correct server context. * Add AllowUser to the selected server. */ found_server = 0; /* Standard server selected, start adding users directly */ if( ! strstr((char *)global_server_type, "Virtualhost") ) found_server = 1; /* Add AllowUser UserName to proftpd.conf to the right server */ if((fp=fopen(PROFTPD_CONF,"r"))==NULL) { free(address_buffer); free(port_buffer); free(user_settings); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size); /* The new_buffer will probably also contain the user_settings */ new_buffer = allocate(conf_size+8192); /* Add the new user to the new conf */ if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 4000 ) { fclose(fp); free(old_buffer); free(address_buffer); free(port_buffer); free(new_buffer); free(user_settings); return; } strcat(new_buffer, old_buffer); if( strstr("Virtualhost", (char *)global_server_type) && ! found_server && strcmp(old_buffer, address_buffer) == 0 ) { /* Lets see if its the same port as the selected one */ /* If this server has the same port its the correct server. */ while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 4000 ) continue; strcat(new_buffer, old_buffer); /* This will expect the servers port on the second line ! * else itll miss some values .. */ if( strstr(old_buffer, "Port") && strcmp(old_buffer, port_buffer) == 0 ) { found_server = 1; break; } if( strstr(old_buffer, "") ) break; } } /* Continue until we find the selected server */ if( ! found_server ) continue; /* Add AllowUSer Username .. to this server only */ if( strstr(old_buffer, "") && found_server && ! limit_access ) { strcat(new_buffer, " AllowUser "); strcat(new_buffer, username); strcat(new_buffer, "\n"); limit_access = 1; /* just incase so we just change the first occurance */ /* Add the user after */ while(fgets(old_buffer, conf_size, fp)!=NULL) { strcat(new_buffer, old_buffer); if( strstr(old_buffer, "") && limit_access==1 ) { /* Only add it once */ limit_access = 2; /* The user was added after */ /* Global */ num_imported++; strcat(new_buffer, user_settings); } } } /* Add the new user_settings if we have another user (once) */ if( strstr(old_buffer, "import_home_entry)); if( strlen(g_home_dir) <= 4000 ) sprintf(import_root_dir, "%s", g_home_dir); else { info = g_strdup_printf(_("Error: Home directory too long: %s\n"), g_home_dir); show_info(info); g_free(info); return; } /* Call foreach on the users */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->import_treeview)); gtk_tree_selection_selected_foreach(GTK_TREE_SELECTION(selection), (GtkTreeSelectionForeachFunc) &add_import_users, widgets); /* Update the users, user settings and the conf tab. */ populate_users(widgets); select_first_user(widgets); populate_user_settings(widgets); populate_conf_tab(widgets); gtk_widget_destroy(widgets->import_window); info = g_strdup_printf(_("Total number of imported users: %ld\n"), num_imported); show_info(info); g_free(info); reread_conf(widgets); } gadmin-proftpd-0.4.2/src/create_del_system_user_question.c0000644000000000000000000001240211513432312022533 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "gettext.h" #include "widgets.h" #include "create_del_system_user_question.h" #include "delete_user.h" void create_del_system_user_question(struct w *widgets) { GtkWidget *vbox31, *label297, *hbox225; GtkWidget *label298, *label299; GtkWidget *userdel_question_entry; GtkWidget *label300, *hbuttonbox13; GtkWidget *question_userdel_cancel_button; GtkWidget *alignment49, *hbox229; GtkWidget *image49, *label304; GtkWidget *question_userdel_delete_button; GtkWidget *alignment50, *hbox230, *image50, *label305; G_CONST_RETURN gchar *username; username = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[0])); widgets->del_system_user_question_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(widgets->del_system_user_question_window), _("Delete this system user ?")); gtk_window_set_position(GTK_WINDOW(widgets->del_system_user_question_window), GTK_WIN_POS_CENTER); vbox31 = gtk_vbox_new(TRUE, 0); gtk_container_add(GTK_CONTAINER(widgets->del_system_user_question_window), vbox31); label297 = gtk_label_new (_("Do you also want to delete the system user ?")); gtk_box_pack_start (GTK_BOX (vbox31), label297, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label297), GTK_JUSTIFY_LEFT); hbox225 = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox31), hbox225, FALSE, FALSE, 0); label298 = gtk_label_new (""); gtk_box_pack_start (GTK_BOX (hbox225), label298, FALSE, FALSE, 0); gtk_widget_set_size_request (label298, 30, -1); gtk_label_set_justify (GTK_LABEL (label298), GTK_JUSTIFY_LEFT); label299 = gtk_label_new (_("Username: ")); gtk_box_pack_start (GTK_BOX (hbox225), label299, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label299), GTK_JUSTIFY_LEFT); userdel_question_entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox225), userdel_question_entry, TRUE, TRUE, 0); gtk_widget_set_sensitive (userdel_question_entry, FALSE); gtk_editable_set_editable (GTK_EDITABLE (userdel_question_entry), FALSE); /* Set the username in the entry */ gtk_entry_set_text(GTK_ENTRY(userdel_question_entry), username); label300 = gtk_label_new (""); gtk_box_pack_start (GTK_BOX (hbox225), label300, FALSE, FALSE, 0); gtk_widget_set_size_request (label300, 90, -1); gtk_label_set_justify (GTK_LABEL (label300), GTK_JUSTIFY_LEFT); hbuttonbox13 = gtk_hbutton_box_new (); gtk_box_pack_start (GTK_BOX (vbox31), hbuttonbox13, FALSE, FALSE, 0); gtk_widget_set_size_request (hbuttonbox13, -1, 40); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox13), GTK_BUTTONBOX_SPREAD); question_userdel_cancel_button = gtk_button_new (); gtk_container_add (GTK_CONTAINER (hbuttonbox13), question_userdel_cancel_button); GTK_WIDGET_SET_FLAGS (question_userdel_cancel_button, GTK_CAN_DEFAULT); alignment49 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_container_add (GTK_CONTAINER (question_userdel_cancel_button), alignment49); hbox229 = gtk_hbox_new (FALSE, 2); gtk_container_add (GTK_CONTAINER (alignment49), hbox229); image49 = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start (GTK_BOX (hbox229), image49, FALSE, FALSE, 0); label304 = gtk_label_new_with_mnemonic (_("No")); gtk_box_pack_start (GTK_BOX (hbox229), label304, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label304), GTK_JUSTIFY_LEFT); question_userdel_delete_button = gtk_button_new (); gtk_container_add (GTK_CONTAINER (hbuttonbox13), question_userdel_delete_button); GTK_WIDGET_SET_FLAGS (question_userdel_delete_button, GTK_CAN_DEFAULT); alignment50 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_container_add (GTK_CONTAINER (question_userdel_delete_button), alignment50); hbox230 = gtk_hbox_new (FALSE, 2); gtk_container_add (GTK_CONTAINER (alignment50), hbox230); image50 = gtk_image_new_from_stock ("gtk-remove", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start (GTK_BOX (hbox230), image50, FALSE, FALSE, 0); label305 = gtk_label_new_with_mnemonic (_("Delete")); gtk_box_pack_start (GTK_BOX (hbox230), label305, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label305), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(G_OBJECT(question_userdel_cancel_button), "clicked", G_CALLBACK(dont_delete_system_user), widgets); g_signal_connect(G_OBJECT(question_userdel_delete_button), "clicked", G_CALLBACK(do_delete_system_user), widgets); } gadmin-proftpd-0.4.2/src/populate_gadmin_proftpd.h0000644000000000000000000000204011513432313020764 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #ifndef populate_gadmin_proftpd_H # define populate_gadmin_proftpd_H extern struct w *widgets; void populate_gadmin_proftpd(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/Makefile0000644000000000000000000005775611566007233015404 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # src/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. pkgdatadir = $(datadir)/gadmin-proftpd pkgincludedir = $(includedir)/gadmin-proftpd pkglibdir = $(libdir)/gadmin-proftpd pkglibexecdir = $(libexecdir)/gadmin-proftpd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = i686-pc-linux-gnu host_triplet = i686-pc-linux-gnu sbin_PROGRAMS = gadmin-proftpd$(EXEEXT) gprostats$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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 = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_gadmin_proftpd_OBJECTS = gadmin_proftpd.$(OBJEXT) \ populate_gadmin_proftpd.$(OBJEXT) widgets.$(OBJEXT) \ support.$(OBJEXT) create_main_window.$(OBJEXT) \ create_server_tab.$(OBJEXT) populate_servers.$(OBJEXT) \ server_treeview_row_clicked.$(OBJEXT) add_server.$(OBJEXT) \ delete_server.$(OBJEXT) create_server_settings.$(OBJEXT) \ populate_server_settings.$(OBJEXT) \ apply_server_settings.$(OBJEXT) select_first_server.$(OBJEXT) \ create_user_tab.$(OBJEXT) file_chooser.$(OBJEXT) \ populate_users.$(OBJEXT) user_treeview_row_clicked.$(OBJEXT) \ populate_shell_combo.$(OBJEXT) add_user.$(OBJEXT) \ dir_treeview_funcs.$(OBJEXT) create_user_settings.$(OBJEXT) \ populate_user_settings.$(OBJEXT) select_first_user.$(OBJEXT) \ apply_user.$(OBJEXT) delete_user.$(OBJEXT) \ create_del_system_user_question.$(OBJEXT) \ make_settings_entries.$(OBJEXT) make_settings_combos.$(OBJEXT) \ make_settings_spinbuttons.$(OBJEXT) \ make_settings_buttons.$(OBJEXT) \ make_settings_checkbuttons.$(OBJEXT) \ make_settings_progressbars.$(OBJEXT) \ make_settings_labels.$(OBJEXT) \ make_settings_hseparators.$(OBJEXT) \ create_transfer_tab.$(OBJEXT) kick_button_clicked.$(OBJEXT) \ kick_ban_button_clicked.$(OBJEXT) status_update.$(OBJEXT) \ create_disc_tab.$(OBJEXT) populate_disc_tab.$(OBJEXT) \ create_file_tab.$(OBJEXT) populate_file_tab.$(OBJEXT) \ clear_file_tab.$(OBJEXT) create_security_tab.$(OBJEXT) \ populate_security_tab.$(OBJEXT) clear_security_tab.$(OBJEXT) \ create_conf_tab.$(OBJEXT) populate_conf_tab.$(OBJEXT) \ save_conf_tab.$(OBJEXT) set_version.$(OBJEXT) \ reread_conf.$(OBJEXT) apply_button_clicked.$(OBJEXT) \ commands.$(OBJEXT) generate_cert.$(OBJEXT) functions.$(OBJEXT) \ commented.$(OBJEXT) credits_window.$(OBJEXT) \ activate_button_clicked.$(OBJEXT) \ deactivate_button_clicked.$(OBJEXT) show_info.$(OBJEXT) \ chars_are_digits.$(OBJEXT) allocate.$(OBJEXT) \ system_defines.$(OBJEXT) create_import_window.$(OBJEXT) \ import_functions.$(OBJEXT) show_shutdown.$(OBJEXT) \ shutdown_ok_clicked.$(OBJEXT) standard_conf.$(OBJEXT) \ add_standard_users.$(OBJEXT) show_help.$(OBJEXT) gadmin_proftpd_OBJECTS = $(am_gadmin_proftpd_OBJECTS) gadmin_proftpd_DEPENDENCIES = am_gprostats_OBJECTS = gprostats.$(OBJEXT) chars_are_digits.$(OBJEXT) \ allocate.$(OBJEXT) gprostats_OBJECTS = $(am_gprostats_OBJECTS) gprostats_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gadmin_proftpd_SOURCES) $(gprostats_SOURCES) DIST_SOURCES = $(gadmin_proftpd_SOURCES) $(gprostats_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = ${SHELL} /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2/missing --run aclocal-1.11 AMTAR = ${SHELL} /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2/missing --run tar AUTOCONF = ${SHELL} /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2/missing --run autoconf AUTOHEADER = ${SHELL} /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2/missing --run autoheader AUTOMAKE = ${SHELL} /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2/missing --run automake-1.11 AWK = gawk CATALOGS = sv.gmo fr.gmo es.gmo zh_CN.gmo CATOBJEXT = .gmo CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -g -O2 -Wall CPP = gcc -E CPPFLAGS = CYGPATH_W = echo DATADIRNAME = share DEFS = -DHAVE_CONFIG_H DEPDIR = .deps ECHO_C = ECHO_N = -n ECHO_T = EGREP = /bin/grep -E EXEEXT = GETTEXT_PACKAGE = gadmin-proftpd GMOFILES = sv.gmo fr.gmo es.gmo zh_CN.gmo GMSGFMT = /usr/bin/msgfmt GREP = /bin/grep INSTALL = /bin/install -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s INSTOBJEXT = .mo INTLLIBS = LDFLAGS = LIBOBJS = LIBS = -lcrypt LOCALSTATEDIR = /var LTLIBOBJS = MAINT = # MAKEINFO = ${SHELL} /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2/missing --run makeinfo MKDIR_P = /bin/mkdir -p MKINSTALLDIRS = ./mkinstalldirs MSGFMT = /usr/bin/msgfmt MSGFMT_OPTS = -c OBJEXT = o PACKAGE = gadmin-proftpd PACKAGE_BUGREPORT = PACKAGE_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 PACKAGE_LIBS = -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpng12 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 PACKAGE_NAME = PACKAGE_STRING = PACKAGE_TARNAME = PACKAGE_URL = PACKAGE_VERSION = PATH_SEPARATOR = : PKG_CONFIG = /usr/bin/pkg-config PKG_CONFIG_LIBDIR = PKG_CONFIG_PATH = POFILES = sv.po fr.po es.po zh_CN.po POSUB = po PO_IN_DATADIR_FALSE = PO_IN_DATADIR_TRUE = SET_MAKE = SHELL = /bin/sh STRIP = SYSCONFDIR = /etc USE_NLS = yes VERSION = 0.4.2 XGETTEXT = /usr/bin/xgettext abs_builddir = /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2/src abs_srcdir = /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2/src abs_top_builddir = /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2 abs_top_srcdir = /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2 ac_ct_CC = gcc am__include = include am__leading_dot = . am__quote = am__tar = ${AMTAR} chof - "$$tardir" am__untar = ${AMTAR} xf - bindir = ${exec_prefix}/bin build = i686-pc-linux-gnu build_alias = build_cpu = i686 build_os = linux-gnu build_vendor = pc builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE} dvidir = ${docdir} exec_prefix = ${prefix} host = i686-pc-linux-gnu host_alias = host_cpu = i686 host_os = linux-gnu host_vendor = pc htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /root/PROJEKT/gadmin-proftpd/gadmin-proftpd-0.4.2/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = /var mandir = ${datarootdir}/man mkdir_p = /bin/mkdir -p oldincludedir = /usr/include pdfdir = ${docdir} prefix = /usr program_transform_name = s,x,x, psdir = ${docdir} sbindir = /usr/sbin sharedstatedir = ${prefix}/com srcdir = . sysconfdir = /etc target_alias = top_build_prefix = ../ top_builddir = .. top_srcdir = .. INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 gadmin_proftpd_SOURCES = \ gadmin_proftpd.c gadmin_proftpd.h \ populate_gadmin_proftpd.c populate_gadmin_proftpd.h \ widgets.c widgets.h \ support.c support.h \ create_main_window.c create_main_window.h \ create_server_tab.c create_server_tab.h \ populate_servers.c populate_servers.h \ server_treeview_row_clicked.c server_treeview_row_clicked.h \ add_server.c add_server.h \ delete_server.c delete_server.h \ create_server_settings.c create_server_settings.h \ populate_server_settings.c populate_server_settings.h \ apply_server_settings.c apply_server_settings.h \ select_first_server.c select_first_server.h \ create_user_tab.c create_user_tab.h \ file_chooser.c file_chooser.h \ populate_users.c populate_users.h \ user_treeview_row_clicked.c user_treeview_row_clicked.h \ populate_shell_combo.c populate_shell_combo.h \ add_user.c add_user.h \ dir_treeview_funcs.c dir_treeview_funcs.h \ create_user_settings.c create_user_settings.h \ populate_user_settings.c populate_user_settings.h \ select_first_user.c select_first_user.h \ apply_user.c apply_user.h \ delete_user.c delete_user.h \ create_del_system_user_question.c create_del_system_user_question.h \ make_settings_entries.c make_settings_entries.h \ make_settings_combos.c make_settings_combos.h \ make_settings_spinbuttons.c make_settings_spinbuttons.h \ make_settings_buttons.c make_settings_buttons.h \ make_settings_checkbuttons.c make_settings_checkbuttons.h \ make_settings_progressbars.c make_settings_progressbars.h \ make_settings_labels.c make_settings_labels.h \ make_settings_hseparators.c make_settings_hseparators.h \ create_transfer_tab.c create_transfer_tab.h \ kick_button_clicked.c kick_button_clicked.h \ kick_ban_button_clicked.c kick_ban_button_clicked.h \ status_update.c status_update.h \ create_disc_tab.c create_disc_tab.h \ populate_disc_tab.c populate_disc_tab.h \ create_file_tab.c create_file_tab.h \ populate_file_tab.c populate_file_tab.h \ clear_file_tab.c clear_file_tab.h \ create_security_tab.c create_security_tab.h \ populate_security_tab.c populate_security_tab.h \ clear_security_tab.c clear_security_tab.h \ create_conf_tab.c create_conf_tab.h \ populate_conf_tab.c populate_conf_tab.h \ save_conf_tab.c save_conf_tab.h \ set_version.c set_version.h \ reread_conf.c reread_conf.h \ apply_button_clicked.c apply_button_clicked.h \ commands.c commands.h \ generate_cert.c generate_cert.h \ functions.c functions.h \ commented.c commented.h \ credits_window.c credits_window.h \ activate_button_clicked.c activate_button_clicked.h \ deactivate_button_clicked.c deactivate_button_clicked.h \ show_info.c show_info.h \ chars_are_digits.c chars_are_digits.h \ allocate.c allocate.h \ system_defines.c system_defines.h \ create_import_window.c create_import_window.h \ import_functions.c import_functions.h \ show_shutdown.c show_shutdown.h \ shutdown_ok_clicked.c shutdown_ok_clicked.h \ standard_conf.c standard_conf.h \ add_standard_users.c add_standard_users.h \ show_help.c show_help.h gprostats_SOURCES = \ gprostats.c \ chars_are_digits.c chars_are_digits.h \ allocate.c allocate.h gadmin_proftpd_LDADD = -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpng12 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__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: # $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): # $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) gadmin-proftpd$(EXEEXT): $(gadmin_proftpd_OBJECTS) $(gadmin_proftpd_DEPENDENCIES) @rm -f gadmin-proftpd$(EXEEXT) $(LINK) $(gadmin_proftpd_OBJECTS) $(gadmin_proftpd_LDADD) $(LIBS) gprostats$(EXEEXT): $(gprostats_OBJECTS) $(gprostats_DEPENDENCIES) @rm -f gprostats$(EXEEXT) $(LINK) $(gprostats_OBJECTS) $(gprostats_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c include ./$(DEPDIR)/activate_button_clicked.Po include ./$(DEPDIR)/add_server.Po include ./$(DEPDIR)/add_standard_users.Po include ./$(DEPDIR)/add_user.Po include ./$(DEPDIR)/allocate.Po include ./$(DEPDIR)/apply_button_clicked.Po include ./$(DEPDIR)/apply_server_settings.Po include ./$(DEPDIR)/apply_user.Po include ./$(DEPDIR)/chars_are_digits.Po include ./$(DEPDIR)/clear_file_tab.Po include ./$(DEPDIR)/clear_security_tab.Po include ./$(DEPDIR)/commands.Po include ./$(DEPDIR)/commented.Po include ./$(DEPDIR)/create_conf_tab.Po include ./$(DEPDIR)/create_del_system_user_question.Po include ./$(DEPDIR)/create_disc_tab.Po include ./$(DEPDIR)/create_file_tab.Po include ./$(DEPDIR)/create_import_window.Po include ./$(DEPDIR)/create_main_window.Po include ./$(DEPDIR)/create_security_tab.Po include ./$(DEPDIR)/create_server_settings.Po include ./$(DEPDIR)/create_server_tab.Po include ./$(DEPDIR)/create_transfer_tab.Po include ./$(DEPDIR)/create_user_settings.Po include ./$(DEPDIR)/create_user_tab.Po include ./$(DEPDIR)/credits_window.Po include ./$(DEPDIR)/deactivate_button_clicked.Po include ./$(DEPDIR)/delete_server.Po include ./$(DEPDIR)/delete_user.Po include ./$(DEPDIR)/dir_treeview_funcs.Po include ./$(DEPDIR)/file_chooser.Po include ./$(DEPDIR)/functions.Po include ./$(DEPDIR)/gadmin_proftpd.Po include ./$(DEPDIR)/generate_cert.Po include ./$(DEPDIR)/gprostats.Po include ./$(DEPDIR)/import_functions.Po include ./$(DEPDIR)/kick_ban_button_clicked.Po include ./$(DEPDIR)/kick_button_clicked.Po include ./$(DEPDIR)/make_settings_buttons.Po include ./$(DEPDIR)/make_settings_checkbuttons.Po include ./$(DEPDIR)/make_settings_combos.Po include ./$(DEPDIR)/make_settings_entries.Po include ./$(DEPDIR)/make_settings_hseparators.Po include ./$(DEPDIR)/make_settings_labels.Po include ./$(DEPDIR)/make_settings_progressbars.Po include ./$(DEPDIR)/make_settings_spinbuttons.Po include ./$(DEPDIR)/populate_conf_tab.Po include ./$(DEPDIR)/populate_disc_tab.Po include ./$(DEPDIR)/populate_file_tab.Po include ./$(DEPDIR)/populate_gadmin_proftpd.Po include ./$(DEPDIR)/populate_security_tab.Po include ./$(DEPDIR)/populate_server_settings.Po include ./$(DEPDIR)/populate_servers.Po include ./$(DEPDIR)/populate_shell_combo.Po include ./$(DEPDIR)/populate_user_settings.Po include ./$(DEPDIR)/populate_users.Po include ./$(DEPDIR)/reread_conf.Po include ./$(DEPDIR)/save_conf_tab.Po include ./$(DEPDIR)/select_first_server.Po include ./$(DEPDIR)/select_first_user.Po include ./$(DEPDIR)/server_treeview_row_clicked.Po include ./$(DEPDIR)/set_version.Po include ./$(DEPDIR)/show_help.Po include ./$(DEPDIR)/show_info.Po include ./$(DEPDIR)/show_shutdown.Po include ./$(DEPDIR)/shutdown_ok_clicked.Po include ./$(DEPDIR)/standard_conf.Po include ./$(DEPDIR)/status_update.Po include ./$(DEPDIR)/support.Po include ./$(DEPDIR)/system_defines.Po include ./$(DEPDIR)/user_treeview_row_clicked.Po include ./$(DEPDIR)/widgets.Po .c.o: $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po # source='$<' object='$@' libtool=no \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c $< .c.obj: $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po # source='$<' object='$@' libtool=no \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c `$(CYGPATH_W) '$<'` 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-sbinPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-sbinPROGRAMS # 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: gadmin-proftpd-0.4.2/src/delete_server.c0000644000000000000000000001136511513432312016712 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include "widgets.h" #include "gettext.h" #include "show_info.h" #include "allocate.h" #include "delete_server.h" #include "populate_servers.h" #include "select_first_server.h" #include "populate_server_settings.h" #include "populate_users.h" #include "select_first_user.h" #include "populate_user_settings.h" #include "populate_conf_tab.h" #include "reread_conf.h" extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_type[1024]; extern int activated; void delete_server(struct w *widgets) { FILE *fp; char *old_buffer, *config, *temp_vhost, *address_buffer, *port_buffer; int found_server=0, deleted_server=0; long conf_size; address_buffer = allocate(8192+15); port_buffer = allocate(8192+3); if( strstr((char *)global_server_type, "Virtualhost") ) { /* Added \n so it wont match another similar server */ sprintf(address_buffer, "\n", global_server_address); } else { free(address_buffer); free(port_buffer); return; } sprintf(port_buffer, "Port %s\n", global_server_port); /* Standard server selected, delete the selected user in this (first) server */ if( ! strstr((char *)global_server_type, "Virtualhost") ) found_server=1; if( strlen(address_buffer)==0 ) { free(address_buffer); free(port_buffer); return; } if( strlen(address_buffer)==0 ) { free(address_buffer); free(port_buffer); return; } if( strlen(port_buffer)==0 ) { free(address_buffer); free(port_buffer); return; } /* Delete the configuration for the deleted user in the right server */ if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { free(address_buffer); free(port_buffer); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); config = allocate(conf_size); old_buffer = allocate(conf_size); temp_vhost = allocate(conf_size); if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { /* Is this the correct server..name to delete */ if( strstr("Virtualhost", (char *)global_server_type) && ! found_server && strcmp(old_buffer, address_buffer) == 0 && ! deleted_server ) { strcpy(temp_vhost, old_buffer); while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) continue; strcat(temp_vhost, old_buffer); if( strstr(old_buffer, "Port ") && strcmp(old_buffer, port_buffer) == 0 ) { found_server = 1; deleted_server = 1; /* Scroll past this vhost */ while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 8000 ) continue; strcat(temp_vhost, old_buffer); if( strstr(old_buffer, "") ) break; } } if( strstr(old_buffer, "") ) break; } if( ! found_server ) strcat(config, temp_vhost); else found_server = 0; } else /* Get everything thats not a vhost */ strcat(config, old_buffer); } free(old_buffer); free(address_buffer); free(port_buffer); free(temp_vhost); fclose(fp); if( ! deleted_server ) { free(config); return; } /* Write the new config without the deleted vhost */ if((fp=fopen(PROFTPD_CONF, "w+"))==NULL) { printf("Error Writing configuration here: %s\n", PROFTPD_CONF); free(config); return; } fputs(config, fp); fclose(fp); free(config); populate_servers(widgets); select_first_server(widgets); populate_server_settings(widgets); populate_users(widgets); select_first_user(widgets); populate_user_settings(widgets); populate_conf_tab(widgets); /* Update the server */ reread_conf(widgets); } gadmin-proftpd-0.4.2/src/kick_button_clicked.h0000644000000000000000000000177611513432313020067 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef kick_button_clicked_H # define kick_button_clicked_H extern struct w *widgets; void kick_button_clicked(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/gadmin_proftpd.c0000644000000000000000000002731011513432313017055 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include "gettext.h" #include "support.h" #include "functions.h" #include "create_main_window.h" #include "gadmin_proftpd.h" #include "widgets.h" #include "commands.h" #include "status_update.h" #include "set_version.h" #include "standard_conf.h" #include "create_server_tab.h" #include "create_server_settings.h" #include "create_user_tab.h" #include "create_user_settings.h" #include "create_transfer_tab.h" #include "create_disc_tab.h" #include "create_file_tab.h" #include "create_security_tab.h" #include "create_conf_tab.h" #include "populate_gadmin_proftpd.h" #include "add_standard_users.h" #include "show_info.h" /* For switching between virtual or system users */ gchar *GP_PASSWD_BUF; gchar *GP_SHADOW_BUF; gchar *GP_GROUP_BUF; gchar *GP_GSHADOW_BUF; int MAX_READ_POPEN = 16384; int activated = 0; int use_tls = 0; int use_ratio = 0; int use_quota = 0; /* Globals for adding and importing users */ long num_rows = 0; int row_pos = 0; gchar *homedir=NULL; int info_window_exit_main = 0; /* Used to stop iteration when adding directories */ int global_dir_error = 0; char global_server_address[1024]=""; char global_server_port[1024]=""; char global_server_name[1024]=""; char global_server_type[1024]=""; char global_user_name[1024]=""; /* Used to transform or remove deprecated options based on versions */ char global_version[1024]=""; int main(int argc, char *argv[]) { FILE *fp; int i = 0, auto_security = 0; gchar *conf_path, *info=NULL, *utf8=NULL; gchar *cmd, *openssl_conf, *settings_conf, *settings; /* Missing pam file in FC-3,4,5,6,7 proftpd rpm so its added if missing. */ /* Thanks to Mathias for fixing it. GW! */ gchar *broken_fedora; #ifdef ENABLE_NLS bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); #endif gtk_set_locale(); gtk_init(&argc, &argv); wid* widgets = g_malloc(sizeof(wid)); /* Non root usage */ if( ! getuid() == 0 ) { /* For setting a different exit method in the info window */ info_window_exit_main = 1; info = g_strdup_printf("You must be root to run: %s\nThis window will close in 10 seconds.\n", PACKAGE); show_info(info); g_free(info); /* Users can close the info window earlier then the timeout */ for(i=0; i<10; i++) { while(gtk_events_pending()) gtk_main_iteration(); /* Set when close info window is clicked */ if( info_window_exit_main == 2 ) break; usleep(100000*10); } g_free(widgets); return 0; } /* Create the main window */ create_main_window(widgets); /* Set ProFTPD Version */ set_version(widgets); /* If proftpd has the mod_tls.c module we create, show and use the TLS widgets */ use_tls = using_module("mod_tls.c"); /* If proftpd has the mod_ratio.c module we create, show and use the RATIO widgets */ use_ratio = using_module("mod_ratio.c"); /* If proftpd has mod_quotatab.c and mod_quotatab_file.c modules we create, show and use the Quota widgets */ if( using_module("mod_quotatab.c") && using_module("mod_quotatab_file.c") ) use_quota = 1; /* Create the server tab */ create_server_tab(widgets); /* Create the server settings */ create_server_settings(widgets); /* Create the user tab */ create_user_tab(widgets); /* Create the user settings */ create_user_settings(widgets); /* Create the transfer tab */ create_transfer_tab(widgets); /* Create the disc tab */ create_disc_tab(widgets); /* Create the file tab */ create_file_tab(widgets); /* Create the security tab */ create_security_tab(widgets); /* Create the conf tab */ create_conf_tab(widgets); /* Create the application configuration directory. */ make_dir_chmod(GP_APPCONFDIR, "0700"); /* Add default certificate settings if they are missing */ openssl_conf = g_strdup_printf("%s/certs/gadmin-proftpd-openssl.conf", GP_APPCONFDIR); if( ! file_exists(openssl_conf) && use_tls ) { info = g_strdup_printf("%s/certs", GP_APPCONFDIR); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[15]), info); g_free(info); info = g_strdup_printf("localhost"); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[16]), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf("email@example.org"); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[17]), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("Country")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[18]), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("City")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[19]), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("Organization name")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[20]), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf(_("Organization department")); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[21]), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); info = g_strdup_printf("EN"); utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[24]), utf8); g_free(info); if( utf8!=NULL ) g_free(utf8); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[11]), 1024); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->server_set_spinbutton[12]), 999999); } g_free(openssl_conf); conf_path = g_strdup_printf("%s", PROFTPD_CONF); /* Add the default gadmin-proftpd settings file if its missing */ settings_conf = g_strdup_printf("%s/settings.conf", GP_APPCONFDIR); if( ! file_exists(settings_conf) ) { if((fp = fopen(settings_conf, "w+")) == NULL) { info = g_strdup_printf(_("Error: Unable to create new settings file here:\n%s\n"), settings_conf); show_info(info); g_free(info); g_free(conf_path); g_free(settings_conf); return 0; } settings = g_strconcat("\n", "certificate_directory ", GP_APPCONFDIR, "/certs\n", "random_username_length 6\n", "random_password_length 6\n", "randomize_case lower\n", "useradd_homedir_path /var/ftp\n", "html_path ", HTML_STATISTICS, "\n", "welcome_name ", WELCOME_MESSAGE, "\n", "virtual_users off\n", "\n", NULL); fputs(settings, fp); fclose(fp); g_free(settings); /* If proftpd.conf exists, switch to the new TLS settings */ if( file_exists(conf_path) ) { new_tls_module_conf(); } } g_free(settings_conf); /* Use systems passwd files by default */ GP_PASSWD_BUF = g_strdup_printf("%s", GP_PASSWD); GP_SHADOW_BUF = g_strdup_printf("%s", GP_SHADOW); GP_GROUP_BUF = g_strdup_printf("%s", GP_GROUP); GP_GSHADOW_BUF = g_strdup_printf("%s", GP_GSHADOW); /* If theres no proftpd.conf, add one. */ if( ! file_exists(conf_path) ) add_standard_conf(widgets); else /* If proftpd.conf is bad, ask to add a new one. To support dynamically loaded modules we merge any ModulePath and LoadModule statements. */ if( ! conf_ok(conf_path) ) create_standard_conf_question(widgets); else /* The conf is ok, populate the entire gui */ populate_gadmin_proftpd(widgets); g_free(conf_path); /* Make an automatic backup for this version of gadmin-proftpd */ backup_configuration(widgets); /* This functions adds the required SERVER_USER AND SERVER_GROUP */ add_standard_users(widgets); /* If theres no ftpusers one will be made containing all current usernames (security). */ if((fp=fopen(GP_FTPUSERS, "r"))==NULL) auto_security = 1; else fclose(fp); if( auto_security ) { cmd = g_strdup_printf("cat %s | cut -f1 -d\":\" > %s", GP_PASSWD, GP_FTPUSERS); if((fp=popen(cmd, "r"))==NULL) { info = g_strconcat(_("Couldnt create the ftpusers file here:\n"), GP_FTPUSERS, _("\n\nMake sure the directories exists then restart gadmin-proftpd.\n"), _("\nIf this security feature still fails then security will be good but not optimal.\n"), NULL); show_info(info); g_free(info); } else { info = g_strconcat(_("Couldnt find ftpusers here:\n"), GP_FTPUSERS, _("\n\nThe missing file was created and all users on the system was added to it.\n"), _("All current users are now banned from using the ftp server until they\n"), _("are unbanned. This in an auto security feature and its normal if this is\n"), _("the first time you start gadmin-proftpd.\n"), NULL); show_info(info); g_free(info); } g_free(cmd); } /* Fix for broken Fedora-3,4,5,6,7 proftpd rpm */ if( file_exists("/etc/fedora-release") && file_exists("/etc/pam.d") && ! file_exists("/etc/pam.d/ftp") ) { broken_fedora = g_strconcat("#%PAM-1.0\n", "auth required pam_unix.so nullok\n", "account required pam_unix.so\n", "session required pam_unix.so\n", NULL); if((fp=fopen("/etc/pam.d/ftp", "w+"))==NULL) { info = g_strconcat("Fedora's version of proftpd doesnt add /etc/pam.d/ftp\n", "gadmin-proftpd has failed to add this file as well, this is a bug\n", NULL); show_info(info); g_free(info); } else { fputs(broken_fedora, fp); fclose(fp); info = g_strconcat("Fedora's version of proftpd doesnt add /etc/pam.d/ftp\n", "Its been added now so that users can login\n", NULL); show_info(info); g_free(info); } g_free(broken_fedora); } /* Window close button (x) */ g_signal_connect(GTK_OBJECT(widgets->main_window), "destroy", GTK_SIGNAL_FUNC(gtk_main_quit), NULL); gtk_timeout_add(1000, (GtkFunction) status_update, widgets); gtk_main(); /* Free virtual/system user paths */ g_free(GP_PASSWD_BUF); g_free(GP_SHADOW_BUF); g_free(GP_GROUP_BUF); g_free(GP_GSHADOW_BUF); g_free(widgets); return 0; } gadmin-proftpd-0.4.2/src/deactivate_button_clicked.c0000644000000000000000000000314711513432312021243 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include "widgets.h" #include "gettext.h" #include "commands.h" #include "show_info.h" #include "allocate.h" #include "deactivate_button_clicked.h" #include "commands.h" extern int activated; void deactivate_button_clicked(struct w *widgets) { gchar *cmd, *info; init_stop(widgets); if( ! activated ) return; /* Issues with users in CLOSE_WAIT states so we kill -15 */ cmd = g_strdup_printf("killall -15 %s", PROFTPD_BINARY); if( ! run_command(cmd) ) { info = g_strdup_printf("Failed to deactivate the server with command:\n%s\n", cmd); show_info(info); g_free(info); } g_free(cmd); } gadmin-proftpd-0.4.2/src/make_settings_hseparators.c0000644000000000000000000000257011513432313021331 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "make_settings_hseparators.h" void make_3columns_hseparator(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach) { GtkWidget *hsep; hsep = gtk_hseparator_new(); gtk_table_attach(table, hsep, left_attach, right_attach + 3, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 5, 5); gtk_widget_show(hsep); } gadmin-proftpd-0.4.2/src/apply_user.h0000644000000000000000000000204711513432312016247 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef apply_user_H #define apply_user_H extern struct w *widgets; void apply_user(struct w *widgets); int user_exists_in_selected_server(struct w *widgets, gchar *username); #endif gadmin-proftpd-0.4.2/src/reread_conf.h0000644000000000000000000000200211513432313016323 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef gadmin_proftpd_reread_conf_H # define gadmin_proftpd_reread_conf_H extern struct w *widgets; void reread_conf(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/commands.h0000644000000000000000000000266011513432312015666 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef commands_H # define commands_H extern struct w *widgets; int run_command(gchar *command); void run_command_show_err(gchar *command); int file_exists(char *infile); int using_tls(void); int using_ratio(void); int using_quota(void); void init_start(struct w *widgets); void init_stop(struct w *widgets); char * get_dynamic_module_statements(); char * get_included_dynamic_module_statements(char *path); int using_module(char module_name[1024]); int using_included_module(char module_name[1024]); int module_in_include_path(char *path, char module_name[1024]); #endif gadmin-proftpd-0.4.2/src/make_settings_spinbuttons.h0000644000000000000000000000431011513432313021365 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef make_settings_spinbuttons_H # define make_settings_spinbuttons_H GtkWidget *make_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_padded_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_short_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_shortleft_spinbutton_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); GtkWidget *make_spinbutton(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); #endif gadmin-proftpd-0.4.2/src/get_option_pos.c0000644000000000000000000000410611513432313017106 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "get_option_pos.h" int get_option_pos(char *line, int optnum) { int z = 0; int num = 1; long i = 0; if( optnum == 0 ) { for(i=0; line[i]!='\0'; i++) if( line[i]!=' ' && line[i]!='\t' ) break; return i; } if( optnum == 1 ) { for(i=0; line[i]!='\0'; i++) if( line[i]!=' ' && line[i]!='\t' ) break; for(i=i; line[i]!='\0'; i++) if( line[i]==' ' && line[i+1]!=' ' ) break; i++; return i; } /* Scroll past the first option declaration to the first option value */ if( line!=NULL && strlen(line) > 0 ) { for(i=0; line[i]!='\0'; i++) { if( line[i]!=' ' ) break; } for(i=i; line[i]!='\0'; i++) { if( line[i-1]==' ' && line[i]!=' ' ) break; } } /* One small step for man, one giant leap for mankind :) */ i++; for(z=0; z<=optnum; z++) { if( num == optnum ) break; /* Scroll to the beginning of the option value */ if( line!=NULL && strlen(line) > 0 ) { for(i=i; line[i]!='\0'; i++) { if( line[i-1]==' ' && line[i]!=' ' ) { num++; break; } } } } return i; } gadmin-proftpd-0.4.2/src/apply_button_clicked.c0000644000000000000000000000213511513432312020253 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "reread_conf.h" /* This is the main apply button */ void apply_button_clicked(struct w *widgets) { reread_conf(widgets); } gadmin-proftpd-0.4.2/src/add_user.h0000644000000000000000000000173511513432312015655 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef add_user_H # define add_user_H extern struct w *widgets; void add_user(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/set_version.c0000644000000000000000000000536711513432313016430 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include "widgets.h" #include "gettext.h" #include "functions.h" #include "allocate.h" #include "show_info.h" extern int MAX_READ_POPEN; extern char global_version[1024]; void set_version(struct w *widgets) { FILE *fp; char *version; int i = 0, ver_found = 0; gchar *command; gchar *ver=NULL; gchar *utf8=NULL; gchar *info; GdkColor color; command = g_strdup_printf("%s -v 2>&1", PROFTPD_BINARY); if((fp=popen(command, "r"))==NULL) { info = g_strdup_printf(_("Set version failed\n")); show_info(info); g_free(info); g_free(command); return; } g_free(command); version = allocate(MAX_READ_POPEN); while(fgets(version, MAX_READ_POPEN, fp)!=NULL) { if( cmplowercase(version, "proftpd") && strlen(version) < 30 ) { /* Only get the version at the end */ for(i=strlen(version)-1; version[i]!='\0'; i--) if( version[i]==' ' && version[i+1]!=' ' ) break; ver = g_strdup_printf(_(" Information: PRoFTPD-%s"), &version[i+1]); utf8 = g_locale_to_utf8(ver, strlen(ver)-1, NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->version_label), utf8); g_free(utf8); ver_found = 1; } } pclose(fp); if( ! ver_found ) { ver = g_strdup_printf(_(" Proftpd is not installed or not in your path.")); utf8 = g_locale_to_utf8(ver, strlen(ver), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->version_label), utf8); g_free(utf8); g_free(ver); /* Set status color */ gdk_color_parse("red", &color); gtk_widget_modify_fg(widgets->version_label, GTK_STATE_NORMAL, &color); } /* Used to determine what options to use with various versions of proftpd */ snprintf(global_version, 1000, "%s", version); free(version); } gadmin-proftpd-0.4.2/src/file_chooser.h0000644000000000000000000000222711513432313016526 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #ifndef get_dialog_path_selection_h #define get_dialog_path_selection_h /* Type can be DIR or FILE. Returns a path or NULL. Free with g_free() if not NULL. */ gchar *get_dialog_path_selection(gchar *type, gchar *initial_dir, gchar *initial_file); #endif gadmin-proftpd-0.4.2/src/create_file_tab.c0000644000000000000000000002015611513432312017150 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include "widgets.h" #include "gettext.h" #include "show_info.h" #include "create_file_tab.h" #include "populate_file_tab.h" #include "clear_file_tab.h" /* Wether or not to let the file section expand */ #define EXPAND_FILE_SECTION TRUE void generate_welcome_stats(struct w *widgets); void generate_html_stats(struct w *widgets); /* Generates ftp statistics as welcome.msg for each user */ void generate_welcome_stats(struct w *widgets) { FILE *fp; gchar *cmd, *info; cmd = g_strdup_printf("gprostats -w %s", WELCOME_MESSAGE); if((fp=popen(cmd, "r"))==NULL) { info = g_strdup_printf(_("Error running command: %s\n"), cmd); show_info(info); g_free(info); } else pclose(fp); g_free(cmd); } /* Generates ftp statistics as a html file */ void generate_html_stats(struct w *widgets) { FILE *fp; gchar *cmd, *info; cmd = g_strdup_printf(_("gprostats -html %s"), HTML_STATISTICS); if((fp=popen(cmd, "r"))==NULL) { info = g_strdup_printf(_("Error running command: %s\n"), cmd); show_info(info); g_free(info); } else pclose(fp); g_free(cmd); } void create_file_tab(struct w *widgets) { GtkCellRenderer *file_cell_renderer; GtkWidget *file_treeview_hbox; GtkWidget *file_scrolled_window; gchar *utf8=NULL; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* Create the file treeview in a scrolled window */ file_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox5), file_treeview_hbox, EXPAND_FILE_SECTION, TRUE, 0); file_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(file_treeview_hbox), file_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(file_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); widgets->file_store = gtk_list_store_new(6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); widgets->file_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->file_treeview), GTK_TREE_MODEL(widgets->file_store)); gtk_container_add(GTK_CONTAINER(file_scrolled_window), widgets->file_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->file_treeview), TRUE); /* Set the column labels in the treeview */ file_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *username_col = gtk_tree_view_column_new_with_attributes(_("Username"), file_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->file_treeview), GTK_TREE_VIEW_COLUMN(username_col)); GtkTreeViewColumn *action_col = gtk_tree_view_column_new_with_attributes(_("Action"), file_cell_renderer, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->file_treeview), GTK_TREE_VIEW_COLUMN(action_col)); GtkTreeViewColumn *bytes_col = gtk_tree_view_column_new_with_attributes(_("Bytes"), file_cell_renderer, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->file_treeview), GTK_TREE_VIEW_COLUMN(bytes_col)); GtkTreeViewColumn *filename_col = gtk_tree_view_column_new_with_attributes(_("Files"), file_cell_renderer, "text", 3, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->file_treeview), GTK_TREE_VIEW_COLUMN(filename_col)); GtkTreeViewColumn *hostname_col = gtk_tree_view_column_new_with_attributes(_("Client"), file_cell_renderer, "text", 4, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->file_treeview), GTK_TREE_VIEW_COLUMN(hostname_col)); GtkTreeViewColumn *sot_col = gtk_tree_view_column_new_with_attributes(_("Start of transfer"), file_cell_renderer, "text", 5, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->file_treeview), GTK_TREE_VIEW_COLUMN(sot_col)); /* The update and clear hbutton box */ GtkWidget *file_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox5), file_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(file_button_box), GTK_BUTTONBOX_SPREAD); /* Clear files button */ GtkWidget *clear_file_button = gtk_button_new_from_stock(GTK_STOCK_DELETE); gtk_box_pack_start(GTK_BOX(file_button_box), clear_file_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(clear_file_button), "clicked", G_CALLBACK(clear_file_tab), widgets); /* Update files button */ GtkWidget *update_file_button = gtk_button_new_from_stock(GTK_STOCK_REFRESH); gtk_box_pack_start(GTK_BOX(file_button_box), update_file_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(update_file_button), "clicked", G_CALLBACK(populate_files), widgets); /* The generate statistics hbutton box */ GtkWidget *gen_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox5), gen_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(gen_button_box), GTK_BUTTONBOX_SPREAD); /* Generate welcome.msg files in all users ftp root directories */ GtkWidget *genstats_button1 = gtk_button_new(); gtk_box_pack_start(GTK_BOX(gen_button_box), genstats_button1, FALSE, FALSE, 0); GtkWidget *genstats_alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(genstats_button1), genstats_alignment1); GtkWidget *genstats_hbox1 = gtk_hbox_new (FALSE, 2); gtk_container_add(GTK_CONTAINER(genstats_alignment1), genstats_hbox1); GtkWidget *genstats_image1 = gtk_image_new_from_stock("gtk-refresh", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(genstats_hbox1), genstats_image1, FALSE, FALSE, 0); GtkWidget *genstats_label1 = gtk_label_new_with_mnemonic(_("Generate welcome messages")); gtk_box_pack_start(GTK_BOX(genstats_hbox1), genstats_label1, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(genstats_label1), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(G_OBJECT(genstats_button1), "clicked", G_CALLBACK(generate_welcome_stats), widgets); /* Generate a ftp.htm file as /var/www/html/ftp.htm */ GtkWidget *genstats_button2 = gtk_button_new(); gtk_box_pack_start(GTK_BOX(gen_button_box), genstats_button2, FALSE, FALSE, 0); GtkWidget *genstats_alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(genstats_button2), genstats_alignment2); GtkWidget *genstats_hbox2 = gtk_hbox_new (FALSE, 2); gtk_container_add(GTK_CONTAINER(genstats_alignment2), genstats_hbox2); GtkWidget *genstats_image2 = gtk_image_new_from_stock("gtk-refresh", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(genstats_hbox2), genstats_image2, FALSE, FALSE, 0); GtkWidget *genstats_label2 = gtk_label_new_with_mnemonic(_("Generate html statistics")); gtk_box_pack_start(GTK_BOX(genstats_hbox2), genstats_label2, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(genstats_label2), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(G_OBJECT(genstats_button2), "clicked", G_CALLBACK(generate_html_stats), widgets); gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/populate_user_settings.c0000644000000000000000000004267411513432313020701 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include "gettext.h" #include "allocate.h" #include "widgets.h" #include "functions.h" #include "populate_user_settings.h" #include "chars_are_digits.h" #include "show_info.h" #include "populate_shell_combo.h" extern char global_server_address[1024]; extern char global_server_port[1024]; extern char global_server_name[1024]; extern char global_server_type[1024]; extern char global_user_name[1024]; extern int use_ratio; extern int use_quota; /* Move to header */ void set_toggle_values(char *new_buffer, GtkTreeIter iter, struct w *widgets); /* Set toggle values for each directory in the directory treeview */ void set_toggle_values(char *new_buffer, GtkTreeIter iter, struct w *widgets) { int x = 0; if( strstr(new_buffer, "LIST") || strstr(new_buffer, "NLST") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 1, 1, -1); if( strstr(new_buffer, "STOR") || strstr(new_buffer, "STOU") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 2, 1, -1); if( strstr(new_buffer, "APPE") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 3, 1, -1); if( strstr(new_buffer, "RETR") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 4, 1, -1); if( strstr(new_buffer, "RNFR") || strstr(new_buffer, "RNTO") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 5, 1, -1); if( strstr(new_buffer, "DELE") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 7, 1, -1); if( strstr(new_buffer, "MKD") || strstr(new_buffer, "XMKD") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 8, 1, -1); if( strstr(new_buffer, "RMD") || strstr(new_buffer, "XRMD") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 9, 1, -1); if( strstr(new_buffer, "SITE") ) /* dont match SITE_CHMOD or SITE_CHGRP */ { for(x=0; new_buffer[x]!='\0'; x++) { if( new_buffer[x]=='\0' || new_buffer[x+1]=='\0' || new_buffer[x+2]=='\0' || new_buffer[x+3]=='\0' || new_buffer[x+4]=='\0' ) break; if( new_buffer[x]=='S' && new_buffer[x+1]=='I' && new_buffer[x+2]=='T' && new_buffer[x+3]=='E' && new_buffer[x+4]==' ' ) { gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 10, 1, -1); break; } } } if( strstr(new_buffer, "SITE_CHMOD") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 11, 1, -1); if( strstr(new_buffer, "SITE_CHGRP") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 12, 1, -1); if( strstr(new_buffer, "MTDM") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 13, 1, -1); /* Show working directory. Cant strstr PWD for some reason ! */ if( strstr(new_buffer, "WD") ) /* PWD and XPWD */ { for(x=0; new_buffer[x]!='\0'; x++) { if( new_buffer[x]=='\0' || new_buffer[x+1]=='\0' || new_buffer[x+2]=='\0' ) break; if( new_buffer[x]=='P' && new_buffer[x+1]=='W' && new_buffer[x+2]=='D' ) { gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 14, 1, -1); break; } } } if( strstr(new_buffer, "SIZE") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 15, 1, -1); if( strstr(new_buffer, "STAT") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 16, 1, -1); if( strstr(new_buffer, "CWD") && strstr(new_buffer, "XCWD") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 17, 1, -1); if( strstr(new_buffer, "CDUP") && strstr(new_buffer, "XCUP") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 18, 1, -1); } void populate_user_settings(struct w *widgets) { FILE *fp; gchar *utf8=NULL; gchar *info; GtkTreeIter iter; char *new_buffer, *line, *user_buffer, *address_buffer; char *port_buffer, *spinval; char *fr, *frc, *br, *brc; /* Used for ratio settings */ long file_size; int found = 0, homedir_vals_set = 0, i = 0, x = 0; int stats_checked = 1; gint spinvalue = 0; gchar *username, *what, *val; /* Clear the directory treeview */ gtk_list_store_clear(GTK_LIST_STORE(widgets->directory_store)); username = g_strdup_printf("%s", global_user_name); /* Always set an empty password */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[1]), ""); /* Set all widget values to default if no user is selected */ info = g_strdup_printf("%s", global_user_name); if( info == NULL || strlen(info) < 1 ) { /* User */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[0]), ""); /* Password */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[1]), ""); /* Group */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[2]), ""); /* Comment */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[3]), ""); /* Shell */ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->user_set_combo[0]), 0); /* Require password */ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[1]), TRUE); /* Show user in statistics */ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[2]), TRUE); /* Max logins, set to 10 */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[0]), 10); /* Allow logins from */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[5]), "All"); /* Ratio defaults to disabled */ if( use_ratio ) { /* Byte ratio */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[1]), 0); /* Byte ratio credit */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[2]), 0); /* File ratio */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[3]), 0); /* File ratio credit */ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[4]), 0); } } g_free(info); if((fp=fopen(PROFTPD_CONF, "r"))==NULL) { info = g_strdup_printf(_("Error reading the configuration here:\n%s\n"), PROFTPD_CONF); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); line = allocate(file_size+1); new_buffer = allocate(file_size+1); user_buffer = allocate(4096); address_buffer = allocate(8192); port_buffer = allocate(8192); /* Set the banned checkbuttons state */ if( is_banned(global_user_name) ) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0]), TRUE); else gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0]), FALSE); /* Dont match a similar user */ snprintf(user_buffer, 4000, "User %s\n", global_user_name); if( strstr((char *)global_server_type, "Virtualhost") ) sprintf(address_buffer, "\n", global_server_address); else sprintf(address_buffer, global_server_address); sprintf(port_buffer, "Port %s\n", global_server_port); /* Scroll to the selected vhost */ if( strstr((char *)global_server_type, "Virtualhost") ) { if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { /* If its the correct address */ if( strcmp(line, address_buffer) == 0 ) { while(fgets(line, file_size, fp)!=NULL) { /* This server was not the right one */ if( strstr(line, "") ) break; if( strcmp(line, port_buffer) == 0 ) { found = 1; break; } } } if( found ) break; } } /* We have scrolled to a vhost or just began at the top */ found = 0; if( file_size > 1 ) while(fgets(line, file_size, fp)!=NULL) { /* Pick up all 4000 ) { info = g_strdup_printf(_("A line with over 4000 chars is not valid in:\n%s\n"), PROFTPD_CONF); show_info(info); fclose(fp); free(line); free(new_buffer); free(user_buffer); free(address_buffer); free(port_buffer); free(info); return; } /* We have found the correct user, insert its settings */ if( strcmp(line, user_buffer) == 0 && ! strstr(line, "AllowUser") && ! strstr(line, "DenyUser") && ! strstr(line, "FakeUser") ) { /* Insert the root directory to the directory treeview (collected in the loop above) */ new_buffer[strlen(new_buffer)-2]='\0'; utf8 = g_locale_to_utf8(&new_buffer[11], strlen(&new_buffer[11]), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->directory_store), &iter); gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 0, utf8, -1); /* Username on the line after (cant be set before root dir) */ sscanf(line, "%*s %s", new_buffer); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[0]), utf8); found = 1; /* Insert all the standard values like user, group etc */ while(fgets(line, file_size, fp)!=NULL) { if( strstr(line, "Group") && found ) { sscanf(line, "%*s %s", new_buffer); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[2]), utf8); } if( strstr(line, "AnonRequirePassword") && found ) { sscanf(line, "%*s %s", new_buffer); if( strstr(new_buffer, "off") ) /* cant use 'on' so this is reversed */ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[1]), FALSE); else gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[1]), TRUE); } if( strstr(line, "Allow from") && found ) { strcpy(new_buffer, line); for(i=0; new_buffer[i]!='\0'; i++) { if( i >= 2 && new_buffer[i-2]=='m' ) { new_buffer[strlen(new_buffer)-1]='\0'; utf8 = g_locale_to_utf8(&new_buffer[i], strlen(&new_buffer[i]), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[5]), utf8); break; } if( i > 1000 ) break; } } if( strstr(line, "MaxClients") && found ) { for(x=0; line[x]!='\0'; x++) { if( line[x]=='"' ) break; } x++; if( line[x]!='\0' ) sprintf(new_buffer, "%s", &line[x]); for(x=0; new_buffer[x]!='\0'; x++) { if( new_buffer[x]=='"' ) { new_buffer[x]='\0'; break; } } /* Max clients spinbutton */ spinval = allocate(4096); sscanf(line, "%*s %s", spinval); if( chars_are_digits(spinval) ) { spinvalue = atoi(spinval); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[0]), spinvalue); } free(spinval); } /* Ratio Module */ if( use_ratio && strstr(line, "UserRatio ") && found ) { /* Allocating all at once for clarity */ fr = allocate(4096); frc = allocate(4096); br = allocate(4096); brc = allocate(4096); /* Get the ratio numbers (file ratio, fileratio credit, byte ratio, byte ratio credit) */ sscanf(line, "%*s %*s %s %s %s %s", fr, frc, br, brc); /* Byte ratio spinbutton */ if( chars_are_digits(br) ) { spinvalue = atoi(br); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[1]), spinvalue); } free(br); /* Byte ratio credit spinbutton */ if( chars_are_digits(brc) ) { spinvalue = atoi(brc); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[2]), spinvalue); } free(brc); /* File ratio spinbutton */ if( chars_are_digits(fr) ) { spinvalue = atoi(fr); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[3]), spinvalue); } free(fr); /* File ratio credit spinbutton */ if( chars_are_digits(frc) ) { spinvalue = atoi(frc); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->user_set_spinbutton[4]), spinvalue); } free(frc); } /* AllowOverwite setting in the directory treeview for the root directory */ if( strstr(line, "AllowOverwrite on") ) gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 6, 1, -1); /* Append the Home directory values */ if( strstr(line, "= 2 && new_buffer[i-2]=='y' ) { new_buffer[strlen(new_buffer)-2]='\0'; utf8 = g_locale_to_utf8(&new_buffer[i], strlen(&new_buffer[i]), NULL, NULL, NULL); /* Append the directory */ gtk_list_store_append(GTK_LIST_STORE(widgets->directory_store), &iter); gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 0, utf8, -1); break; } if( i > 1000 ) break; } /* List settings for this directory */ while(fgets(line, file_size, fp)!=NULL) { if( strstr(line, "directory_store), &iter, 6, 1, -1); /* Save the allow limit line with the cmds */ if( strstr(line, "user_set_checkbutton[2]), TRUE); else gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[2]), FALSE); /* Get and insert the users comment */ what = g_strdup_printf("comment"); val = get_user_setting(username, what); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[3]), val); g_free(what); g_free(val); /* Get the users shell, itll be the selected shell in the combo */ what = g_strdup_printf("shell"); val = get_user_setting(username, what); g_free(what); /* Select the shell we just got in the shell combo box */ GtkListStore *shell_store; shell_store = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(widgets->user_set_combo[0]))); if( shell_store ) { GtkTreeIter shell_iter; gchar *shell; if( gtk_tree_model_get_iter_first(GTK_TREE_MODEL(shell_store), &shell_iter) ) { do { gtk_tree_model_get(GTK_TREE_MODEL(shell_store), &shell_iter, 0, &shell, -1); if( shell ) { if( strcmp(val, shell) == 0 ) { gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->user_set_combo[0]), &shell_iter); break; } g_free(shell); } } while(gtk_tree_model_iter_next(GTK_TREE_MODEL(shell_store), &shell_iter)); } } g_free(val); g_free(username); if( utf8!=NULL ) g_free(utf8); gtk_widget_show_all(widgets->main_window); } gadmin-proftpd-0.4.2/src/create_import_window.c0000644000000000000000000002432211513432312020303 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include #include #include #include "gettext.h" #include "widgets.h" #include "allocate.h" #include "functions.h" #include "import_functions.h" #include "create_import_window.h" extern gchar *GP_PASSWD_BUF; void create_import_window(struct w *widgets) { /* Create and populate the import window */ FILE *fp; int i; long conf_size; char *old_buffer, *new_buffer; GtkTreeIter iter; GtkTreeSelection *selection; gchar *utf8=NULL; gchar *username, *groupname; GtkTreeViewColumn *user_col, *group_col; GtkCellRenderer *import_cell_renderer; GtkWidget *import_vbox; GtkWidget *import_label0; GtkWidget *import_scrolledwindow; GtkWidget *label4; GtkWidget *import_hbox1; GtkWidget *import_label1; GtkWidget *import_hbox3; GtkWidget *import_label2; GtkWidget *import_hbox2; GtkWidget *import_label4; GtkWidget *spacer_label1; GtkWidget *import_hbuttonbox; GtkWidget *import_button; GtkWidget *alignment1; GtkWidget *hbox2; GtkWidget *image1; GtkWidget *label2; GtkWidget *import_cancel_button; GtkWidget *alignment2; GtkWidget *hbox3; GtkWidget *image2; GtkWidget *label3; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); widgets->import_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(widgets->import_window, 560, 350); gtk_window_set_title(GTK_WINDOW(widgets->import_window), _("Select any users you want to import")); gtk_window_set_position(GTK_WINDOW(widgets->import_window), GTK_WIN_POS_CENTER); import_vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(widgets->import_window), import_vbox); import_label0 = gtk_label_new(_("Import users to the selected server.")); gtk_box_pack_start(GTK_BOX(import_vbox), import_label0, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(import_label0), GTK_JUSTIFY_LEFT); gtk_misc_set_padding(GTK_MISC(import_label0), 0, 5); import_scrolledwindow = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(import_vbox), import_scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(import_scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); widgets->import_treeview = gtk_tree_view_new(); gtk_container_add(GTK_CONTAINER(import_scrolledwindow), widgets->import_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->import_treeview), TRUE); widgets->import_store = gtk_list_store_new(2, G_TYPE_STRING , G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->import_treeview), GTK_TREE_MODEL(widgets->import_store)); /* Set the column labels in the treeview */ import_cell_renderer = gtk_cell_renderer_text_new(); user_col = gtk_tree_view_column_new_with_attributes(_("Username"), import_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->import_treeview), GTK_TREE_VIEW_COLUMN(user_col)); group_col = gtk_tree_view_column_new_with_attributes(_("Groupname"), import_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->import_treeview), GTK_TREE_VIEW_COLUMN(group_col)); /* Selection is multiple */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->import_treeview)); gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_MULTIPLE); spacer_label1 = gtk_label_new(" "); gtk_box_pack_start(GTK_BOX(import_vbox), spacer_label1, FALSE, FALSE, 0); label4 = gtk_label_new(_("Selected users will be imported with the following settings:")); gtk_box_pack_start(GTK_BOX(import_vbox), label4, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label4), GTK_JUSTIFY_LEFT); import_hbox1 = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(import_vbox), import_hbox1, FALSE, FALSE, 0); import_label1 = gtk_label_new(_("FTP home directory:")); gtk_box_pack_start(GTK_BOX(import_hbox1), import_label1, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(import_label1), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC(import_label1), 0.02, 0.5); gtk_misc_set_padding(GTK_MISC(import_label1), 5, 10); widgets->import_home_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(import_hbox1), widgets->import_home_entry, TRUE, TRUE, 20); gtk_entry_set_text(GTK_ENTRY(widgets->import_home_entry), "/var/ftp"); import_hbox3 = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(import_vbox), import_hbox3, FALSE, FALSE, 0); import_label2 = gtk_label_new(_("Add users to private directories below the FTP home directory:")); gtk_box_pack_start(GTK_BOX(import_hbox3), import_label2, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(import_label2), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC(import_label2), 0.02, 0.5); gtk_misc_set_padding(GTK_MISC(import_label2), 5, 7); widgets->import_with_username_checkbutton = gtk_check_button_new_with_mnemonic(""); gtk_box_pack_start(GTK_BOX(import_hbox3), widgets->import_with_username_checkbutton, FALSE, FALSE, 0); import_hbox2 = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(import_vbox), import_hbox2, FALSE, FALSE, 0); import_label4 = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(import_vbox), import_label4, FALSE, FALSE, 0); gtk_widget_set_size_request(import_label4, -1, 16); gtk_label_set_justify(GTK_LABEL(import_label4), GTK_JUSTIFY_LEFT); import_hbuttonbox = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(import_vbox), import_hbuttonbox, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(import_hbuttonbox), GTK_BUTTONBOX_SPREAD); import_button = gtk_button_new(); gtk_container_add(GTK_CONTAINER(import_hbuttonbox), import_button); GTK_WIDGET_SET_FLAGS(import_button, GTK_CAN_DEFAULT); alignment1 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(import_button), alignment1); hbox2 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment1), hbox2); image1 = gtk_image_new_from_stock("gtk-yes", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(hbox2), image1, FALSE, FALSE, 0); label2 = gtk_label_new_with_mnemonic(_("Import")); gtk_box_pack_start(GTK_BOX (hbox2), label2, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label2), GTK_JUSTIFY_LEFT); import_cancel_button = gtk_button_new(); gtk_container_add(GTK_CONTAINER(import_hbuttonbox), import_cancel_button); GTK_WIDGET_SET_FLAGS(import_cancel_button, GTK_CAN_DEFAULT); alignment2 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(import_cancel_button), alignment2); hbox3 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment2), hbox3); image2 = gtk_image_new_from_stock("gtk-cancel", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(hbox3), image2, FALSE, FALSE, 0); label3 = gtk_label_new_with_mnemonic(_("Cancel")); gtk_box_pack_start(GTK_BOX(hbox3), label3, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label3), GTK_JUSTIFY_LEFT); // g_signal_connect((gpointer)widgets->import_namebased_checkbutton, "toggled", // G_CALLBACK(import_namebased_checkbutton_toggled), widgets); // g_signal_connect((gpointer)widgets->import_upload_checkbutton, "toggled", // G_CALLBACK(import_upload_checkbutton_toggled), widgets); g_signal_connect((gpointer)import_button, "clicked", G_CALLBACK(import_button_clicked), widgets); g_signal_connect_swapped((gpointer)import_cancel_button, "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(widgets->import_window)); gtk_widget_show_all(widgets->import_window); /* Populate the import treeview with users */ if((fp=fopen(GP_PASSWD_BUF, "r"))==NULL) { printf("Cant open passwd here:\n%s\n", GP_PASSWD_BUF); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size); new_buffer = allocate(8192); while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strlen(old_buffer) > 10 && strlen(old_buffer) < 4000 ) { for(i=0; old_buffer[i]!='\0'; i++) if( old_buffer[i]==':' ) break; strcpy(new_buffer, old_buffer); new_buffer[i]='\0'; /* Dont insert root or the user the server runs as */ if( !strcmp(new_buffer, "root") || !strcmp(new_buffer, SERVER_USER) ) continue; gtk_list_store_append(GTK_LIST_STORE(widgets->import_store), &iter); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->import_store), &iter, 0, utf8, -1); /* Get this users groupname */ username = g_strdup_printf("%s", new_buffer); groupname = get_user_setting(username, "group"); snprintf(new_buffer, 4000, "%s", groupname); utf8 = g_locale_to_utf8(new_buffer, strlen(new_buffer), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->import_store), &iter, 1, utf8, -1); g_free(username); g_free(groupname); } } fclose(fp); free(old_buffer); free(new_buffer); if( utf8 != NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/commented.h0000644000000000000000000000171611513432312016041 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef GSAMBAD_COMMENTED_H # define GSAMBAD_COMMENTED_H int commented(char *line); #endif gadmin-proftpd-0.4.2/src/Makefile.am0000644000000000000000000000655411513432313015757 0ustar rootroot## Process this file with automake to produce Makefile.in INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ sbin_PROGRAMS = gadmin-proftpd gprostats gadmin_proftpd_SOURCES = \ gadmin_proftpd.c gadmin_proftpd.h \ populate_gadmin_proftpd.c populate_gadmin_proftpd.h \ widgets.c widgets.h \ support.c support.h \ create_main_window.c create_main_window.h \ create_server_tab.c create_server_tab.h \ populate_servers.c populate_servers.h \ server_treeview_row_clicked.c server_treeview_row_clicked.h \ add_server.c add_server.h \ delete_server.c delete_server.h \ create_server_settings.c create_server_settings.h \ populate_server_settings.c populate_server_settings.h \ apply_server_settings.c apply_server_settings.h \ select_first_server.c select_first_server.h \ create_user_tab.c create_user_tab.h \ file_chooser.c file_chooser.h \ populate_users.c populate_users.h \ user_treeview_row_clicked.c user_treeview_row_clicked.h \ populate_shell_combo.c populate_shell_combo.h \ add_user.c add_user.h \ dir_treeview_funcs.c dir_treeview_funcs.h \ create_user_settings.c create_user_settings.h \ populate_user_settings.c populate_user_settings.h \ select_first_user.c select_first_user.h \ apply_user.c apply_user.h \ delete_user.c delete_user.h \ create_del_system_user_question.c create_del_system_user_question.h \ make_settings_entries.c make_settings_entries.h \ make_settings_combos.c make_settings_combos.h \ make_settings_spinbuttons.c make_settings_spinbuttons.h \ make_settings_buttons.c make_settings_buttons.h \ make_settings_checkbuttons.c make_settings_checkbuttons.h \ make_settings_progressbars.c make_settings_progressbars.h \ make_settings_labels.c make_settings_labels.h \ make_settings_hseparators.c make_settings_hseparators.h \ create_transfer_tab.c create_transfer_tab.h \ kick_button_clicked.c kick_button_clicked.h \ kick_ban_button_clicked.c kick_ban_button_clicked.h \ status_update.c status_update.h \ create_disc_tab.c create_disc_tab.h \ populate_disc_tab.c populate_disc_tab.h \ create_file_tab.c create_file_tab.h \ populate_file_tab.c populate_file_tab.h \ clear_file_tab.c clear_file_tab.h \ create_security_tab.c create_security_tab.h \ populate_security_tab.c populate_security_tab.h \ clear_security_tab.c clear_security_tab.h \ create_conf_tab.c create_conf_tab.h \ populate_conf_tab.c populate_conf_tab.h \ save_conf_tab.c save_conf_tab.h \ set_version.c set_version.h \ reread_conf.c reread_conf.h \ apply_button_clicked.c apply_button_clicked.h \ commands.c commands.h \ generate_cert.c generate_cert.h \ functions.c functions.h \ commented.c commented.h \ credits_window.c credits_window.h \ activate_button_clicked.c activate_button_clicked.h \ deactivate_button_clicked.c deactivate_button_clicked.h \ show_info.c show_info.h \ chars_are_digits.c chars_are_digits.h \ allocate.c allocate.h \ system_defines.c system_defines.h \ create_import_window.c create_import_window.h \ import_functions.c import_functions.h \ show_shutdown.c show_shutdown.h \ shutdown_ok_clicked.c shutdown_ok_clicked.h \ standard_conf.c standard_conf.h \ add_standard_users.c add_standard_users.h \ show_help.c show_help.h gprostats_SOURCES = \ gprostats.c \ chars_are_digits.c chars_are_digits.h \ allocate.c allocate.h gadmin_proftpd_LDADD = @PACKAGE_LIBS@ gadmin-proftpd-0.4.2/src/activate_button_clicked.h0000644000000000000000000000201211513432312020725 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef activate_button_clicked_H # define activate_button_clicked_H extern struct w *widgets; void activate_button_clicked(struct w *widgets); #endif gadmin-proftpd-0.4.2/src/make_settings_labels.c0000644000000000000000000000266111513432313020241 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "make_settings_labels.h" void make_3columns_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach) { GtkWidget *label; label = gtk_label_new(label_text); gtk_table_attach(table, label, left_attach, right_attach + 3, top_attach, bottom_attach, GTK_FILL, GTK_EXPAND, 5, 5); gtk_widget_show(label); } gadmin-proftpd-0.4.2/src/credits_window.c0000644000000000000000000001563711513432312017114 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "gettext.h" #include "credits_window.h" void show_credits() { gchar *credits; GtkWidget *credits_window; GtkWidget *credits_vbox; GtkWidget *credits_scrolledwindow; GtkWidget *credits_textview; GtkWidget *close_credits_button; GtkWidget *credits_alignment, *credits_hbox; GtkWidget *credits_image, *credits_label; credits_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(credits_window, 550, 350); gtk_window_set_title(GTK_WINDOW (credits_window), _("Credits")); gtk_window_set_position(GTK_WINDOW(credits_window), GTK_WIN_POS_CENTER); credits_vbox = gtk_vbox_new(FALSE, 0); gtk_widget_show(credits_vbox); gtk_container_add(GTK_CONTAINER(credits_window), credits_vbox); credits_scrolledwindow = gtk_scrolled_window_new(NULL, NULL); gtk_widget_show(credits_scrolledwindow); gtk_box_pack_start (GTK_BOX (credits_vbox), credits_scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (credits_scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (credits_scrolledwindow), GTK_SHADOW_ETCHED_OUT); credits_textview = gtk_text_view_new (); gtk_widget_set_name (credits_textview, "credits_textview"); gtk_widget_show (credits_textview); gtk_container_add (GTK_CONTAINER (credits_scrolledwindow), credits_textview); gtk_text_view_set_editable (GTK_TEXT_VIEW (credits_textview), FALSE); gtk_text_view_set_justification (GTK_TEXT_VIEW (credits_textview), GTK_JUSTIFY_CENTER); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (credits_textview), FALSE); gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (credits_textview), 4); gtk_text_view_set_left_margin (GTK_TEXT_VIEW (credits_textview), 29); credits = g_strconcat( "\n", _("Author: "), "Magnus Loef \n", "\n", _("I want to thank the following for their contributions:"), "\n-------------------------------------------------------------------------\n", _("The PROFTPD developers.\n\n"), "Rudolf Kastl ", _("for the RPM spec file."), "\n\n", _("And all translators:"), "\n-------------------------------------------------------------------------\n", _("Afrikaans"), " (af) NAME \n", _("Amharic"), " (am) NAME \n", _("Arabic"), " (ar) NAME \n", _("Azerbaijani"), " (az) NAME \n", _("Basque"), " (eu) NAME \n", _("Bulgarian"), " (bg) NAME \n", _("Breton"), " (br) NAME \n", _("Brittish-English"), " (en_GB) NAME \n", _("Bosnian"), " (bs) NAME \n", _("Byelorussian"), " (be) NAME \n", _("Catalan"), " (ca) NAME \n", _("Chinese"), " (zh_CN) Stanley Peng \n", _("Chinese-Taiwan"), " (zh_TW) NAME \n", _("Croatian"), " (hr) NAME \n", _("Czech"), " (cs) NAME \n", _("Danish"), " (dk) NAME \n", _("Dutch"), " (nl) NAME \n", _("Esperanto"), " (eo) NAME \n", _("Estonian"), " (et) NAME \n", _("Finnish"), " (fi) NAME \n", _("French"), " (fr) NAME \n", _("Galician"), " (gl) NAME \n", _("German"), " (de) Sebastian Schoss \n", _("Greek"), " (el) NAME \n", _("Hebrew"), " (he) NAME \n", _("Hini"), " (hi) NAME \n", _("Hungarian"), " (hu) NAME \n", _("Icelandic"), " (is) NAME \n", _("Indonesian"), " (id) NAME \n", _("Irish"), " (ga) NAME \n", _("Italian"), " (it) NAME \n", _("Japanese"), " (ja) NAME \n", _("Korean"), " (ko) NAME \n", _("Kurdish"), " (ku) NAME \n", _("Latvian-Lettish"), " (lv) NAME \n", _("Lithuanian"), " (lt) NAME \n", _("Macedonian"), " (mk) NAME \n", _("Maori"), " (mi) NAME \n", _("Macedonian"), " (mk) NAME \n", _("Maltese"), " (mt) NAME \n", _("Norwegian"), " (no) NAME \n", _("Polish"), " (pl) NAME \n", _("Portuguese"), " (pt) (pt_BR) NAME \n", _("Portuguese-Brazil"), " (pt_BR) NAME \n", _("Romanian"), " (ro) NAME \n", _("Russian"), " (ru) NAME \n", _("Serbian"), " (sr) NAME \n", _("Slovak"), " (sk) NAME \n", _("Slovenian"), " (sl) NAME \n", _("Spanish"), " (es) NAME \n", _("Swedish"), " (sv) Magnus Loef \n", _("Tamil"), " (ta) NAME \n", _("Thai"), " (th) NAME \n", _("Turkish"), " (tr) NAME \n", _("Traditional Chinese"), " (zh_TW) NAME \n", _("Ukrainian"), " (uk) NAME \n", _("Vietnamese"), " (vi) NAME \n", _("Wallon"), " (wa) NAME \n", _("Welch"), " (cy) NAME \n", "\n", NULL); gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (credits_textview)), credits, -1); if( credits!=NULL ) g_free(credits); close_credits_button = gtk_button_new (); gtk_widget_show (close_credits_button); gtk_box_pack_start (GTK_BOX (credits_vbox), close_credits_button, FALSE, FALSE, 0); credits_alignment = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (credits_alignment); gtk_container_add (GTK_CONTAINER (close_credits_button), credits_alignment); credits_hbox = gtk_hbox_new (FALSE, 2); gtk_widget_show (credits_hbox); gtk_container_add (GTK_CONTAINER (credits_alignment), credits_hbox); credits_image = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_BUTTON); gtk_widget_show (credits_image); gtk_box_pack_start (GTK_BOX (credits_hbox), credits_image, FALSE, FALSE, 0); credits_label = gtk_label_new_with_mnemonic (_("Close")); gtk_widget_show (credits_label); gtk_box_pack_start (GTK_BOX (credits_hbox), credits_label, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (credits_label), GTK_JUSTIFY_LEFT); g_signal_connect_swapped ((gpointer) close_credits_button, "clicked", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (credits_window)); gtk_widget_show(credits_window); } gadmin-proftpd-0.4.2/src/user_treeview_row_clicked.c0000644000000000000000000000427011513432313021315 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "populate_user_settings.h" extern char global_user_name[1024]; void user_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, gpointer data) { gchar *user; GtkTreeIter iter; GtkTreePath *path; GtkTreeModel *list_store; GtkTreeSelection *selection; /* The left button is pressed */ if( ! event->type == GDK_BUTTON_PRESS || ! event->button == 1 ) return; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); if( gtk_tree_selection_count_selected_rows(selection) <= 1 ) { /* Get the treepath for the row that was clicked */ if( gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), event->x, event->y, &path, NULL, NULL, NULL)) { gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); list_store = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(list_store, &iter, path); gtk_tree_model_get(list_store, &iter, 0, &user, -1); sprintf(global_user_name, "%s", (gchar *)user?user:"None"); g_free(user); gtk_tree_path_free(path); populate_user_settings(data); } } } gadmin-proftpd-0.4.2/src/populate_disc_tab.c0000644000000000000000000000632011513432313017537 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include "support.h" #include #include #include #include #include "allocate.h" #include "widgets.h" #include "populate_disc_tab.h" #include "show_info.h" // Hmm,,, this is an extern!!!!! #define MAX_READ_POPEN 16384 #define DISC_USAGE "df -hP | grep /" void populate_discs(struct w *widgets) { /* Lists discs in the disc treeview */ FILE *fp; GtkTreeIter iter; GtkTreePath *path; gboolean edit=0; int found = 0; gchar *utf8=NULL; char buf[MAX_READ_POPEN]=""; char mount[8192]="", free[1024]="", used[1024]="", total[1024]="", percent[1024]="", device[8192]=""; gtk_list_store_clear(widgets->disc_store); if((fp=popen(DISC_USAGE, "r"))==NULL) { printf("Error running command %s\n", DISC_USAGE); return; } fflush(fp); while(fgets(buf, MAX_READ_POPEN, fp)!=NULL) { sscanf(buf, "%s %s %s %s %s %s", device, total, used, free, percent, mount); gtk_list_store_append(GTK_LIST_STORE(widgets->disc_store), &iter); utf8 = g_locale_to_utf8(mount, strlen(mount), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->disc_store), &iter, 0, utf8, -1); utf8 = g_locale_to_utf8(free, strlen(free), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->disc_store), &iter, 1, utf8, -1); utf8 = g_locale_to_utf8(used, strlen(used), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->disc_store), &iter, 2, utf8, -1); utf8 = g_locale_to_utf8(total, strlen(total), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->disc_store), &iter, 3, utf8, -1); utf8 = g_locale_to_utf8(percent, strlen(percent), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->disc_store), &iter, 4, utf8, -1); utf8 = g_locale_to_utf8(device, strlen(device), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->disc_store), &iter, 5, utf8, -1); found = 1; } pclose(fp); if(utf8 !=NULL) g_free(utf8); /* Cant set treepath if there arent any discs/rows, then itll crash */ if( ! found ) return; path = gtk_tree_path_new_first(); gtk_tree_view_set_cursor(GTK_TREE_VIEW(widgets->disc_treeview), path, NULL, edit); gtk_tree_path_free(path); } gadmin-proftpd-0.4.2/src/commented.c0000644000000000000000000000267011513432312016034 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "commented.h" int commented(char *line) { int i, ret = 0; if( line!=NULL && strlen(line) > 0 ) { for(i=0; line[i]!='\0'; i++) { if( i > 9000 ) { ret = 1; break; } /* Skip whitespace */ if( line[i]==' ' || line[i]=='\t' ) continue; /* If the first char thats not whitespace is '#' or ';' then the line is commented out */ if( line[i]=='#' || line[i]==';' ) ret = 1; else ret = 0; break; } } return ret; } gadmin-proftpd-0.4.2/src/get_option_pos.h0000644000000000000000000000176711513432313017125 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef gadmin_proftpd_GET_OPTION_POS_H # define gadmin_proftpd_GET_OPTION_POS_H int get_option_pos(char *line, int optnum); #endif gadmin-proftpd-0.4.2/src/make_settings_progressbars.h0000644000000000000000000000323711513432313021520 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef make_settings_progressbars_H # define make_settings_progressbars_H GtkWidget *make_progressbar_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint bar_length); /* GtkWidget *make_short_combo_with_label(GtkTable *table, const gchar *label_text, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); */ GtkWidget *make_button(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint button_length); #endif gadmin-proftpd-0.4.2/src/create_user_tab.c0000644000000000000000000005062711513432312017215 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "widgets.h" #include "gettext.h" #include "functions.h" #include "create_user_tab.h" #include "user_treeview_row_clicked.h" #include "populate_shell_combo.h" #include "apply_user.h" #include "file_chooser.h" #define EXPAND_USER_SECTION FALSE #define EXPAND_USER_SETTINGS_SECTION TRUE void directory_cell_edited(GtkCellRendererText *cell, gchar *path_string, gchar *new_text, struct w *widgets) { /* Changes the edited directory cell text */ GtkTreeIter iter; GtkTreePath *path = NULL; path = gtk_tree_path_new_from_string(path_string); gtk_tree_model_get_iter(GTK_TREE_MODEL(widgets->directory_store), &iter, path); if( path!=NULL ) gtk_tree_path_free(path); gtk_list_store_set(GTK_LIST_STORE(widgets->directory_store), &iter, 0, new_text, -1); } void dir_toggle_button_clicked(GtkCellRendererToggle *cell, gchar *path, struct w *widgets) { GtkTreeIter iter; gboolean val; GtkTreeModel *model; GtkTreePath *treepath = NULL; int column = (int) g_object_get_data(G_OBJECT(cell), "column"); treepath = gtk_tree_path_new_from_string(path); gtk_tree_model_get_iter(GTK_TREE_MODEL(widgets->directory_store), &iter, treepath); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->directory_treeview)); gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, column, &val, -1); if( val ) gtk_list_store_set(widgets->directory_store, &iter, column, FALSE, -1); else gtk_list_store_set(widgets->directory_store, &iter, column, TRUE, -1); gtk_tree_path_free(treepath); } void add_directory(gchar *dir, struct w *widgets) { /* Adds a directory with default permissions to the directory treeview */ int i = 0; GtkTreeModel *model; GtkTreeIter iter; gchar *utf8 = NULL; gchar *dir_path; dir_path = g_strdup_printf("%s", dir); utf8 = g_locale_to_utf8(dir_path, strlen(dir_path), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->directory_store), &iter); gtk_list_store_set(widgets->directory_store, &iter, 0, utf8, -1); g_free(dir_path); /* Select a few default permissions for the directory */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->directory_treeview)); for(i=1; i<19; i++) { if( i==1 || i == 4 || i > 13 ) gtk_list_store_set(widgets->directory_store, &iter, i, TRUE, -1); } if( utf8!=NULL ) g_free(utf8); } void select_directory_clicked(struct w *widgets) { gchar *path = NULL; path = get_dialog_path_selection("DIR", "/var/ftp", "None"); if( path!=NULL ) { add_directory(path, widgets); g_free(path); } } void del_directory(struct w *widgets) { /* Deletes the selected directory if its not the one listed first (the home/root directory) */ GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; GtkTreePath *path; gint has_row_above; gboolean val; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->directory_treeview)); val = gtk_tree_selection_get_selected(GTK_TREE_SELECTION(selection), &model, &iter); path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &iter); has_row_above = gtk_tree_path_prev(path); /* A row is selected and its not the first one, remove it */ if( val && has_row_above ) gtk_list_store_remove(widgets->directory_store, &iter); gtk_tree_path_free(path); } void create_user_tab(struct w *widgets) { GtkCellRenderer *user_cell_renderer; GtkWidget *user_treeview_hbox, *user_settings_treeview_hbox; GtkWidget *user_scrolled_window, *directory_scrolled_window; GtkCellRenderer *toggle_cell_renderer[19]; GtkCellRenderer *dir_cell_renderer; GtkTreeViewColumn *col[19]; GtkWidget *frame; int i = 0, colnr = 0, cellnr = 0; gchar *utf8 = NULL; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* Create the userlist treeview in a scrolled window */ user_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox2), user_treeview_hbox, EXPAND_USER_SECTION, TRUE, 0); user_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(user_treeview_hbox), user_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(user_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(user_scrolled_window, -1, 100); widgets->user_store = gtk_list_store_new(7, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); widgets->user_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_MODEL(widgets->user_store)); gtk_container_add(GTK_CONTAINER(user_scrolled_window), widgets->user_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->user_treeview), TRUE); /* Set the column labels in the treeview */ user_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *user_col = gtk_tree_view_column_new_with_attributes(_("User"), user_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_VIEW_COLUMN(user_col)); GtkTreeViewColumn *group_col = gtk_tree_view_column_new_with_attributes(_("Group"), user_cell_renderer, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_VIEW_COLUMN(group_col)); GtkTreeViewColumn *comment_col = gtk_tree_view_column_new_with_attributes(_("Comment"), user_cell_renderer, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_VIEW_COLUMN(comment_col)); GtkTreeViewColumn *homedir_col = gtk_tree_view_column_new_with_attributes(_("Home directory"), user_cell_renderer, "text", 3, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_VIEW_COLUMN(homedir_col)); GtkTreeViewColumn *req_password_col = gtk_tree_view_column_new_with_attributes(_("Require password"), user_cell_renderer, "text", 4, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_VIEW_COLUMN(req_password_col)); GtkTreeViewColumn *banned_col = gtk_tree_view_column_new_with_attributes(_("Banned"), user_cell_renderer, "text", 5, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_VIEW_COLUMN(banned_col)); GtkTreeViewColumn *max_logins_col = gtk_tree_view_column_new_with_attributes(_("Maximum connections"), user_cell_renderer, "text", 6, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_VIEW_COLUMN(max_logins_col)); g_signal_connect((gpointer)widgets->user_treeview, "button_press_event", G_CALLBACK(user_treeview_row_clicked), widgets); /* The delete, new user and apply buttonbox */ widgets->user_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox2), widgets->user_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(widgets->user_button_box), GTK_BUTTONBOX_SPREAD); /* Create the user settings scrolled window with a frame and a table */ user_settings_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox2), user_settings_treeview_hbox, EXPAND_USER_SETTINGS_SECTION, TRUE, 0); widgets->user_settings_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(user_settings_treeview_hbox), widgets->user_settings_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widgets->user_settings_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(widgets->user_settings_scrolled_window, -1, 100); /* Add a vbox to the scrolled window */ widgets->user_settings_vbox = gtk_vbox_new(FALSE, 0); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(widgets->user_settings_scrolled_window), widgets->user_settings_vbox); /* Add a frame */ frame = gtk_frame_new(_("User settings and directories:")); /* A table with NUM settings and 2 columns */ widgets->usr_set_table = gtk_table_new(NUM_USERTAB_ENTRIES+NUM_USERTAB_SPINBUTTONS+NUM_USERTAB_CHECKBUTTONS+NUM_USERTAB_COMBOS, 2, FALSE); gtk_box_pack_start(GTK_BOX(widgets->user_settings_vbox), frame, TRUE, TRUE, 1); gtk_container_add(GTK_CONTAINER(frame), widgets->usr_set_table); /* Create the directory treeview in the user settings scrolled window */ directory_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(widgets->user_settings_vbox), directory_scrolled_window, FALSE, FALSE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(directory_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(directory_scrolled_window, -1, 100); /* Directory store with some columns... */ widgets->directory_store = gtk_list_store_new(19, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN); /* Create the directory treeeview and add it to the scrolled window */ widgets->directory_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_MODEL(widgets->directory_store)); gtk_container_add(GTK_CONTAINER(directory_scrolled_window), widgets->directory_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->directory_treeview), TRUE); /* Add the directory hbox */ GtkWidget *add_dir_hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(widgets->user_settings_vbox), add_dir_hbox, FALSE, FALSE, 0); /* Add directory button */ GtkWidget *add_directory_button = gtk_button_new(); gtk_box_pack_start(GTK_BOX(add_dir_hbox), add_directory_button, FALSE, FALSE, 0); gtk_tooltips_set_tip(tooltips, add_directory_button, _("Add a new directory."), NULL); GtkWidget *alignment62 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(add_directory_button), alignment62); GtkWidget *hbox60 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment62), hbox60); GtkWidget *image52 = gtk_image_new_from_stock("gtk-add", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(hbox60), image52, FALSE, FALSE, 0); GtkWidget *label230 = gtk_label_new_with_mnemonic(_("Add directory")); gtk_box_pack_start(GTK_BOX(hbox60), label230, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label230), GTK_JUSTIFY_LEFT); /* The add directory signal hookup */ g_signal_connect_swapped(add_directory_button, "clicked", G_CALLBACK(select_directory_clicked), widgets); /* Spacer label */ GtkWidget *label910 = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(add_dir_hbox), label910, FALSE, FALSE, 0); gtk_widget_set_size_request(label910, 20, -1); gtk_label_set_justify(GTK_LABEL(label910), GTK_JUSTIFY_LEFT); /* Delete directory button */ GtkWidget *del_directory_button = gtk_button_new(); gtk_box_pack_start(GTK_BOX(add_dir_hbox), del_directory_button, FALSE, FALSE, 0); gtk_tooltips_set_tip(tooltips, del_directory_button, _("Delete the selected directory."), NULL); GtkWidget *alignment64 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(del_directory_button), alignment64); GtkWidget *hbox64 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment64), hbox64); GtkWidget *image56 = gtk_image_new_from_stock("gtk-delete", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(hbox64), image56, FALSE, FALSE, 0); GtkWidget *label234 = gtk_label_new_with_mnemonic(_("Delete directory")); gtk_box_pack_start(GTK_BOX(hbox64), label234, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label234), GTK_JUSTIFY_LEFT); /* The delete directory signal hookup */ g_signal_connect_swapped(del_directory_button, "clicked", G_CALLBACK(del_directory), widgets); /* Spacer label */ GtkWidget *label340 = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(add_dir_hbox), label340, FALSE, FALSE, 0); gtk_widget_set_size_request(label340, 20, -1); gtk_label_set_justify(GTK_LABEL(label340), GTK_JUSTIFY_LEFT); /* A second apply button does the same as the one in the user frame */ /* GtkWidget *apply_directory_button = gtk_button_new(); gtk_box_pack_start(GTK_BOX(add_dir_hbox), apply_directory_button, FALSE, FALSE, 0); gtk_tooltips_set_tip(tooltips, apply_directory_button, _("Apply changes after adding directories and setting permissions."), NULL); GtkWidget *alignment68 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(apply_directory_button), alignment68); GtkWidget *hbox68 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment68), hbox68); GtkWidget *image58 = gtk_image_new_from_stock("gtk-refresh", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(hbox68), image58, FALSE, FALSE, 0); GtkWidget *label238 = gtk_label_new_with_mnemonic(_("Apply changes")); gtk_box_pack_start(GTK_BOX(hbox68), label238, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label238), GTK_JUSTIFY_LEFT); */ /* The second apply buttons signal hookup */ // g_signal_connect_swapped(apply_directory_button, "clicked", // G_CALLBACK(apply_user), widgets); /* Make the directory cell editable */ dir_cell_renderer = gtk_cell_renderer_text_new(); g_object_set(dir_cell_renderer, "editable", TRUE, NULL); g_signal_connect(dir_cell_renderer, "edited", G_CALLBACK(directory_cell_edited), widgets); /* Add callbacks for the toggle buttons and set data on the cells to column numbers */ for(i=0; i < 19; i++) { toggle_cell_renderer[i] = gtk_cell_renderer_toggle_new(); g_object_set(toggle_cell_renderer[i], "activatable", TRUE, NULL); g_object_set_data(G_OBJECT(toggle_cell_renderer[i]), "column", (void*)(i+1)); g_signal_connect(toggle_cell_renderer[i], "toggled", G_CALLBACK(dir_toggle_button_clicked), widgets); } colnr = 0; cellnr = 0; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Directory"), dir_cell_renderer, "text", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; /* Separate dir cell */ /* Limit commands, begins at colnr 1 and cells at 0 */ col[colnr] = gtk_tree_view_column_new_with_attributes(_("List"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Upload"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Append"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Download"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Rename"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Overwrite"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Delete"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Make directory"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Remove directory"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Site"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Chmod"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Change group"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Show dates"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Show working directory"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Show sizes"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Stat"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("Change working directory"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; col[colnr] = gtk_tree_view_column_new_with_attributes(_("CD up"), toggle_cell_renderer[cellnr], "active", colnr, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->directory_treeview), GTK_TREE_VIEW_COLUMN(col[colnr])); colnr++; cellnr++; gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-proftpd-0.4.2/src/reread_conf.c0000644000000000000000000000277711513432313016341 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "../config.h" #include #include #include #include #include #include "widgets.h" #include "gettext.h" #include "commands.h" extern int activated; void reread_conf(struct w *widgets) { /* Reread with a HUP and show any errors */ gchar *command, *test; if( ! activated ) return; command = g_strdup_printf("killall -1 %s", PROFTPD_BINARY); if( ! run_command(command) ) { printf("Restarting proftpd failed\n"); test = g_strdup_printf("killall -1 %s 2>&1", PROFTPD_BINARY); run_command_show_err(test); g_free(test); } g_free(command); } gadmin-proftpd-0.4.2/src/system_defines.c0000644000000000000000000000511511513432313017100 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ /* Several defines for different OSes. * Checking defaults to Linux macros. */ #include "../config.h" #ifdef USE_LINUX #define ADDUSER "useradd" #define DELUSER "userdel" #define ADDGROUP "groupadd" #define USERSHOME "/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_SUNOS #define ADDUSER "useradd" #define DELUSER "userdel" #define ADDGROUP "groupadd" #define USERSHOME "/opt/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_FREEBSD #define ADDUSER "pw useradd" #define DELUSER "pw userdel" #define ADDGROUP "pw groupadd" #define USERSHOME "/usr/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_OPENBSD #define ADDUSER "useradd" #define DELUSER "userdel" #define ADDGROUP "groupadd" #define USERSHOME "/usr/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_NETBSD #define ADDUSER "useradd" #define DELUSER "userdel" #define ADDGROUP "groupadd" #define USERSHOME "/usr/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_DARWIN #define ADDUSER "useradd" #define DELUSER "userdel" #define ADDGROUP "groupadd" #define USERSHOME "/Users/" #define DISC_USAGE "df -hP |grep /" #include "osx_functions.c" #elif defined USE_AIX #define ADDUSER "useradd" #define DELUSER "userdel" #define ADDGROUP "groupadd" #define USERSHOME "/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_HPUX #define ADDUSER "useradd" #define DELUSER "userdel" #define ADDGROUP "groupadd" #define USERSHOME "/home/" #define DISC_USAGE "df -hP |grep /" #else /* Default macros */ #define ADDUSER "useradd" #define DELUSER "userdel" #define ADDGROUP "groupadd" #define USERSHOME "/home/" #define DISC_USAGE "df -hP |grep /" #endif gadmin-proftpd-0.4.2/src/show_shutdown.c0000644000000000000000000002230611513432313016773 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include "../config.h" #include "support.h" #include "gettext.h" #include "widgets.h" #include "shutdown_ok_clicked.h" void show_shutdown(struct w *widgets) { GtkWidget *shutdown_ok_button, *shutdown_cancel_button; GtkWidget *hseparator35, *hbox134, *label146; GtkWidget *label251, *vbox17, *label141; GtkWidget *hbox78, *label142; GtkWidget *hbox79, *label145, *label144; GtkWidget *label148, *hbox81, *label147; GtkWidget *label152, *image36, *label153; GtkWidget *hseparator49, *label252, *hseparator34; GtkWidget *alignment37, *hbox83, *image37; GtkWidget *label154, *hbuttonbox9; GtkWidget *alignment36, *hbox82; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); widgets->shutdown_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width(GTK_CONTAINER(widgets->shutdown_window), 5); gtk_window_set_title(GTK_WINDOW(widgets->shutdown_window), _("Shutdown")); gtk_window_set_position(GTK_WINDOW(widgets->shutdown_window), GTK_WIN_POS_CENTER); vbox17 = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(widgets->shutdown_window), vbox17); label141 = gtk_label_new(_("The server will shut down according to these settings.")); gtk_box_pack_start(GTK_BOX(vbox17), label141, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label141), GTK_JUSTIFY_LEFT); hseparator35 = gtk_hseparator_new(); gtk_widget_set_name(hseparator35, "hseparator35"); gtk_widget_show(hseparator35); gtk_box_pack_start(GTK_BOX(vbox17), hseparator35, TRUE, TRUE, 0); gtk_widget_set_size_request(hseparator35, -1, 5); hbox134 = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox17), hbox134, TRUE, TRUE, 0); label146 = gtk_label_new(_("Time to real shutdown:")); gtk_box_pack_start(GTK_BOX (hbox134), label146, FALSE, FALSE, 0); gtk_widget_set_size_request(label146, 260, -1); gtk_label_set_justify(GTK_LABEL(label146), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC(label146), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label146), 10, 0); widgets->real_shutdown_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(hbox134), widgets->real_shutdown_entry, FALSE, FALSE, 0); gtk_tooltips_set_tip(tooltips, widgets->real_shutdown_entry, _("now, +Minutes or HHMM"), NULL); gtk_entry_set_max_length(GTK_ENTRY(widgets->real_shutdown_entry), 1000); gtk_entry_set_text(GTK_ENTRY(widgets->real_shutdown_entry), "+30"); label251 = gtk_label_new(""); gtk_widget_set_name(label251, "label251"); gtk_widget_show(label251); gtk_box_pack_start(GTK_BOX(hbox134), label251, FALSE, FALSE, 0); gtk_widget_set_size_request(label251, 80, 16); gtk_label_set_justify(GTK_LABEL(label251), GTK_JUSTIFY_LEFT); hbox78 = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox17), hbox78, TRUE, TRUE, 0); label142 = gtk_label_new(_("New access disabled:")); gtk_box_pack_start(GTK_BOX(hbox78), label142, FALSE, FALSE, 0); gtk_widget_set_size_request(label142, 260, -1); gtk_label_set_justify(GTK_LABEL(label142), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC(label142), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label142), 10, 0); widgets->new_acc_disabled_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(hbox78), widgets->new_acc_disabled_entry, FALSE, FALSE, 0); gtk_tooltips_set_tip(tooltips, widgets->new_acc_disabled_entry, _("Minutes before real shutdown."), NULL); gtk_entry_set_max_length(GTK_ENTRY(widgets->new_acc_disabled_entry), 1000); gtk_entry_set_text(GTK_ENTRY(widgets->new_acc_disabled_entry), "20"); label144 = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(hbox78), label144, FALSE, FALSE, 0); gtk_widget_set_size_request(label144, 80, 16); gtk_label_set_justify(GTK_LABEL(label144), GTK_JUSTIFY_LEFT); hbox79 = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox17), hbox79, TRUE, TRUE, 0); label145 = gtk_label_new(_("Existing users disconnected:")); gtk_box_pack_start(GTK_BOX(hbox79), label145, FALSE, FALSE, 0); gtk_widget_set_size_request(label145, 260, -1); gtk_label_set_justify(GTK_LABEL(label145), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC(label145), 0, 0.5); gtk_misc_set_padding(GTK_MISC(label145), 10, 0); widgets->existing_users_dc_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(hbox79), widgets->existing_users_dc_entry, FALSE, FALSE, 0); gtk_tooltips_set_tip(tooltips, widgets->existing_users_dc_entry, _("Minutes before real shutdown."), NULL); gtk_entry_set_max_length(GTK_ENTRY(widgets->existing_users_dc_entry), 1000); gtk_entry_set_text(GTK_ENTRY(widgets->existing_users_dc_entry), "10"); label148 = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(hbox79), label148, FALSE, FALSE, 0); gtk_widget_set_size_request(label148, 80, 16); gtk_label_set_justify(GTK_LABEL(label148), GTK_JUSTIFY_LEFT); hbox81 = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox17), hbox81, TRUE, TRUE, 0); label147 = gtk_label_new(_("Shutdown message:")); gtk_box_pack_start(GTK_BOX(hbox81), label147, FALSE, FALSE, 0); gtk_widget_set_size_request(label147, 180, -1); gtk_label_set_justify(GTK_LABEL(label147), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC(label147), 0.01, 0.5); gtk_misc_set_padding(GTK_MISC(label147), 10, 0); widgets->shutdown_msg_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(hbox81), widgets->shutdown_msg_entry, TRUE, TRUE, 0); gtk_entry_set_max_length(GTK_ENTRY(widgets->shutdown_msg_entry), 1000); gtk_entry_set_text(GTK_ENTRY(widgets->shutdown_msg_entry), _("%s , Current connections will be dropped: %d")); label152 = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(hbox81), label152, FALSE, FALSE, 0); gtk_widget_set_size_request(label152, 10, 16); gtk_label_set_justify(GTK_LABEL(label152), GTK_JUSTIFY_LEFT); hseparator49 = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(vbox17), hseparator49, TRUE, TRUE, 0); gtk_widget_set_size_request(hseparator49, -1, 10); label252 = gtk_label_new(_("Pressing the activate button will cancel the shutdown and let users login again.")); gtk_box_pack_start(GTK_BOX(vbox17), label252, FALSE, FALSE, 0); gtk_widget_set_size_request(label252, 297, -1); gtk_label_set_justify(GTK_LABEL(label252), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC(label252), 0.04, 0.5); hseparator34 = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(vbox17), hseparator34, TRUE, TRUE, 0); gtk_widget_set_size_request(hseparator34, -1, 10); hbuttonbox9 = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(vbox17), hbuttonbox9, TRUE, TRUE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox9), GTK_BUTTONBOX_SPREAD); shutdown_cancel_button = gtk_button_new(); gtk_container_add(GTK_CONTAINER(hbuttonbox9), shutdown_cancel_button); GTK_WIDGET_SET_FLAGS(shutdown_cancel_button, GTK_CAN_DEFAULT); alignment37 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(shutdown_cancel_button), alignment37); hbox83 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment37), hbox83); image37 = gtk_image_new_from_stock("gtk-cancel", GTK_ICON_SIZE_BUTTON); gtk_widget_set_name(image37, "image37"); gtk_widget_show(image37); gtk_box_pack_start(GTK_BOX(hbox83), image37, TRUE, TRUE, 0); label154 = gtk_label_new_with_mnemonic(_("Cancel")); gtk_box_pack_start(GTK_BOX(hbox83), label154, TRUE, TRUE, 0); gtk_label_set_justify(GTK_LABEL(label154), GTK_JUSTIFY_LEFT); shutdown_ok_button = gtk_button_new(); gtk_container_add(GTK_CONTAINER(hbuttonbox9), shutdown_ok_button); GTK_WIDGET_SET_FLAGS(shutdown_ok_button, GTK_CAN_DEFAULT); alignment36 = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(shutdown_ok_button), alignment36); hbox82 = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(alignment36), hbox82); image36 = gtk_image_new_from_stock("gtk-apply", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(hbox82), image36, TRUE, TRUE, 0); label153 = gtk_label_new_with_mnemonic(_("OK")); gtk_box_pack_start(GTK_BOX(hbox82), label153, TRUE, TRUE, 0); gtk_label_set_justify(GTK_LABEL(label153), GTK_JUSTIFY_LEFT); g_signal_connect_swapped(shutdown_cancel_button, "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(widgets->shutdown_window)); g_signal_connect_swapped(shutdown_ok_button, "clicked", G_CALLBACK(shutdown_ok_clicked), widgets); gtk_widget_show_all(widgets->shutdown_window); } gadmin-proftpd-0.4.2/src/show_help.h0000644000000000000000000000166211513432313016057 0ustar rootroot/* GADMIN-PROFTPD - An easy to use GTK+ frontend for the ProFTPD standalone server. * Copyright (C) 2001 - 2011 Magnus Loef * * 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 3 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef show_help_H # define show_help_H void show_help(); #endif gadmin-proftpd-0.4.2/README0000644000076400007640000000036111220261457014260 0ustar mangemangeAdditional Required packages: ----------------------------- gtk+ >= 2.0 proftpd >= 1.3.0 openssl (If proftpd has been built with mod_tls or as a module) I hope you like it. Send bugreports, comments or questions to magnus-swe@telia.com gadmin-proftpd-0.4.2/MAKE_RPM0000755000076400007640000000031411566003036014557 0ustar mangemange#!/bin/sh # Make a Redhat RPM. version='0.4.2' cd .. tar -zhcvf /root/rpmbuild/SOURCES/gadmin-proftpd-$version.tar.gz gadmin-proftpd-$version cd gadmin-proftpd-$version rpmbuild -ba gadmin-proftpd.spec gadmin-proftpd-0.4.2/config.h.in0000644000000000000000000000707311566003223015156 0ustar rootroot/* config.h.in. Generated from configure.in by autoheader. */ /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Path to the ftpwho binary */ #undef FTPWHO_BINARY /* needed for gettext... */ #undef GETTEXT_PACKAGE /* application config dir */ #undef GP_APPCONFDIR /* path to ftpusers */ #undef GP_FTPUSERS /* path to group */ #undef GP_GROUP /* path to gshadow */ #undef GP_GSHADOW /* path to passwd */ #undef GP_PASSWD /* path to shadow */ #undef GP_SHADOW /* path to shells */ #undef GP_SHELLS /* path to shutmsg */ #undef GP_SHUTMSG /* var dir */ #undef GP_VARDIR /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define for linking with -lcrypt */ #undef HAVE_CRYPT /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* path to generated html statistics */ #undef HTML_STATISTICS /* The minimum accepted password length. */ #undef MIN_PASS_LEN /* 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 home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Path to the proc filesystem */ #undef PROC_PATH /* Path to the proftpd binary */ #undef PROFTPD_BINARY /* path to proftpd.conf */ #undef PROFTPD_CONF /* Path to backup proftpd.conf */ #undef PROFTPD_CONF_BACKUP /* path to the systems security log */ #undef SECURE_LOG /* The server runs as this group */ #undef SERVER_GROUP /* The server runs as this user */ #undef SERVER_USER /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Command for making the server start at boot */ #undef SYSINIT_START_CMD /* Command for not making the server start at boot */ #undef SYSINIT_STOP_CMD /* using aix macros... */ #undef USE_AIX /* using darwin macros... */ #undef USE_DARWIN /* using freebsd macros... */ #undef USE_FREEBSD /* using hpux macros... */ #undef USE_HPUX /* using Linux macros... */ #undef USE_LINUX /* using netbsd macros... */ #undef USE_NETBSD /* using openbsd macros... */ #undef USE_OPENBSD /* using sunos macros... */ #undef USE_SUNOS /* Version number of package */ #undef VERSION /* Name of generated welcome messages */ #undef WELCOME_MESSAGE /* path to proftpds xferlog */ #undef XFER_LOG gadmin-proftpd-0.4.2/missing0000755000076400007640000002403607521233631015006 0ustar mangemange#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, 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 case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -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]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' 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' is missing on your system. 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 missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # 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 you do not seem to have it handy on your system. 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 prerequirements 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 gadmin-proftpd-0.4.2/gadmin-proftpd.spec0000644000000000000000000000670111566003167016726 0ustar rootroot%define desktop_vendor newrpms %{!?_dist: %{expand: %%define dist rhfc14}} Summary: GADMIN-ProFTPD -- A GTK+ administation tool for the ProFTPD server. Name: gadmin-proftpd Version: 0.4.2 Release: 0.1.%{dist}.nr License: GPL Group: Applications/System URL: http://mange.dynalias.org/linux.html Source0: http://mange.dynalias.org/linux/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_builddir}/%{name}-%{version}-root Provides: gadmin-proftpd gprostats %description GADMIN-ProFTPD is a fast and easy to use GTK+ administration tool for the proftpd standalone server. %prep %setup -q %configure SYSINIT_START_CMD="chkconfig proftpd on" SYSINIT_STOP_CMD="chkconfig proftpd off" %build %{__make} %install rm -rf $RPM_BUILD_ROOT %makeinstall INSTALL_USER=`id -un` INSTALL_GROUP=`id -gn` # pam auth install -d %{buildroot}%{_sysconfdir}/pam.d/ install -d %{buildroot}%{_sysconfdir}/security/console.apps install -m 644 etc/pam.d/%{name} %{buildroot}%{_sysconfdir}/pam.d/%{name} install -m 644 etc/security/console.apps/%{name} %{buildroot}%{_sysconfdir}/security/console.apps/%{name} # desktop entry install -d %{buildroot}%{_datadir}/applications install -m 644 desktop/gadmin-proftpd.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop # doc files.. install -d %{buildroot}%{_datadir}/doc/%{name} install -m 644 README COPYING AUTHORS ChangeLog %{buildroot}%{_datadir}/doc/%{name} %find_lang %name %post if test ! -h %{_bindir}/gadmin-proftpd ; then \ ln -s %{_bindir}/consolehelper %{_bindir}/gadmin-proftpd ; \ fi; %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(0755, root, root) %{_sbindir}/%{name} %{_sbindir}/gprostats %defattr(0644, root, root) #%doc COPYING AUTHORS ChangeLog %{_datadir}/doc/%{name}/README %{_datadir}/doc/%{name}/COPYING %{_datadir}/doc/%{name}/AUTHORS %{_datadir}/doc/%{name}/ChangeLog %{_sysconfdir}/pam.d/%{name} %{_sysconfdir}/security/console.apps/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/*.png %dir %{_datadir}/pixmaps/%{name} %{_datadir}/pixmaps/%{name}/*.png %{_datadir}/pixmaps/%{name}/%{name}36.xpm %changelog * Sat May 21 2011 Magnus-swe - Dont add ratio directives if the ratio module is loaded - but ratios arent turned on in the global settings. * Sat Jan 15 2011 Magnus-swe - Module detection improvement. * Wed Mar 17 2010 Magnus-swe - Better handling of directories with spaces and - the AllowOverwrite option. * Thu Feb 11 2010 Magnus-swe - Adds TLS option: - TLSOptions AllowClientRenegotiations * Fri Aug 28 2009 Magnus-swe - Removes the global apply and directory apply buttons. - Combines "add user" and "apply user" buttons. - Adds more information about adding new users. - Sets missing version color. - Swedish translation update. * Wed Jul 22 2009 Magnus-swe - Adds a new user button. - Status is shown in red or green. * Sat Jun 20 2009 Magnus-swe - Adds support for dynamically loaded modules. * Thu Oct 15 2008 Magnus-swe - Adds a new Swedish translation. - Configuration backup, restore and auto backup. * Thu Oct 09 2008 Magnus-swe - Fixed the way it populates and mod_tls handling. * Thu Sep 25 2008 Magnus-swe - Fixed certificates validity days. * Wed Jun 18 2008 Magnus-swe - Added signed certificate creation and explicit encryption. gadmin-proftpd-0.4.2/config.sub0000755000076400007640000006710007615210750015372 0ustar mangemange#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-09-07' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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. # 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. # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dsp16xx \ | fr30 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | m32r | m68000 | m68k | m88k | mcore \ | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el | mips64vr4300 \ | mips64vr4300el | mips64vr5000 | mips64vr5000el \ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ | mipsisa32 \ | mn10200 | mn10300 \ | ns16k | ns32k \ | openrisc \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | s390 | s390x \ | sh | sh[34] | sh[34]eb | shbe | shle \ | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ | stormy16 | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 \ | we32k \ | x86 | xscale \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alphapca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armv*-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c54x-* \ | clipper-* | cray2-* | cydra-* \ | d10v-* | d30v-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | m32r-* \ | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | s390-* | s390x-* \ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ | v850-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [cjt]90) basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; windows32) basic_machine=i386-pc os=-windows32-msvcrt ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh3eb | sh4eb) basic_machine=sh-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gadmin-proftpd-0.4.2/aclocal.m40000644000000000000000000015646011566003221014776 0ustar rootroot# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],, [m4_warning([this file was generated for autoconf 2.66. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can 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. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.ac. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_ac,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT]) ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .]) ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file 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. # serial 4 # This was merged into AC_PROG_CC in Autoconf. AU_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when you adjust the code. You can also remove the above call to AC_PROG_CC if you already called it elsewhere.]) am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ]) AU_DEFUN([fp_PROG_CC_STDC]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file 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. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file 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. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file 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. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file 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. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file 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. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR gadmin-proftpd-0.4.2/ChangeLog0000644000076400007640000000712511566005616015165 0ustar mangemangeVersion 0.4.2 -------------------------------------------------------- Dont add ratio directives if the ratio module is loaded but ratios arent turned on in the global settings. Version 0.4.1 -------------------------------------------------------- Module detection improvement. Version 0.4.0 -------------------------------------------------------- Better handling of directories with spaces and the AllowOverwrite option. Added option DisplayChdir. -------- Possible bug found -------- PRoFTPD doesnt seem to show DisplayLogin messages if they are located in a directory with spaces, like this: Version 0.3.9 -------------------------------------------------------- Added this TLS option to make filezilla work again: TLSOptions AllowClientRenegotiations Version 0.3.8 -------------------------------------------------------- Removes the global apply and directory apply buttons. Combines "add user" and "apply user" buttons. Adds more information about adding new users. Sets missing version color. Swedish translation update. Version 0.3.7 -------------------------------------------------------- Added a "New user" button. Status is shown in red or green. Swedish translation update. Fixes array comparizon warnings. Version 0.3.6 -------------------------------------------------------- Adds support for included configurations. Adds support for dynamically loaded modules. Virtual user management fixes. Adds better default install instructions. Version 0.3.5 -------------------------------------------------------- Added a new and complete Swedish translation. Added automatic configuration backups for new versions. Adds more buttons to the configuration tab that can backup or restore a previous backup or revert to a standard configuration. Doesnt show the configuration question again if the answer is no. Added more checks for invalid configuration settings such as line length checks, DefaultRoot and UserAlias options. Version 0.3.4 -------------------------------------------------------- Only require generation of certificates before start if the use secure FTP combo does not show "off". QA for SSL enabled vs non SSL enabled servers and user ratios. Version 0.3.3 -------------------------------------------------------- Adds vhosts with localhost as the address. Adds new vhosts with RequireValidShell off. Fixes various population issues. Now only uses SSLv23 (removed TLSv1) Fixes certificate entry insertions when no encryption is used. Added a certificate check before server start. Version 0.3.2 -------------------------------------------------------- Fixed vhost certificate paths and options. Version 0.3.1 -------------------------------------------------------- Fixed valid days selection for generated certificates. (Admins should regenerate certificates) Version 0.3.0 -------------------------------------------------------- Added optional virtual user management that automatically adds AuthPAM off module setting. A new treeview was added to the transfer tab. Toggle button callbacks and columns for directories where combined. Code cleanup and bugfixes. Version 0.2.9 -------------------------------------------------------- Added a new FTP directory selector. Fixed a static module listing command. Signed certificate handling was added. Now handles explicit encryption. Using: "auth+data" instead of "On" for option "TLSRequired". Added options: TLSRSACertificateKeyFile, TLSCACertificateFile and "TLSRenegotiate required off". Removed gprotls.conf and example .pem-file. Moved "#GP_" settings to new settings.conf. Automatically substitutes TLS module configuration. gadmin-proftpd-0.4.2/depcomp0000755000076400007640000002753307521233631014771 0ustar mangemange#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, 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 . 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 # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi 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. 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. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # 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" ;; 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 tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab 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 proprocessed 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'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used 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 "$@" -o /dev/null $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 $? # 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 ;; -*) ;; *) 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 proprocessed 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 '/^# [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 proprocessed 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 gadmin-proftpd-0.4.2/AUTHORS0000644000076400007640000000004310473146636014457 0ustar mangemangeMagnus Loef gadmin-proftpd-0.4.2/install-sh0000755000076400007640000001270107521233631015407 0ustar mangemange#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # 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}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # 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 $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 gadmin-proftpd-0.4.2/INSTALL0000644000076400007640000000163410757353411014443 0ustar mangemange Installation instructions: ---------------------------------- This package cant be installed without giving the correct configure options. For any GNU/Linux system following the FHS the proper options could be: ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/sbin (See the Autoinstall file for more options and src/system_defines.c if you are porting) After the configure stage has completed with no errors its time to compile the source: make The final stage, installing the program and its datafiles: make install Currently gadmin-proftpd has support for the following systems to a varying degree: Linux FreeBSD OpenBSD NetBSD Darwin Mac OSX AIX HP-UX Solaris SunOS If gadmin-proftpd doesnt work flawlessly on your system and you know how to correct it then send a mail explaining how to this in detail, preferrably with a patch to: magnus-swe@telia.com gadmin-proftpd-0.4.2/po/0000755000076400007640000000000011566007413014021 5ustar mangemangegadmin-proftpd-0.4.2/po/POTFILES0000644000000000000000000000011711566007233014716 0ustar rootroot ../src/main.c \ ../src/interface.c \ ../src/callbacks.c \ ../src/support.c gadmin-proftpd-0.4.2/po/POTFILES.in0000644000076400007640000000016207626723212015601 0ustar mangemange# List of source files containing translatable strings. src/main.c src/interface.c src/callbacks.c src/support.c gadmin-proftpd-0.4.2/po/translation_howto.sh0000755000000000000000000000176511075411305017667 0ustar rootroot#!/bin/bash # Howto translate the program to your own language: # Run this command first to make the initial template. xgettext --no-location -k_:1 -kN_:1 -o gadmin-proftpd.pot ../src/*.c # Copy the resulting gadmin-proftpd.pot as yourlang.po in the current directory. # General information: # Try to make the translated lines about as long as the english lines # (on some places it might otherwise expand the application too much). # You dont have to translate all the country names from the credits dialog # if you dont want to. # Now translate yourlang.po in utf-8 with gedit or so and # set it to the correct language, charcode and email in the .po file. # (All the upper case names should be changed). # If you have written the translation in gedit (utf8) .. then use # CHARCODE=utf-8 # Now add your language to ALL_LINGUAS="sv en dk" in configure.in then # run autoconf. # Install the program by using ./Autoinstall and check the result. # If the result looks good then send me the .po file. gadmin-proftpd-0.4.2/po/Makefile.in0000644000000000000000000001774411566007234015632 0ustar rootroot# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # 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 to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = gadmin-proftpd PACKAGE = gadmin-proftpd VERSION = 0.4.2 SHELL = /bin/sh srcdir = . top_srcdir = .. prefix = /usr exec_prefix = ${prefix} datarootdir = ${prefix}/share datadir = ${datarootdir} libdir = ${exec_prefix}/lib localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po INSTALL = /bin/install -c INSTALL_DATA = ${INSTALL} -m 644 MKINSTALLDIRS = $(top_srcdir)/./mkinstalldirs CC = gcc GENCAT = @GENCAT@ GMSGFMT = /usr/bin/msgfmt MSGFMT = /usr/bin/msgfmt MSGFMT_OPTS = -c XGETTEXT = /usr/bin/xgettext MSGMERGE = msgmerge DEFS = -DHAVE_CONFIG_H CFLAGS = -g -O2 -Wall CPPFLAGS = INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = sv.po fr.po es.po zh_CN.po GMOFILES = sv.gmo fr.gmo es.gmo zh_CN.gmo DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = sv.gmo fr.gmo es.gmo zh_CN.gmo CATOBJEXT = .gmo INSTOBJEXT = .mo .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-yes all-yes: $(CATALOGS) all-no: $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --flag=g_strdup_printf:1:c-format \ --flag=g_string_printf:2:c-format \ --flag=g_string_append_printf:2:c-format \ --flag=g_error_new:3:c-format \ --flag=g_set_error:4:c-format \ --flag=g_markup_printf_escaped:1:c-format \ --flag=g_log:3:c-format \ --flag=g_print:1:c-format \ --flag=g_printerr:1:c-format \ --flag=g_printf:1:c-format \ --flag=g_fprintf:2:c-format \ --flag=g_sprintf:2:c-format \ --flag=g_snprintf:3:c-format \ --flag=g_scanner_error:2:c-format \ --flag=g_scanner_warn:2:c-format \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(GETTEXT_PACKAGE).po \ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-yes install-data-no: all install-data-yes: all if test -r "$(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 -r "$(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 -r "$(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 dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m 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 $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: update-po $(DISTFILES) dists="$(DISTFILES)"; \ 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`; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$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 ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ 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: gadmin-proftpd-0.4.2/po/zh_CN.po0000644000076400007640000012141110204251121015343 0ustar mangemange# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-02-03 15:26+0800\n" "PO-Revision-Date: 2005-02-03 16:00+0800\n" "Last-Translator: Stanley Peng \n" "Language-Team: Rays i18n Team \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "Error reading passwd here:\n" msgstr "无法读取passwd文件:\n" msgid "" "\n" "Not installed correctly ?.\n" msgstr "" "\n" "没有正确安装?。\n" msgid "Error reading group here:\n" msgstr "无法读取group文件:\n" #, c-format msgid "User: %s could not be found in passwd or shadow.\n" msgstr "用户:%s 没有出现在passwd或shadow文件中。\n" msgid "The password was not changed.\n" msgstr "密码没有改变。\n" #, c-format msgid "Error changing password for user: %s\n" msgstr "为用户:%s 改变密码错误\n" #, c-format msgid "Cant add the master ftpuser with this command: %s\n" msgstr "无法使用此命令添加主ftpuser :%s\n" #, c-format msgid "" "The user: %s\n" "has been added to your system with a /bin/false shell\n" "and put in ftpusers, no password was set.\n" msgstr "" "用户: %s\n" "已添加到系统,采用a /bin/false shell\n" "并放在ftpusers中,未设置密码。\n" #, c-format msgid "Cant add the master ftp group with this command: %s\n" msgstr "无法使用此命令添加主ftp组:%s\n" #, c-format msgid "" "The group: %s\n" "has been added to your system.\n" msgstr "" "组: %s\n" "已添加到系统中。\n" msgid "Cant write to ftpusers here:\n" msgstr "无法写到ftpusers :\n" msgid "" "\n" "Run GProFTPD as root.\n" msgstr "" "\n" "以root用户运行GProFTPD。\n" msgid "Online" msgstr "在线" msgid "Offline" msgstr "离线" msgid "" "\n" "The server could not be turned off.\n" "\n" msgstr "" "\n" "服务器无法关闭。\n" "\n" msgid "Do you have another server running on this port ?\n" msgstr "此端口是否有其他服务器运行?\n" msgid "This could be a server running from inetd/xinetd.\n" msgstr "可能是inetd/xinetd 上运行的服务器。\n" msgid "The server is offline.\n" msgstr "服务器离线。\n" msgid "List server: Cant open proftpd.conf here:\n" msgstr "列表服务器:此处无法打开proftpd.conf:\n" #, c-format msgid "A line with over 8000 chars is not valid in: %s\n" msgstr "以下超过8000字符的行无效:%s\n" msgid "on" msgstr "打开" msgid "off" msgstr "关闭" msgid "binary" msgstr "二进制" msgid "ascii" msgstr "ascii" msgid "GMT" msgstr "GMT" msgid "local time" msgstr "本机时间" msgid "upper" msgstr "大写" msgid "lower" msgstr "小写" msgid "both" msgstr "大小写" msgid "data" msgstr "数据" msgid "control" msgstr "控制" msgid "User" msgstr "用户" msgid "Group" msgstr "组" msgid "Root directory" msgstr "根目录" msgid "Require password" msgstr "所需密码" msgid "Banned" msgstr "禁用" msgid "Maximum connections" msgstr "最大连接" msgid "yes" msgstr "是" msgid "no" msgstr "否" msgid "Address" msgstr "地址" msgid "Port" msgstr "端口" msgid "Name" msgstr "名称" msgid "Type" msgstr "类型" msgid "list_servers: Could not allocate enough memory\n" msgstr " list_servers:无法分配足够内存空间\n" #, c-format msgid "" "An entry in: %s\n" " is too long, please correct it.\n" msgstr "" "以下条目内容: %s\n" " 过长,请更正。\n" msgid "Mounted on" msgstr "挂载于" msgid "Free space" msgstr "空闲空间" msgid "Used space" msgstr "已用空间" msgid "Total space" msgstr "总空间大小" msgid "Percent used" msgstr "占用比率" msgid "Device" msgstr "设备" msgid "Cant open the securitylog here:\n" msgstr "此处无法打开securitylog:\n" msgid "Could not allocate enough memory to read:\n" msgstr "无法分配足够空间读取:\n" msgid "Username" msgstr "用户名" msgid "Action" msgstr "动作" msgid "Filename" msgstr "文件名" msgid "Bytes" msgstr "字节" msgid "Start of transfer" msgstr "开始传送" msgid "Remote host" msgstr "远程主机" msgid "list_files: Could not allocate enough memory\n" msgstr " list_files:无法分配足够内存\n" #, c-format msgid "" "An entry in: %s\n" " is too long and has been shortened.\n" msgstr "" "以下条目内容: %s\n" " 过长,已被截短。\n" msgid "Alot of these extremely long filnames will decrease startup speed.\n" msgstr "使用过长文件名将减慢启动速度。\n" msgid "uploaded" msgstr "已上载" msgid "downloaded" msgstr "已下载" msgid "deleted" msgstr "已删除" msgid "Cant write the new proftpd.conf here:\n" msgstr "此处无法写新的proftpd.conf:\n" msgid "" "\n" "Run GProFTPD as root\n" msgstr "" "\n" "以root运行GProFTPD \n" msgid "Cant allocate enough memory for the default values\n" msgstr "无法为默认值分配足够内存\n" msgid "Cant allocate enough memory for the configuration.\n" msgstr "没有足够内存进行配置。\n" msgid "Cant get version from: \"proftpd -v\"\n" msgstr "无法获取版本,从: \"proftpd -v\"\n" msgid "ProFTPD must be installed and be in your path.c" msgstr " 必须在你的path.c下安装ProFTPD。" #, c-format msgid "Proftpd version: %s" msgstr " Proftpd 版本: %s " #, c-format msgid "GProftpd version: %s" msgstr " Gproftpd版本: %s " msgid "No version found" msgstr "找不到版本" msgid "Servername" msgstr "服务器名" msgid "Server type" msgstr "服务器类型" msgid "Cant open shells for reading here:\n" msgstr "无法打开shell读取:\n" msgid "Cant open shells for writing /bin/false here:\n" msgstr "无法打开shell写/bin/false:\n" msgid "Couldnt find ftpusers here:\n" msgstr "无法找到ftpusers :\n" msgid "" "\n" "so GProftpd made that file and added all users\n" msgstr "" "\n" "因此 GProftpd 创建文件并添加所有用户\n" msgid "on the system to it. They are now banned from using the ftp server.\n" msgstr "在系统上。现在被禁用ftp服务器。\n" msgid "This in an auto-security feature.\n" msgstr "这是自动安全特性。\n" msgid "You must specify a username.\n" msgstr "必须指定用户名。\n" msgid "Usernames are not allowed to begin with a number.\n" msgstr "用户名不能以数字开头。\n" msgid "Refusing to add user root.\n" msgstr "拒绝添加用户root。\n" msgid "A username containing < or > is not allowed.\n" msgstr "用户名不能包含< 或 >。\n" msgid "The minimum password length is 6 chars.\n" msgstr "密码至少要6个字符。\n" msgid "The minimum shell length is 3 chars.\n" msgstr "shell最小长度是3字符。\n" msgid "Mimimum directory path length is 1 char.\n" msgstr "最小目录路径长度为1字符。\n" msgid "Error reading configuration:\n" msgstr "读取配置错误:\n" msgid "" "\n" "Run gproftpd as root, not installed correctly ?.\n" msgstr "" "\n" "以root运行 gproftpd, 安装不正确? \n" msgid "That user already exists in this server in proftpd.conf.\n" msgstr "本服务器已有此用户,位于proftpd.conf\n" msgid "Nothing was changed.\n" msgstr "未更改。\n" msgid "Error adding the fake user with this command:\n" msgstr "使用此命令添加伪用户出错:\n" msgid "" "\n" "add it in a terminal\n" msgstr "" "\n" "在终端添加\n" msgid "Error adding the fake darwin user, add it manually.\n" msgstr "错误添加伪darwin 用户,请手动添加。\n" msgid "Error adding the real user with this command:\n" msgstr "使用此命令添加真用户出错:\n" msgid "The system user was not added because uppercase\n" msgstr "系统用户不能添加,因为大写问题\n" msgid "or language specific letters arent allowed.\n" msgstr "或不允许特定语言的字母。\n" msgid "Could not read AllowUser here:\n" msgstr "此处无法读取AllowUser:\n" msgid "" "\n" "Run gproftpd as root\n" msgstr "" "\n" "以root运行gproftpd\n" msgid "Could not write the new userinformation to:\n" msgstr "无法写入新的用户信息:\n" msgid "Manually delete that user,\n" msgstr "手动删除此用户,\n" msgid "could not delete it.\n" msgstr "无法删除。\n" msgid "Cant delete a user of zero length.\n" msgstr "无法删除0长度的用户。\n" msgid "Refusing to delete user root.\n" msgstr "拒绝删除用户root。\n" msgid "Cant open the configuration:\n" msgstr "无法打开配置文件:\n" msgid "Could not find the specified server\n" msgstr "无法找到特定服务器\n" msgid "Try reselecting the server by doubleclicking on it.\n" msgstr "通过双击重新选择服务器。\n" msgid "Error reading the configuration here:\n" msgstr "读取此处配置错误:\n" #, c-format msgid "The user could not be found, this is a bug or %s has errors.\n" msgstr "无法找到该用户,这是漏洞或%s 错误。\n" msgid "run a syntax check to find out if there are any problems.\n" msgstr "运行语法检测,看是否有错误。\n" msgid "" "\n" "The minimum password length is 6 chars.\n" msgstr "" "\n" "密码至少为 6字符。\n" msgid "" "\n" "The Password was changed.\n" msgstr "" "\n" "密码已更改。\n" msgid "The user didnt exist in shadow or passwd.\n" msgstr "该用户在shadow或passwd中不存在。\n" msgid "" "\n" "Cant open proftpd.conf\n" msgstr "" "\n" "无法打开proftpd.conf\n" msgid "" "If there are no complaints the configuration is ok...\n" "\n" msgstr "" "如果其他问题,配置OK......\n" "\n" msgid "" "\n" "Check completed. " msgstr "" "\n" "检测完成。" #, c-format msgid "" "Cant write to proftpd.conf here: \n" "%s\n" msgstr "" "无法写到proftpd.conf: \n" "%s\n" msgid "You must specify a username or process number.\n" msgstr "必须指定一个用户名或程序号。\n" msgid "popen error, user not kicked\n" msgstr " popen 错误,不踢出用户\n" msgid "User or pid not found.\n" msgstr "未找到用户或pid。\n" msgid "popen error, user not kicked or banned.\n" msgstr "popen错误,用户未被踢出或禁止。\n" #, c-format msgid "" "The user was not banned, could not write to:\n" "%s" msgstr "" "未禁止用户,无法写到:\n" "%s" msgid "Cant ban a non active user by PID.\n" msgstr "无法通过PID禁止一个非活动用户\n" msgid "Misspelled maybe ?\n" msgstr "是否拼写错误?\n" msgid "The user was already banned.\n" msgstr "已禁止用户。\n" msgid "The user was not currently in the ftp.\n" msgstr "用户目前不在ftp 中。\n" msgid "The user was banned but not kicked.\n" msgstr "禁止用户但不踢出。\n" msgid "The user was kicked and banned.\n" msgstr "用户被踢出并禁止。\n" msgid "Welcome message generation failed" msgstr "生成欢迎页面失败" msgid "No xferlog records found or popen failed\n" msgstr "无xferlog 记录,或popen失败\n" msgid "Every certificate field must be filled in\n" msgstr "必须填写所有验证字段\n" msgid "This step can take a while" msgstr "此过程需要一段时间" msgid "The certificate has been created successfully\n" msgstr "验证已成功创建\n" msgid "and placed in the correct location.\n" msgstr "并位于正确位置。\n" msgid "It will be used by new FTP-TLS logins.\n" msgstr "将用于新的FTP-TLS 登录。\n" msgid "The certificate has not been created, something went wrong.\n" msgstr "验证未创建,出现错误。\n" msgid "Cant open proftpd.conf for writing here:\n" msgstr "无法打开proftpd.conf 写入:\n" msgid "Cant allocate enough memory for adding a new server\n" msgstr "没有足够内存添加新服务器\n" msgid "The standard server can not be deleted.\n" msgstr "无法删除标准服务器\n" msgid "Setting a servers port to 0 disables it.\n" msgstr "把服务器设为0即禁用它。\n" msgid "Refusing to delete a server with no specified name.\n" msgstr "拒绝删除没有指定名称的服务器。\n" msgid "Refusing to delete a server with no specified port.\n" msgstr "拒绝删除没有指定端口的服务器。\n" msgid "Cant open the proftpd.conf here:\n" msgstr "无法打开这里的proftpd.conf:\n" msgid "Could not delete the specified server\n" msgstr "无法删除指定服务器\n" msgid "Refusing to change a server without a specified name.\n" msgstr "拒绝修改没有指定名称的服务器。\n" msgid "Refusing to change a server without a specified port.\n" msgstr "拒绝修改没有指定端口的服务器。\n" msgid "Cant open proftpd.conf here:\n" msgstr "无法打开这里的proftpd.conf:\n" msgid "Could not find the specified server, no changes where made.\n" msgstr "无法找到指定服务器,不进行修改。\n" msgid "GProftpd help" msgstr "GProftpd 帮助" msgid "" "\n" "When gproftpd is started it checks if you have all required files and that " "the environment is ok.\n" "\n" msgstr "" "\n" "当 gproftpd 启动时,检测你是否拥有所有必要的文件以及环境是否合适。\n" "\n" msgid "" "If you have just upgraded you should check out the homepage if any additions " "to the configuration are\n" msgstr "" "如果刚升级,应到主页检测是否有附加的配置\n" "\n" msgid "" "necessary in order to take full advantage of all its features.\n" "\n" msgstr "" "以充分实现完整功能\n" "\n" msgid "" "Proftpd must be installed and located somewhere in the environments path " "variable\n" "\n" "\n" msgstr "" "必须安装Proftpd并位于environments路径变量\n" "\n" "\n" msgid "" "When you add a user you can randomize its name and password or use your " "own.\n" msgstr "" "添加用户后,你可以随意为其命名和设置密码,或使用自己的信息。\n" msgid "" "You can also select its login shell and where this user should have its root " "directory and upload directory.\n" msgstr "你也可以选择login shell、用户root目录的位置,以及upload目录。\n" msgid "" "If the selected shell is /bin/false, /sbin/nologin etc the user can only " "login to this ftpserver otherwise\n" msgstr "" "如果所选的shell是/bin/false, /sbin/nologin等,则用户只能" "登录到此ftpserver,否则\n" msgid "" "that user gets a private home directory as well as its ftp directory and can " "login via ssh etc if that server\n" msgstr "" "用户有一个私有home目录,及其ftp目录,并能通过ssh等登录,如果该服务器\n" msgid "" "allows this user to do so.\n" "\n" msgstr "" "允许用户这样做。\n" msgid "The upload directory must be located below the users root directory.\n" msgstr "upload目录必须在用户root目录下。\n" msgid "" "If you dont want that user to have an upload directory you can uncheck the " "checkbox next to it.\n" "\n" msgstr "" "如果不希望用户使用upload目录,你可以取消复选框旁的选择。\n" "\n" msgid "" "If you want to add directories thats not under the users root directory you " "can do this:\n" "\n" msgstr "" "如果想在非root目录下添加目录" "你可以:\n" "\n" msgid "Linux (as of kernel 2.4.0):\n" msgstr "Linux(内核版本2.4.0): \n" msgid "" "mount --bind /some/directory/to/share /home/ftp/make_this_directory_first\n" "\n" msgstr "" "mount --bind /some/directory/to/share /home/ftp/make_this_directory_first\n" "\n" msgid "" "Alternatively:\n" "mount -o bind /var/data /home/ftp/bob/data\n" "\n" msgstr "" "此外:\n" "mount -o bind /var/data /home/ftp/bob/data\n" "\n" msgid "" "*BSD (as of 4.4BSD):\n" "mount_null /var/data /home/ftp/bob/data\n" "\n" msgstr "" "*BSD (as of 4.4BSD):\n" "mount_null /var/data /home/ftp/bob/data\n" "\n" msgid "" "Solaris:\n" "mount -F lofs /var/data /home/ftp/bob/data\n" "\n" msgstr "" "Solaris:\n" "mount -F lofs /var/data /home/ftp/bob/data\n" "\n" msgid "" "If you want automatically generated statistics you can use gprostats with " "crond\n" msgstr "如果想自动生成统计表,可以结合crond使用gprostats\n" msgid "" "or press the welcome and html statistics buttons in the files tab to make " "them once.\n" "\n" msgstr "" "或在文件标签中按下welcome和html statistics按钮,让它们一次实现\n" "\n" msgid "" "With crond and gprostats you can do this to have it automatically update the " "statistics:\n" msgstr "使用crond 和 gprostats,你可以让它自动更新统计:\n" msgid "" "gprostats -html /path/to/output.html\n" "gprostats -w welcome.msg\n" msgstr "" msgid "" "or both at the same time: gprostats -html /path/to/output.html -w welcome." "msg\n" msgstr "或同时进行:gprostats -html /path/to/output.html -w welcome." "msg\n" msgid "" "Use -c /path/to/proftpd.conf -x /path/to/xferlog if you need to.\n" "\n" msgstr "必要时使用-c /path/to/proftpd.conf -x /path/to/xferlog。\n" "\n" msgid "" "If you have made customized welcome messages and dont want them overwritten\n" msgstr "如果你编写了个性化欢迎信息,且不希望被改写\n" msgid "" "by gprostats you can configure this by doubleclicking a user and unchecking " "update statistics.\n" msgstr "通过gprostats,你可以双击一个用户,并取消更新统计来进行配置。\n" msgid "" "then pressing the change button, this will also exclude the user from the " "html output.\n" "\n" msgstr "" "然后按下更改按钮,这样一来用户也不会出现在html输出中。\n" "\n" msgid "" "Some typical setups:\n" "\n" "If one or more of your users needs to have upload access to a http servers " "directory:\n" "\n" msgstr "" "一些典型设置:\n" "\n" "如果用户想上载到http服务器目录:\n" "\n" msgid "" "1. Set the users ftp root directory to the webserver's root directory /var/" "www/html\n" msgstr "" "1.将用户 ftp root 目录设置为网络服务器的 root 目录 /var/www/html\n" msgid "" " or /var/www/html/this_users_directory for a private homepage.\n" "\n" msgstr "" " 或作为个人主页的/var/www/html/this_users_directory 。\n" "\n" msgid "" "2. Take away all text from the upload directory field\n" "\n" msgstr "" "2. 去除upload目录中的所有文本。\n" "\n" msgid "3. Make sure the checkbutton next to the upload directory is checked.\n" msgstr "3.确保upload目录旁的复选按钮选中。\n" msgid "" " Press the add button to add this user.\n" "\n" msgstr "" " 按下添加按钮添加用户。\n" "\n" msgid "" "4. You can now login as this user and upload to the html directory.\n" "\n" "\n" msgstr "" "4. 现在,你可以以这个用户登录,并上传html 目录。\n" "\n" "\n" msgid "" "To add anonymous readonly access to a directory you can do this:\n" "\n" msgstr "" "将匿名的只读访问添加到一个目录中,你可以这样做: \n" "\n" msgid "1. Type anonymous in the username field. \n" msgstr "1. 在用户名字段中键入匿名。\n" msgid "" " Press the password randomize button or type any password you want.\n" msgstr "" " 按下密码随机按钮或键入任何你想要的密码。\n" msgid " Select the /bin/false shell.\n" msgstr " 选择/bin/false shell 。\n" msgid " Uncheck the upload checkbutton, this is important.\n" msgstr " 不要选中upload 复选框按钮,这是很重要的。\n" msgid "" " Press add to add this anonymous user.\n" "\n" msgstr "" " 按下添加按钮,添加这个匿名用户。\n" "\n" msgid "" "2. Doubleclick that user in the users tab and set require password to off " "then\n" msgstr "" "2. 双击用户标签中的那个用户,然后将需要密码设置成关闭 \n" msgid "" " check that this user isnt banned then press the change button.\n" "\n" msgstr "" " 检查这个用户是否是被禁止访问的用户,然后按下修改按纽\n" "\n" msgid "" "4. You can now login as anonymous with no password.\n" "\n" "\n" msgstr "" "4. 现在你可以匿名的方式,不需要密码就可以登录了。\n" "\n" "\n" msgid "" "This is the default setting, one upload directory and a readonly ftp root " "directory:\n" msgstr "" "这是默认设置,一个上传目录和一个只读 ftp 根目录:\n" msgid "Root directory: /home/ftp\n" msgstr "根目录:/home/ftp\n" msgid "" "Upload directory /home/ftp/upload\n" "\n" msgstr "" "上传目录 /home/ftp/upload\n" "\n" msgid "" "The users can then upload files in the upload directory and download from " "the\n" msgstr "" "然后用户可以上传在上传目录中的文件,并从ftp 根目录中下载文件" "the\n" msgid "" "ftp root directory where you can put what you want to share.\n" "\n" msgstr "" "你可以将你想要共享的内容放到ftp 根目录中\n" "\n" msgid "" "You can easily add more servers to run on different interfaces and ports.\n" msgstr "" "你可以很轻易地添加更多的服务器,以在不同的接口和端口上运行\n" msgid "" "When a user connects to one address and port it gets access according to " "that servers\n" msgstr "" "当一个用户连接到一个地址和端口时,可以根据那个服务器进行访问 \n" msgid "" "configuration but only if the server is selected to bind to addresses.\n" msgstr "" "配置,但只在服务器被选中绑定到地址上时。\n" msgid "" "There are two directives used for this:\n" "Bind and SocketBindTight.\n" msgstr "" "两个指令用于这个:\n" "Bind 和 SocketBindTight.\n" msgid "" "If you want to turn off a server without deleting it you can set its port " "value to 0\n" "\n" msgstr "" "若你想关掉服务器,但不删除它,那么你可以将它的端口值设置成0 \n" "\n" msgid "" "If this Proftpd server is behind a NAT gateway you should specify the " "gateways\n" msgstr "" "若这个 Proftpd 服务器配置了一个 NAT 网关,那么你应指定网关\n" msgid "" "DNS name or IP address otherwise turn it off.\n" "\n" msgstr "" "否则,DNS名或IP地址就将它关闭。\n" "\n" msgid "" "If you copy or move a file directly to the ftpservers directory you may need " "to\n" msgstr "" "若你直接将一个文件复制或移到你所需要的ftpservers 目录中\n" msgid "" "chmod it with 644 and chmod directories to 755 so that the directory and " "file can be accessed.\n" "\n" msgstr "" "将它的模式修改成644,并将目录的模式修改成755,以便目录和文件均可以访问。\n" "\n" msgid "" "This is one way of chmodding all files recursively in the directory /home/" "ftp:\n" msgstr "" "这是一种在目录/home/ftp中递归地改变所有文件的模式的方法:\n" msgid "" "find /home/ftp -type f -exec chmod 644 -v {} \\;\n" "\n" msgstr "" "查找 /home/ftp -type f -exec chmod 644 -v {} \\;\n" "\n" msgid "" "Upload directories should have a chmod of 777 and this can be used for /home/" "ftp/upload\n" msgstr "" "上传目录应有一个chmod 777,这可以用于/home/" "ftp/upload\n" msgid "" "find /home/ftp/upload -type d -exec chmod 777 -v {} \\;\n" "\n" "\n" msgstr "" "查找 /home/ftp/upload -type d -exec chmod 777 -v {} \\;\n" "\n" "\n" msgid "" "For more detailed information about the server and its configuration " "directives visit:\n" msgstr "" "有关服务器及其配置指令的详细信息,请访问:\n" msgid "http://www.proftpd.org\n" msgstr "http://www.proftpd.org\n" msgid "Close" msgstr "关闭" msgid "Shutdown" msgstr "关机" msgid "The server will shut down according to these settings." msgstr "根据这些设置,服务器将关机。" msgid "Time to real shutdown:" msgstr "真实关机的时间:" msgid "now, +Minutes or HHMM" msgstr "现在,+Minutes 或 HHMM " msgid "New access disabled:" msgstr "不能执行新的访问:" msgid "Minutes before real shutdown." msgstr "在真实关机之前还有多少分钟。" msgid "Existing users disconnected:" msgstr "现有用户断开连接:" msgid "Shutdown message:" msgstr "关机消息:" #, c-format msgid "%s , Current connections will be dropped: %d" msgstr "%s , 当前连接将结束: %d " msgid "Pressing the online button will let users login again." msgstr "按下在线按纽将让用户再次登录。" msgid "Cancel" msgstr "取消" msgid "OK" msgstr "确定" msgid "GProFTPD information" msgstr " GProFTPD 信息" msgid "User settings" msgstr "用户设置" msgid "These are the settings for this user." msgstr "这些设置用于该用户。" msgid "Username: " msgstr "用户名:" msgid "Password: " msgstr "密码:" msgid "Group: " msgstr "组:" msgid "Require password:" msgstr "需要密码:" msgid "Allow logins from:" msgstr "允许从以下站点登录:" msgid "Maximum logins: " msgstr "最大登录次数:" msgid "Message: " msgstr "消息:" msgid "Root directory: " msgstr "根目录:" msgid "Update statistics:" msgstr "更新statistics :" msgid "Banned:" msgstr "禁止:" msgid "Type a password longer then 6 chars to change." msgstr "键入一个长度大于6个字符的密码来修改。" msgid "all,none,192.168.0.,host.domain.edu,.trusted-domain.org" msgstr " all,none,192.168.0.,host.domain.edu,.trusted-domain.org " msgid "Upload directory:" msgstr "上传目录:" msgid "This user is permitted to do the following in this directory:" msgstr "用户可以在该目录中进行以下操作:" msgid "List:" msgstr "列表:" msgid "Upload:" msgstr "上传" msgid "Append:" msgstr "附加:" msgid "Download:" msgstr "下传:" msgid "Rename:" msgstr "重新命名:" msgid "Delete:" msgstr "删除:" msgid "Create directory:" msgstr "创建目录:" msgid "Remove directory:" msgstr "删除目录:" msgid "Site:" msgstr "位置:" msgid "Show dates:" msgstr "显示日期:" msgid "Show current path:" msgstr "显示当前路径:" msgid "Show filesize:" msgstr "显示文件大小:" msgid "Change working directory:" msgstr "更改工作目录:" msgid "Change mode:" msgstr "更改模式:" msgid "Change group:" msgstr "修改组:" msgid "Cdup:" msgstr " Cdup:" msgid "Show connection settings:" msgstr "显示连接设置:" msgid "Delete" msgstr "删除" msgid "Change" msgstr "修改" msgid "About" msgstr "关于" msgid "Author: " msgstr "作者:" msgid "I want to thank the following for their contributions:" msgstr "我要感谢以下主要贡献人员:" msgid "for the icons and the weblogo.\n" msgstr "在图标和网站标志方面的贡献。\n" msgid "for coding support and testing.\n" msgstr "在代码支持和测试方面的贡献。\n" msgid "The people at the GTK+ development lists.\n" msgstr " GTK+ 开发列表上人员。\n" msgid "for the RPM spec file." msgstr "在RPM spec 文件方面的贡献。" msgid "And all translators:" msgstr "以及所有翻译者" msgid "Afrikaans" msgstr "南非荷兰语" msgid "Amharic" msgstr "阿姆哈拉语" msgid "Arabic" msgstr "阿拉伯语" msgid "Azerbaijani" msgstr "阿塞拜疆语" msgid "Basque" msgstr "巴斯克语" msgid "Bulgarian" msgstr "保加利亚语" msgid "Breton" msgstr "法国布里多尼地区语言" msgid "Brittish-English" msgstr "英语" msgid "Bosnian" msgstr "波斯尼亚语" msgid "Byelorussian" msgstr "白俄罗斯语" msgid "Catalan" msgstr "加泰罗尼亚语" msgid "Chinese-Simplified" msgstr "简体中文" msgid "Chinese-Traditional" msgstr "繁体中文" msgid "Croatian" msgstr "克罗地亚语" msgid "Czech" msgstr "捷克语" msgid "Danish" msgstr "丹麦语" msgid "Dutch" msgstr "荷兰语" msgid "Esperanto" msgstr "世界语" msgid "Estonian" msgstr "爱沙尼亚语" msgid "Finnish" msgstr "芬兰语" msgid "French" msgstr "法语" msgid "Galician" msgstr "加利西亚语" msgid "German" msgstr "德语" msgid "Greek" msgstr "希腊语" msgid "Hebrew" msgstr "希伯来语" msgid "Hini" msgstr " Hini " msgid "Hungarian" msgstr "匈牙利语" msgid "Icelandic" msgstr "冰岛语" msgid "Indonesian" msgstr "印度尼西亚语" msgid "Irish" msgstr "爱尔兰语" msgid "Italian" msgstr "意大利语" msgid "Japanese" msgstr "日语" msgid "Korean" msgstr "韩语" msgid "Kurdish" msgstr "库尔德语" msgid "Latvian-Lettish" msgstr "拉脱维亚-列托(Lett) 语" msgid "Lithuanian" msgstr "立陶宛语" msgid "Macedonian" msgstr "马其顿语" msgid "Maori" msgstr "毛利语" msgid "Maltese" msgstr "马耳他语" msgid "Norwegian" msgstr "挪威语" msgid "Polish" msgstr "波兰语" msgid "Portuguese" msgstr "葡萄牙语" msgid "Portuguese-Brazil" msgstr "葡萄牙-巴西语" msgid "Romanian" msgstr "罗马尼亚语" msgid "Russian" msgstr "俄语" msgid "Serbian" msgstr "塞尔维亚语" msgid "Slovak" msgstr "斯洛伐克人语 " msgid "Slovenian" msgstr "斯洛文尼亚语 " msgid "Spanish" msgstr "西班牙语" msgid "Swedish" msgstr "瑞典语" msgid "Tamil" msgstr "泰米尔语" msgid "Thai" msgstr "泰国语" msgid "Turkish" msgstr "土耳其语" msgid "Ukrainian" msgstr "乌克兰语" msgid "Vietnamese" msgstr "越南语" msgid "Wallon" msgstr "瓦龙语" msgid "Welch" msgstr " Welch " msgid "And a big thanks to the Proftpd team.\n" msgstr "并万分感谢Proftpd 团队。\n" msgid "Choose the users root directory" msgstr "选择用户根目录" msgid "Choose an upload directory (must be below the users directory)" msgstr "选择一个上传目录(必须在用户目录下)" msgid "GProftpd question" msgstr " GProftpd 问题" msgid "" "GProftpd could not find proftpd.conf or you are using\n" "the basic configuration wich doesnt have all features\n" "that gproftpd's default configuration has.\n" "\n" "If you use proftpd's default configuration and dont\n" "want to see this question again, take away the line:\n" "# Port 21 is the standard ftp port.\n" "\n" "Do you want to overwrite proftpd.conf with GProftpd's\n" "default configuration ?\n" "\n" " (If you dont know then press yes)\n" msgstr "" "GProftpd 不能查找到 proftpd.conf,或者你正使用的基本配置不具有\n" "gproftpd 的缺省配置的所有特性。\n" "\n" "若你使用proftpd的缺省配置,不想再看到这个问题,那么去除这行:\n" "# Port 21是标准的 ftp 端口。\n" "\n" "你要通过GProftpd 的缺省配置重写proftpd.conf 吗?\n" "\n" " (若你不知道,请按下是。)\n" msgid "Yes" msgstr "是" msgid "No" msgstr "否" msgid "GProFTPD Password" msgstr " GProFTPD 密码" msgid "This user already existed in the system." msgstr "该用户已经存在于系统中。" msgid "Username:" msgstr "用户名:" msgid "New password: " msgstr "新密码:" msgid "Do you want to change the users password ?" msgstr "你要修改用户密码吗?" msgid "Dont change" msgstr "不修改" msgid "Delete the system user ?" msgstr "删除系统用户?" msgid "Do you also want to delete the system user ?" msgstr "你也想删除系统用户吗?" msgid "Username: " msgstr "用户名" msgid "Add this needed master ftpuser ?" msgstr "添加这个需要主ftp用户" msgid "GProftpd needs to add the user and group the server will runs as." msgstr " GProftpd 需要添加用户和组,服务器将以它们运行。 " msgid "User and groupname:" msgstr "用户和组名" msgid "This action is necessary, do you want to do it ?" msgstr "这个动作是必要的,你不想进行吗?" msgid " Online " msgstr " 在线 " msgid " Offline " msgstr " 离线 " msgid " Shutdown " msgstr " 关闭 " msgid " ReRead " msgstr " 重读 " msgid " Help " msgstr " 帮助 " msgid " About " msgstr " 关于 " msgid " Quit " msgstr " 退出 " msgid "Information:" msgstr "信息" msgid "proftpd -v failed." msgstr " proftpd -v 失败。" msgid "The server is currently:" msgstr "服务器当前:" msgid "Cant determine." msgstr "不能确定。" msgid "This is the configuration for the currently selected server." msgstr "这是当前选定服务器的配置。" msgid "Import" msgstr "导入" msgid "Add Server" msgstr "添加服务器" msgid "Delete server" msgstr "删除服务器" msgid "Apply" msgstr "应用" msgid "DNS name or ip address of the server:" msgstr "服务器的DNS名或IP地址:" msgid "Show alternate server identity:" msgstr "显示可选服务器的ID:" msgid "NAT gateway address:" msgstr "NAT 网关地址:" msgid "The administrators email address:" msgstr "管理员邮件地址:" msgid "To listen on all interfaces 0.0.0.0 can be used" msgstr "监听所有可以使用的接口0.0.0.0 " msgid "Only use this if you are behind a NAT gateway" msgstr "若你使用一个NAT网关,就只能用这个。" msgid "Bind servers to their addresses:" msgstr "将服务器帮定到它们的地址上:" msgid "Identity lookups:" msgstr "身份查询:" msgid "Reverse lookups:" msgstr "反向查询" msgid "Timestandard:" msgstr "时间标准" msgid "The port the server listens on:" msgstr "服务器监听的端口" msgid "Passive ports range:" msgstr "响应被动数据连接请求的端口范围:" msgid "Maximum connections for each server:" msgstr "每个服务器最大的连接次数:" msgid "Max login attempts before disconnected:" msgstr "在断开连接之前尝试登录的最大次数:" msgid "Login timeout:" msgstr "登录超时:" msgid "Idle timeout:" msgstr "空闲超时:" msgid "Randomized username length:" msgstr "随机用户名长度:" msgid "Randomized password length:" msgstr "随机的密码长度:" msgid "Randomize to upper or lower case:" msgstr "大小写随机:" msgid "Default transfermode:" msgstr "默认的传输模式:" msgid "FXP transfers:" msgstr " FXP 传输:" msgid "gmt" msgstr " gmt " msgid "0 is offline" msgstr "0是离线" msgid "Seconds" msgstr "秒" msgid "Useradds default root directory path:" msgstr "Useradds 的默认根目录路径:" msgid "Useradds default upload directory:" msgstr " Useradds 的默认上传的目录:" msgid "Statistics default html path:" msgstr " Statistics的默认html 路径:" msgid "Statistics default welcome name:" msgstr " Statistics的默认欢迎名:" msgid "The systems logfile:" msgstr "系统日志文件" msgid "The server runs as this user:" msgstr "服务器以该用户运行:" msgid "The server runs as this group:" msgstr "服务器以该组运行:" msgid "This fake user owns all files:" msgstr "该伪用户拥有所有文件:" msgid "This fake group owns all files:" msgstr "该伪组拥有所有文件:" msgid "Upload settings:" msgstr "上传设置:" msgid "Upload bandwidth:" msgstr "上传带宽:" msgid "Resume broken uploads:" msgstr "继续上传:" msgid "Automatically delete aborted uploads:" msgstr "自动删除已终止的上传:" msgid "KB/Sec" msgstr " KB/秒" msgid "Download settings:" msgstr "下载设置:" msgid "Download bandwidth:" msgstr "下载带宽:" msgid "Resume broken downloads:" msgstr "继续下传:" msgid "KB/sec" msgstr " KB/秒 " msgid "FTP-TLS secure communications:" msgstr " FTP-TLS 安全交流:" msgid "Use FTP-TLS:" msgstr " 使用FTP-TLS:" msgid "Require encrytion on channels:" msgstr "需要在信道上加密" msgid "Verify clients:" msgstr "验证客户端:" msgid "Use these protocols:" msgstr "使用这些协议:" msgid "TLS Logfile" msgstr " TLS 日志文件" msgid "RSA certificate file:" msgstr "RSA 认证文件:" msgid "Create a new selfsigned certificate:" msgstr "创建一个新的自签名证书:" msgid "DNS name or IP-address of this server:" msgstr " 这个服务器的DNS 名或IP地址:" msgid "Email address:" msgstr "邮件地址:" msgid "State or province:" msgstr "州或省:" msgid "City or town:" msgstr "城市或乡镇:" msgid "Organization:" msgstr "组织:" msgid "Organizational unit:" msgstr "组织单位:" msgid "Password:" msgstr "密码:" msgid "Challenge password:" msgstr "挑战密码(Challenge password):" msgid "Number of bits:" msgstr "位数" msgid "Number of days the certificate is valid:" msgstr "认证的有效天数:" msgid "Countrycode IE: SV, DK, US etc:" msgstr " Countrycode IE: SV、DK、US 等等:" msgid "Generate certificate:" msgstr "进行认证:" msgid "Generate" msgstr "生成" msgid "Servers" msgstr "服务器" msgid "Add delete or make changes to users in the currently selected server." msgstr "在当前选中的服务器中添加、删除用户或修改用户。" msgid "Make a random username" msgstr "建立一个随机的用户名" msgid "Select the users root directory" msgstr "选中用户根目录" msgid "Root directory:" msgstr "根目录" msgid "Make a random password" msgstr "建立一个随机的密码" msgid "Select an upload directory below the users root directory" msgstr "选中用户根目录下的上传目录" msgid "Shell: " msgstr " Shell:" msgid "Create this upload directory" msgstr "创建上传目录" msgid "Add" msgstr "添加" msgid "Doubleclick to make changes to a user" msgstr "双击对用户进行修改" msgid "Users" msgstr "用户" msgid "Current usage, transferrates and terminating connections." msgstr "当前使用情况,传输率和终止连接。" msgid "Total bandwidth: " msgstr "带宽总量:" msgid "Total incoming: " msgstr "输入总量:" msgid " Total outgoing: " msgstr "外发总量:" msgid "Username or PID:" msgstr "用户名或PID:" msgid "Kicks the first matching username or the matching process number" msgstr "将第一个匹配的用户名或匹配的进程号踢出" msgid "Kick" msgstr " Kick " msgid "Kickbans the first matching username or the matching process number" msgstr "将第一个匹配的用户名或匹配的进程号踢出并禁止" msgid "Kickban" msgstr "Kickban" msgid "Transfers" msgstr "传输" msgid "Information about mounted devices." msgstr "关于已挂载设备的信息。" msgid "Update" msgstr "更新" msgid "Disk" msgstr "磁盘" msgid "Transferred files and statistics generation." msgstr "已传输的文件和生成统计表。" msgid "Generate:" msgstr "生成:" msgid "Welcome" msgstr "欢迎" msgid "Clear" msgstr "清除" msgid "Files" msgstr "文件" msgid "This is the entire proftpd configuration." msgstr "这是proftpd全部配置。" msgid "Restore" msgstr "恢复" msgid "Backup" msgstr "备份" msgid "Check syntax" msgstr "检查语法" msgid "The server will not reread its configuration" msgstr "服务不会再次读取其配置" msgid "Save" msgstr "保存" msgid "Conf" msgstr "配置文件" msgid "Server security information." msgstr "服务器安全信息" msgid "Successful logins" msgstr "登录成功" msgid "Refused logins" msgstr "登录失败" msgid "Security" msgstr "安全" #, c-format msgid "Total number of imported users: %ld\n" msgstr "导入用户的总数:%ld\n" msgid "Select any users you want to import" msgstr "选中你想要导入的用户" msgid "Import users to the currently selected server." msgstr "将用户导入到当前选中的服务器中。" msgid "All selected users will be imported with the following settings:" msgstr "所有选中的用户将被导入,并具有以下设置:" msgid "The users will have this root directory:" msgstr "用户将拥有这个根目录:" msgid "They will have username based directories under the root directory:" msgstr "他们将有自己的用户名,这些用户名基于根目录下的目录:" msgid "Add an upload directory under the root directory:" msgstr "将一个上传目录添加到根目录下:" msgid "" "If you delete all text here and check the checkbutton then users will be " "able to upload directly in the root directory" msgstr "" "若在这里您删除了所有文本,并选中了复选框,那么用户将可以直接在根目录" "中进行上传了" #, c-format msgid "Couldn't find pixmap file: %s" msgstr "不能查找到pixmap文件: %s" gadmin-proftpd-0.4.2/po/es.po0000600000076400007640000012263710064431673014774 0ustar mangemange# GProftpd - Spanish translation(Peruvian spanish - visit Cusco today!!) # Copyright (C) 2004 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the GProftpd package. # Diego Escalante , 2004 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: 8.1.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2004-06-16 19:02-0500\n" "PO-Revision-Date: 2004-06-16 19:02-0500\n" "Last-Translator: Diego Escalante \n" "Language-Team: ES \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "Error reading passwd here:\n" msgstr "Error al leer el password:\n" msgid "" "\n" "Not installed correctly ?.\n" msgstr "" "\n" "¿Instalación defectuosa?.\n" msgid "Error reading group here:\n" msgstr "Error al leer el grupo:\n" #, c-format msgid "User: %s could not be found in passwd or shadow.\n" msgstr "El usuario %s no pudo ser encontrado en los archivos passwd o shadow.\n" msgid "The password was not changed.\n" msgstr "El password del usuario no fue cambiado.\n" #, c-format msgid "Error changing password for user: %s\n" msgstr "Error al cambiar el password del usuario: %s\n" #, c-format msgid "No se pudo añadir el master ftpuser con el comando: %s\n" msgstr "" #, c-format msgid "" "The user: %s\n" "has been added to your system with a /bin/false shell\n" "and put in ftpusers, no password was set.\n" msgstr "" "El usuario: %s\n" "ha sido añadido al sistema con un shell /bin/false,\n" "además se le añadió al grupo ftpusers, no se estableció un password.\n" #, c-format msgid "Cant add the master ftp group with this command: %s\n" msgstr "No se pudo añadir el master ftp group con el comando: %s\n" #, c-format msgid "" "The group: %s\n" "has been added to your system.\n" msgstr "" "El grupo: %s\n" "fue añadido al sistema.\n" msgid "Cant write to ftpusers here:\n" msgstr "No se pudo escribir a ftpusers:\n" msgid "" "\n" "Run GProFTPD as root.\n" msgstr "" "\n" "Ejecute GProFTPD como usuario root.\n" msgid "Online" msgstr "Activado" msgid "Offline" msgstr "Desactivado" msgid "" "\n" "The server could not be turned off.\n" "\n" msgstr "" "\n" "El servidor no pudo ser desactivado.\n" "\n" msgid "Do you have another server running on this port ?\n" msgstr "¿Hay algún otro servidor activo en este puerto?\n" msgid "This could be a server running from inetd/xinetd.\n" msgstr "Podría ser un servidor ejecutándose desde inetd/xinetd.\n" msgid "The server is offline.\n" msgstr "El servidor está desactivado.\n" msgid "List server: Cant open proftpd.conf here:\n" msgstr "Listar servidor: No se pudo abrir el archivo proftpd.conf:\n" #, c-format msgid "A line with over 8000 chars is not valid in: %s\n" msgstr "Una línea de más de 8000 caracteres no es válida en: %s\n" msgid "on" msgstr "Activado" msgid "off" msgstr "Desactivado" msgid "binary" msgstr "binario" msgid "ascii" msgstr "ascii" msgid "GMT" msgstr "GMT" msgid "local time" msgstr "hora local" msgid "upper" msgstr "superior" msgid "lower" msgstr "inferior" msgid "both" msgstr "ambos" msgid "data" msgstr "datos" msgid "control" msgstr "control" msgid "User" msgstr "Usuario" msgid "Group" msgstr "Grupo" msgid "Root directory" msgstr "Directorio raíz" msgid "Require password" msgstr "Requerir password" msgid "Banned" msgstr "Baneado" msgid "Maximum connections" msgstr "Conexiones máximas" msgid "yes" msgstr "sí" msgid "no" msgstr "no" msgid "Address" msgstr "Dirección" msgid "Port" msgstr "Puerto" msgid "Name" msgstr "Nombre" msgid "Type" msgstr "Tipo" msgid "list_servers: Could not allocate enough memory\n" msgstr "list_servers: No se pudo reservar memoria suficiente.\n" #, c-format msgid "" "An entry in: %s\n" " is too long, please correct it.\n" msgstr "" "Una entrada en: %s\n" "es muy larga, por favor corríjala.\n" msgid "Mounted on" msgstr "Montado en" msgid "Free space" msgstr "Espacio libre" msgid "Used space" msgstr "Espacio usado" msgid "Total space" msgstr "Espacio total" msgid "Percent used" msgstr "Porcentaje usado" msgid "Device" msgstr "Dispositivo" msgid "Cant open the securitylog here:\n" msgstr "No se pudo abrir el registro de seguridad:\n" msgid "Could not allocate enough memory to read:\n" msgstr "No se pudo reservar memoria suficiente para leer:\n" msgid "Username" msgstr "Nombre de usuario" msgid "Action" msgstr "Acción" msgid "Filename" msgstr "Nombre de archivo" msgid "Bytes" msgstr "Bytes" msgid "Start of transfer" msgstr "Inicio de transferencia" msgid "Remote host" msgstr "Host remoto" msgid "list_files: Could not allocate enough memory\n" msgstr "list_files: No se pudo reservar memoria suficiente\n" #, c-format msgid "" "An entry in: %s\n" " is too long and has been shortened.\n" msgstr "" "Una entrada en: %s\n" "es muy larga y ha sido acortada.\n" msgid "Alot of these extremely long filnames will decrease startup speed.\n" msgstr "Muchos archivos con nombres largos reducirán la velocidad de inicio.\n" msgid "uploaded" msgstr "Subido" msgid "downloaded" msgstr "Descargado" msgid "deleted" msgstr "Borrado" msgid "Cant write the new proftpd.conf here:\n" msgstr "No se pudo escribir el nuevo archivo proftpd.conf:\n" msgid "" "\n" "Run GProFTPD as root\n" msgstr "" "\n" "Ejecute GProFTPD como usuario root\n" msgid "Cant allocate enough memory for the default values\n" msgstr "No se pudo reservar memoria para los valores por defecto\n" msgid "Cant allocate enough memory for the configuration.\n" msgstr "No se pudo reservar memoria para la configuración.\n" msgid "Cant get version from: \"proftpd -v\"\n" msgstr "No se pudo obtener la versión desde \"proftpd -v\"\n" msgid "ProFTPD must be installed and be in your path.\n" msgstr "ProFTPD debe estar instalado y en su path.\n" #, c-format msgid "Proftpd version: %s" msgstr "Proftpd versión: %s" #, c-format msgid "GProftpd version: %s" msgstr "GProftpd versión: %s" msgid "No version found" msgstr "No se encontraron versiones" msgid "Servername" msgstr "Nombre del servidor" msgid "Server type" msgstr "Tipo del servidor" msgid "Cant open shells for reading here:\n" msgstr "No se pudieron abrir shells para leer:\n" msgid "Cant open shells for writing /bin/false here:\n" msgstr "No se pudieron abrir shells para escribir /bin/false:\n" msgid "Couldnt find ftpusers here:\n" msgstr "No se pudo encontrar ftpusers:\n" msgid "" "\n" "so GProftpd made that file and added all users\n" msgstr "" "\n" "GProftpd creó el archivo y añadió a todos los usuarios\n" msgid "on the system to it. They are now banned from using the ftp server.\n" msgstr "del sistema a él. Ahora están baneados de usar el servidor ftp.\n" msgid "This in an auto-security feature.\n" msgstr "Esta es una característica de auto seguridad.\n" msgid "You must specify a username.\n" msgstr "Debe especificar un nombre de usuario.\n" msgid "Usernames are not allowed to begin with a number.\n" msgstr "No se permiten nombres de usuario que comienzen por un número.\n" msgid "Refusing to add user root.\n" msgstr "Negándose a agregar al usuario root.\n" msgid "A username containing < or > is not allowed.\n" msgstr "No se permiten nombres de usuario que contengan < o >.\n" msgid "The minimum password length is 6 chars.\n" msgstr "La longitud mínima de un password es 6 caracteres.\n" msgid "The minimum shell length is 3 chars.\n" msgstr "La longitud mínima del shell es 3 caracteres.\n" msgid "Mimimum directory path length is 1 char.\n" msgstr "La longitud mínima de un path es 1 caracter.\n" msgid "Error reading configuration:\n" msgstr "Error al leer la configuración:\n" msgid "" "\n" "Run gproftpd as root, not installed correctly ?.\n" msgstr "" "\n" "Ejecuta gproftpd como usuario root, ¿Mala instalación?.\n" msgid "That user already exists in this server in proftpd.conf.\n" msgstr "El usuario ya existe en este servidor, en proftpd.conf.\n" msgid "Nothing was changed.\n" msgstr "Nada fue cambiado.\n" msgid "Error adding the fake user with this command:\n" msgstr "Error al añadir al usuario falso con el comando:\n" msgid "" "\n" "add it in a terminal\n" msgstr "" "\n" "añadir en una terminal\n" msgid "Error adding the fake darwin user, add it manually.\n" msgstr "Error añadiendo el usuario falso darwin, añadalo manualmente.\n" msgid "Error adding the real user with this command:\n" msgstr "Error añadiendo el usuario real con el comando:\n" msgid "The system user was not added because uppercase\n" msgstr "El usuario de sistema no fue añadido por las letras capitales(mayúsculas)\n" msgid "or language specific letters arent allowed.\n" msgstr "o letras específicas del lenguaje que no están permitidas.\n" msgid "Could not read AllowUser here:\n" msgstr "No se pudo leer AllowUser:\n" msgid "" "\n" "Run gproftpd as root\n" msgstr "" "\n" "Ejecuta gproftpd como usuario root\n" msgid "Could not write the new userinformation to:\n" msgstr "No se pudo escribir la nueva información de usuario a:\n" msgid "Manually delete that user,\n" msgstr "Elimine manualmente al usuario,\n" msgid "could not delete it.\n" msgstr "no pudo ser eliminado.\n" msgid "Cant delete a user of zero length.\n" msgstr "No se puede eliminar un usuario de longitud cero.\n" msgid "Refusing to delete user root.\n" msgstr "Negando la eliminación del usuario root.\n" msgid "Cant open the configuration:\n" msgstr "No se pudo abrir el archivo de configuración:\n" msgid "Could not find the specified server\n" msgstr "No se pudo encontrar el servidor especificado\n" msgid "Try reselecting the server by doubleclicking on it.\n" msgstr "Intente reseleccionar el servidor haciendo doble click en el.\n" msgid "Error reading the configuration here:\n" msgstr "Error al leer la configuración:\n" #, c-format msgid "The user could not be found, this is a bug or %s has errors.\n" msgstr "El usuario no fue hallado, esto es un error o %s tiene errores.\n" msgid "run a syntax check to find out if there are any problems.\n" msgstr "ejecute una revisión de sintáxis para asegurarse que no hayan problemas.\n" msgid "" "\n" "The minimum password length is 6 chars.\n" msgstr "" "\n" "La longitud mínima de un password es de 6 caracteres.\n" msgid "" "\n" "The Password was changed.\n" msgstr "" "\n" "El password fue cambiado.\n" msgid "The user didnt exist in shadow or passwd.\n" msgstr "El usuario no existía en passwd o shadow.\n" msgid "" "\n" "Cant open proftpd.conf\n" msgstr "" "\n" "No se pudo abrir proftpd.conf\n" msgid "" "If there are no complaints the configuration is ok...\n" "\n" msgstr "" "Si no hay advertencias o quejas, la configuración está bien...\n" "\n" msgid "" "\n" "Check completed." msgstr "" "\n" "Revisión completa." #, c-format msgid "" "Cant write to proftpd.conf here: \n" "%s\n" msgstr "" "No se pudo escribir a proftpd.conf: \n" "%s\n" msgid "You must specify a username or process number.\n" msgstr "Debes especificar un nombre de usuario o número de proceso.\n" msgid "popen error, user not kicked\n" msgstr "error de popen, el usuario no fue echado\n" msgid "User or pid not found.\n" msgstr "Usuario o pid no encontrados.\n" msgid "popen error, user not kicked or banned.\n" msgstr "error de popen, el usuario no fue echado ni baneado.\n" #, c-format msgid "" "The user was not banned, could not write to:\n" "%s" msgstr "" "El usuario no fue baneado, no se pudo escribir a:\n" "%s" msgid "Cant ban a non active user by PID.\n" msgstr "No se puede banear a un usuario no activo por su PID.\n" msgid "Misspelled maybe ?\n" msgstr "¿Mal escrito quizá?\n" msgid "The user was already banned.\n" msgstr "El usuario ya se encontraba baneado.\n" msgid "The user was not currently in the ftp.\n" msgstr "El usuario no estaba, actualmente, en el ftp.\n" msgid "The user was banned but not kicked.\n" msgstr "El usuario fue baneado, pero no echado.\n" msgid "The user was kicked and banned.\n" msgstr "El usuario fue echado y baneado.\n" msgid "Welcome message generation failed" msgstr "Generación de mensaje de bienvenida fallida" msgid "No xferlog records found or popen failed\n" msgstr "No se encontraron registros de xfer, o popen falló al abrirlos\n" msgid "Every certificate field must be filled in\n" msgstr "Todo campo de certificado debe ser llenado\n" msgid "This step can take a while" msgstr "Este paso puede tomar un tiempo" msgid "The certificate has been created successfully\n" msgstr "El certificado fue creado exitosamente\n" msgid "and placed in the correct location.\n" msgstr "y puesto en el lugar correcto.\n" msgid "It will be used by new FTP-TLS logins.\n" msgstr "Será usado por los nuevos logins FTP-TLS\n" msgid "The certificate has not been created, something went wrong.\n" msgstr "El certificado no fue creado, algo salió mal.\n" msgid "Cant open proftpd.conf for writing here:\n" msgstr "No se pudo abrir proftpd.conf para escribir:\n" msgid "Cant allocate enough memory for adding a new server\n" msgstr "No se pudo reservar memoria suficiente para añadir un nuevo servidor\n" msgid "The standard server can not be deleted.\n" msgstr "El servidor estándar no puede ser eliminado.\n" msgid "Setting a servers port to 0 disables it.\n" msgstr "Estableciendo el puerto de un servidor a 0, lo deshabilita.\n" msgid "Refusing to delete a server with no specified name.\n" msgstr "Rehusando eliminar un servidor sin nombre especificado.\n" msgid "Refusing to delete a server with no specified port.\n" msgstr "Rehusando eliminar un servidor sin puerto especificado.\n" msgid "Cant open the proftpd.conf here:\n" msgstr "No se pudo abrir proftpd.conf:\n" msgid "Could not delete the specified server\n" msgstr "No se pudo borrar el servidor especificado\n" msgid "Refusing to change a server without a specified name.\n" msgstr "Rehusando cambiar el servidor sin un nombre especificado.\n" msgid "Refusing to change a server without a specified port.\n" msgstr "Rehusando cambiar el servidor sin un puerto especificado.\n" msgid "Cant open proftpd.conf here:\n" msgstr "No se pudo abrir proftpd.conf:\n" msgid "Could not find the specified server, no changes where made.\n" msgstr "No se pudo encontrar el servidor especificado, no se realizaron cambios.\n" msgid "GProftpd help" msgstr "Ayuda de GProftpd" msgid "" "\n" "When gproftpd is started it checks if you have all required files and that " "the environment is ok.\n" "\n" msgstr "" "\n" "Cuando gproftpd inicia, revisa que tenga todos los archivos requeridos y que " "el entorno sea correcto.\n" "\n" msgid "" "If you have just upgraded you should check out the homepage if any additions " "to the configuration are\n" msgstr "" "Si acaba de actualizar debería revisa la página web de gproftpd para ver si alguna adición " "a la configuración es\n" msgid "" "necessary in order to take full advantage of all its features.\n" "\n" msgstr "" "necesaria para tomar ventaja total de las características de gproftpd.\n" "\n" msgid "" "Proftpd must be installed and located somewhere in the environments path " "variable\n" "\n" "\n" msgstr "" "Proftpd debe estar instalado y localizado en algún lugar de la variable path" "\n" "\n" msgid "" "When you add a user you can randomize its name and password or use your " "own.\n" msgstr "" "Cuando añade un usuario puede crear un nombre y password aleatorio o usar " "uno propio.\n" msgid "" "You can also select its login shell and where this user should have its root " "directory and upload directory.\n" msgstr "" "También puede elegir su shell de login y dónde debe tener este usuario su directorio " "raíz y directorio de subida.\n" msgid "" "If the selected shell is /bin/false, /sbin/nologin etc the user can only " "login to this ftpserver otherwise\n" msgstr "" "Si el shell seleccionado es /bin/false, /sbin/nologin, etc, el usuario solo puede " "loguearse a este servidor, de lo contrario\n" msgid "" "that user gets a private home directory as well as its ftp directory and can " "login via ssh etc if that server\n" msgstr "" "ese usuario obtiene un directorio home, así como un directorio ftp y puede " "loguearse via ssh si el servidor\n" msgid "" "allows this user to do so.\n" "\n" msgstr "" "se lo permite.\n" "\n" msgid "The upload directory must be located below the users root directory.\n" msgstr "El directorio de subida debe estar localizado debajo del directorio raíz del usuario.\n" msgid "" "If you dont want that user to have an upload directory you can uncheck the " "checkbox next to it.\n" "\n" msgstr "" msgid "" "If you want to add directories thats not under the users root directory you " "can do this:\n" "\n" msgstr "" "Si desea añadir directorios que no se encuentre bajo el directorio raíz del usuario, " "puerde hacer esto:\n" "\n" msgid "Linux (a partir del kernel 2.4.0):\n" msgstr "" msgid "" "mount --bind /some/directory/to/share /home/ftp/make_this_directory_first\n" "\n" msgstr "" msgid "" "Alternatively:\n" "mount -o bind /var/data /home/ftp/bob/data\n" "\n" msgstr "" "Alternativamente:\n" "mount -o bind /var/data /home/ftp/bob/data\n" "\n" msgid "" "*BSD (as of 4.4BSD):\n" "mount_null /var/data /home/ftp/bob/data\n" "\n" msgstr "" "*BSD (a partir de 4.4BSD):\n" "mount_null /var/data /home/ftp/bob/data\n" "\n" msgid "" "Solaris:\n" "mount -F lofs /var/data /home/ftp/bob/data\n" "\n" msgstr "" msgid "" "If you want automatically generated statistics you can use gprostats with " "crond\n" msgstr "" "Si desea estadísticas automáticamente generadas, entonces puede usar gprostats con " "crond\n" msgid "" "or press the welcome and html statistics buttons in the files tab to make " "them once.\n" "\n" msgstr "" "o presionar los botones de bienvenida y estadística en las pestañas de los archivos a realizar " "\n" msgid "" "With crond and gprostats you can do this to have it automatically update the " "statistics:\n" msgstr "" "Con crond y gprostats puede hacer esto para actualizar automáticamente las " "estadísticas:\n" msgid "" "gprostats -html /path/to/output.html\n" "gprostats -w welcome.msg\n" msgstr "" msgid "" "or both at the same time: gprostats -html /path/to/output.html -w welcome." "msg\n" msgstr "" "o ambos a la vez: gprostats -html /path/to/output.html -w welcome." "msg\n" msgid "" "Use -c /path/to/proftpd.conf -x /path/to/xferlog if you need to.\n" "\n" msgstr "" "Use -c /path/to/proftpd.conf -x /path/to/xferlog si lo necesita.\n" "\n" msgid "" "If you have made customized welcome messages and dont want them overwritten\n" msgstr "" "Si ha creado mensajes de bienvenida personalizados y no desea que se sobreescriban\n" msgid "" "by gprostats you can configure this by doubleclicking a user and unchecking " "update statistics.\n" msgstr "" "por gprostats, puede configurar esto mediante un doble click al usuario y luego deseleccionando " "actualizar estadísticas.\n" msgid "" "then pressing the change button, this will also exclude the user from the " "html output.\n" "\n" msgstr "" "luego, presione el botón cambiar, esto también excluirá al usuario de " "salida html.\n" "\n" msgid "" "Some typical setups:\n" "\n" "If one or more of your users needs to have upload access to a http servers " "directory:\n" "\n" msgstr "" "Algunas configuraciones típicas:\n" "\n" "Si uno o más de sus usuarios necesita acceso de subida al directorio del servidor http:" "\n" "\n" msgid "" "1. Set the users ftp root directory to the webserver's root directory /var/" "www/html\n" msgstr "" "1. Establezca el directorio raíz del ftp al directorio raíz del servidor http /var/" "www/html\n" msgid "" " or /var/www/html/this_users_directory for a private homepage.\n" "\n" msgstr "" " o la ruta a una homepage privada.\n" "\n" msgid "" "2. Take away all text from the upload directory field\n" "\n" msgstr "" "2. Quite todo el texto del campo directorio de subida\n" "\n" msgid "3. Make sure the checkbutton next to the upload directory is checked.\n" msgstr "3. Asegurese que el botón de selección esté marcado.\n" msgid "" " Press the add button to add this user.\n" "\n" msgstr "" " Presione el botón añadir para añadir este usuario.\n" "\n" msgid "" "4. You can now login as this user and upload to the html directory.\n" "\n" "\n" msgstr "" "4. Ahora puede loguearse como este usuario y subir archivos al directorio html.\n" "\n" "\n" msgid "" "To add anonymous readonly access to a directory you can do this:\n" "\n" msgstr "" "Para añadir acceso anónimo a un servidor puede:\n" "\n" msgid "1. Type anonymous in the username field. \n" msgstr "1. Escribir anonymous en el campo de usuario.\n" msgid "" " Press the password randomize button or type any password you want.\n" msgstr "" " Presione el botón password aleatorio o escriba el password que desee.\n" msgid " Select the /bin/false shell.\n" msgstr " Seleccione el shell /bin/false.\n" msgid " Uncheck the upload checkbutton, this is important.\n" msgstr " Deseleccione el botón de subida, esto es importante.\n" msgid "" " Press add to add this anonymous user.\n" "\n" msgstr "" " Presione añadir para añadir este usuario anónimo.\n" "\n" msgid "" "2. Doubleclick that user in the users tab and set require password to off " "then\n" msgstr "" "2. Haga doble click en el usuario en la pestaña de usuarios y establezca requerir password a desactivado " "luego\n" msgid "" " check that this user isnt banned then press the change button.\n" "\n" msgstr "" " revise si el usuario no está baneado y presione el botón cambiar.\n" "\n" msgid "" "4. You can now login as anonymous with no password.\n" "\n" "\n" msgstr "" "4. Ya puede loguearse como anonymous sin password.\n" "\n" "\n" msgid "" "This is the default setting, one upload directory and a readonly ftp root " "directory:\n" msgstr "Esta es la configuración por defecto, un directorio de subida y otro de solo lectura como raíz:\n" msgid "Root directory: /home/ftp\n" msgstr "Directorio raíz: /home/ftp\n" msgid "" "Upload directory /home/ftp/upload\n" "\n" msgstr "" "Directorio de subida /home/ftp/upload\n" "\n" msgid "" "The users can then upload files in the upload directory and download from " "the\n" msgstr "" "Los usuarios puede subir archivos al directorio de subida y descargar " "del\n" msgid "" "ftp root directory where you can put what you want to share.\n" "\n" msgstr "" "directorio raíz del ftp, donde puede colocar lo que desée compartir.\n" "\n" msgid "" "You can easily add more servers to run on different interfaces and ports.\n" msgstr "" "Puede añadir facilmente, más servidor y ejecutarlos en distintas interfaces y distintos puertos.\n" msgid "" "When a user connects to one address and port it gets access according to " "that servers\n" msgstr "" "Cuando un usuario se conecta a una dirección y puerto, obtiene acceso de acuerdo a" "ese servidor\n" msgid "" "configuration but only if the server is selected to bind to addresses.\n" msgstr "" "y su configuración, pero sólo si se selecciona asociar direcciones.\n" msgid "" "There are two directives used for this:\n" "Bind and SocketBindTight.\n" msgstr "" "Hay dos directivas usadas para esto:\n" "Bind y SocketBindTight.\n" msgid "" "If you want to turn off a server without deleting it you can set its port " "value to 0\n" "\n" msgstr "" "Si desea desactivar un servidor sin tener que eliminarlo, puede establecer su puerto " "al valor 0\n" "\n" msgid "" "If this Proftpd server is behind a NAT gateway you should specify the " "gateways\n" msgstr "" "Si este servidor Proftpd está detrás de una pasarela NAT, debe especificar la " "pasarela y su\n" msgid "" "DNS name or IP address otherwise turn it off.\n" "\n" msgstr "" "Nombre DNS o dirección IP, de otro modo desactívelo.\n" "\n" msgid "" "If you copy or move a file directly to the ftpservers directory you may need " "to\n" msgstr "" "Si copia o mueve un archivo directamente al directorio de servidores ftp, puede necesitar" "hacer\n" msgid "" "chmod it with 644 and chmod directories to 755 so that the directory and " "file can be accessed.\n" "\n" msgstr "" "chmod 644 y chmod 755 directorios, así los directorios y " "archivos pueden ser usados.\n" "\n" msgid "" "This is one way of chmodding all files recursively in the directory /home/" "ftp:\n" msgstr "" "Esta es una manera de cambiar los permisos de los archivos dentro de /home/" "ftp:\n" msgid "" "find /home/ftp -type f -exec chmod 644 -v {} \\;\n" "\n" msgstr "" msgid "" "Upload directories should have a chmod of 777 and this can be used for /home/" "ftp/upload\n" msgstr "" "Directorios de subida deben ser chmod 777 esto puede ser usado para /home/" "ftp/upload\n" msgid "" "find /home/ftp/upload -type d -exec chmod 777 -v {} \\;\n" "\n" "\n" msgstr "" msgid "" "For more detailed information about the server and its configuration " "directives visit:\n" msgstr "" "Para información más detallada acerca del servidor y su configuración " "visite:\n" msgid "http://www.proftpd.org\n" msgstr "" msgid "Close" msgstr "Cerrar" msgid "Shutdown" msgstr "Desconectar" msgid "The server will shut down according to these settings." msgstr "El servidor se desconectará de acuerdo a esta configuración:" msgid "Time to real shutdown:" msgstr "Tiempo hasta la verdadera desconexión:" msgid "now, +Minutes or HHMM" msgstr "now, +Minutes o HHMM" msgid "New access disabled:" msgstr "Nuevo acceso deshabilitado:" msgid "Minutes before real shutdown." msgstr "Minutos antes de la verdadera desconexión." msgid "Existing users disconnected:" msgstr "Usuarios existentes desconectados:" msgid "Shutdown message:" msgstr "Mensaje de desconexión:" #, c-format msgid "%s , Current connections will be dropped: %d" msgstr "%s, la conexión actual será terminada: %d" msgid "Pressing the online button will let users login again." msgstr "Al presionar el botón activado, permitirá a los usuarios loguearse de nuevo." msgid "Cancel" msgstr "Cancelar" msgid "OK" msgstr "Ok" msgid "GProFTPD information" msgstr "Información de GProFTPD" msgid "User settings" msgstr "Configuración del usuario" msgid "These are the settings for this user." msgstr "Esta es la configuración para este usuario." msgid "Username: " msgstr "Usuario: " msgid "Password: " msgstr "Password: " msgid "Group: " msgstr "Grupo: " msgid "Require password:" msgstr "Requerir password:" msgid "Allow logins from:" msgstr "Permitir logins de:" msgid "Maximum logins: " msgstr "Logins máximos: " msgid "Message: " msgstr "Mensaje: " msgid "Root directory: " msgstr "Directorio raíz: " msgid "Update statistics:" msgstr "Actualizar estadísticas:" msgid "Banned:" msgstr "Baneado:" msgid "Type a password longer then 6 chars to change." msgstr "Introduzca un password mayor de 6 caracteres para cambiar." msgid "all,none,192.168.0.,host.domain.edu,.trusted-domain.org" msgstr "" msgid "Upload directory:" msgstr "Directorio de subida:" msgid "This user is permitted to do the following in this directory:" msgstr "Se le permite a este usuario, hacer lo siguiente en este directorio:" msgid "List:" msgstr "Listar:" msgid "Upload:" msgstr "Subir:" msgid "Append:" msgstr "Anexar:" msgid "Download:" msgstr "Descargar:" msgid "Rename:" msgstr "Renombrar:" msgid "Delete:" msgstr "Eliminar:" msgid "Create directory:" msgstr "Crear directorio" msgid "Remove directory:" msgstr "Remover directorio" msgid "Site:" msgstr "Sitio:" msgid "Show dates:" msgstr "Mostrar fechas:" msgid "Show current path:" msgstr "Mostrar el path actual:" msgid "Show filesize:" msgstr "Mostrar tamaño de archivo" msgid "Change working directory:" msgstr "Cambiar directorio de trabajo:" msgid "Change mode:" msgstr "Modo de cambio:" msgid "Change group:" msgstr "Cambiar grupo:" msgid "Cdup:" msgstr "Cdup:" msgid "Show connection settings:" msgstr "Mostrar configuración de conexión:" msgid "Delete" msgstr "Eliminar" msgid "Change" msgstr "Cambiar" msgid "About" msgstr "Acerca de" msgid "Author: " msgstr "Autor: " msgid "I want to thank the following for their contributions:" msgstr "Deseo agraceder a los siguientes por sus contribuciones:" msgid "for the icons and the weblogo.\n" msgstr "por los íconos y el logo de la web.\n" msgid "for coding support and testing.\n" msgstr "por la asistencia en el código y las pruebas.\n" msgid "The people at the GTK+ development lists.\n" msgstr "La gente en las listas de desarrollo GTK+.\n" msgid "for the RPM spec file." msgstr "por el spec de los RPM." msgid "And all translators:" msgstr "Y a todos los traductores:" msgid "Afrikaans" msgstr "" msgid "Amharic" msgstr "" msgid "Arabic" msgstr "" msgid "Azerbaijani" msgstr "" msgid "Basque" msgstr "" msgid "Bulgarian" msgstr "" msgid "Breton" msgstr "" msgid "Brittish-English" msgstr "" msgid "Bosnian" msgstr "" msgid "Byelorussian" msgstr "" msgid "Catalan" msgstr "" msgid "Chinese" msgstr "" msgid "Chinese-Taiwan" msgstr "" msgid "Croatian" msgstr "" msgid "Czech" msgstr "" msgid "Danish" msgstr "" msgid "Dutch" msgstr "" msgid "Esperanto" msgstr "" msgid "Estonian" msgstr "" msgid "Finnish" msgstr "" msgid "French" msgstr "" msgid "Galician" msgstr "" msgid "German" msgstr "" msgid "Greek" msgstr "" msgid "Hebrew" msgstr "" msgid "Hini" msgstr "" msgid "Hungarian" msgstr "" msgid "Icelandic" msgstr "" msgid "Indonesian" msgstr "" msgid "Irish" msgstr "" msgid "Italian" msgstr "" msgid "Japanese" msgstr "" msgid "Korean" msgstr "" msgid "Kurdish" msgstr "" msgid "Latvian-Lettish" msgstr "" msgid "Lithuanian" msgstr "" msgid "Macedonian" msgstr "" msgid "Maori" msgstr "" msgid "Maltese" msgstr "" msgid "Norwegian" msgstr "" msgid "Polish" msgstr "" msgid "Portuguese" msgstr "" msgid "Portuguese-Brazil" msgstr "" msgid "Romanian" msgstr "" msgid "Russian" msgstr "" msgid "Serbian" msgstr "" msgid "Slovak" msgstr "" msgid "Slovenian" msgstr "" msgid "Spanish" msgstr "" msgid "Swedish" msgstr "" msgid "Tamil" msgstr "" msgid "Thai" msgstr "" msgid "Turkish" msgstr "" msgid "Traditional Chinese" msgstr "" msgid "Ukrainian" msgstr "" msgid "Vietnamese" msgstr "" msgid "Wallon" msgstr "" msgid "Welch" msgstr "" msgid "And a big thanks to the Proftpd team.\n" msgstr "Y un gran agradecimiento al equipo de Proftpd.\n" msgid "Choose the users root directory" msgstr "Elija el directorio raíz de usuario" msgid "Choose an upload directory (must be below the users directory)" msgstr "Elija un directorio de subida (debe estar por debajo del directorio de usuario)" msgid "GProftpd question" msgstr "Pregunta de GProftpd" msgid "" "GProftpd could not find proftpd.conf or you are using\n" "the basic configuration wich doesnt have all features\n" "that gproftpd's default configuration has.\n" "\n" "If you use proftpd's default configuration and dont\n" "want to see this question again, take away the line:\n" "# Port 21 is the standard ftp port.\n" "\n" "Do you want to overwrite proftpd.conf with GProftpd's\n" "default configuration ?\n" "\n" " (If you dont know then press yes)\n" msgstr "" "GProftpd no pudo encontrar proftpd.conf, o está usando\n" "la configuración básica, que no posée todas las características\n" "que la configuración por defecto de gproftpd tiene.\n" "\n" "Si ua la configuración por defecto de proftpd y no\n" "desea ver este aviso de nuevo, quite la línea:\n" "# Port 21 is the standard ftp port.\n" "\n" "¿Desea sobreescribir proftpd.conf con la configuración por defecto de\n" "GProftpd?\n" "\n" " (Si duda, presione Sí)\n" msgid "Yes" msgstr "Sí" msgid "No" msgstr "No" msgid "GProFTPD Password" msgstr "Password de GProFTPD" msgid "This user already existed in the system." msgstr "Este usuario ya existe en el sistema." msgid "Username:" msgstr "Usuario:" msgid "New password: " msgstr "Nuevo password: " msgid "Do you want to change the users password ?" msgstr "¿Desea cambiar el password de los usuarios?" msgid "Dont change" msgstr "No cambiar" msgid "Delete the system user ?" msgstr "¿Eliminar el usuario de sistema?" msgid "Do you also want to delete the system user ?" msgstr "¿También desea eliminar el usuario de sistema?" msgid "Username: " msgstr "Usuario:" msgid "Add this needed master ftpuser ?" msgstr "¿Añadir este, necesario, master ftpuser?" msgid "GProftpd needs to add the user and group the server will runs as." msgstr "GProftpd necesita añadir el usuario y grupo como los cuales se ejecutará el servidor." msgid "User and groupname:" msgstr "Usuario y nombre de grupo:" msgid "This action is necessary, do you want to do it ?" msgstr "Esta acción es necesaria, ¿quiere realizarla?" msgid " Online " msgstr " Activado " msgid " Offline " msgstr " Desactivado " msgid " Shutdown " msgstr " Detener " msgid " ReRead " msgstr " Releer " msgid " Help " msgstr " Ayuda " msgid " About " msgstr " Acerca de " msgid " Quit " msgstr " Salir " msgid "Information:" msgstr "Información:" msgid "proftpd -v failed." msgstr "proftpd -v falló." msgid "The server is currently:" msgstr "El servidor es actualmente:" msgid "Cant determine." msgstr "No se pudo determinar." msgid "This is the configuration for the currently selected server." msgstr "Esta es la configuración para el servidor seleccionado." msgid "Import" msgstr "Importar" msgid "Add Server" msgstr "Añadir servidor" msgid "Delete server" msgstr "Eliminar servidor" msgid "Apply" msgstr "Aplicar" msgid "DNS name or ip address of the server:" msgstr "Nombre DNS o dirección IP del servidor:" msgid "Show alternate server identity:" msgstr "Mostrar identidad alternativa del servidor:" msgid "NAT gateway address:" msgstr "Dirección de la pasarela NAT:" msgid "The administrators email address:" msgstr "El correo electrónico del/los administrador(es):" msgid "To listen on all interfaces 0.0.0.0 can be used" msgstr "Para escuchar en todas las interfaces, 0.0.0.0 puede ser usado" msgid "Only use this if you are behind a NAT gateway" msgstr "Sólo use esto si se encuentra detrás de una pasarela NAT" msgid "Bind servers to their addresses:" msgstr "Asociar servidores a sus direcciones:" msgid "Identity lookups:" msgstr "Búsqueda de identidad:" msgid "Reverse lookups:" msgstr "Búsqueda en reversa:" msgid "Timestandard:" msgstr "Estándar de tiempo:" msgid "The port the server listens on:" msgstr "El puerto en el que escucha el servidor:" msgid "Passive ports range:" msgstr "Rango de puertos pasivos" msgid "Maximum connections for each server:" msgstr "Máximo número de conexiones para cada servidor:" msgid "Max login attempts before disconnected:" msgstr "Máximo número de intentos de login antes de la desconexión:" msgid "Login timeout:" msgstr "Tiempo " msgid "Idle timeout:" msgstr "Tiempo inactivo:" msgid "Randomized username length:" msgstr "Longitud del nombre de usuario aleatoria:" msgid "Randomized password length:" msgstr "Longitud del password aleatoria:" msgid "Randomize to upper or lower case:" msgstr "Mayúsculas o minúsculas, aleatoriamente:" msgid "Default transfermode:" msgstr "Modo de transferencia por defecto:" msgid "FXP transfers:" msgstr "Transferencias FXP:" msgid "gmt" msgstr "GMT" msgid "0 is offline" msgstr "0 es desconectado" msgid "Seconds" msgstr "Segundos" msgid "Useradds default root directory path:" msgstr "Directorio raíz por defecto de usuarios añadidos:" msgid "Useradds default upload directory:" msgstr "Directorio de subida por defecto de usuarios añadidos:" msgid "Statistics default html path:" msgstr "Path html por defecto de estadísticas:" msgid "Statistics default welcome name:" msgstr "Nombre de bienvenida por defecto de estadísticas:" msgid "The systems logfile:" msgstr "El archivo de registro del sistema:" msgid "The server runs as this user:" msgstr "Este servidor se ejecuta como este usuario" msgid "The server runs as this group:" msgstr "Este servidor se ejecuta como este grupo:" msgid "This fake user owns all files:" msgstr "Este usuario falso posée todos los archivos:" msgid "This fake group owns all files:" msgstr "Este grupo falso posée todos los archivos:" msgid "Upload settings:" msgstr "Configuración de subida:" msgid "Upload bandwidth:" msgstr "Ancho de banda de subida:" msgid "Resume broken uploads:" msgstr "Resumir subidas interrumpidas" msgid "Automatically delete aborted uploads:" msgstr "Eliminar automáticamente las subidas abortados" msgid "KB/Sec" msgstr "Kb/s" msgid "Download settings:" msgstr "Configuración de descarga:" msgid "Download bandwidth:" msgstr "Ancho de banda de descarga:" msgid "Resume broken downloads:" msgstr "Resumir descargas inconclusas:" msgid "KB/sec" msgstr "Kb/s" msgid "FTP-TLS secure communications:" msgstr "Comunicaciones seguras FTP-TLS:" msgid "Use FTP-TLS:" msgstr "Usar FTP-TLS:" msgid "Require encrytion on channels:" msgstr "Requerir cifrado en los canales:" msgid "Verify clients:" msgstr "Verificar clientes:" msgid "Use these protocols:" msgstr "Usar estos protocolos:" msgid "TLS Logfile" msgstr "Archivo de registro TLS" msgid "RSA certificate file:" msgstr "Archivo de certificación RSA" msgid "Create a new selfsigned certificate:" msgstr "Crear un nuevo certificado auto firmado:" msgid "DNS name or IP-address of this server:" msgstr "Nombre DNS o dirección IP de éste servidor:" msgid "Email address:" msgstr "Dirección de correo electrónico:" msgid "State or province:" msgstr "Estado o provincia" msgid "City or town:" msgstr "Ciudad o pueblo:" msgid "Organization:" msgstr "Organización:" msgid "Organizational unit:" msgstr "Unidad orgánica:" msgid "Password:" msgstr "Passsword:" msgid "Challenge password:" msgstr "Password de reto:" msgid "Number of bits:" msgstr "Número de bits" msgid "Number of days the certificate is valid:" msgstr "Número de días en los que el certificado es válido" msgid "Countrycode IE: SV, DK, US etc:" msgstr "Código de país IE: SV, DK, PE, US etc" msgid "Generate certificate:" msgstr "Generar certificado:" msgid "Generate" msgstr "Generar" msgid "Servers" msgstr "Servidores" msgid "Add delete or make changes to users in the currently selected server." msgstr "Añadir, borrar or cambiar los usuarios en el servidor seleccionado." msgid "Make a random username" msgstr "Crear nombre de usuario aleatorio" msgid "Select the users root directory" msgstr "Seleccione el directorio raíz de los usuarios" msgid "Root directory:" msgstr "Directorio raíz:" msgid "Make a random password" msgstr "Crear un password aleatorio" msgid "Select an upload directory below the users root directory" msgstr "Seleccione un directorio de subida bajo el directorio raíz del usuario" msgid "Shell: " msgstr "Shell: " msgid "Create this upload directory" msgstr "Crear éste directorio de subida" msgid "Add" msgstr "Añadir" msgid "Doubleclick to make changes to a user" msgstr "Haga doble click para modificar el usuario" msgid "Users" msgstr "Usuarios" msgid "Current usage, transferrates and terminating connections." msgstr "Uso actual, tazas de transferencia y conexiones terminando." msgid "Total bandwidth: " msgstr "Ancho de banda total: " msgid "Total incoming: " msgstr "Entrada total: " msgid " Total outgoing: " msgstr " Salida total: " msgid "Username or PID:" msgstr "Nombre de usuario o PID:" msgid "Kicks the first matching username or the matching process number" msgstr "Echa el primer nombre de usuario o proceso que coincida " msgid "Kick" msgstr "Echar" msgid "Kickbans the first matching username or the matching process number" msgstr "Echa y banea el primer nombre de usuario o proceso que coincida" msgid "Kickban" msgstr "Echar y banear" msgid "Transfers" msgstr "Transferencias" msgid "Information about mounted devices." msgstr "Información acerca de dispositivos montados." msgid "Update" msgstr "Actualizar" msgid "Disc" msgstr "Disco" msgid "Transferred files and statistics generation." msgstr "Archivos transferidos y generación de estadísticas" msgid "Generate:" msgstr "Generar" msgid "Welcome" msgstr "Bienvenido" msgid "Clear" msgstr "Limpiar" msgid "Files" msgstr "Archivos" msgid "This is the entire proftpd configuration." msgstr "Ésta es la configuración de proftpd entera." msgid "Restore" msgstr "Restaurar" msgid "Backup" msgstr "Copia de respaldo" msgid "Check syntax" msgstr "Revise la sintáxis" msgid "The server will not reread its configuration" msgstr "El servidor no re-leerá su configuración" msgid "Save" msgstr "Guardar" msgid "Conf" msgstr "Configurar" msgid "Server security information." msgstr "Información de seguridad del servidor" msgid "Successful logins" msgstr "Logins exitosos" msgid "Refused logins" msgstr "Logins rechazados" msgid "Security" msgstr "Seguridad" #, c-format msgid "Total number of imported users: %ld\n" msgstr "Número total de usuarios importados: %ld\n" msgid "Select any users you want to import" msgstr "Selecciona los usuarios que desee importar" msgid "Import users to the currently selected server." msgstr "Importar usuarios al servidor seleccionado." msgid "All selected users will be imported with the following settings:" msgstr "Todos los usuarios seleccionados serán importados con las siguiente configuración:" msgid "The users will have this root directory:" msgstr "Los usuarios tendrán éste directorio raíz:" msgid "They will have username based directories under the root directory:" msgstr "Tendrán directorios bajo el directorio raíz, basándose en el nombre de usuario:" msgid "Add an upload directory under the root directory:" msgstr "Añadir un directorio de subida bajo el directorio raíz:" msgid "" "If you delete all text here and check the checkbutton then users will be " "able to upload directly in the root directory" msgstr "" "Si borra todo el texto aquí y activa el casillero los usuarios podrán " "subir archivos directamente al directorio raíz" #, c-format msgid "Couldn't find pixmap file: %s" msgstr "No se pudo encontrar el archivo pixmap: %s" gadmin-proftpd-0.4.2/po/fr.po0000664000076400007640000011541310465436440015002 0ustar mangemange# GProftpd - French translation (French - France | visit us at www.keyko-web.net). # Copyright (C) 2006 Gproftpd and Steve HOLWEG # This file is distributed under the same license as the GProftpd package. # Steve HOLWEG , 2006. # Myriam THOMAS , 2006. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: 8.2.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-08-02 12:51+0200\n" "PO-Revision-Date: 2006-08-02 12:51+0200\n" "Last-Translator: Steve HOLWEG \n" "Language-Team: FR \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #, c-format msgid "" "Failed adding the system group:\n" "%s\n" msgstr "" "Echec de l'ajout du groupe syst\xE8me:\n" "%s\n" #, c-format msgid "" "Failed adding the system user:\n" "%s\n" msgstr "" "Echec de l'ajout de l'utilisateur syst\xE8me:\n" "%s\n" #, c-format msgid "" "Added this locked and false shelled system user:\n" "%s\n" msgstr "" "L'utilisateur verouill\xE9 et sans shell suivant a \xE9t\xE9 ajout\xE9:\n" "%s\n" #, c-format msgid "You must specify a username.\n" msgstr "Vous devez sp\xE9" "cifier un nom d'utilisateur.\n" #, c-format msgid "" "Failed adding user: %s\n" "A user name can not begin with a number.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Un nom d'utilisateur ne peut commencer par un chiffre.\n" #, c-format msgid "" "Failed adding user: %s\n" "The user root can not be added for security reasons.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Root ne peut \xEAtre rajout\xE9 pour des raisons de securit\xE9.\n" #, c-format msgid "" "Failed adding user: %s\n" "chars \"<\" and \">\" arent allowed.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Les caract\xE8res \"<\" and \">\" ne sont pas autoris\xE9s.\n" #, c-format msgid "" "Failed adding user: %s\n" "A minimum password length of 6 chars is required.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Le mot de passe doit contenir au moins 6 caract\xE9res.\n" #, c-format msgid "" "Failed adding user: %s\n" "No group specified.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Pas de groupe sp\xE9cifi\xE9.\n" #, c-format msgid "" "Failed adding user: %s\n" "No shell specified.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Pas de Shell sp\xE9cifi\xE9.\n" #, c-format msgid "" "Failed adding user: %s\n" "The specified home directory is too short.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Le r\xE9pertoire personnel est trop court.\n" msgid "A comment is required to add a user.\n" msgstr "Un Commentaire est obligatoire pour ajouter un utilisateur.\n" #, c-format msgid "" "Failed adding user: %s\n" "Cant open proftpd.conf.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Impossible d'ouvrir proftpd.conf.\n" #, c-format msgid "" "Failed adding user: %s\n" "The selected virtual host was not found.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Virtual host inconnu.\n" #, c-format msgid "" "Failed adding user: %s\n" "The user already exists in this server.\n" msgstr "" "Impossibe d'ajouter: %s\n" "Utilisateur d\xE9j\xE0 pr\xE9sent sur le serveur.\n" #, c-format msgid "Error adding group: %s\n" msgstr "Erreur d'ajout du groupe: %s\n" #, c-format msgid "Failed adding user: %s\n" msgstr "Erreur d'ajout de l'utilisateur: %s\n" #, c-format msgid "Failed adding group: %s\n" msgstr "Impossible d'ajouter le groupe: %s\n" msgid "" "The system user was not added because uppercase\n" "or language specific letters are not allowed.\n" msgstr "" "L'Utilisateur syst\xE8me n'a pas \xE9t\xE9 ajout\xE9 car les majuscules\n" "ou autres caract\xE8res sp\xE9cifiques sont interdits.\n" #, c-format msgid "" "The system user \"%s\" already exists.\n" "The user was added to this server but the password was not changed.\n" msgstr "" "L'utilisateur syst\xE8me \"%s\" existe d\xE9j\xE0.\n" "L'utilisateur a \xE9t\xE9 ajout\xE9 au serveur, le mot de passe reste inchang\xE9.\n" #, c-format msgid "" "Could not write the new user configuration to:\n" "%s\n" "Run gproftpd as root\n" msgstr "" "Impossible de sauvegarder la configuration sous:\n" "%s\n" "Executer gproftpd en root\n" msgid "Refusing to change a server without a specified name.\n" msgstr "Impossible de changer de serveur sans nom.\n" msgid "Refusing to change a server without a specified port.\n" msgstr "Impossible de changer de serveur sans port.\n" #, c-format msgid "" "Cant open proftpd.conf here: \n" "%s\n" msgstr "" "Impossible d'ouvrir proftpd.conf: \n" "%s\n" #, c-format msgid "A line with over 8000 chars is not valid in: %s\n" msgstr "Une ligne de plus de 8000 car. est invalide dans: %s\n" #, c-format msgid "The minimum password length is %d.\n" msgstr "La longueur minimum du mot de passe est %d.\n" msgid "Error: user not found, couldnt change its settings.\n" msgstr "Erreur: Utilisateur inconnu, impossible de le modifier.\n" msgid "" "\n" "The Password was changed.\n" msgstr "" "\n" "Le mot de passe a \xE9t\xE9 chang\xE9.\n" msgid "" "The password was not changed.\n" "The user didnt exist in shadow or passwd.\n" msgstr "" "Le mot de passe n'a pas été modifié.\n" "l'utilisateur n'existe pas dans \"shadow\" et \"passwd\".\n" msgid "Delete this system user ?" msgstr "Effacer cet utilisateur système ?" msgid "Do you also want to delete the system user ?" msgstr "Voulez-vous vraiment effacer l'utilisateur système ?" msgid "Username: " msgstr "Nom d'utilisateur: " msgid "No" msgstr "Non" msgid "Delete" msgstr "Effacer" msgid "Mounted on" msgstr "Point de montage" msgid "Free space" msgstr "Espace libre" msgid "Used space" msgstr "Espace utilisé" msgid "Total space" msgstr "Espace total" msgid "Percent used" msgstr "Pourcentage utilisé" msgid "Device" msgstr "Lecteur" #, c-format msgid "Error running command: %s\n" msgstr "Erreur dans la commande: %s\n" #, c-format msgid "gprostats -html %s" msgstr "gprostats -html %s" msgid "Username" msgstr "Nom d'utilisateur" msgid "Action" msgstr "Action" msgid "Bytes" msgstr "Octets" msgid "Files" msgstr "Fichiers" msgid "Hostname" msgstr "Nom d'hôte" msgid "Start of transfer" msgstr "Debut du transfert" msgid "Generate welcome messages" msgstr "Génération du message d'acceuil" msgid "Generate html statistics" msgstr "Génération de statistique HTML" msgid "Select any users you want to import" msgstr "Selection des utilisateurs à importer" msgid "Import users to the currently selected server." msgstr "Importer des utilisateurs vers le serveur sélectionné" msgid "All selected users will be imported with the following settings:" msgstr "Tous les utilisateurs sélectionnés vont être importés avec les paramètres:" msgid "The users will have this root directory:" msgstr "Les utilisateurs vont avoir ce dossier root:" msgid "They will have username based directories under the root directory:" msgstr "Leurs dossiers seront basés sur le nom d'utilisateur dans le dossier root:" msgid "Add an upload directory under the root directory:" msgstr "Ajouter un dossier upload dans le dossier root:" msgid "" "If you delete all text here and check the checkbutton then users will be " "able to upload directly in the root directory" msgstr "" "Si vous effacez tout le texte et validez la case, les utilisateurs " "pourront uploader directement dans le dossier root" msgid "Import" msgstr "Importer" msgid "Cancel" msgstr "Annuler" msgid "Activate" msgstr "Activer" msgid "Deactivate" msgstr "Désactiver" msgid "Shutdown" msgstr "Eteindre" msgid "Apply" msgstr "Appliquer" msgid "Help" msgstr "Aide" msgid "About" msgstr "A propos" msgid "Quit" msgstr "Quitter" msgid "Servers" msgstr "Serveurs" msgid "Users" msgstr "Utilisateurs" msgid "Transfers" msgstr "Transferts" msgid "Disc" msgstr "Disque" msgid "Security" msgstr "Sécurité" msgid "Configuration" msgstr "Configuration" msgid "Information: cant read version" msgstr "Information: Impossible de lire la version" msgid "Status: unknown" msgstr "Statut: indéterminé" msgid "Security information" msgstr "Information de sécurité" msgid " The servers IP-address or hostname: " msgstr " Adresse IP du serveur ou nom de domaine: " msgid "" "ftp.mydomain.org, 192.168.0.100 or 0.0.0.0 which means listen to all network " "interfaces" msgstr "" "ftp.mydomain.org, 192.168.0.100 or 0.0.0.0 qui signifie toutes les interfaces " "réseau" msgid " Alternative server identity: " msgstr " Identité alternative du serveur: " msgid "" "My FTP server or set it to off to have the server use its own name and " "version" msgstr "" "My FTP server ou le mettre sur Off pour utiliser le nom et la version " "du serveur" msgid "On" msgstr "On" msgid "Off" msgstr "Off" msgid " Configure NAT routing: " msgstr " Configuration NAT: " msgid "" "The public IP or DNS name of the NAT router, IE: router.mydomain.org or " "192.168.0.100" msgstr "" "L'adresse IP public ou le nom de domaine du routeur NAT, Ex: router.mydomain.org ou " "192.168.0.100" msgid " The administrators email address: " msgstr " Adresse email de l'administrateur: " msgid "The administrators email address" msgstr "Adresse email de l'administrateur" msgid " Use identity lookups: " msgstr " Identifier l'hôte distant:" msgid " Use reverse lookups: " msgstr " Résoudre les noms DNS: " msgid " Time standard: " msgstr " Heure de base: " msgid "GMT or local time" msgstr "Heure GMT ou heure locale" msgid "GMT" msgstr "GMT" msgid "Local time" msgstr "Heure loc." msgid " Port: " msgstr " Port: " msgid "" "The port the server listens on. 21 is the standard port. 0 means deactivated" msgstr "" "Port d'écoute du serveur. Le port standard et le 21. 0 pour le désactiver" msgid " Passive port range: " msgstr " Port passif: " msgid "From this port" msgstr "A partir du port" msgid "To this port" msgstr "Jusqu'à ce port" msgid " Maximum connections: " msgstr " Nombre de connexions max.: " msgid "The maximum simoultaneous connections for this server" msgstr "Le nombre maximal de connexions pour ce serveur" msgid " Maximum login tries: " msgstr " Nombre d'essai maximum: " msgid "The maximum number of logins a user can fail before disconnected" msgstr "Le nombre maximal d'échec à l'authentification d'un utilisateur " msgid " Login timeout: " msgstr " Délai d'authentification: " msgid "The maximum time a user can spend authenticating" msgstr "Le délai maximum pour qu'un utilisateur s'authentifie" msgid " Idle timeout: " msgstr " Délai d'inactivité" msgid "The time it takes before an idle user is thrown out in seconds" msgstr "Le délai d'inactivité en seconde avant déconnexion" msgid " Transfer mode: " msgstr " Mode de Transfert: " msgid "Binary" msgstr "Binaire" msgid "Ascii" msgstr "Ascii" msgid " FXP transfers: " msgstr " Tranferts FXP: " msgid " Randomized username length: " msgstr " Taille du nom d'utilisateur aléatoire: " msgid "The length of the randomized usernames" msgstr "La taille du nom d'utilisateur" msgid " Randomized password length: " msgstr " Taille du mot de passe aléatoire: " msgid "The length of the randomized passwords" msgstr "La taille du mot de passe" msgid " Randomize case: " msgstr " Case du mot de passe: " msgid "Upper" msgstr "Majuscule" msgid "Lower" msgstr "Minuscule" msgid " Default home directory: " msgstr " Répertoire par défaut: " msgid "This will be set as the users default home directory" msgstr "Ceci va être le dossier par défaut des utilisateurs" msgid " Default upload directory: " msgstr " Répertoire Upload par défaut: " msgid "This will be set as the users default upload directory" msgstr "Ceci va être le dossier upload par défaut des utilisateurs" msgid " Default HTML statistics filepath: " msgstr " Chemin du fichier HTML de statistique: " msgid "" "This will be set as the default HTML statistics filepath, IE: /var/www/ftp." "htm" msgstr "" "Chemin du fichier HTML de statistique, Ex: /var/www/ftp." "htm" msgid " The systems security logfile: " msgstr " Fichier log" msgid "IE: /var/log/secure" msgstr "Ex: /var/log/secure" msgid " The server runs as this user: " msgstr " Utilisateur système du serveur: " msgid "" "The server drops its privileges and runs as this user, nobody is often used" msgstr "" "Le serveur remplace ces droits par cet utilisateur, nobody est le plus courant" msgid " The server runs as this group: " msgstr " Groupe système du serveur: " msgid "" "The server drops its privileges and runs as this group, nobody is often used" msgstr "" "Le serveur remplace ces droits par ce groupe, nogroup est le plus courant" msgid " This fake user owns all files: " msgstr " Cet utilisateur factice possède tous les fichiers: " msgid "Doesnt have to be an existing user" msgstr "N'a pas besoin d'être un utilisateur existant" msgid " This fake group owns all files: " msgstr " Ce groupe factice possède tous les fichiers: " msgid "Doesnt have to be an existing group" msgstr "N'a pas besoin d'être un groupe existant" msgid " Upload speed: " msgstr " Vitesse d'upload: " msgid "Total upload speed shared by all clients" msgstr "Vitesse total en upload partagée par tous les clients" msgid " Download speed: " msgstr " Vitesse de téléchargement: " msgid "Total download speed shared by all clients" msgstr "Vitesse totale en téléchargement partagée par tous les clients" msgid " Allow Resume of broken uploads: " msgstr " Autoriser la reprise des uploads interrompus: " msgid " Allow Resume of broken downloads: " msgstr " Autoriser la reprise des téléchargements interrompus: " msgid " Automatically remove aborted uploads: " msgstr " Suppresion automatique des uploads interrompus: " msgid " FTP-TLS secure communications: " msgstr " FTP-TLS communications encryptées" msgid " Use FTP-TLS secure communications: " msgstr " Utiliser FTP-TLS ? " msgid " Require encryption on channels: " msgstr " Cryptage nécessaire pour: " msgid "Both" msgstr "Les deux" #, c-format msgid "Data" msgstr "Donn\xE9" "es" #, c-format msgid "Control" msgstr "Contr\xF4le" msgid " Verify clients: " msgstr " Vérification des clients: " msgid " Use these protocols: " msgstr " Utilisation de ces protocoles: " msgid "IE: TLSv1" msgstr "Ex: TLSv1" msgid " The TLS logfile: " msgstr " Fichier log TLS: " msgid "IE: /var/log/gproftpd_tls_site1.log" msgstr "Ex: /var/log/gproftpd_tls_site1.log" msgid " The selfsigned certificate settings: " msgstr " Paramètre des certificats auto-signer: " msgid " The RSA certificate file: " msgstr " Fichier RSA: " msgid "IE: /etc/gproftpd/gproftpd_site1.pem" msgstr "Ex: /etc/gproftpd/gproftpd_site1.pem" msgid " This servers DNS name or IP-Address: " msgstr " Nom de domaine ou adresse IP du serveur: " msgid "This servers DNS name or IP address" msgstr "Nom de domaine ou adresse IP du serveur" msgid " Email address: " msgstr " Adresse Courriel: " msgid " State or province: " msgstr " Région ou département: " msgid "A state or a province" msgstr "Une région ou un département" msgid " City or town: " msgstr " Ville: " msgid "A city or a town" msgstr " Le nom de la ville" msgid " Organization: " msgstr " Entreprise: " msgid "Some organization" msgstr "Une entreprise" msgid " Organizational unit: " msgstr " Unité de l'entreprise: " msgid "Accounting" msgstr "Comptable" msgid " Password: " msgstr " Mot de passe: " msgid "A password" msgstr " Un mot de passe" msgid " Challenge password: " msgstr " Vérification du mot de passe: " msgid "A challenge password" msgstr "La vérification du mot de passe" msgid " Number of encryption bits: " msgstr " Niveau d'encryptage en bits: " msgid "Number of bits in the generated certificate" msgstr "Nombre de bits dans le certificat" msgid " Number of days the certificate is valid: " msgstr "Validité du certificat en jour: " msgid "Number of days the certificate is valid" msgstr "Nombre de jour où le certificat est valide " msgid " Country code IE: SV, DK, EN, US: " msgstr " Code pays Ex: FR, DE, EN, US: " msgid "The country code" msgstr "Le code pays" msgid " Generate a new selfsigned certificate: " msgstr " Création d'un nouveau certificat auto-signer" msgid "Address" msgstr "Addresse" msgid "Port" msgstr "Port" msgid "Server Name" msgstr "Nom du serveur" msgid "Server Type" msgstr "Type du serveur" msgid "Import users" msgstr "Importer" msgid "Server settings" msgstr "Paramètre du serveur" msgid " Total transfer rate: " msgstr " Vitesse total: " msgid " Total incoming: " msgstr " Vitesse entrante: " msgid " Total outgoing: " msgstr " Vitesse sortante: " msgid " Username or Process ID: " msgstr" Nom d'utilisateur ou ID du processus: " msgid "Kick" msgstr "Expulsé" msgid "Kickban" msgstr "Bannir" msgid "Account locked:" msgstr "Compte Bloqué" msgid "Username:" msgstr "Nom d'utilisateur:" msgid "Create a randomized username" msgstr "Créer un nom aléatoire" msgid "Password:" msgstr "Mot de passe:" msgid "Create a randomized password" msgstr "Créer un mot de passe aléatoire" msgid " Group: " msgstr " Groupe: " msgid "The group the user belongs to" msgstr "Le groupe de l'utilisateur" msgid " Comment: " msgstr " Commentaire: " msgid "A comment about the user" msgstr "Un Commentaire sur l'utilisateur" msgid "Home directory:" msgstr "Dossier Personnel:" msgid "Choose a home directory for this user" msgstr "Choissisez un répertoire pour l'utilisateur" msgid " Shell: " msgstr " Shell: " msgid " Require password: " msgstr " Mot de passe? " msgid " Show user in statistics: " msgstr " Inclure dans les statistiques? " msgid " Maximum logins: " msgstr " Logins max.: " msgid "Maximum number of simultaneous logins this user can make" msgstr " Nombre de connexions maximum simultanées pour cet utilisateur " msgid " Allow logins from: " msgstr " Autoriser les logins depuis: " msgid "All, None, IP, DNS name or CIDR-Address" msgstr "All, None, IP, nom de domaine ou adresse CIDR" msgid "Click_Here" msgstr "Cliquer_Ici" msgid "User" msgstr "Utilisateur" msgid "Group" msgstr "Groupe" msgid "Comment" msgstr "Commentaire" msgid "Home directory" msgstr "Répertoire local" msgid "Require password" msgstr "Mot de passe" msgid "Banned" msgstr "Banni" msgid "Maximum connections" msgstr "Max. connexions" msgid "User settings and directories:" msgstr "Paramètre utilisateur" msgid "Add a new directory." msgstr "Ajouter un nouveau dossier" msgid "Add directory" msgstr "Ajouter un dossier" msgid "Delete the selected directory." msgstr "Effacer le dossier sélectionner." msgid "Delete directory" msgstr "Effacer le dossier" msgid "Apply changes after adding directories and setting permissions." msgstr "Appliquer après avoir créé les dossiers et donné les droits." msgid "Apply changes" msgstr "Appliquer" msgid "Directory" msgstr "Dossier" msgid "List" msgstr "Liste" msgid "Upload" msgstr "Upload" msgid "Append" msgstr "Ajouter" msgid "Download" msgstr "Téléchargement" msgid "Rename" msgstr "Renommer" msgid "Overwrite" msgstr "Réécrire" msgid "Make directory" msgstr "Créer dossier" msgid "Remove directory" msgstr "Supprimer dossier" msgid "Site" msgstr "Site" msgid "Chmod" msgstr "Chmod" msgid "Change group" msgstr "Changer de groupe" msgid "Show dates" msgstr "Afficher les dates" msgid "Show working directory" msgstr "Afficher les dossiers en cour" msgid "Show sizes" msgstr "Afficher les tailles" msgid "Stat" msgstr "Stat" msgid "Change working directory" msgstr "Changer de dossier courant" msgid "CD up" msgstr "CD up" msgid "Credits" msgstr "Credits" msgid "Author: " msgstr "Auteur: " msgid "I want to thank the following for their contributions:" msgstr "Je voudrai remercier les personnes suivantes pour leur contribution:" msgid "" "The PROFTPD developers.\n" "\n" msgstr "" "Les developpeurs de PROFTPD.\n" "\n" msgid "for the RPM spec file." msgstr "pour le fichier RPM" msgid "And all translators:" msgstr "Et tous les traducteurs:" msgid "Afrikaans" msgstr "Africains" msgid "Amharic" msgstr "Amharique" msgid "Arabic" msgstr "Arabe" msgid "Azerbaijani" msgstr "Azerbaijan" msgid "Basque" msgstr "Basque" msgid "Bulgarian" msgstr "Bulgare" msgid "Breton" msgstr "Breton" msgid "Brittish-English" msgstr "Anglais" msgid "Bosnian" msgstr "Bosniaque" msgid "Byelorussian" msgstr "Byelorusse" msgid "Catalan" msgstr "Catalan" msgid "Chinese" msgstr "Chinois" msgid "Chinese-Taiwan" msgstr "Chinois-Taiwanais" msgid "Croatian" msgstr "Croate" msgid "Czech" msgstr "Tchèque" msgid "Danish" msgstr "Danois" msgid "Dutch" msgstr "Néerlandais" msgid "Esperanto" msgstr "" msgid "Estonian" msgstr "Estonnien" msgid "Finnish" msgstr "Finlandais" msgid "French" msgstr "Français" msgid "Galician" msgstr "Galicien" msgid "German" msgstr "Allemand" msgid "Greek" msgstr "Grecque" msgid "Hebrew" msgstr "Hebreux" msgid "Hini" msgstr "Indoux" msgid "Hungarian" msgstr "Hongrois" msgid "Icelandic" msgstr "Islandais" msgid "Indonesian" msgstr "indonésien" msgid "Irish" msgstr "Irlandais" msgid "Italian" msgstr "Italien" msgid "Japanese" msgstr "Japonais" msgid "Korean" msgstr "Koréen" msgid "Kurdish" msgstr "Kurde" msgid "Latvian-Lettish" msgstr "Leitton" msgid "Lithuanian" msgstr "Lithuanien" msgid "Macedonian" msgstr "Macedonien" msgid "Maori" msgstr "Maori" msgid "Maltese" msgstr "Maltais" msgid "Norwegian" msgstr "Norvégien" msgid "Polish" msgstr "Polonais" msgid "Portuguese" msgstr "Portugais" msgid "Portuguese-Brazil" msgstr "Portugais-brésilien" msgid "Romanian" msgstr "Roumain" msgid "Russian" msgstr "Russe" msgid "Serbian" msgstr "Serbe" msgid "Slovak" msgstr "Slovaque" msgid "Slovenian" msgstr "Slovénien" msgid "Spanish" msgstr "Espagnol" msgid "Swedish" msgstr "Suédois" msgid "Tamil" msgstr "Tamoul" msgid "Thai" msgstr "Thailandais" msgid "Turkish" msgstr "Turkisch" msgid "Traditional Chinese" msgstr "Chinois traditionnel" msgid "Ukrainian" msgstr "Ukrainien" msgid "Vietnamese" msgstr "Vietnamien" msgid "Wallon" msgstr "" msgid "Welch" msgstr "" msgid "Close" msgstr "" msgid "Could not delete the user, select a user first.\n" msgstr "Impossible de supprimer l'utilisateur, selectionner en un avant.\n" msgid "User root can not be deleted.\n" msgstr "Impossible de supprimer root.\n" #, c-format msgid "" "proftpd.conf was not found here:\n" "%s\n" msgstr "" "proftpd.conf na pas \xE9t\xE9 trouver à l'emplacement:\n" "%s\n" msgid "Could not find the server, user not deleted\n" msgstr "Impossible de trouver le serveur, utilisateur non supprimé\n" msgid "No username specified.\n" msgstr "Pas de nom d'utilisateur.\n" msgid "The root user can not be deleted.\n" msgstr "Impossible de supprimer root.\n" #, c-format msgid "Failed deleting user: %s\n" msgstr "Impossible d'effacer: %s\n" msgid "User setting not found" msgstr "Paramètre utilisateur introuvable" msgid "No value has been set" msgstr "Pas de valeur saisie" msgid "No comment set" msgstr "Pas de commantaire saisi" msgid "Max randomize username length is 999\n" msgstr "Taille maximum des noms d'utilisateurs: 999\n" msgid "Randomize username length can only contain digits\n" msgstr "les noms d'utilisateurs ne peuvent contenir que des caratères de base\n" msgid "Max home directory length is 8192 chars.\n" msgstr "Taille maximum des noms de dossier: 8192 car.\n" msgid "Max randomize password length is 999\n" msgstr "Taille maximum des mots de passes: 999\n" msgid "Randomize password length can only contain digits\n" msgstr "Les mots de passes ne peuvent contenir que des carat\xE8res de base\n" msgid "Randomize length too long, changed it to 256.\n" msgstr "Taille aléatoire trop grande, la changer en 256.\n" msgid "Every certificate field must be filled in.\n" msgstr "Tous les champs du certificat doivent être remplis.\n" msgid "The password field cant contain any spaces or newline chars.\n" msgstr "Le mot de passe ne peut contenir d'espace ou de \"\\n\".\n" #, c-format msgid "Error writing gprotls.conf here: %s\n" msgstr "Erreur d'\xE9criture de gprotls.conf dans: %s\n" msgid "Creating private cert and key" msgstr "Création du certificat et de la clef" msgid "The certificate has been created successfully\n" msgstr "Le certificat à été créé avec succès\n" msgid "and placed in the correct location.\n" msgstr "Et placé dans le bon dossier.\n" msgid "It will be used by new FTP-TLS logins.\n" msgstr "Il sera utilisé pour les nouvelles connexions FTP-TLS.\n" msgid "The certificate has not been created, something went wrong.\n" msgstr "Le certificat n'a pas été créé, une erreur est survenue.\n" msgid "Couldnt create the ftpusers file here:\n" msgstr "Impossible de créer le fichier ftpusers:\n" msgid "" "\n" "\n" "Make sure the directories exists then restart gproftpd.\n" msgstr "" "\n" "\n" "Vérifier que le répertoire existe puis relancer gproftpd.\n" msgid "" "\n" "If this security feature still fails then security will be good but not " "optimal.\n" msgstr "" "\n" "Si cette option de security continue à se mettre en échec, la securité " "est active mais non optimale.\n" msgid "Couldnt find ftpusers here:\n" msgstr "Impossible de trouver ftpusers ici:\n" msgid "" "\n" "\n" "The missing file was created and all users on the system was added to it.\n" msgstr "" "\n" "\n" "Le fichier à été créé et tout les utilisateurs système y ont été ajouté.\n" msgid "All current users are now banned from using the ftp server until they\n" msgstr "Tous les utilisateurs sont bannis du serveur jusqu'\xE0 ce qu'ils\n" msgid "" "are unbanned. This in an auto security feature and its normal if this is\n" msgstr "" "soient débannis. Ceci est une securité automatique et cela est normal si c'est\n" msgid "the first time you start gproftpd.\n" msgstr "la premi\xE8" "re fois que vous utilisez gproftpd.\n" #, c-format msgid "" "The user: \"%s\" was not imported\n" "because it already existed in this server.\n" msgstr "" "L'utilisateur: \"%s\" n'a pas \xE9t\xE9 import\xE9\n" "car il existe d\xE9j\xE0 sur le serveur.\n" #, c-format msgid "Total number of imported users: %ld\n" msgstr "Nombre d'utilisateurs import\xE9s: %ld\n" msgid "uploaded" msgstr "Uploader" msgid "downloaded" msgstr "Télécharger" msgid "deleted" msgstr "Effacer" msgid "split filename ?" msgstr "Séparer les noms de fichiers ?" #, c-format msgid "" "Cant open the security log here:\n" "%s\n" msgstr "" "Impossible d'ouvrir le fichier log securit\xE9:\n" "%s\n" #, c-format msgid "" "Cant find the shells file here:\n" "%s\n" msgstr "" "Impossible de trouver le shell:\n" "%s\n" #,#, c-format msgid "" "Warning: could not find a false or no login shell here:\n" "%s\n" "Appending the other shells." msgstr "" "Attention: Impossible de trouver un shell null ou aucun shell:\n" "%s\n" "? les autres shells." #, c-format msgid "yes" msgstr "oui" #, c-format msgid "no" msgstr "non" #, c-format msgid "" "Error reading the configuration here:\n" "%s\n" msgstr "" "Erreur de lecture de la configuration:\n" "%s\n" #, c-format msgid "" "A line with over 4000 chars is not valid in:\n" "%s\n" msgstr "" "Une ligne de plus de 4000 car. est invalide dans:\n" "%s\n" msgid "Set version failed\n" msgstr "Erreur de la Mise à jour de la version\n" #, c-format msgid " Information: %s" msgstr " Information: %s" msgid " Proftpd is not installed or not in your path." msgstr " Proftpd n'est pas installé ou différent du \"path\"." msgid "GProftpd help" msgstr "Aide Gproftpd" msgid "" "\n" "\n" "Adding users:\n" "\n" msgstr "" "\n" "\n" "Ajout d'utilisateurs:\n" "\n" msgid "" "When adding a user you can randomize its username and password or use your " "own.\n" msgstr "" "Quand vous ajoutez un utilisateur vous pouvez soit créer un nom d'utilisateur \n" "et un mot de passe aléatoire soit définir vous même les données.\n" msgid "" "You can also select its login shell, group, comment and toplevel ftp home " "directory.\n" msgstr "" "Vous pouvez aussi définir le shell, groupe, commentaire et répertoire racine.\n" msgid "Press add when you are satisfied with the users settings.\n" msgstr "Une fois satisfait de la configuration, pressez la touche \"ajouter\".\n" msgid "" "When the user has been added you can add and set permissions on its " "directories.\n" "\n" msgstr "" "Une fois l'utilisateur ajouté vous pouvez ajouter et définir les droits " "sur les dossiers.\n" "\n" msgid "" "Any other directories added must be located below the ftp home directory for " "this user.\n" "\n" msgstr "" "Tout autre dossier ajouté doit être placé dans le répertoire racine de " "l'utilisateur.\n" "\n" msgid "" "If you need to add more users with similar settings you can simply change a " "current users\n" msgstr "" "Si vous avez besoin d'ajouter plusieurs utilisateurs avec des paramètres \n" "sensiblements identiques vous pouvez simplement changer le\n" msgid "" "username, password and directory and then press the add button.\n" "\n" msgstr "" "nom d'utilisateur, mot de passe, répertoire et cliquez sur la touche \"ajouter\".\n" "\n" msgid "" "\n" "2 typical setups:\n" "\n" msgstr "" "\n" "2 Exemple de Configuration:\n" "\n" msgid "" "Users needs upload access to a http servers directory:\n" "\n" msgstr "" "Les utilisateurs ont besoin d'un accès en upload vers un serveur http:\n" "\n" msgid "Set the users home directory to the webserver's root directory IE:\n" msgstr "Définnissez le répertoire racine de l'utilisateur vers le répertoire web\n" msgid "/var/www/html or /var/www/html/UserName for a private homepage.\n" msgstr "Ex: /var/www/html ou /var/www/html/UserName pour un site perso.\n" msgid "" "Add the required upload permissions for this users directory and press " "apply.\n" "\n" msgstr "" "Ensuite ajoutez les droits d'upload sur le dossier et cliquez sur " "\"appliquer\".\n" "\n" msgid "" "\n" "Adding anonymous access to a directory:\n" "\n" msgstr "" "\n" "Ajout d'un accès anonyme à un dossier:\n" "\n" msgid "Type anonymous in the username field.\n" msgstr "Ecrivez \"anonymous\" dans champ du nom d'utilisateur.\n" msgid "" "Press the password randomize button or type a password longer then 5 chars.\n" msgstr "" "Générez un mot de passe aléatoire ou de votre cru long de 5 car. minimum.\n" msgid "Type anonymous as group and comment.\n" msgstr "Ecrivez \"anonymous\" dans le group et le commentaire.\n" msgid "Select /dev/null shell.\n" msgstr "Séléctionnez le Shell /dev/null.\n" msgid "Set require password to off.\n" msgstr "Définnissez la case mot de passe à faux.\n" msgid "Type this users home directory IE: /var/ftp/anonymous.\n" msgstr "Définnissez son répertoire personnel Ex: /var/ftp/anonymous.\n" msgid "Press add to add this anonymous user.\n" msgstr "Cliquez sur \"ajouter\" pour valider.\n" msgid "" "You can now login as anonymous with no password.\n" "\n" msgstr "" "Maintenant vous pouvez accedez de façon anonyme et sans mot de passe.\n" "\n" msgid "" "If the selected shell is false or null the user can only login to this " "ftpserver otherwise\n" msgstr "" "Si le Shell est \"false\" ou \"null\" l'utilisateur peut uniquement se\n" "connecter au serveur ftp dans les autres cas \n" msgid "" "that user gets a private home directory as well as its ftp directory and can " "login via ssh\n" msgstr "" "l'utilisateur obtient un répertoire personnel accessible par le ftp, via ssh, etc\n" msgid "" "etc if that server allows the user to do so.\n" "\n" msgstr "" "si le serveur le permet.\n" "\n" msgid "" "You can easily add more servers to run on different interfaces and ports.\n" msgstr "" "Vous pouvez simplement ajouter d'autres serveurs sur différents ports ou interfaces.\n" msgid "" "The same users can have different directories and settings in different " "servers.\n" msgstr "" "Le même utilisateur peut avoir différents dossiers et droits sur différents " "serveurs.\n" msgid "" "When a user connects to one address and port it gets access according to " "that servers\n" msgstr "" "Quand un utilisateur se connecte sur un serveur (une adresse et un port), il accéde à \n" msgid "configuration for that user.\n" msgstr "ce serveur et sa configuration pour l'utilisateur.\n" msgid "" "If you want to turn a server off without deleting it you can set its port " "value to 0\n" "\n" msgstr "" "Si vous voulez éteindre un serveur sans l'effacer, il suffit de mettre son " "port à la valeur 0.\n" "\n" msgid "" "If this Proftpd server is behind a NAT gateway you should specify the " "gateways\n" msgstr "" "Si le serveur Proftpd est derrière un routeur NAT vous devriez spécifier" "la passerelle,\n" msgid "" "external DNS name or IP-address as \"Configure NAT routing\" and then turn " "it on.\n" "\n" msgstr "" "le nom de domaine ou l'adresse IP dans \"Configuration NAT\" et activer " "l'option.\n" "\n" msgid "" "If you want to add directories thats not under the users root directory you " "can do this:\n" "\n" msgstr "" "Si vous voulez ajouter des dossiers extérieurs au dossier racine de l'utilisateur\n" "vous pouvez faire:\n" "\n" msgid "Linux (as of kernel 2.4.0):\n" msgstr "Linux (à partir du kernel 2.4.0):\n" msgid "" "mount --bind /some/directory/to/share /var/ftp/make_this_directory_first\n" "\n" msgstr "" "mount --bind /un/dossier/a/partagé /var/ftp/vers_le_dossier\n" "\n" msgid "" "Alternatively:\n" "mount -o bind /var/data /var/ftp/bob/data\n" "\n" msgstr "" "Alternative:\n" "mount -o bind /un/dossier/a/partagé /var/ftp/vers_le_dossier\n" "\n" msgid "" "*BSD (as of 4.4BSD):\n" "mount_null /var/data /var/ftp/bob/data\n" "\n" msgstr "" "*BSD (à partir de 4.4BSD):\n" "mount_null /un/dossier/a/partagé /var/ftp/vers_le_dossier\n" "\n" msgid "" "Solaris:\n" "mount -F lofs /var/data /var/ftp/bob/data\n" "\n" msgstr "" "Solaris:\n" "mount -F lofs /un/dossier/a/partagé /var/ftp/vers_le_dossier\n" "\n" msgid "" "Statistics:\n" "\n" msgstr "" "Statistiques:\n" "\n" msgid "" "Pressing the generate welcome statistics button in the file tab will create\n" msgstr "" "Le bouton \"Génération du message d'acceuil\" dans l'onglet \"fichiers\" a pour effet de créer\n" msgid "welcome messages for all users in this FTP server\n" msgstr "un message de bienvenue pour tous les utilisateurs du serveur ftp.\n" msgid "Pressing generate HTML statistics in the file tab creates top 10\n" msgstr "Le bouton \"Génération de statistique HTML\"dans l'onglet \"fichiers\" créer le TOP 10\n" msgid "" "upload and download statistics as a webpage IE: /var/www/html/ftp.htm\n" "\n" msgstr "" "des uploads et téléchargements au format HTML Ex: /var/www/html/ftp.htm\n" "\n" msgid "" "With crond and gprostats you can do this to have it automatically update the " "statistics:\n" msgstr "" "Grâce a \"crond\" et \"gprostats\" vous pouvez automatiser la mise à jour des " "statistiques:\n" msgid "" "gprostats -html /path/to/output.html\n" "gprostats -w welcome.msg\n" msgstr "" "gprostats -html /chemin/vers/sorti.html\n" "gprostats -w welcome.msg\n" msgid "" "or both at the same time: gprostats -html /path/to/output.html -w welcome." "msg\n" msgstr "" "ou les deux ensembles: gprostats -html /chemin/vers/sorti.html -w welcome." "msg\n" msgid "" "Use -c /path/to/proftpd.conf -x /path/to/xferlog if you need to.\n" "\n" msgstr "" "Utiliser -c /path/to/proftpd.conf -x /path/to/xferlog si besoin est.\n" "\n" msgid "" "If you have made customized welcome messages and dont want them overwritten " "by gprostats\n" msgstr "" "Si vous avez customisé le ficher de bienvenue et ne voulez pas le mettre à jour\n" msgid "" "you can configure this by doubleclicking a user and unchecking update " "statistics.\n" msgstr "" "par gprostats vous pouvez exclure un utilisateur en double cliquant dessus \n" "et en décochant \"Inclure dans les statistiques\".\n" msgid "" "then pressing the apply button, this will also exclude the user from the " "html output.\n" "\n" msgstr "" "Une fois appliqué, l'utilisateur sera aussi exclu des mises à jour HTML.\n" "\n" msgid "" "If you copy or move a file directly to the ftpservers directory you may need " "to\n" msgstr "" "Si vous copiez ou deplacez un fichier directement dans le répertoire ftp vous devez\n" msgid "" "chmod it with 644 and chmod directories to 755 so that the directory and " "file can be accessed.\n" "\n" msgstr "" "faire un \"chmod\" 644 et un \"chmod\" 755 sur les dossiers pour pourvoir " "y accéder.\n" "\n" msgid "" "This is one way of chmodding all files recursively in the directory /var/" "ftp:\n" msgstr "" "Il existe une seule solution pour attribuer les droits aux fichiers dans /var/" "ftp:\n" msgid "" "find /var/ftp -type f -exec chmod 644 -v {} \\;\n" "\n" msgstr "" msgid "" "Upload directories should have a chmod of 777 and this can be used for /var/" "ftp/upload\n" msgstr "" "Le répertoire Upload nécessite les droits \"chmod\" 777, par exemple pour /var/" "ftp/upload\n" msgid "" "find /var/ftp/upload -type d -exec chmod 777 -v {} \\;\n" "\n" "\n" msgstr "" msgid "" "For more detailed information about the server and its configuration " "directives visit:\n" msgstr "" "Pour plus d'informations sur le serveur et sa configuration vous pouvez " "consulter:\n" msgid "http://www.proftpd.org\n" msgstr "" #, c-format msgid "%s %s information" msgstr "" msgid "The server will shut down according to these settings." msgstr "Le serveur va s'éteindre d'après les paramètres." msgid "Time to real shutdown:" msgstr "Temps avant extinction réel:" msgid "now, +Minutes or HHMM" msgstr "now, +Minutes ou HHMM" msgid "New access disabled:" msgstr "Nouvel accès interdit:" msgid "Minutes before real shutdown." msgstr "Minute avant extinction réelles." msgid "Existing users disconnected:" msgstr "Utilisateurs déconnectés:" msgid "Shutdown message:" msgstr "Message d'arrêt:" #, c-format msgid "%s , Current connections will be dropped: %d" msgstr "%s , Les connexions actuelles seront coupées: %d" msgid "" "Pressing the activate button will cancel the shutdown and let users login " "again." msgstr "" "Appuyer sur \"Activer\" pour annuler l'extinction et revenir à " "l'état normal." msgid "OK" msgstr "Ok" #, c-format msgid "" "Cant write a new proftpd.conf here:\n" "%s\n" msgstr "" "Impossible d'\xE9crire proftpd.conf:\n" "%s\n" msgid "GProftpd question" msgstr "" msgid "" "GProftpd could not find proftpd.conf or you are using\n" "the basic configuration that doesnt have all features\n" "that gproftpd requires.\n" "\n" "If you use proftpd's default configuration and dont\n" "want to see this question again then delete the line:\n" "\"# Port 21 is the standard ftp port\"\n" "in the configuration tab.\n" "Do you want to overwrite proftpd.conf with GProftpd's\n" "default configuration ?\n" "\n" " (If you dont know then press yes)\n" msgstr "" "GProftpd ne trouve pas proftpd.conf ou vous utilisez\n" "la configuration de base qui ne contient pas toutes les fonctions\n" "nécessaire à gproftpd.\n" "\n" "Si vous utilisez la configuration de base et ne voulez\n" "réafficher cette question, effacer la ligne:\n" "\"# Port 21 is the standard ftp port\"\n" "dans l'onglet configuration.\n" "Voulez-vous réecrire proftpd.conf avec la configuration\n" "par défaut de proftpd ?\n" "\n" " (Si vous ne savez pas cliquer sur oui)\n" msgid "Yes" msgstr "Oui" msgid "Status: Deactivated" msgstr "Statut: Desactiver" msgid "The server is deactivated.\n" msgstr "Le serveur est desactivé.\n" msgid "Status: Activated" msgstr "Statut: Activer" msgid "Error running ftpwho -v.\n" msgstr "" #, c-format msgid "Couldn't find pixmap file: %s" msgstr "" gadmin-proftpd-0.4.2/po/sv.po0000644000000000000000000012155411513432757014554 0ustar rootroot# Swedish translation of GADMIN-ProFTPD. # Copyright (C) 2008 magnus-swe@telia.com # This file is distributed under the same license as the gadmin-proftpd package. # FIRST AUTHOR , 2004. # msgid "" msgstr "" "Project-Id-Version: gadmin-proftpd 0.3.6\n" "Report-Msgid-Bugs-To: magnus-swe@telia.com\n" "POT-Creation-Date: 2004-05-30 20:12+0200\n" "PO-Revision-Date: 3004-05-30 20:00+0200\n" "Last-Translator: Magnus-swe \n" "Language-Team: SV \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "" "Write the new users name and other settings in the user profile below.\n" msgstr "Skriv den nya användarens namn och andra inställningar i användarprofilen nedan.\n" msgid "" "Press apply to add this new user with the selected settings.\n" "\n" msgstr "Tryck verkställ för att lägga till den nya användaren med de nya inställningarna.\n" "\n" msgid "" "You can also skip this step and directly alter an existing users name and\n" msgstr "Du kan också skippa detta steg och ändra en existerande användares namn och\n" msgid "settings and then press apply. This can save administration time.\n" msgstr "inställningar direkt och sedan trycka på verkställ. Detta kan spara administrationtid.\n" msgid "You need to generate certificates before you can start the server.\n" msgstr "Du måste generera certifikat innan du kan starta servern.\n" #, c-format msgid "" "Failed adding the system group:\n" "%s\n" msgstr "Misslyckades med att lägga till systemgruppen:\n" "%s\n" #, c-format msgid "" "Failed adding the system user:\n" "%s\n" msgstr "Misslyckades med att lägga till systemanvändaren:\n" "%s\n" #, c-format msgid "" "Added this locked and false shelled system user:\n" "%s\n" msgstr "Lade till den här låsta och falskskaliga systemanvändaren:\n" "%s\n" #, c-format msgid "Failed reading file: %s\n" msgstr "Misslyckades med att läsa filen: %s\n" msgid "You must specify a username.\n" msgstr "Du måste ange ett användarnamn.\n" #, c-format msgid "" "Failed adding user: %s\n" "A user name can not begin with a number.\n" msgstr "Misslyckades med att lägga till användaren: %s\n" "Ett användarnamn kan inte börja med ett nummer.\n" #, c-format msgid "" "Failed adding user: %s\n" "The user root can not be added for security reasons.\n" msgstr "" "Misslyckades med att lägga till användare: %s\n" "Root-användaren kan inte läggas till av säkerhetsskäl.\n" #, c-format msgid "" "Failed adding user: %s\n" "chars \"<\" and \">\" arent allowed.\n" msgstr "" "Misslyckades med att lägga till användaren: %s\n" "Tecknen \"<\" och \">\" är inte tillåtna.\n" #, c-format msgid "" "Failed adding user: %s\n" "A minimum password length of 6 chars is required.\n" msgstr "" "Misslyckades med att lägga till användaren: %s\n" "En minimum-lösenordslängd på 6 tecken krävs.\n" #, c-format msgid "" "Failed adding user: %s\n" "No group specified.\n" msgstr "" "Misslyckades med att lägga till användaren: %s\n" "Ingen grupp has angetts.\n" #, c-format msgid "" "Failed adding user: %s\n" "No shell specified.\n" msgstr "" "Misslyckades med att lägga till användaren: %s\n" "Inget skal är angett.\n" msgid "A comment is required to add a user.\n" msgstr "En kommentar krävs för att lägga till en användare.\n" #, c-format msgid "" "Failed adding user: %s\n" "Cant open proftpd.conf.\n" msgstr "" "Misslyckades med att lägga till användaren: %s\n" "Kan inte öppna proftpd.conf\n" #, c-format msgid "" "Failed adding user: %s\n" "The selected virtual host was not found.\n" msgstr "" "Misslyckades med att lägga till användaren: %s\n" "Den valda virtuella värden hittades inte.\n" #, c-format msgid "" "Failed adding user: %s\n" "The user already exists in this server.\n" msgstr "" "Misslyckades med att lägga till användaren: %s\n" "användaren finns redan i den här servern.\n" #, c-format msgid "Failed adding user: %s\n" msgstr "Misslyckades med att lägga till användaren: %s\n" #, c-format msgid "Failed adding group: %s\n" msgstr "Misslyckades med att lägga till gruppen: %s\n" #, c-format msgid "Error adding group: %s\n" msgstr "Fel vid tillägg av grupp: %s\n" msgid "" "The system user was not added because uppercase\n" "or language specific letters are not allowed.\n" msgstr "" "Systemanvändaren lades inte till för att stora\n" "eller språkspecifika tecken inte tillåts.\n" msgid "Missing ftp home directory. Scroll down and add one first.\n" msgstr "Hemkatalog saknas. Scrolla ner och lägg till en först.\n" #, c-format msgid "" "The system user \"%s\" already exists.\n" "The user was added to this server but the password was not changed.\n" msgstr "" "Systemanvändaren \"%s\" finns redan.\n" "Användaren lades till i den här servern men lösenordet ändrades inte.\n" #, c-format msgid "" "Could not write the new user configuration to:\n" "%s\n" "Run gadmin-proftpd as root\n" msgstr "" "Kunde inte skriva den nya användarkonfigurationen till:\n" "%s\n" "Kör gadmin-proftpd som root\n" msgid "Refusing to change a server without a specified name.\n" msgstr "Vägrar att lägga till en server utan specifiserat namn.\n" msgid "Refusing to change a server without a specified port.\n" msgstr "Vägrar att ändra en server utan specifiserad port.\n" #, c-format msgid "" "Cant open proftpd.conf here: \n" "%s\n" msgstr "" "Cant open proftpd.conf här:\n" "%s\n" #, c-format msgid "A line with over 8000 chars is not valid in: %s\n" msgstr "En rad med över 8000 tecken är inte tillåtet i: %s\n" #, c-format msgid "The minimum password length is %d.\n" msgstr "Minsta lösenordslängd är: %d.\n" msgid "Error: user not found, couldnt change its settings.\n" msgstr "Fel: Användaren hittades inte, kunde inte ändra dess inställningar.\n" msgid "" "\n" "The Password was changed.\n" msgstr "" "\n" "Lösenordet ändrades.\n" msgid "" "The password was not changed.\n" "The user didnt exist in shadow or passwd.\n" msgstr "" "Lösenordet ändrades inte.\n" "Användaren fanns inte i shadow eller passwd.\n" msgid "Standard" msgstr "Standard" msgid "Restore" msgstr "Återställ" msgid "Backup" msgstr "Backup" msgid "Delete this system user ?" msgstr "Ta bort den här systemanvändaren ?" msgid "Do you also want to delete the system user ?" msgstr "Vill du även ta bort systemanvändaren ?" msgid "Username: " msgstr "Användarnamn: " msgid "No" msgstr "Nej" msgid "New user" msgstr "Ny användare" msgid "Delete" msgstr "Ta bort" msgid "Mounted on" msgstr "Monterad på" msgid "Free space" msgstr "Ledigt utrymme" msgid "Used space" msgstr "Använt utrymme" msgid "Total space" msgstr "Totalt utrymme" msgid "Percent used" msgstr "Procent använt" msgid "Device" msgstr "Enhet" #, c-format msgid "Error running command: %s\n" msgstr "Fel vid körning av kommando: %s\n" #, c-format msgid "gprostats -html %s" msgstr "gprostats -html %s" msgid "Username" msgstr "Användarnamn" msgid "Action" msgstr "Händelse" msgid "Bytes" msgstr "Bytes" msgid "Files" msgstr "Filer" msgid "Client" msgstr "Klient" msgid "Start of transfer" msgstr "Start av överföring" msgid "Generate welcome messages" msgstr "Generera välkomstmeddelanden" msgid "Generate html statistics" msgstr "Generera html-statistik" msgid "Select any users you want to import" msgstr "Välj de användare du vill importera" msgid "Import users to the selected server." msgstr "Importera användare till den valda servern." msgid "Groupname" msgstr "Gruppnamn" msgid "Selected users will be imported with the following settings:" msgstr "Valda användare kommer att importeras med följande inställningar:" msgid "FTP home directory:" msgstr "FTP hemkatalog:" msgid "Add users to private directories below the FTP home directory:" msgstr "Lägg till användare i privata kataloger under FTP-hemkatalogen:" msgid "Import" msgstr "Importera" msgid "Cancel" msgstr "Avbryt" msgid "Activate" msgstr "Aktivera" msgid "Deactivate" msgstr "Deaktivera" msgid "Shutdown" msgstr "Stäng ner" msgid "Apply" msgstr "Verkställ" msgid "Help" msgstr "Hjälp" msgid "About" msgstr "Om" msgid "Quit" msgstr "Avsluta" msgid "Servers" msgstr "Servrar" msgid "Users" msgstr "Användare" msgid "Transfers" msgstr "Överföringar" msgid "Disc" msgstr "Disk" msgid "Security" msgstr "Säkerhet" msgid "Configuration" msgstr "Konfiguration" msgid "Information: cant read version" msgstr "Information: kan inte läsa version" msgid "Status: unknown" msgstr "Status: okänd" msgid "Security information" msgstr "Säkerhetsinformation" msgid "" "Virtual user management activated.\n" "\n" msgstr "" "Virtuell användarhantering aktiverad.\n" "\n" msgid "Any system users you have created will no longer be able to log in.\n" msgstr "De systemanvändare du har skapat kan inte längre logga in.\n" msgid "" "\n" "If you also want to let system users login then remove entire\n" msgstr "" "\n" "Om du även vill låta systemanvändare logga in så tar du bort de\n" msgid "" "newly added AuthPAM off module restriction lines in the configuration tab.\n" msgstr "" "nyligen tillagda AuthPAM off modulrestriktionsraderna i konfigurationsfliken.\n" msgid "" "\n" "Press apply if this is what you want.\n" "\n" msgstr "" "\n" "Tryck verkställ om det här är vad du vill.\n" "\n" msgid "Switch back if this is not what you want.\n" msgstr "Ändra tillbaka om det här inte är vad du vill.\n" msgid "" "Virtual user management deactivated.\n" "\n" msgstr "" "Virtuell användarhantering deaktiverad.\n" "\n" msgid "Any virtual users you have created will no longer be able to log in.\n" msgstr "De virtuella användare du skapat kan inte längre logga in.\n" msgid "" "Press apply if this is what you want.\n" "\n" msgstr "" "Tryck på verkställ om det här är vad du vill.\n" "\n" msgid "" "ftp.mydomain.org, 192.168.0.100 or 0.0.0.0 which means listen to all network " "interfaces" msgstr "" "ftp.mindomän.org, 192.168.0.100 eller 0.0.0.0 som betyder lyssna på alla nätverks- " "kort" msgid "" "My FTP server or set it to off to have the server use its own name and " "version" msgstr "" "min FTP-server, eller sätt till off så att servern använder sitt eget namn och " "version" msgid "On" msgstr "På" msgid "Off" msgstr "Av" msgid "Server port:" msgstr "Serverport:" msgid "" "A port the server listens on. 21 is the standard port. 0 means that the " "server is deactivated" msgstr "" "En port som servern lyssnar på. 21 är standardporten. 0 betyder att " "servern är deaktiverad" msgid "NAT router:" msgstr "NAT-router:" msgid "The external IP address or DNS name of the NAT router." msgstr "Externa IP-adressen eller DNS-namnet på NAT-routern." msgid "Admin email:" msgstr "Admin-epost:" msgid "The administrators email address" msgstr "Administratörens epostadress" msgid "Identity lookups:" msgstr "Identitetsuppslagningar:" msgid "Reverse lookups:" msgstr "Baklängesuppslagningar:" msgid "Time standard:" msgstr "Tidsstandard:" msgid "GMT or local time" msgstr "GMT eller lokal tid" msgid "GMT" msgstr "GMT" msgid "Local time" msgstr "Lokal tid" msgid "Passive port range:" msgstr "Passivt portintervall:" msgid "From this port" msgstr "Från den här porten" msgid "To this port" msgstr "Till den här porten" msgid "Max connections:" msgstr "Max anslutningar:" msgid "The maximum simoultaneous connections for this server" msgstr "Max antal samtidiga användare för den här servern" msgid "Max login attempts:" msgstr "Max inloggningsförsök:" msgid "" "The maximum number of logins attempts a user can fail before disconnected" msgstr "" "Max antal inloggningsförsök en användare kan försöka innan avstängd" msgid "Login timeout:" msgstr "Inloggningstimeout:" msgid "The maximum time a user can spend authenticating" msgstr "Maxtid en användare kan spendera på autentisering" msgid "Idle timeout:" msgstr "Inaktivitetstimeout:" msgid "The time it takes before an idle user is thrown out in seconds" msgstr "Tiden det tar innan en inaktiv användare kastas ut i sekunder" msgid "Transfer mode:" msgstr "Överföringsläge:" msgid "Binary" msgstr "Binärt" msgid "Ascii" msgstr "Ascii" msgid "FXP transfers:" msgstr "FXP-överföringar:" msgid "Username length:" msgstr "Användarnamnslängd:" msgid "The length of the randomized usernames" msgstr "Längden på de randomiserade användarnamnen" msgid "Password length:" msgstr "Lösenordslängd:" msgid "The length of the randomized passwords" msgstr "Längden på de randomiserade lösenorden" msgid "Randomized letters:" msgstr "Randomiserade bokstäver:" msgid "Upper" msgstr "Stora" msgid "Lower" msgstr "Små" msgid "Enable virtual users:" msgstr "Aktivera virtuella användare:" msgid "HTML statistics:" msgstr "HTML-statistik:" msgid "Generated HTML statistics file, IE: /var/www/ftp.htm" msgstr "Genererad HTML-statistikfil, tex: /var/www/ftp.htm" msgid "Security log:" msgstr "Säkerhetslogg:" msgid "IE: /var/log/secure" msgstr "tex: /var/log/secure" msgid "Server user:" msgstr "Serveranvändare:" msgid "" "The server drops its privileges and runs as this user, nobody is often used" msgstr "" "Servern sänker sina rättigheter och körs som den här användaren, nobody is often used" msgid "Server group:" msgstr "Servergrupp:" msgid "" "The server drops its privileges and runs as this group, nobody is often used" msgstr "" "Servern sänker sina rättigheter och körs som den här gruppen, nobody is often used" msgid "Fake file user:" msgstr "Falsk filägare:" msgid "" "It will look like this fake user owns all files.\n" "It does not have to be an existing user" msgstr "" "Det kommer att se ut som den här falska användaren äger alla filer.\n" "Det behöver inte vara en existerande användare" msgid "Fake file group:" msgstr "Falsk filgrupp:" msgid "" "It will look like this fake group owns all files.\n" "It does not have to be an existing group" msgstr "" "Det kommer att se ut som den här falska gruppen äger alla filer.\n" "Det behöver inte vara en existerande grupp" msgid "Upload speed:" msgstr "Uppladdningshastighet:" msgid "Total upload speed shared by all clients in KiloBytes/sec" msgstr "Total uppladdningshastighet:" msgid "Download speed:" msgstr "Nerladdningshastighet:" msgid "Total download speed shared by all clients in KiloBytes/sec" msgstr "Total nerladdningshastighet delad av alla klienter i KiloBytes/sek" msgid "Resume uploads:" msgstr "Återuppta uppladdningar:" msgid "Resume downloads:" msgstr "Återuppta nerladdningar:" msgid "Remove aborted uploads:" msgstr "Ta bort avbrutna uppladdningar:" msgid "Secure communications:" msgstr "Säker kommunikation:" msgid "Use secure communication:" msgstr "Använd säker kommunikation:" msgid "Require for channels:" msgstr "Kräv för kanaler:" msgid "Both" msgstr "Båda" msgid "Data" msgstr "Data" msgid "Control" msgstr "Kontroll" msgid "Verify clients:" msgstr "Verifiera klienter:" msgid "Use these protocols:" msgstr "Använd dessa protokoll:" msgid "IE: SSLv23 or TLSv1" msgstr "Tex: SSLv23 eller TLSv1" msgid "TLS log:" msgstr "TLS-log:" msgid "IE: /var/log/gadmin-proftpd_tls.log" msgstr "Tex: /var/log/gadmin-proftpd_tls.log" msgid " Signed certificate settings: " msgstr " Signerade certifikatsinställningar: " msgid "Certificate directory:" msgstr "Certifikatskatalog:" msgid "IE: /etc/gadmin-proftpd/certs" msgstr "Tex: /etc/gadmin-proftpd/certs" msgid "This servers DNS name or IP address" msgstr "Den här serverns DNS-namn eller IP-adress" msgid "Email address:" msgstr "Epostadress:" msgid "Country:" msgstr "Land:" msgid "A country" msgstr "Ett Land" msgid "City or town:" msgstr "Stad eller stadsdel:" msgid "A city or a town" msgstr "En stad eller en stadsdel" msgid "Organization:" msgstr "Organisation:" msgid "Some organization" msgstr "Någon organisation" msgid "Organizational unit:" msgstr "Organisationsenhet:" msgid "Accounting" msgstr "Bokföring" msgid "Password:" msgstr "Lösenord:" msgid "A password" msgstr "ett lösenord" msgid "Encryption bits:" msgstr "Krypteringsbitar:" msgid "Number of bits in the generated certificate" msgstr "Antal bitar i det genererade certifikatet" msgid "Days valid:" msgstr "Dagar giltigt:" msgid "Number of days the certificate is valid" msgstr "Antal dagar som certifikatet är giltigt" msgid "Country code:" msgstr "Landskod:" msgid "The country code, IE: SV, DK, EN, US, etc" msgstr "Landskoden, tex: SV, DK, EN, US, etc" msgid "Generate new certificates:" msgstr "Generera nya certifikat:" msgid "Ratios for uploads and downloads:" msgstr "Ratios för uppladdning och nerladdning:" msgid "Use ratios:" msgstr "Använd ratios:" msgid "Save ratios:" msgstr "Spara ratios:" msgid "Server address" msgstr "Serveradress" msgid "Port" msgstr "Port" msgid "Server name" msgstr "Servernamn" msgid "Server type" msgstr "Servertyp" msgid "Server address:" msgstr "Serveradress:" msgid "Server name:" msgstr "Servernamn:" msgid "Server type:" msgstr "Servertyp:" msgid "Settings" msgstr "Inställningar" msgid "PID" msgstr "PID" msgid "User" msgstr "Användare" msgid "KiloBytes/sec" msgstr "KiloBytes/sec" msgid "Directory" msgstr "katalog" msgid "File" msgstr "Fil" msgid "Server" msgstr "Server" msgid "Select PID:" msgstr "Välj PID:" msgid "Kick" msgstr "Kicka" msgid "Kickban" msgstr "Kickabanna" msgid "Account locked:" msgstr "Konto låst:" msgid "Username:" msgstr "Användarnamn:" msgid "Group:" msgstr "Grupp:" msgid "Comment:" msgstr "Kommentar:" msgid "Shell:" msgstr "Skal:" msgid "Require password:" msgstr "Kräv lösenord:" msgid "Show user in statistics:" msgstr "Visa användaren i statistik:" msgid "Maximum logins:" msgstr "Max inloggningar:" msgid "Allow logins from:" msgstr "Tillåt inloggningar ifrån:" msgid "All, None, IP, DNS name or CIDR-Address" msgstr "All, None, IP, DNS namn eller CIDR-Adress" msgid "Byte ratio:" msgstr "Byteratio:" msgid "Byte ratio credit:" msgstr "Byteratio-kredit:" msgid "File ratio:" msgstr "Filratio" msgid "File ratio credit:" msgstr "Filratio-kredit:" msgid "Group" msgstr "Grupp" msgid "Comment" msgstr "Kommentar" msgid "Home directory" msgstr "Hemkatalog" msgid "Require password" msgstr "Kräv lösenord" msgid "Banned" msgstr "Bannad" msgid "Maximum connections" msgstr "Max anslutningar" msgid "User settings and directories:" msgstr "Användarinställningar och kataloger:" msgid "Add a new directory." msgstr "Lägg till en ny katalog." msgid "Add directory" msgstr "Lägg till katalog" msgid "Delete the selected directory." msgstr "Ta bort vald katalog." msgid "Delete directory" msgstr "Ta bort katalog" msgid "Apply changes after adding directories and setting permissions." msgstr "Verkställ ändringar efter katalogtillägg och rättighetsinställningar." msgid "Apply changes" msgstr "Verkställ ändringar" msgid "List" msgstr "Lista" msgid "Upload" msgstr "Ladda upp" msgid "Append" msgstr "Återuppta" msgid "Download" msgstr "Ladda ner" msgid "Rename" msgstr "Byta namn" msgid "Overwrite" msgstr "Skriva över" msgid "Make directory" msgstr "Skapa katalog" msgid "Remove directory" msgstr "Ta bort katalog" msgid "Site" msgstr "Site" msgid "Chmod" msgstr "Chmod" msgid "Change group" msgstr "Ändra grupp" msgid "Show dates" msgstr "Visa datum" msgid "Show working directory" msgstr "Visa arbetskatalog" msgid "Show sizes" msgstr "" msgid "Stat" msgstr "Stat" msgid "Change working directory" msgstr "Byt arbetskatalog" msgid "CD up" msgstr "CD upp" msgid "Credits" msgstr "Credits" msgid "Author: " msgstr "Author: " msgid "I want to thank the following for their contributions:" msgstr "Jag vill tacka följande för deras bidrag:" msgid "" "The PROFTPD developers.\n" "\n" msgstr "" "PROFTPD-utvecklarna.\n" "\n" msgid "for the RPM spec file." msgstr "för RPM-specfilen." msgid "And all translators:" msgstr "Och alla översättare:" msgid "Afrikaans" msgstr "" msgid "Amharic" msgstr "" msgid "Arabic" msgstr "" msgid "Azerbaijani" msgstr "" msgid "Basque" msgstr "" msgid "Bulgarian" msgstr "" msgid "Breton" msgstr "" msgid "Brittish-English" msgstr "" msgid "Bosnian" msgstr "" msgid "Byelorussian" msgstr "" msgid "Catalan" msgstr "" msgid "Chinese" msgstr "" msgid "Chinese-Taiwan" msgstr "" msgid "Croatian" msgstr "" msgid "Czech" msgstr "" msgid "Danish" msgstr "" msgid "Dutch" msgstr "" msgid "Esperanto" msgstr "" msgid "Estonian" msgstr "" msgid "Finnish" msgstr "" msgid "French" msgstr "" msgid "Galician" msgstr "" msgid "German" msgstr "" msgid "Greek" msgstr "" msgid "Hebrew" msgstr "" msgid "Hini" msgstr "" msgid "Hungarian" msgstr "" msgid "Icelandic" msgstr "" msgid "Indonesian" msgstr "" msgid "Irish" msgstr "" msgid "Italian" msgstr "" msgid "Japanese" msgstr "" msgid "Korean" msgstr "" msgid "Kurdish" msgstr "" msgid "Latvian-Lettish" msgstr "" msgid "Lithuanian" msgstr "" msgid "Macedonian" msgstr "" msgid "Maori" msgstr "" msgid "Maltese" msgstr "" msgid "Norwegian" msgstr "" msgid "Polish" msgstr "" msgid "Portuguese" msgstr "" msgid "Portuguese-Brazil" msgstr "" msgid "Romanian" msgstr "" msgid "Russian" msgstr "" msgid "Serbian" msgstr "" msgid "Slovak" msgstr "" msgid "Slovenian" msgstr "" msgid "Spanish" msgstr "" msgid "Swedish" msgstr "" msgid "Tamil" msgstr "" msgid "Thai" msgstr "" msgid "Turkish" msgstr "" msgid "Traditional Chinese" msgstr "" msgid "Ukrainian" msgstr "" msgid "Vietnamese" msgstr "" msgid "Wallon" msgstr "" msgid "Welch" msgstr "" msgid "Close" msgstr "Stäng" msgid "Could not delete the user, select a user first.\n" msgstr "Kunde inte ta bort användaren, välj en användare fört.\n" msgid "User root can not be deleted.\n" msgstr "Användare root kan inte tas bort.\n" #, c-format msgid "" "proftpd.conf was not found here:\n" "%s\n" msgstr "" "proftpd.conf kunde inte hittas här:\n" "%s\n" msgid "Could not find the server, user not deleted\n" msgstr "Kunde inte hitta servern, användaren togs ej bort\n" msgid "No username specified.\n" msgstr "Inget användarnan specifiserat.\n" msgid "The root user can not be deleted.\n" msgstr "Rootanvändaren kan inte tas bort.\n" #, c-format msgid "Failed deleting user: %s\n" msgstr "Kunde inte ta bort användare: %s\n" msgid "Invalid directory path: NONE" msgstr "Felaktig katalogsökväg: NONE" #, c-format msgid "Invalid directory path: %s" msgstr "Felaktig katalogsökväg: %s" msgid "Select directory" msgstr "Välj en katalog" msgid "Select file" msgstr "Välj en fil" msgid "User setting not found" msgstr "Användarinställningar ej funna" msgid "No value has been set" msgstr "Inget värde har satts" msgid "Group file not found" msgstr "Gruppfil kunde inte hittas" msgid "Group name not found" msgstr "Gruppnamn kunde inte hittas" msgid "Max randomize username length is 999\n" msgstr "Max randomiserad användarnamnslängd är 999\n" msgid "Randomize username length can only contain digits\n" msgstr "randomiserad änvändarnamnslängd kan endast innehålla siffror\n" msgid "Max randomize password length is 999\n" msgstr "Max randomiserad lösenordslängd är 999\n" msgid "Randomize password length can only contain digits\n" msgstr "Randomiserad lösenordslängd kan bara innehålla siffror\n" msgid "Randomize length too long, changed it to 256.\n" msgstr "Randomiserad längd är för lång, byttes till 256.\n" msgid "Country" msgstr "Land" msgid "City" msgstr "Stad" msgid "Organization name" msgstr "Organisationsnamn" msgid "Organization department" msgstr "Organisationsenhet" #, c-format msgid "" "Error: Unable to create new settings file here:\n" "%s\n" msgstr "" "Fel: Kan inte skapa ny inställningsfil här:\n" "%s\n" msgid "Couldnt create the ftpusers file here:\n" msgstr "Kunde inte skapa ftpusers-filen här:\n" msgid "" "\n" "\n" "Make sure the directories exists then restart gadmin-proftpd.\n" msgstr "" "\n" "\n" "Se till att katalogerna existerar, starta sedan om servern.\n" msgid "" "\n" "If this security feature still fails then security will be good but not " "optimal.\n" msgstr "" "\n" "Om den här säkerhetsinställningen fortfarande inte fungerar så minskas " "säkerheten och blir inte optimal.\n" msgid "Couldnt find ftpusers here:\n" msgstr "Kunde inte hitta ftpusers här:\n" msgid "" "\n" "\n" "The missing file was created and all users on the system was added to it.\n" msgstr "" "\n" "\n" "Den saknade filen skapades och alla användare på systemet lades till i den.\n" msgid "All current users are now banned from using the ftp server until they\n" msgstr "alla nuvarande användare är nu bannade från FTP-servern tills dom\n" msgid "" "are unbanned. This in an auto security feature and its normal if this is\n" msgstr "" "tillåts igen. Det här är en auto-säkerhetsfunktion och det är normalt om det här är\n" msgid "the first time you start gadmin-proftpd.\n" msgstr "första gången du startar gadmin-proftpd.\n" msgid "Every certificate field must be filled in.\n" msgstr "Alla certifikatsfält måste fyllas i.\n" msgid "The password field cant contain any spaces or newline chars.\n" msgstr "Lösenordsfältet kan inte innehålla några mellanrum eller nyradstecken.\n" #, c-format msgid "" "Can not create secure certificate directory with command:\n" "%s\n" msgstr "" "Kan inte skapa en säker certifikatskatalog med det här kommandot:\n" "%s\n" msgid "Setting up environment" msgstr "Sätter upp miljön" #, c-format msgid "" "Error writing gadmin-proftpd-openssl.conf here: \n" "%s\n" msgstr "" "Fel vid skapande av gadmin-proftpd-openssl.conf här: \n" "%s\n" #, c-format msgid "" "Error: Could not chmod:\n" "%s\n" msgstr "" "Fel:: Kunde inte chmodda:\n" "%s\n" #, c-format msgid "" "Error writing openssl password file here:\n" "%s\n" msgstr "" "Fel vid skrivande av openssl lösenordsfil här:\n" "%s\n" #, c-format msgid "" "Error changing to certificate directory: \n" "%s\n" msgstr "" "Fel vid byte till certifikatskatalogen: \n" "%s\n" msgid "Creating certificate authority" msgstr "Skapar certifikatsauktoritet" #, c-format msgid "" "Error running openssl script 1:\n" "%s\n" msgstr "" "Fel vid körning av openssl skript 1:\n" "%s\n" msgid "Creating client certificate" msgstr "Skapar klientcertifikat" #, c-format msgid "" "Error running openssl script 2:\n" "%s\n" msgstr "" "Fel vid körning av openssl skript 2:\n" "%s\n" msgid "Signing client certificate" msgstr "Signerar klientcertifikatet" #, c-format msgid "" "Error running openssl script 3:\n" "%s\n" msgstr "" "Fel vid körning av openssl skript 3:\n" "%s\n" msgid "The certificates have been created successfully.\n" msgstr "Certifikaten har skapats med lyckat resultat.\n" msgid "They will be used by new secure FTP logins.\n" msgstr "Dom kommer att användas av nya säkra FTP-inloggningar.\n" #, c-format msgid "" "The user: \"%s\" was not imported\n" "because it already existed in this server.\n" msgstr "" "Användaren: \"%s\" blev inte importerad\n" "för att den redan existerade i den här servern.\n" #, c-format msgid "Error: Home directory too long: %s\n" msgstr "Fel: Hemkatalogen är för lång: %s\n" #, c-format msgid "Total number of imported users: %ld\n" msgstr "Totalt antal importerade användare: %ld\n" msgid "uploaded" msgstr "laddade upp" msgid "downloaded" msgstr "laddade ner" msgid "deleted" msgstr "tog bort" msgid "split filename ?" msgstr "delat filnamn ?" #, c-format msgid "" "Cant open the security log here:\n" "%s\n" msgstr "" "Kan inte öppna säkerhetsloggen här:\n" "%s\n" #, c-format msgid "" "Cant find the shells file here:\n" "%s\n" msgstr "" "Kan inte hitta skalfilen här:\n" "%s\n" #, c-format msgid "" "Warning: could not find a false or no login shell here:\n" "%s\n" "Appending the other shells." msgstr "" "Varning: kunde inte hitta ett falskt eller ej-loginskal här:\n" "%s\n" "Lägger till andra skal." #, c-format msgid "yes" msgstr "ja" #, c-format msgid "no" msgstr "nej" #, c-format msgid "" "Error reading the configuration here:\n" "%s\n" msgstr "" "Fel vid läsning av konfigurationen här:\n" "%s\n" #, c-format msgid "" "A line with over 4000 chars is not valid in:\n" "%s\n" msgstr "" "En rad med över 4000 tecken är inte giltig i:\n" "%s\n" msgid "Set version failed\n" msgstr "Sätta version misslyckades\n" #, c-format msgid " Information: PRoFTPD-%s" msgstr " Information: PRoFTPD-%s" msgid " Proftpd is not installed or not in your path." msgstr " Proftpd är inte installerad eller inte i din sökväg." msgid "GADMIN-PROFTPD Help" msgstr "GADMIN-PROFTPD Hjälp" msgid "" "\n" "\n" "Adding users:\n" "\n" msgstr "" "\n" "\n" "Lägga till användare:\n" "\n" msgid "" "When adding a user you can randomize its username and password or use your " "own.\n" msgstr "" "När du lägger till en användare kan du randomisera dess användarnamn och " "lösenord eller använda ett eget.\n" msgid "" "You can also select its login shell, group, comment and ftp home directory.\n" msgstr "" "Du kan också välja dess inloggnings-skal, grupp, kommentar och FTP hemkatalog.\n" msgid "" "Press add when you are satisfied with the users settings and permissions.\n" "\n" msgstr "" "Tryck lägg till när du är nöjd med användarinställningarna och rättigheterna.\n" "\n" msgid "" "Any other directories added must be located below the ftp home directory for " "this user.\n" "\n" msgstr "" "Andra kataloger måste finnas under FTP hemkatalogen för " "den här användaren.\n" "\n" msgid "" "If you need to add more users with similar settings you can simply change a " "current users\n" msgstr "" "Om du behöver lägga till fler användare med liknande inställningar så kan du enklast ändra en " "befintlig användares\n" msgid "" "username, password and then press the add button.\n" "\n" msgstr "" "användarnamn, lösenord och sedan trycka på knappen lägg till.\n" "\n" msgid "" "\n" "Typical setups:\n" "\n" msgstr "" "\n" "Typiska uppsättningar:\n" "\n" msgid "" "Users needs upload access to a http servers directory:\n" "\n" msgstr "" "Användare behöver uppladdningsåtkomst till en http-servers katalog:\n" "\n" msgid "Set the users home directory to the webserver's root directory IE:\n" msgstr "Sätt användarens hemkatalog till webserverns rootkatalog, tex:\n" msgid "/var/www/html or /var/www/html/UserName for a private homepage.\n" msgstr "/var/www/html eller /var/www/html/UserName för en privat hemsida.\n" msgid "" "\n" "Adding anonymous access to a directory:\n" "\n" msgstr "" "\n" "Tillägg av anonym åtkomst av en katalog:\n" "\n" msgid "Type anonymous in the username field.\n" msgstr "Skriv anonymous i användarnamnsfältet.\n" msgid "" "Press the password randomize button or type a password longer then 5 chars.\n" msgstr "" "Tryck på lösenordsrandomiseringsknappen eller skriv ett lösenord som är längre än 5 tecken.\n" msgid "Type anonymous as group and comment.\n" msgstr "Skriv anonymous som grupp och kommentar.\n" msgid "Select /dev/null shell.\n" msgstr "Välj /dev/null som skal.\n" msgid "Set require password to off.\n" msgstr "Sätt kräv lösenord till av.\n" msgid "Type this users home directory IE: /var/ftp/anonymous.\n" msgstr "Skriv användarens hemkatalog, tex: /var/ftp/anonymous.\n" msgid "" "Press add to add this anonymous user.\n" "\n" msgstr "" "Tryck lägg till för att lägga till den här anonyma användaren.\n" "\n" msgid "" "You can now login as anonymous with no password or get in directly with a " "web browser.\n" "\n" msgstr "" "Nu kan du logga in som anonymous utan lösenord eller komma in direkt med en " "webläsare.\n" "\n" msgid "" "If the selected shell is false or null the user can only login to this FTP " "server otherwise\n" msgstr "" "Om det valda skalet är falskt eller null så kan användaren bara logga in till den här FTP- " "servern annars\n" msgid "" "that user gets a private home directory as well as its FTP directory and can " "login via ssh\n" msgstr "" "får den här användaren en privat hemkatalog och även en FTP-katalog och kan " "logga in via ssh\n" msgid "" "etc if that server allows the user to do so.\n" "\n" msgstr "" "osv om den servern tillåter den användaren att göra det.\n" "\n" msgid "" "You can easily add more virtual servers to run on different interfaces and " "ports.\n" msgstr "" "Du kan enkelt lägga till fler virtuella servrar som körs på andra adresser och " "portar.\n" msgid "" "The same users can have different directories and settings in different " "servers.\n" msgstr "" "Samma användare kan ha olika kataloger och inställningar i olika " "servrar.\n" msgid "" "When a user connects to one address and port it gets access according to " "that servers\n" msgstr "" "När en användare ansluter till en adress och port så får den åtkomst i förhållande till " "den serverns\n" msgid "configuration for that user.\n" msgstr "konfiguration för den användaren.\n" msgid "" "If you want to turn a server off without deleting it you can set its port " "value to 0\n" "\n" msgstr "" "Om du vill stänga av en server utan att ta bort den så kan du sätta dess port " "värde till 0\n" "\n" msgid "" "If this Proftpd server is behind a NAT router you should specify the " "routers\n" msgstr "" "Om den här Proftpd servern finns bakom en NAT-router bör du specifisera " "routerns\n" msgid "" "external DNS name or IP-address as the \"NAT router\" option and then turn " "it on.\n" "\n" msgstr "" "externa DNS-namn eller IP-adress som \"NAT-router\" inställningen och sedan aktivera " "det valet.\n" "\n" msgid "" "If you want to add directories thats not under the users home directory you " "can do this:\n" "\n" msgstr "" "Om du vill lägga till kataloger som inte finns under användarens hemkatalog så " "kan du göra så här:\n" "\n" msgid "Linux (as of kernel 2.4.0):\n" msgstr "Linux (från kernel 2.4.0):\n" msgid "" "mount --bind /some/directory/to/share /var/ftp/make_this_directory_first\n" "\n" msgstr "" "mount --bind /någon/katalog/att/dela /var/ftp/skapa_den_här_katalogen_först\n" "\n" msgid "" "BSD (as of 4.4BSD):\n" "mount_null /var/data /var/ftp/make_this_directory_first\n" "\n" msgstr "" "BSD (as of 4.4BSD):\n" "mount_null /var/data /var/ftp/skapa_den_här_katalogen_först\n" "\n" msgid "" "Solaris:\n" "mount -F lofs /var/data /var/ftp/make_this_directory_first\n" "\n" msgstr "" "Solaris:\n" "mount -F lofs /var/data /var/ftp/skapa_den_här_katalogen_först\n" "\n" msgid "" "Statistics:\n" "\n" msgstr "" "Statistik:\n" "\n" msgid "" "Pressing the generate welcome statistics button in the file tab will create\n" msgstr "" "Att trycka på generera statistik-knappen i fil-fliken kommer att skapa\n" msgid "welcome messages for all users in this FTP server.\n" msgstr "välkomstmeddelanden för alla användare i den här FTP-servern.\n" msgid "Pressing generate HTML statistics in the file tab creates top 10\n" msgstr "Att trycka generera HTML-statistik i fil-fliken skapar top 10\n" msgid "" "upload and download statistics as a webpage IE: /var/www/html/ftp.htm\n" "\n" msgstr "" "uppladdnings och nerladdnings-statistik som en websida, tex: /var/www/html/ftp.htm\n" "\n" msgid "" "With crond and gprostats you can do this to have it automatically update the " "statistics:\n" msgstr "" "Med crond och gprostats kan du göra så att statistiken automatiskt " "uppdateras:\n" msgid "" "gprostats -html /path/to/output.html\n" "gprostats -w welcome.msg\n" msgstr "" "gprostats -html /path/to/utfil.html\n" "gprostats -w welcome.msg\n" msgid "" "or both at the same time: gprostats -html /path/to/output.html -w welcome." "msg\n" msgstr "" "eller båda på samma gång: gprostats -html /path/to/utfil.html -w welcome." "msg\n" msgid "" "Use -c /path/to/proftpd.conf -x /path/to/xferlog if you need to.\n" "\n" msgstr "" "använd -c /sökväg/till/proftpd.conf -x /sökväg/till/xferlog om du behöver.\n" "\n" msgid "" "If you have made customized welcome messages and dont want them overwritten " "by gprostats\n" msgstr "" "Om du har gjort välkomstmeddelanden för hand och inte vill ha dom överskrivna " "av gprostats\n" msgid "" "you can configure this by selecting a user and unchecking \"show user in " "statistics\" and\n" msgstr "" "kan du konfigurera det genom att välja en användare och avbocka \"visa användaren i " "statistiken\" och\n" msgid "" "then pressing the apply button, this will also exclude the user from the " "html output.\n" "\n" msgstr "" "sedan trycka på verkställ, det kommer också att exkludera användaren från " "html-utfilen.\n" "\n" msgid "" "If you copy or move a file directly to the ftpservers directory you may need " "to\n" msgstr "" "Om du kopierar eller flyttar en fil direkt till FTP-serverns katalog så behöver du " "kanske\n" msgid "" "chmod it with 644 and chmod directories to 755 so that the directory and " "file can be accessed.\n" "\n" msgstr "" "chmodda filen med 644 och chmodda katalogerna till 755 så att katalogen och " "filen kan kommas åt.\n" "\n" msgid "" "This is one way of chmodding all files recursively in the directory /var/" "ftp:\n" msgstr "" "Det här är ett sätt att chmodda alla filer rekursivt i katalogen /var/" "ftp:\n" msgid "" "find /var/ftp -type f -exec chmod 644 -v {} \\;\n" "\n" msgstr "" "find /var/ftp -type f -exec chmod 644 -v {} \\;\n" "\n" msgid "" "Upload directories should have a chmod of 777 and this can be used for /var/" "ftp/upload\n" msgstr "" "Uppladdningskataloger borde ha chmod satt till 777 och det kan användas för /var/" "ftp/upload\n" msgid "" "find /var/ftp/upload -type d -exec chmod 777 -v {} \\;\n" "\n" "\n" msgstr "" "find /var/ftp/upload -type d -exec chmod 777 -v {} \\;\n" "\n" "\n" msgid "" "For more detailed information about the server and its configuration " "directives visit:\n" msgstr "" "För mer detaljerad information om servern och dess konfigurationsdirektiv " "besök:\n" msgid "http://www.proftpd.org\n" msgstr "http://www.proftpd.org\n" #, c-format msgid "GADMIN-PROFTPD %s Information" msgstr "GADMIN-PROFTPD %s Information" msgid "The server will shut down according to these settings." msgstr "Servern kommer att stängas ner med dessa inställningar." msgid "Time to real shutdown:" msgstr "Tid till riktig nedstängning:" msgid "now, +Minutes or HHMM" msgstr "now, +Minuter eller HHMM" msgid "New access disabled:" msgstr "Ny åtkomst nekad:" msgid "Minutes before real shutdown." msgstr "Minuter innan riktig nedstängning." msgid "Existing users disconnected:" msgstr "Existerande användare avstängda:" msgid "Shutdown message:" msgstr "Nedstängningsmeddelande:" #, c-format msgid "%s , Current connections will be dropped: %d" msgstr "%s , Nuvarande anslutningar kommer att stängas: %d" msgid "" "Pressing the activate button will cancel the shutdown and let users login " "again." msgstr "" "Att trycka på aktivera-knappen kommer att ta bort nedstängningen och låta användare logga in " "igen." msgid "OK" msgstr "OK" #, c-format msgid "" "Error: Could not backup the current configuration:\n" "%s\n" msgstr "" "Fel: Kunde inte backa upp den nuvarande konfigurationen:\n" "%s\n" #, c-format msgid "" "The configuration was backed up here for safety:\n" "%s\n" msgstr "" "Konfigurationen backades upp här av säkerhetsskäl:\n" "%s\n" #, c-format msgid "" "The configuration was backed up here for safety:\n" "%s%s\n" msgstr "" "Konfigurationen backades upp här av säkerhetsskäl:\n" "%s%s\n" msgid "The configuration file could not be restored.\n" msgstr "Konfigurationsfilen kunde inte återställas.\n" #, c-format msgid "" "Cant write a new proftpd.conf here:\n" "%s\n" msgstr "" "Kan inte skriva en ny proftpd.conf här:\n" "%s\n" msgid "GADMIN-PROFTPD Question" msgstr "GADMIN-PROFTPD-fråga" msgid "GADMIN-PROFTPD could not find the proftpd configuration\n" msgstr "GADMIN-PROFTPD kunde inte hitta proftpd konfigurationen\n" msgid "or you are using a basic configuration that doesnt have\n" msgstr "eller så använder du en enkel konfiguration som inte har\n" msgid "" "all the features that this program requires.\n" "\n" "\n" msgstr "" "alla inställningar som det här programmet behöver.\n" "\n" "\n" msgid "Do you want to overwrite your current proftpd configuration\n" msgstr "Vill du skriva över din nuvarande proftpd-konfiguration\n" msgid "" "with a suitable standard configuration for gadmin-proftpd ?\n" "\n" msgstr "" "med en passande standardkonfiguration för gadmin-proftpd ?\n" "\n" msgid "\t\t\t(If you dont know then press yes)\n" msgstr "\t\t\t(Om du inte vet bör du trycka ja)\n" msgid "Yes" msgstr "" #, c-format msgid "" "Error: cant create the settings directory here:\n" "%s\n" msgstr "" "Fel: kan inte skapa inställningskatalogen här:\n" "%s\n" #, c-format msgid "" "Error: cant write the settings file here:\n" "%s\n" msgstr "" "Fel: kan inte skriva inställningsfilen här:\n" "%s\n" msgid "Status: Deactivated" msgstr "Status: Deaktiverad" msgid "The server is deactivated.\n" msgstr "Servern är deaktiverad.\n" msgid "Status: Activated" msgstr "Status: Aktiverad" msgid "Error running ftpwho -v.\n" msgstr "Fel vid körande av ftpwho -v.\n" msgid "Idle" msgstr "Overksam" msgid "Uploading" msgstr "Laddar upp" msgid "Downloading" msgstr "Laddar ner" msgid "Deleting" msgstr "Tar bort" msgid "Total Kbytes/sec:" msgstr "Totalt Kbytes/sek:" msgid "Incoming Kbytes/sec:" msgstr "Inkommande Kbytes/sek:" msgid "Outgoing Kbytes/sec:" msgstr "Utgående Kbytes/sek:" #, c-format msgid "Couldn't find pixmap file: %s" msgstr "Kunde inte hitta pixmap-filen: %s" gadmin-proftpd-0.4.2/po/ChangeLog0000644000076400007640000000144111232060424015562 0ustar mangemangeVersion 0.3.8 ------------------ Added more translatable strings. Copy from sv.po at the top. Version 0.3.7 ------------------ Added string "New user" All tooltips is create_user_settings.c are now translatable. Updated sv.po Version 0.3.6 ------------------ Removed deprecated "#, fuzzy" line in sv.po header. Version 0.3.5 ------------------ New and complete Swedish translation. Version 8.2.9 ------------------ Added French translation: Steve Holweg and Thomas Myriam Version 8.1.9: ------------------ Added simplified Chineese zh_CN thanks to Stanley Peng Version 8.1.7: -------------------------- Swedish translation: Magnus-swe Spanish translation: Diego Escalante gadmin-proftpd-0.4.2/po/Makefile0000644000076400007640000002006311566007234015463 0ustar mangemange# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # 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 to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = gadmin-proftpd PACKAGE = gadmin-proftpd VERSION = 0.4.2 SHELL = /bin/sh srcdir = . top_srcdir = .. prefix = /usr exec_prefix = ${prefix} datarootdir = ${prefix}/share datadir = ${datarootdir} libdir = ${exec_prefix}/lib localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po INSTALL = /bin/install -c INSTALL_DATA = ${INSTALL} -m 644 MKINSTALLDIRS = $(top_srcdir)/./mkinstalldirs CC = gcc GENCAT = @GENCAT@ GMSGFMT = /usr/bin/msgfmt MSGFMT = /usr/bin/msgfmt MSGFMT_OPTS = -c XGETTEXT = /usr/bin/xgettext MSGMERGE = msgmerge DEFS = -DHAVE_CONFIG_H CFLAGS = -g -O2 -Wall CPPFLAGS = INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = sv.po fr.po es.po zh_CN.po GMOFILES = sv.gmo fr.gmo es.gmo zh_CN.gmo DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ ../src/main.c \ ../src/interface.c \ ../src/callbacks.c \ ../src/support.c CATALOGS = sv.gmo fr.gmo es.gmo zh_CN.gmo CATOBJEXT = .gmo INSTOBJEXT = .mo .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-yes all-yes: $(CATALOGS) all-no: $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --flag=g_strdup_printf:1:c-format \ --flag=g_string_printf:2:c-format \ --flag=g_string_append_printf:2:c-format \ --flag=g_error_new:3:c-format \ --flag=g_set_error:4:c-format \ --flag=g_markup_printf_escaped:1:c-format \ --flag=g_log:3:c-format \ --flag=g_print:1:c-format \ --flag=g_printerr:1:c-format \ --flag=g_printf:1:c-format \ --flag=g_fprintf:2:c-format \ --flag=g_sprintf:2:c-format \ --flag=g_snprintf:3:c-format \ --flag=g_scanner_error:2:c-format \ --flag=g_scanner_warn:2:c-format \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(GETTEXT_PACKAGE).po \ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-yes install-data-no: all install-data-yes: all if test -r "$(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 -r "$(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 -r "$(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 dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m 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 $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: update-po $(DISTFILES) dists="$(DISTFILES)"; \ 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`; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$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 ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ 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: gadmin-proftpd-0.4.2/po/Makefile.in.in0000644000000000000000000001772411075173735016242 0ustar rootroot# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # 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 to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ libdir = @libdir@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge 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 = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) 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) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --flag=g_strdup_printf:1:c-format \ --flag=g_string_printf:2:c-format \ --flag=g_string_append_printf:2:c-format \ --flag=g_error_new:3:c-format \ --flag=g_set_error:4:c-format \ --flag=g_markup_printf_escaped:1:c-format \ --flag=g_log:3:c-format \ --flag=g_print:1:c-format \ --flag=g_printerr:1:c-format \ --flag=g_printf:1:c-format \ --flag=g_fprintf:2:c-format \ --flag=g_sprintf:2:c-format \ --flag=g_snprintf:3:c-format \ --flag=g_scanner_error:2:c-format \ --flag=g_scanner_warn:2:c-format \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(GETTEXT_PACKAGE).po \ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all if test -r "$(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 -r "$(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 -r "$(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 dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m 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 $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: update-po $(DISTFILES) dists="$(DISTFILES)"; \ 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`; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$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 ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ 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: gadmin-proftpd-0.4.2/COPYING0000644000000000000000000010451310642030763014166 0ustar rootroot GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . gadmin-proftpd-0.4.2/MAKE_TGZ0000755000076400007640000000037711566003043014574 0ustar mangemange#!/bin/sh version='0.4.2' beta='' make clean rm -f config.cache rm -f Makefile rm -f config.h rm -f config.log rm -f config.status rm -f stamp* rm -f po/*.gmo rm -rf src/.deps cd .. tar -hzcvf gadmin-proftpd-$version$beta.tar.gz gadmin-proftpd-$version gadmin-proftpd-0.4.2/TODO0000644000000000000000000000023411231564001013606 0ustar rootroot TODO: ----------------------------------------------- 1. Add per user quota management. 2. Bind mounts with sysinit automounting. 3. More translations. gadmin-proftpd-0.4.2/Makefile.am0000644000076400007640000000513611025262353015440 0ustar mangemange## Process this file with automake to produce Makefile.in VERSION = @VERSION@ SUBDIRS = src po EXTRA_DIST = \ autogen.sh install-data-local: @$(NORMAL_INSTALL) if test -d $(srcdir)/pixmaps; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps/gadmin-proftpd; \ for pixmap in $(srcdir)/pixmaps/*; do \ if test -f $$pixmap; then \ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(datadir)/pixmaps/gadmin-proftpd; \ fi \ done \ fi; if test -d $(DESTDIR)$(datadir)/pixmaps; then \ cp pixmaps/gadmin-proftpd.png $(DESTDIR)$(datadir)/pixmaps/; \ fi; if test -f $(DESTDIR)$(bindir)/consolehelper && test ! -f $(DESTDIR)$(bindir)/gadmin-proftpd; then \ ln -s $(DESTDIR)$(bindir)/consolehelper $(DESTDIR)$(bindir)/gadmin-proftpd; \ fi; @echo "Failsafe for a mixed environment" if test -f $(DESTDIR)/usr/local/bin/consolehelper && test ! -f $(DESTDIR)/usr/local/bin/gadmin-proftpd; then \ ln -s $(DESTDIR)/usr/local/bin/consolehelper $(DESTDIR)/usr/local/bin/gadmin-proftpd; \ fi; if test -d $(DESTDIR)$(sysconfdir)/pam.d; then \ cp etc/pam.d/gadmin-proftpd $(DESTDIR)$(sysconfdir)/pam.d/; \ fi; if test -d $(DESTDIR)$(sysconfdir)/security/console.apps; then \ cp etc/security/console.apps/gadmin-proftpd $(DESTDIR)$(sysconfdir)/security/console.apps/; \ fi; if test -d $(DESTDIR)$(datadir)/applications; then \ cp desktop/gadmin-proftpd.desktop $(DESTDIR)$(datadir)/applications/; \ fi; if test -d $(DESTDIR)$(datadir)/gnome/apps/Internet; then \ cp desktop/gadmin-proftpd.desktop $(DESTDIR)$(datadir)/gnome/apps/Internet/; \ fi; if test ! -d $(DESTDIR)$(datadir)/doc/gadmin-proftpd; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/doc/gadmin-proftpd; \ cp AUTHORS $(DESTDIR)$(datadir)/doc/gadmin-proftpd/; \ cp README $(DESTDIR)$(datadir)/doc/gadmin-proftpd/; \ cp ChangeLog $(DESTDIR)$(datadir)/doc/gadmin-proftpd/; \ cp COPYING $(DESTDIR)$(datadir)/doc/gadmin-proftpd/; \ fi; if test ! -d $(DESTDIR)$(sysconfdir)/gadmin-proftpd; then \ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gadmin-proftpd; \ fi; if test ! -d $(DESTDIR)$(sysconfdir)/gadmin-proftpd; then \ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gadmin-proftpd; \ fi; @echo "" @echo "Start GAdmin-ProFTPD by typing gadmin-proftpd in a terminal" @echo "or start it from the menu." @echo "" @echo "Send bugreports, comments or questions to magnus-swe@telia.com" @echo "" dist-hook: if test -d pixmaps; then \ mkdir $(DESTDIR)$(distdir)/pixmaps; \ for pixmap in pixmaps/*; do \ if test -f $$pixmap; then \ cp -p $$pixmap $(DESTDIR)$(distdir)/pixmaps; \ fi \ done \ fi gadmin-proftpd-0.4.2/mkinstalldirs0000755000000000000000000000370411075173735015751 0ustar rootroot#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # 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 case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do 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 # End: # mkinstalldirs ends here gadmin-proftpd-0.4.2/configure0000755000076400007640000072717711566004351015335 0ustar mangemange#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.66. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="configure.in" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS LOCALSTATEDIR SYSCONFDIR MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES DATADIRNAME CATOBJEXT CATALOGS XGETTEXT GMSGFMT MSGFMT_OPTS MSGFMT USE_NLS GETTEXT_PACKAGE PACKAGE_LIBS PACKAGE_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PACKAGE_CFLAGS PACKAGE_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path PACKAGE_CFLAGS C compiler flags for PACKAGE, overriding pkg-config PACKAGE_LIBS linker flags for PACKAGE, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=gadmin-proftpd VERSION=0.4.2 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OS type" >&5 $as_echo_n "checking for OS type... " >&6; } case $host in *-linux*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux ($host) found." >&5 $as_echo "Linux ($host) found." >&6; } $as_echo "#define USE_LINUX 1" >>confdefs.h ;; *-solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris ($host) found." >&5 $as_echo "Solaris ($host) found." >&6; } $as_echo "#define USE_SUNOS 1" >>confdefs.h ;; *-sunos*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris ($host) found." >&5 $as_echo "Solaris ($host) found." >&6; } $as_echo "#define USE_SUNOS 1" >>confdefs.h ;; *-freebsd*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Free BSD ($host) found." >&5 $as_echo "Free BSD ($host) found." >&6; } $as_echo "#define USE_FREEBSD 1" >>confdefs.h ;; *-openbsd*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Open BSD ($host) found." >&5 $as_echo "Open BSD ($host) found." >&6; } $as_echo "#define USE_OPENBSD 1" >>confdefs.h ;; *-netbsd*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Net BSD ($host) found." >&5 $as_echo "Net BSD ($host) found." >&6; } $as_echo "#define USE_NETBSD 1" >>confdefs.h ;; *-darwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin Mac OS X ($host) found." >&5 $as_echo "Darwin Mac OS X ($host) found." >&6; } $as_echo "#define USE_DARWIN 1" >>confdefs.h ;; *-aix*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX ($host) found." >&5 $as_echo "AIX ($host) found." >&6; } $as_echo "#define USE_AIX 1" >>confdefs.h ;; *-hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: HP UX ($host) found." >&5 $as_echo "HP UX ($host) found." >&6; } $as_echo "#define USE_HPUX 1" >>confdefs.h ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Unknown host found: ($host). Using Linux macros..." >&5 $as_echo "Unknown host found: ($host). Using Linux macros..." >&6; } $as_echo "#define USE_LINUX 1" >>confdefs.h ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then : break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi pkg_modules="gtk+-2.0 >= 1.3.13" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGE" >&5 $as_echo_n "checking for PACKAGE... " >&6; } if test -n "$PACKAGE_CFLAGS"; then pkg_cv_PACKAGE_CFLAGS="$PACKAGE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PACKAGE_LIBS"; then pkg_cv_PACKAGE_LIBS="$PACKAGE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PACKAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$pkg_modules" 2>&1` else PACKAGE_PKG_ERRORS=`$PKG_CONFIG --print-errors "$pkg_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PACKAGE_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($pkg_modules) were not met: $PACKAGE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else PACKAGE_CFLAGS=$pkg_cv_PACKAGE_CFLAGS PACKAGE_LIBS=$pkg_cv_PACKAGE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi GETTEXT_PACKAGE=gadmin-proftpd cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF ALL_LINGUAS="sv fr es zh_CN" # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = x""yes; then : gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_ngettext_libc=yes else gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_dgettext_libc=yes else gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_bindtextdomain=yes else ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dgettext=yes else ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dcgettext=yes else ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : CATOBJEXT=.gmo DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5 $as_echo_n "checking for library containing crypt... " >&6; } if test "${ac_cv_search_crypt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char crypt (); int main () { return crypt (); ; return 0; } _ACEOF for ac_lib in '' crypt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_crypt=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_crypt+set}" = set; then : break fi done if test "${ac_cv_search_crypt+set}" = set; then : else ac_cv_search_crypt=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5 $as_echo "$ac_cv_search_crypt" >&6; } ac_res=$ac_cv_search_crypt if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" test "$ac_cv_search_crypt" = "none required" || AUTHLIBS="-lcrypt $AUTHLIBS" cat >>confdefs.h <<_ACEOF #define HAVE_CRYPT 1 _ACEOF fi SYSCONFDIR=`eval echo $sysconfdir` LOCALSTATEDIR=`eval echo $localstatedir` test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' default_proftpd_conf="/etc/proftpd.conf" test "x$PROFTPD_CONF" = x && PROFTPD_CONF=$default_proftpd_conf cat >>confdefs.h <<_ACEOF #define PROFTPD_CONF "`eval echo "${PROFTPD_CONF}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using configuration file: (${PROFTPD_CONF})" >&5 $as_echo "Using configuration file: (${PROFTPD_CONF})" >&6; } default_secure_log="/var/log/secure" test "x$SECURE_LOG" = x && SECURE_LOG=$default_secure_log cat >>confdefs.h <<_ACEOF #define SECURE_LOG "`eval echo "${SECURE_LOG}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using security log: (${SECURE_LOG})" >&5 $as_echo "Using security log: (${SECURE_LOG})" >&6; } default_xfer_log="/var/log/xferlog" test "x$XFER_LOG" = x && XFER_LOG=$default_xfer_log cat >>confdefs.h <<_ACEOF #define XFER_LOG "`eval echo "${XFER_LOG}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using xferlog: (${XFER_LOG})" >&5 $as_echo "Using xferlog: (${XFER_LOG})" >&6; } default_html_statistics="/var/www/html/ftp.htm" test "x$HTML_STATISTICS" = x && HTML_STATISTICS=$default_html_statistics cat >>confdefs.h <<_ACEOF #define HTML_STATISTICS "`eval echo "${HTML_STATISTICS}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using html statistics output file: (${HTML_STATISTICS})" >&5 $as_echo "Using html statistics output file: (${HTML_STATISTICS})" >&6; } default_welcome_message="welcome.msg" test "x$WELCOME_MESSAGE" = x && WELCOME_MESSAGE=$default_welcome_message cat >>confdefs.h <<_ACEOF #define WELCOME_MESSAGE "`eval echo "${WELCOME_MESSAGE}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using welcome message output file: (${WELCOME_MESSAGE})" >&5 $as_echo "Using welcome message output file: (${WELCOME_MESSAGE})" >&6; } default_server_user="nobody" test "x$SERVER_USER" = x && SERVER_USER=$default_server_user cat >>confdefs.h <<_ACEOF #define SERVER_USER "`eval echo "${SERVER_USER}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using server user: (${SERVER_USER})" >&5 $as_echo "Using server user: (${SERVER_USER})" >&6; } default_server_group="nobody" test "x$SERVER_GROUP" = x && SERVER_GROUP=$default_server_group cat >>confdefs.h <<_ACEOF #define SERVER_GROUP "`eval echo "${SERVER_GROUP}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using server group: (${SERVER_GROUP})" >&5 $as_echo "Using server group: (${SERVER_GROUP})" >&6; } default_proftpd_binary="proftpd" test "x$PROFTPD_BINARY" = x && PROFTPD_BINARY=$default_proftpd_binary cat >>confdefs.h <<_ACEOF #define PROFTPD_BINARY "`eval echo "${PROFTPD_BINARY}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using PROFTPD binary: (${PROFTPD_BINARY})" >&5 $as_echo "Using PROFTPD binary: (${PROFTPD_BINARY})" >&6; } default_ftpwho_binary="ftpwho" test "x$FTPWHO_BINARY" = x && FTPWHO_BINARY=$default_ftpwho_binary cat >>confdefs.h <<_ACEOF #define FTPWHO_BINARY "`eval echo "${FTPWHO_BINARY}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using FTPWHO binary: (${FTPWHO_BINARY})" >&5 $as_echo "Using FTPWHO binary: (${FTPWHO_BINARY})" >&6; } default_proc_path="/proc" test "x$PROC_PATH" = x && PROC_PATH=$default_proc_path cat >>confdefs.h <<_ACEOF #define PROC_PATH "`eval echo "${PROC_PATH}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using Proc filesystem: (${PROC_PATH})" >&5 $as_echo "Using Proc filesystem: (${PROC_PATH})" >&6; } default_min_pass_len=6 test "x$MIN_PASS_LEN" = x && MIN_PASS_LEN=$default_min_pass_len cat >>confdefs.h <<_ACEOF #define MIN_PASS_LEN ${MIN_PASS_LEN} _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using MIN_PASS_LEN: (${MIN_PASS_LEN})" >&5 $as_echo "Using MIN_PASS_LEN: (${MIN_PASS_LEN})" >&6; } default_sysinit_start_cmd="echo" test "x$SYSINIT_START_CMD" = x && SYSINIT_START_CMD=$default_sysinit_start_cmd cat >>confdefs.h <<_ACEOF #define SYSINIT_START_CMD "`eval echo "${SYSINIT_START_CMD}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using sysinit start command: (${SYSINIT_START_CMD})" >&5 $as_echo "Using sysinit start command: (${SYSINIT_START_CMD})" >&6; } default_sysinit_stop_cmd="echo" test "x$SYSINIT_STOP_CMD" = x && SYSINIT_STOP_CMD=$default_sysinit_stop_cmd cat >>confdefs.h <<_ACEOF #define SYSINIT_STOP_CMD "`eval echo "${SYSINIT_STOP_CMD}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using sysinit stop command: (${SYSINIT_STOP_CMD})" >&5 $as_echo "Using sysinit stop command: (${SYSINIT_STOP_CMD})" >&6; } default_gp_appconfdir="/etc/gadmin-proftpd" test "x$GP_APPCONFDIR" = x && GP_APPCONFDIR=$default_gp_appconfdir cat >>confdefs.h <<_ACEOF #define GP_APPCONFDIR "`eval echo "${GP_APPCONFDIR}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using GP_APPCONFDIR: (${GP_APPCONFDIR})" >&5 $as_echo "Using GP_APPCONFDIR: (${GP_APPCONFDIR})" >&6; } default_proftpd_conf_backup="${GP_APPCONFDIR}/proftpd.conf.old.gadmin-proftpd-${VERSION}" test "x$PROFTPD_CONF_BACKUP" = x && PROFTPD_CONF_BACKUP=$default_proftpd_conf_backup cat >>confdefs.h <<_ACEOF #define PROFTPD_CONF_BACKUP "`eval echo "${PROFTPD_CONF_BACKUP}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using backup proftpd.conf file: (${PROFTPD_CONF_BACKUP})" >&5 $as_echo "Using backup proftpd.conf file: (${PROFTPD_CONF_BACKUP})" >&6; } cat >>confdefs.h <<_ACEOF #define GP_FTPUSERS "`eval echo "/etc/ftpusers"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_SHELLS "`eval echo "/etc/shells"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_SHUTMSG "`eval echo "/etc/shutmsg"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_PASSWD "`eval echo "/etc/passwd"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_SHADOW "`eval echo "/etc/shadow"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_GROUP "`eval echo "/etc/group"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_GSHADOW "`eval echo "/etc/gshadow"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_VARDIR "`eval echo "${localstatedir}"`" _ACEOF ac_config_files="$ac_config_files Makefile src/Makefile po/Makefile.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gadmin-proftpd-0.4.2/Autoinstall0000755000076400007640000000200611351443114015620 0ustar mangemange### Default paths and settings ### # PROFTPD_CONF="/etc/proftpd.conf" # SECURE_LOG="/var/log/secure" # XFER_LOG="/var/log/xferlog" # PROC_PATH="/proc" # PROFTPD_BINARY="proftpd" # FTPWHO_BINARY="ftpwho" # SERVER_USER="nobody" # SERVER_GROUP="nobody" # WELCOME_MESSAGE="welcome.msg" # HTML_STATISTICS="/var/www/html/ftp.htm" # MIN_PASS_LEN=6 # SYSINIT_START_CMD="echo" # SYSINIT_STOP_CMD="echo" ### Configure for Debian/Ubuntu derived systems ### # ./configure --prefix=/usr --sysconfdir=/etc \ # --localstatedir=/var --sbindir=/usr/sbin \ # PROFTPD_CONF="/etc/proftpd/proftpd.conf" \ # HTML_STATISTICS="/usr/share/apache2/default-site/ftp.htm" \ # SYSINIT_START_CMD="update-rc.d -f proftpd defaults" \ # SYSINIT_STOP_CMD="update-rc.d -f proftpd remove" && # make && make install ### Configure for Redhat/Fedora derived systems ### ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --sbindir=/usr/sbin \ SYSINIT_START_CMD="chkconfig proftpd on" \ SYSINIT_STOP_CMD="chkconfig proftpd off" && make && make install