gadmin-samba-0.3.2/0000755000000000000000000000000011527566322012543 5ustar rootrootgadmin-samba-0.3.2/configure.in0000644000000000007640000001746411527511660015210 0ustar rootmangednl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(gadmin-samba, 0.3.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-samba 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="fr de" AM_GLIB_GNU_GETTEXT dnl Use -Wall if we have gcc. 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_DEFINE_UNQUOTED(SYSCONFDIR,"`eval echo "${sysconfdir}"`",[etc dir]) AC_SUBST(SYSCONFDIR) dnl Path to the local state directory LOCALSTATEDIR=`eval echo $localstatedir` AC_SUBST(LOCALSTATEDIR) AC_DEFINE_UNQUOTED(LOCALSTATEDIR,"`eval echo "${localstatedir}"`",[var dir]) test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' dnl Path to the smbd binary. default_smbd_binary="smbd" test "x$SMBD_BINARY" = x && SMBD_BINARY=$default_smbd_binary AC_DEFINE_UNQUOTED(SMBD_BINARY,"`eval echo "${SMBD_BINARY}"`",[Path to the smbd binary]) AC_MSG_RESULT([Using SMBD binary: (${SMBD_BINARY})]) dnl Path to the nmbd binary. default_nmbd_binary="nmbd" test "x$NMBD_BINARY" = x && NMBD_BINARY=$default_nmbd_binary AC_DEFINE_UNQUOTED(NMBD_BINARY,"`eval echo "${NMBD_BINARY}"`",[Path to the nmbd binary]) AC_MSG_RESULT([Using NMBD binary: (${NMBD_BINARY})]) dnl Path to the winbindd binary. default_winbindd_binary="winbindd" test "x$WINBINDD_BINARY" = x && WINBINDD_BINARY=$default_winbindd_binary AC_DEFINE_UNQUOTED(WINBINDD_BINARY,"`eval echo "${WINBINDD_BINARY}"`",[Path to the winbindd binary]) AC_MSG_RESULT([Using WINBINDD binary: (${WINBINDD_BINARY})]) dnl Path to the pdbedit binary. default_pdbedit_binary="pdbedit" test "x$PDBEDIT_BINARY" = x && PDBEDIT_BINARY=$default_pdbedit_binary AC_DEFINE_UNQUOTED(PDBEDIT_BINARY,"`eval echo "${PDBEDIT_BINARY}"`",[Path to the pdbedit binary]) AC_MSG_RESULT([Using PDBEDIT binary: (${PDBEDIT_BINARY})]) dnl The default minimum accepted password length is 6. default_min_pass_len=6 test "x$MIN_PASS_LEN" = x && MIN_PASS_LEN=$default_min_pass_len AC_DEFINE_UNQUOTED(MIN_PASS_LEN,"`eval echo "${MIN_PASS_LEN}"`",[The minimum accepted password length.]) AC_MSG_RESULT([Using MIN_PASS_LEN: (${MIN_PASS_LEN})]) dnl The default samba server user. default_samba_user="nobody" test "x$SAMBA_USER" = x && SAMBA_USER=$default_samba_user AC_DEFINE_UNQUOTED(SAMBA_USER,"`eval echo "${SAMBA_USER}"`",[The user that samba runs as IE: nobody.]) AC_MSG_RESULT([Using samba server user: (${SAMBA_USER})]) dnl Path to the smb.conf file. default_smb_conf="/etc/samba/smb.conf" test "x$SAMBA_CONF" = x && SAMBA_CONF=$default_smb_conf AC_DEFINE_UNQUOTED(SAMBA_CONF,"`eval echo "${SAMBA_CONF}"`",[Path to smbd.conf]) AC_MSG_RESULT([Using smb.conf file: (${SAMBA_CONF})]) dnl Path to the backup smb.conf file. default_smb_conf_backup="${SAMBA_CONF}.old.gadmin-samba-${VERSION}" test "x$SAMBA_CONF_BACKUP" = x && SAMBA_CONF_BACKUP=$default_smb_conf_backup AC_DEFINE_UNQUOTED(SAMBA_CONF_BACKUP,"`eval echo "${SAMBA_CONF_BACKUP}"`",[Path to backup smb.conf]) AC_MSG_RESULT([Using backup smb.conf file: (${SAMBA_CONF_BACKUP})]) dnl Path to the gadmin_samba_users file. default_gadmin_samba_users="/etc/gadmin-samba/gadmin_samba_users" test "x$GADMIN_SAMBA_USERS" = x && GADMIN_SAMBA_USERS=$default_gadmin_samba_users AC_DEFINE_UNQUOTED(GADMIN_SAMBA_USERS,"`eval echo "${GADMIN_SAMBA_USERS}"`",[Path to the gadmin_samba_users file]) AC_MSG_RESULT([Using gadmin_samba_users file: (${GADMIN_SAMBA_USERS})]) dnl Path to the smbusers file. default_samba_usermap="/etc/samba/smbusers" test "x$SAMBA_USERMAP" = x && SAMBA_USERMAP=$default_samba_usermap AC_DEFINE_UNQUOTED(SAMBA_USERMAP,"`eval echo "${SAMBA_USERMAP}"`",[Path to smbusers]) AC_MSG_RESULT([Using smbusers file: (${SAMBA_USERMAP})]) dnl Path to the kerberos configuration file. default_kerberos_conf="/etc/krb5.conf" test "x$KERBEROS_CONF" = x && KERBEROS_CONF=$default_kerberos_conf AC_DEFINE_UNQUOTED(KERBEROS_CONF,"`eval echo "${KERBEROS_CONF}"`",[Path to kerberos configuration]) AC_MSG_RESULT([Using kerberos krbX.conf file: (${KERBEROS_CONF})]) dnl Path to the 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 security log]) AC_MSG_RESULT([Using security log: (${SECURE_LOG})]) dnl Path 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: (${PROC_PATH})]) 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 paths AC_DEFINE_UNQUOTED(SYSCONFDIR,"`eval echo "/etc"`",[etc dir]) AC_DEFINE_UNQUOTED(APPCONFDIR,"`eval echo "/etc/gadmin-samba"`",[application config dir]) AC_DEFINE_UNQUOTED(SETTINGS_FILE,"`eval echo "/etc/gadmin-samba/settings.conf"`",[application config file]) AC_DEFINE_UNQUOTED(SHELLS_FILE,"`eval echo "/etc/shells"`",[path to shells]) AC_DEFINE_UNQUOTED(PASSWD_FILE,"`eval echo "/etc/passwd"`",[path to passwd]) AC_DEFINE_UNQUOTED(SHADOW_FILE,"`eval echo "/etc/shadow"`",[path to shadow]) AC_DEFINE_UNQUOTED(GROUP_FILE,"`eval echo "/etc/group"`",[path to group]) AC_DEFINE_UNQUOTED(GSHADOW_FILE,"`eval echo "/etc/gshadow"`",[path to gshadow]) AC_OUTPUT([ Makefile src/Makefile po/Makefile.in ]) gadmin-samba-0.3.2/NEWS0000644000076400007640000000000011441500406013464 0ustar mangemangegadmin-samba-0.3.2/scripts/0000755000000000000000000000000011442170476014227 5ustar rootrootgadmin-samba-0.3.2/scripts/example.bat0000755000000000000000000000035710757336154016367 0ustar rootroot@echo off REM # GADMIN-SAMBA example bat file for SAMBA netlogons. REM # Rename this file to a corresponding UserName.bat or GroupName.bat. echo Welcome to SAMBA24. echo Setting current time... net time \\samba24 /set /yes REM # pause gadmin-samba-0.3.2/scripts/gadmin-samba-pdf0000755000000000000000000000070011442170476017241 0ustar rootroot#!/bin/sh ### SAMBA Postscript to PDF Printing by Magnus Loef ############ ### Use "printing = bsd" in smb.conf for this printer ########## ### Install client printers as "HP Color Laserjet PS" ########## ### Any postscript laserjet printer will do but select color ### OUTDIR="/var/lib/samba/pdf-documents" DATE=`date +%Y-%b-%d---%H.%M.%S` /usr/bin/ps2pdf12 $1 $OUTDIR/$DATE.pdf echo "$2 Created: $DATE.pdf" >> $OUTDIR/CreationLog.wri rm -f $1 gadmin-samba-0.3.2/desktop/0000755000076400007640000000000011434573416014465 5ustar mangemangegadmin-samba-0.3.2/desktop/gadmin-samba.desktop0000644000076400007640000000114511434573416020401 0ustar mangemange[Desktop Entry] Encoding=UTF-8 Name=GADMIN-SAMBA Name[de]=GADMIN-SAMBA Name[es]=GADMIN-SAMBA Name[fi]=GADMIN-SAMBA Name[fr]=GADMIN-SAMBA Name[ko]=GADMIN-SAMBA Name[no]=GADMIN-SAMBA Name[pt_BR]=GADMIN-SAMBA Name[sl]=GADMIN-SAMBA Name[sv]=GADMIN-SAMBA Name[uk]=GADMIN-SAMBA Name[ro]=GADMIN-SAMBA Name[zh_TW]=GADMIN-SAMBA GenericName=GADMIN-SAMBA Comment=SAMBA file, print and domain server administration Comment[de]=SAMBA Datei-, Druck- und Domänen-Kontroller Verwaltung Exec=gadmin-samba Icon=gadmin-samba.png Terminal=false Type=Application Categories=Application;Network;X-Red-Hat-ServerConfig;X-Red-Hat-Base; gadmin-samba-0.3.2/Makefile.in0000644000000000000000000006267111527512157014621 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@ 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-samba; \ for pixmap in $(srcdir)/pixmaps/*; do \ if test -f $$pixmap; then \ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(datadir)/pixmaps/gadmin-samba; \ fi \ done \ fi; if test -d $(DESTDIR)$(datadir)/pixmaps; then \ cp $(srcdir)/pixmaps/gadmin-samba.png $(DESTDIR)$(datadir)/pixmaps/; \ fi; if test -f $(DESTDIR)$(bindir)/consolehelper && test ! -f $(DESTDIR)$(bindir)/gadmin-samba; then \ ln -s $(DESTDIR)$(bindir)/consolehelper $(DESTDIR)$(bindir)/gadmin-samba; \ fi; @echo "Failsafe for a mixed environment" if test -f $(DESTDIR)/usr/local/bin/consolehelper && test ! -f $(DESTDIR)/usr/local/bin/gadmin-samba; then \ ln -s $(DESTDIR)/usr/local/bin/consolehelper $(DESTDIR)/usr/local/bin/gadmin-samba; \ fi; if test -d $(DESTDIR)$(sysconfdir)/pam.d; then \ cp etc/pam.d/gadmin-samba $(DESTDIR)$(sysconfdir)/pam.d/; \ fi; if test -d $(DESTDIR)$(sysconfdir)/security/console.apps; then \ cp etc/security/console.apps/gadmin-samba $(DESTDIR)$(sysconfdir)/security/console.apps/; \ fi; if test -d $(DESTDIR)$(datadir)/applications; then \ cp desktop/gadmin-samba.desktop $(DESTDIR)$(datadir)/applications/; \ fi; if test ! -d $(DESTDIR)$(datadir)/doc/gadmin-samba; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/doc/gadmin-samba; \ fi; if test -d $(DESTDIR)$(datadir)/doc/gadmin-samba; then \ cp AUTHORS $(DESTDIR)$(datadir)/doc/gadmin-samba/; \ cp README $(DESTDIR)$(datadir)/doc/gadmin-samba/; \ cp ChangeLog $(DESTDIR)$(datadir)/doc/gadmin-samba/; \ cp COPYING $(DESTDIR)$(datadir)/doc/gadmin-samba/; \ fi; if test ! -d $(DESTDIR)$(sysconfdir)/gadmin-samba; then \ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gadmin-samba; \ fi; if test -d $(DESTDIR)$(bindir) && test ! -f $(DESTDIR)$(bindir)/gadmin-samba-pdf; then \ cp scripts/gadmin-samba-pdf $(bindir)/; \ fi; @echo Installing example logon script to $(DESTDIR)$(localstatedir)/lib/samba/netlogon. if test ! -d $(DESTDIR)$(localstatedir)/lib/samba/netlogon; then \ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/samba/netlogon; \ fi; if test -d $(DESTDIR)$(localstatedir)/lib/samba/netlogon && \ test ! -f $(DESTDIR)$(localstatedir)/lib/samba/netlogon/example.bat; then \ cp scripts/example.bat $(DESTDIR)$(localstatedir)/lib/samba/netlogon/; \ chmod a+r $(DESTDIR)$(localstatedir)/lib/samba/netlogon/example.bat; \ fi; @echo Creating the profiles directory $(DESTDIR)$(localstatedir)/lib/samba/profiles. if test ! -d $(DESTDIR)$(localstatedir)/lib/samba/profiles; then \ $(mkinstalldirs) -m 1755 $(DESTDIR)$(localstatedir)/lib/samba/profiles; \ fi; @echo Creating the pdf-documents directory $(DESTDIR)$(localstatedir)/lib/samba/pdf-documents. if test ! -d $(DESTIR)$(localstatedir)/lib/samba/pdf-documents; then \ $(mkinstalldirs) -m 1755 $(DESTDIR)$(localstatedir)/lib/samba/pdf-documents; \ fi; @echo "" @echo "Start GADMIN-SAMBA by typing gadmin-samba 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-samba-0.3.2/etc/0000755000076400007640000000000010757327615013574 5ustar mangemangegadmin-samba-0.3.2/etc/gadmin-samba/0000755000000000000000000000000010371163131015621 5ustar rootrootgadmin-samba-0.3.2/etc/security/0000755000000000000000000000000007733307621015164 5ustar rootrootgadmin-samba-0.3.2/etc/security/console.apps/0000755000000000000000000000000010757327650017574 5ustar rootrootgadmin-samba-0.3.2/etc/security/console.apps/gadmin-samba0000644000000000000000000000006610757327650022041 0ustar rootrootUSER=root PROGRAM=/usr/sbin/gadmin-samba SESSION=true gadmin-samba-0.3.2/etc/pam.d/0000755000000000000000000000000010757327625014322 5ustar rootrootgadmin-samba-0.3.2/etc/pam.d/gadmin-samba0000644000000000000000000000021610635050042016541 0ustar rootroot#%PAM-1.0 auth include config-util account include config-util session include config-util gadmin-samba-0.3.2/pixmaps/0000755000076400007640000000000010757330050014465 5ustar mangemangegadmin-samba-0.3.2/pixmaps/gadmin-samba.png0000664000076400007640000004435510402325212017517 0ustar mangemangePNG  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:oZG*IDATxb?(`xb Q0 ?ь> F4G( F3(#hF``@}h4Q0@fQ0 Fь> F4G( F3(#hF`b%8:@{ǎ 10fG_4 %%@Hi#r&@1ڦ:3={3MHfсѿ}ai_ @#:9xPȿL 0>(sj (=8cC[] ?BZ^4 %33$j9GT>Rk3:,sjk8& }PAqG c&&DZ[gf>)|G.ЈEdnX- `Mrh- ?`%߯|{W6:ь>2230120230p202p jA28(ӳ@Z3:w 3Gԃ? 8dx а ~}g b_2?C:q330fzf.`f`bf|>uFg|XYĀOL?3<@ 2XX3|Co1Ϸ;њzg|6`]ҴGNf@l MFsx kjotOZSO370zh    ]9ut |FgpAxT{{.1|}w`h ?#N`-c˃02:ǽu,PhZ tFG䠈2Ǐ ^<??`=?? z L=Oˠ:޼A3oݠ4$3:zq2۷ ?]bh= (31BmE7Rw9@C*dpAS$ {=:Q@<++/hZ- `[@%_mА(ASc>0} ?>G 3; 81efAݜAѱ6As߯_3|q˫ `+ÃMceXfvU  uFgrX3 mЇgA/+`fASР<3ÿg\3L3:P،"5jwtϑ#Q-޼ay,~y1LvÌ3v+A;`%hO(ٍhM@&÷Bץ~8Z| nGT3;@ ɡ[EzA//2f4RFpV@ v{fQ/^ݵM'`8fx5hˈ<@ XFjrh&##k"52"@8|,Ξ?gzy7F3( ]ڌˈ<@=޹?x hs?h[)(?y6bGQ0_~}ϠF~d^ o]dzdditd} ԥyV"AO@t!>1y#bh̏k3`@c@ly ]{nhI/ nch&#p22r11܏T1l: 0ÌTS29ar4˗ ch ACUl 6M@4 ޾ercϟ?耑_g>G,2vbfd`bFpf:*/CG;N9i֭i4ۛ7Cn >ex7W?ĠX40%;s1? '+(;0 ??3P= On-P%W M)z{ە>j2< 7bxt =(?X?|a T9DY؇JnքW#΀uG>xY{˖𭦟>1zӓ  ʰ=p? { =Y<;+4ېgí?B>  =W T dtp&WAۏ}aï Wњ{`bc0fxi A῾pp~(2Z. j!V 7o܈իA9;|a:Hp۷XUQ@;63<ڵ_ ZgdbPfgq|#_ ÐՄ j茿7l^ ꗿ{N fp,6")fhY]0=kx~vS%.Q `O2ܹ!(h3+MxjFnp&/_U f|i\>/0ڣ}`2:40+ 3|baffU`fPgg|;Z>auD+ok_w/2|{~aPd/2aﻯ #aͣ?P D0H(?er6(-8l 10oiA- $렚5A4ۄ j茿-4A3|^߾aO ~"6j@;w@ɣ(Y @in`O@(  ) ^:XO.RS܄ d_#|a/1e9`ꋟaR _3e/HV})B1A̮ j< r #s|x5/^PԄ j4X !;h&/΋_ ?AGW&fh}pjvX&g%T`fi~]/gw&^YA1H ;aV!MDqk"e _e:kNdZ|R7R )cbM_Hz{4LFev&hŊṡ5;4ð f,Јfgeepe#E4a8;`f/}&<@PQvpm迾<T aTR_7Rȣ|`3;ΈggfOh 4nǑ#{^ ,Cfu#8 Eג%4Pm×;~9 @&G"?"ewPGh"4ˀh\||@vn&uev` u "\Bu"73La2W`r|X28stmgxx:Kw`FL4ޚ @Jq" 4Dٲ P ?]e`_")Z&#/EjٽBlTfvPs )',1}PvGDVF9c?H> ???c{ #Z Vb@k4 )Ж ?mH7h Ƴۘ,3 =w` Rl26IFӕ;?vJJ&͟Aٯx գ`@2jrX& H=G|l^/12ҭ _? \AM\3#ju>;%Ԍ^zlA}~C ⰩZ|GK7(} ٿ~7`: 7# VVܜ) P9.;֌@$-9i?H;F6ۿ>9'*@~wS?~P~Q0d2;`f7~023p V^` ѡ l-?7V0@bFЙ:h ]_=ͰWlRh+|PT׾yڄ\L ;ΌwrDRvo6"ß7?Á_^Eg}aS&|P%zj> ]c`XC%@́5o1ѯh{7Ù/8?SF3(f3v4X񏁍y@,PG,_΃ u/@[3jq% s־}c󛾵[_^`+5ٿAk7Ќqzh&dvزwϟ{eѹlТ;6( oCks`ܗme]/C3kh#h&fv5oAݫ?i6V -ftw @ft&`ÅA 66-g|ŒfQ@=(fX: ;rΉTlTCȫ#er؉0|P+,GW~29ؙ9z'40DLFgd :\G>+@%氌y1h&(-SkFp&212CrBVr@\ (w"2 Z.oGz?nuw霌 lm~'7w4Ú>`2_m 68/4 cKf9}t /'x'hX룣} }翿g`m|#{4z4Y)>n`zW<4#s t"`? aO^b^]o>dR3 qr~:h>|P̎Tϖ Yvo>vS=?`j oCXP3WRpO B y[??7Gf4rFGkQ@Z@9AH"Ctt^\-oAjw-–$šȗ+`@0C upqoWlt#fa5 6sX-&aЕկ_3{ ndsz(\[Dk 7 87ۂ76_/1cRϟa9fvL]c}ffFP yP :&t{|7pvR 'Zߒqgt?~@9{FDĂ*}Y/ÿ?k,q;&ɀz`|drp|#U`{ ǀ_Q;P[Z^#;NJtg MwPsdw_v2 L0 {ɁMuP d]]53O] '*ziEƒ9PȌ!|Y9#eryJ{AM.t_~Uz2:߃5C2χ?G` //+o16+hHַHv`ə//LHFŸ񛨌\f; 䠾)Xl& 1uOA=,5;  26l+<E&/mK 'E9!\N'Р_}_֔#gA7>_ r8xO`shv Gݙ\F03;9#@,Q%lP\*烚젽1zɇHGdh, !$mf z`:P 8IK.F[Hf`yl J f>ڿhN5?&n0y1 FsP-s-]th s-&#1 b&*tXXt@ }t܃@F + 5@A9@F+3xlg+_FW¡犿m+MmE϶4(LC^}t5 HA2Of~:(c1ngdm'"4j8<UӃ` a"eJ~cN' +aˁ@VNF Ewτq-ʕ3ݼ_Ï~)xo?3hXDXj؏24h%$h ˟ _H |>}$FfȍK8;ʙJnsKfo\ NA&u{ Q xX 8$Yx_>F?bчʡ"]68Д*VB~_qu>- ̠% jWH7b88G9tإ]Z>^`F=ca:r}p7A92VB~x:@FT u$XSlr9L\0 ܠ6|̰__$hjd!}zFOPȧF2N畐Ou8α"сt Pnn&pӓq;ZXkg9@䏡8٘XXo7>k!~@X؃tw Nv#!(1bb@,\C3Xk"&99H'65ѱ% Ak~of9` qˀ13:'Ě _A_7;ЌʀX;8j5k.;ڿ']j˯1j= Ge 0]) wo;FWXzKaڭZbfd̠pxMPOSV10@_ ?_e ]⩅`hA9{:@g;  X5\J ) A)g2RFg@dd\!m!FFW 7?_bi k!XF%NX>찃% (0B+ZDLޗ?H.6 8WIK BkvP~ h7 , K5AwO3>1~W6BGWmy3<@N0V @!&h)v7?8 0@p"GmL,вW`*Ï2O_Ǔ8A RM4n;? ]ÐZ&@a5?je.#x$^ӜVTh접xH茰ZdK ?gOWlES~E䃪Tz9!5 L"F5=< oP4!_ظĨ-Czy>XX 0^m4 @}d={MPMP{ k̵C.(AcWwwP b3:JD9L@_ߚ`fjvb~0MP#q!XMBGAb~ݽߌ=&@RÚ?<?08%R" 8AT{ˍ}tmn'j$СY*(iQ`+Љ//33@ AHD@Go0|tmnI5'(F^4?G"ZCTPҪ R2:nϞeGGBfs08nB_/b%q2gh&@t#˟9v ^P_>pDja_[@߿X&'6MW(猡@'>yܶ C/;qMV @l}ꖃV jDߡބ٭ Cx-|Cg70|004m}w?[`GV2d`ctV4/`MC&B?zy7$}>@/H]ω|y ?`40=W~3y_k ȩ#GVחWdmH.'R1F"9hjsLnG~ ؽVс_F @,dft Lt7ku-~ff9o 0gb3gx}]:uh5hkwxs Z(@g>_tCo}b+R =JVOxrk~0p21W ۝ Zq }Ue`- rED<-ZD%ã$PP-j o1|{}]rG1lyMMaSfP 4DŽ% y +:: %З6j$ N|d+&whb||BjS[4ڠ RZ?@7;\''w̰g 9,h@~ȵ:xTݻR! bԵo VSXeTj1;`y.-ɤLȰL ;DD >gn`ϛ' ^c!_შ˯7|ߠ aU޷lDA-%90zuכ <AW{c bZE  QÒ#h Ԥ-F+qb 2~<'3+gB98wVSc /XDepPt =f8.gqE{ A3'2cx ?~dχc`}t;zHV@QAE6'h =tW `3^T|P>1n?33g{>NA&^vEDW+D fdaH>@3kh:o> z:y-8bX 2ajjtXp вRЁQd~@A!xĥNfx=#݃R`4Zr8Wmmo58zMD-['e/w*6/4 C-%"f=KzǏ_%` T?z}`ל8olGњܶǷf+nE3D#r34_/)+03;趉ه3%ν_3h\M ?rms8 Wktp hѱ} hf_(_Q#q.(? eWHcd` h1mP4_n%hfN+l3mpe v7zA3̞=ه|mDkj '[F<? '5a-"X&S\ h9`x칣}Hgr?IւQ kKJn\0[?~=qVc ;@C@i@;@n@,3TVeXY06h<mnDere71}Gf>ºa@ƂAaGCاh@#^Z? E@AWAHePo̼}'[`IL|$? ޢ >™P#DN0psOI+< Rp0d63Al29>aZ+!_+@3v\\A@ffv9.5yvѦ jfRAG=i _+@;Myi`7d0Qmf&F!]h-C,jK3lxcc 0D924 @ fv հ]ٕdFkw2Ǘ\°XL˥f|),8v{Ģ"lh2:.0|]wWbc0Wfde`[m}y1#`GeM |`9OBrﻯ$!| 8]h 3::Jrx807 kKwag0``Ño=ɰKhgѫr&=v 9B0DexÉn}38,~b@ܠ)~"Ěpș b8M[%|~$rL:Mut@9cksA3TKA}6)rc@?8`eR[x#2\6/Aߡy   TX~'l`mc4T3:) R%RX6鍪P0i ](?0\ g )shdt|)saHMyzvj6]h/-}Cm" !Ɍf_9 #" 3S#,~ GteHwh}!y&9@ -óezgBK2>zf4b%H}Dt S;9v-Yφ$ܚ@+Rر!hĂ~dOB.$!O u0T38 p=?mjBv͎Vk5DKߐ%r"%n3RFCo2 ni4ˍZ-j3r@2/rRD aQ{c4O`E_R'RbÓ9l:rWDTÈTS2paA2`uKA ),t"z-τaG\"5ߩtp%h ?ZuWeי25#=9~51VE֙H F(> FM``@}h4Q0@fQ0 Fь> F4G( F3(#hF``@}h4Q0@fQ0 Fь> F4G( F3(#hF``@}hH(A݀r-2@An 4SH)Q0 (4f4} @pAvig^'LsA=! ,PkxqhR؃D=C!@\Dfr BT{'@Od&ٹ㡙Vh?4SIƗJ !Am?  f $x J|] JZ2AlGiP@ @LC /0|bJ{h`O:PPh|$&; cOJNf@LC Өw P*\>A(HDk]h| MFts`43y|!܂ d+q"4,Avb(ڻ_%Vf^y*tA6ű#  [rZ< ď 9b\@F3t %>(#aƓpA#Xkf@37SC%e$ +h3BGX:?c/ lvȜ䌑$vPgv5z er,o&52hSh>@@aZQk:SA?(@5IZ!/@ͦFa@&Cbkm4Z4N tuFAt'01 h֦ h ^Q-0Zpؤdx,],3|pZ:5ʑ>ih0٬#U< (7P!S*pPCbj8 lc 6'0Jsp }tCM`XZ*@ 4t1D67"ը R{uNbZ8c|I,H Z c.'ji`Y@=CK{Pɿڞ@̈́$ Z݁ă´LI|V!=uA9JU ` h1k N 4S&TBtA,Qh783h0f$g-ue,sm$IOD3# rp xr`x"3; N@1_ N Z'd@&67%dGIFm[WZwNd 5 AR c`XJ fq5q߂# ӫc4sM MM' dXSJJBr4O@D%H={m_%Olv Q`/,ڀlr^\}XlJЃ3HIm 6+0^O@bmv$$=b@ ڛZ@ rӌM962hlYC_Be#9Zxjets@,ѫ  @ %Ib~2R2B t#iOD&弹b bxMɠL|pXj԰yH15RhPj/H#õ]2&>Y55A?WWIS(U8@ M-Ѝ%@ $؈࠵Ef4*V]ҟJ|G F4G( F3(#hF``@}h4Q0@fQ0 Fь> F4G( F3(#hF``@}h4Q0@fQ0 Fь> F4G( F3(#IaY<IENDB`gadmin-samba-0.3.2/config.guess0000755000076400007640000011315007615210750015330 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-samba-0.3.2/autogen.sh0000755000076400007640000000770707676644452015044 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-samba-0.3.2/gadmin-samba.spec0000644000076400007640000001314611527512137016211 0ustar mangemange%define desktop_vendor newrpms %{!?_dist: %{expand: %%define dist rhfc14}} Summary: GADMIN-SAMBA -- A GTK+ administation tool for the SAMBA server. Name: gadmin-samba Version: 0.3.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-samba %description GADMIN-SAMBA is a fast and easy to use GTK+ administration tool for the SAMBA server. %prep %setup -q %configure SYSINIT_START_CMD="chkconfig smb on" SYSINIT_STOP_CMD="chkconfig smb 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-samba.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} # Logon scripts install -d %{buildroot}/var/lib/samba/netlogon install -m 755 scripts/example.bat %{buildroot}/var/lib/samba/netlogon # Profiles directory install -d %{buildroot}/var/lib/samba/profiles # PDF Printer script install -d %{buildroot}%{_bindir} install -m 755 scripts/gadmin-samba-pdf %{buildroot}%{_bindir} # PDF Printer output directory install -d %{buildroot}/var/lib/samba/pdf-documents %find_lang %name %post if test ! -h %{_bindir}/gadmin-samba ; then \ ln -s %{_bindir}/consolehelper %{_bindir}/gadmin-samba ; \ fi; %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang ###%files %defattr(0755, root, root) %{_sbindir}/%{name} %{_bindir}/gadmin-samba-pdf /var/lib/samba/netlogon/example.bat %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 %defattr(1755, root, root) %dir /var/lib/samba/profiles %defattr(1755, root, root) %dir /var/lib/samba/pdf-documents %changelog * Fri Feb 18 2011 Magnus Loef - Allow more then 30 chars for the samba version (Really?/Yes, apparently:) - Added Valid users = %U as default for the [homes] share. * Thu Sep 12 2010 Magnus Loef - Allows for more dynamic configuration of netlogon, profiles and pdf-documents. * Thu Sep 9 2010 Magnus Loef - Changed paths to /var/lib/samba for netlogon, profiles and pdf-documents. - All users and All groups macros can now be imported. - Added and updated Deutsch translation (Thanks to Manfred Mueller). - Adds better default user profile values. - Improved handling of directories with spaces. - A small helpfile change (add user/apply user). * Sat Mar 13 2010 Magnus Loef - Now using pdbedit and the tdbsam files instead - of the smbpasswd file and binary. * Wed Nov 18 2009 Magnus-swe - Added a share path selector. - Added a home directory selector. - Shows status color. Array comparizon fixes. - Option "share modes" has been deprecated and will - be removed automatically when a share is applied. - Options "locking" and "strict locking" can be used instead. * Tue May 6 2008 Magnus-swe - Added "bind interfaces only = yes" to the standard configuration. - Added French translation. - wins server = option is not used if theres no ip/dns name. * Tue May 6 2008 Magnus-swe - Fixed cups printing. * Mon Apr 28 2008 Magnus-swe - Added support for continued lines. - Added better automatic configuration backups. * Thu Feb 21 2008 Magnus-swe - Changed name from gsambad to gadmin-samba. * Sat Jun 25 2007 Magnus-swe - License is now GPL version 3 or later. - New share access gui layout. - New user and group per share row splitting functions. - Lots of other things including coloring/highlighting - of the status indicator labels. * Sat Jun 16 2007 Magnus-swe - Added RC start and stop commands. - Updated pam.d authentication specifications. * Wed Aug 2 2006 Magnus-swe - Fixed connections tab and split filenames. - Fixed add_standard_users() and the NOBODY user - account addition (Thanks to Andreas) - Added configure option SAMBA_USERMAP. - The smbusers map file will now be created if - its bad or doesnt exist. - The samba root user is now added as a locked account. - Users changing to BDC, PDC or ADS are notified to alter - samba root conditions. The 10 second non-root user dialog - can now be closed with the close buttons. * Sun Jul 2 2006 Magnus-swe - Added multiconnection killing and old conf backup. - New detection for no good configurations. * Sat Jun 17 2006 Magnus-swe - Added tabs: domain mgmt, connections and machine accounts. * Thu May 25 2006 Magnus-swe - Some small typo fixes and updates. * Mon Mar 27 2006 Magnus-swe - Added a virtual pdf printer and output share. - Added a netlogon example.bat script and alot more. gadmin-samba-0.3.2/src/0000755000076400007640000000000011527566322013604 5ustar mangemangegadmin-samba-0.3.2/src/widgets.c0000644000000000000000000001247411527565345015160 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 62 #define NUM_SERVERTAB_SPINBUTTONS 20 #define NUM_SERVERTAB_COMBOS 42 #define NUM_USERTAB_ENTRIES 7 #define NUM_USERTAB_SPINBUTTONS 1 #define NUM_USERTAB_CHECKBUTTONS 2 #define NUM_USERTAB_COMBOS 1 #define NUM_SHARETAB_ENTRIES 22 #define NUM_SHARETAB_SPINBUTTONS 10 #define NUM_SHARETAB_CHECKBUTTONS 10 #define NUM_SHARETAB_COMBOS 10 #define NUM_MACCTTAB_ENTRIES 2 #define NUM_SETTINGS_ENTRIES 20 #define NUM_SETTINGS_SPINBUTTONS 2 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 *notebook_vbox8; GtkWidget *notebook_vbox9; 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; /* 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 *user_set_table; GtkWidget *acclock_label; /* The add user widgets */ GtkWidget *useradd_username_entry; GtkWidget *useradd_group_entry; GtkWidget *useradd_password_entry; GtkWidget *useradd_homedir_entry; GtkWidget *useradd_comment_entry; GtkWidget *useradd_shell_combo; /* The user tab's directory treeview */ GtkWidget *directory_treeview; GtkListStore *directory_store; /* The share tab's widgets */ GtkWidget *share_treeview; GtkListStore *share_store; GtkWidget *share_settings_vbox; GtkWidget *share_settings_scrolled_window; /* The user settings widgets */ GtkWidget *share_set_entry[NUM_SHARETAB_ENTRIES]; GtkWidget *share_set_spinbutton[NUM_SHARETAB_SPINBUTTONS]; GtkWidget *share_set_checkbutton[NUM_SHARETAB_CHECKBUTTONS]; GtkWidget *share_set_combo[NUM_SHARETAB_COMBOS]; GtkWidget *share_set_table; /* User and group access (valid/invalid/write/admin) */ GtkWidget *valid_users_treeview; GtkListStore *valid_users_store; GtkWidget *invalid_users_treeview; GtkListStore *invalid_users_store; GtkWidget *write_users_treeview; GtkListStore *write_users_store; GtkWidget *admin_users_treeview; GtkListStore *admin_users_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 machine account tab's widgets */ GtkWidget *macct_treeview; GtkListStore *macct_store; GtkWidget *macct_settings_vbox; GtkWidget *macct_settings_scrolled_window; GtkWidget *macct_set_table; GtkWidget *macct_set_entry[NUM_MACCTTAB_ENTRIES]; /* The connection tabs widgets */ GtkWidget *conns_treeview; GtkListStore *conns_store; /* 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 questions widgets */ GtkWidget *import_question_window; GtkWidget *import_chkbtn_local; GtkWidget *import_chkbtn_remote; GtkWidget *import_chkbtn_users; GtkWidget *import_chkbtn_groups; GtkWidget *import_chkbtn_valid; GtkWidget *import_chkbtn_invalid; GtkWidget *import_chkbtn_write; GtkWidget *import_chkbtn_admin; /* The import selectors widgets */ GtkWidget *import_window; GtkWidget *import_treeview; GtkListStore *import_store; /* The settings window */ GtkWidget *settings_window; GtkWidget *settings_entry[NUM_SETTINGS_ENTRIES]; GtkWidget *settings_checkbutton[NUM_SETTINGS_SPINBUTTONS]; GtkWidget *add_configuration_window; }wid; gadmin-samba-0.3.2/src/make_settings_buttons.c0000644000000000000000000000462711527565344020125 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_conf_tab.c0000644000000000000000000000375311527565345017176 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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(SAMBA_CONF, "r"))==NULL) { return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffy = allocate(conf_size+1); new_buffy = allocate(conf_size+1); 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-samba-0.3.2/src/create_server_tab.h0000644000000000000000000000176711527565344017200 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/apply_server_settings.c0000644000000000000000000011034611527565344020141 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "commented.h" #include "reread_conf.h" #include "show_info.h" #include "functions.h" #include "apply_server_settings.h" #include "populate_server_settings.h" #include "populate_conf_tab.h" extern int activated; /* Write the new file or just print the changes */ #define WRITE_CHANGES 1 void apply_server_settings(struct w *widgets) { /* Change the selected servers configuration. */ FILE *fp; long conf_size; gint active_index = 0, sec_index = 0; gchar *info; int global_section_found = 0; int sec_changed = 0; int dom_logons = 0; char *line, *conf_line, *new_conf; /* Entries */ G_CONST_RETURN gchar *server_name; G_CONST_RETURN gchar *server_comment; G_CONST_RETURN gchar *domain_workgroup; G_CONST_RETURN gchar *realm; G_CONST_RETURN gchar *allowed_nets; G_CONST_RETURN gchar *listen_nets; G_CONST_RETURN gchar *announce_server_to; G_CONST_RETURN gchar *retrieve_announce_from; G_CONST_RETURN gchar *printcap_path; G_CONST_RETURN gchar *guest_users; G_CONST_RETURN gchar *samba_logfile; G_CONST_RETURN gchar *samba_password_program; G_CONST_RETURN gchar *new_pass_phrase; G_CONST_RETURN gchar *samba_username_mapfile; G_CONST_RETURN gchar *name_resolve_order; G_CONST_RETURN gchar *socket_options; G_CONST_RETURN gchar *wins_servers; G_CONST_RETURN gchar *logon_drive; G_CONST_RETURN gchar *logon_home; G_CONST_RETURN gchar *logon_path; G_CONST_RETURN gchar *logon_script; // G_CONST_RETURN gchar *samba_root_home; G_CONST_RETURN gchar *add_user_script; G_CONST_RETURN gchar *add_user_to_group_script; G_CONST_RETURN gchar *add_group_script; G_CONST_RETURN gchar *del_user_script; G_CONST_RETURN gchar *del_user_from_group_script; G_CONST_RETURN gchar *del_group_script; G_CONST_RETURN gchar *add_machine_script; G_CONST_RETURN gchar *winbind_separator; G_CONST_RETURN gchar *idmap_uid; G_CONST_RETURN gchar *idmap_gid; G_CONST_RETURN gchar *template_shell; /* Spinbuttons */ G_CONST_RETURN gchar *max_log_file_size; G_CONST_RETURN gchar *username_match_level; G_CONST_RETURN gchar *password_match_level; G_CONST_RETURN gchar *election_level; G_CONST_RETURN gchar *password_chat_timeout; G_CONST_RETURN gchar *machine_password_timeout; G_CONST_RETURN gchar *winbind_cache_timeout; /* If the security level combo is changed, change all other relevant options. */ sec_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[0])); /* Compare the current security level and domain logons option */ if((fp=fopen(SAMBA_CONF, "r"))==NULL) { info = g_strdup_printf(_("Cant open smb.conf here: \n%s\n"), SAMBA_CONF); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); /* Check if domain logons is set. Then its atleast a BDC */ if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { if( strstr(line, "domain logons") && strstr(line, "yes") && ! commented(line) ) { dom_logons = 1; break; } /* A share is found, break. */ if( strstr(line, "[") && ! strstr(line, "[global]") && ! commented(line) ) break; } rewind(fp); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { if( strstr(line, "security =") && strstr(line, "user") && ! dom_logons && sec_index !=0 && ! commented(line) && ! sec_changed ) sec_changed = 1; else if( strstr(line, "security =") && strstr(line, "user") && dom_logons && sec_index !=1 && ! commented(line) && ! sec_changed ) sec_changed = 1; else if( strstr(line, "security =") && strstr(line, "domain") && sec_index !=2 && ! commented(line) && ! sec_changed ) sec_changed = 1; else if( strstr(line, "security =") && strstr(line, "ads") && sec_index !=3 && ! commented(line) && ! sec_changed ) sec_changed = 1; if( sec_changed ) break; /* A share is found, break. */ if( strstr(line, "[") && ! strstr(line, "[global]") && ! commented(line) ) break; } fclose(fp); free(line); if( ! strstr(SAMBA_CONF, "smb.conf") ) { info = g_strdup_printf(_("The define for SAMBA_CONF is bad, please reinstall the application.\n")); show_info(info); g_free(info); return; } /* Get settings from the entries */ server_name = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[0])); server_comment = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[1])); domain_workgroup = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[2])); realm = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[3])); allowed_nets = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[4])); listen_nets = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[5])); announce_server_to = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[6])); retrieve_announce_from = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[7])); printcap_path = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[8])); guest_users = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[9])); samba_logfile = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[10])); socket_options = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[11])); logon_drive = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[12])); logon_home = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[13])); logon_path = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[14])); logon_script = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[15])); name_resolve_order = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[16])); wins_servers = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[17])); samba_username_mapfile = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[18])); samba_password_program = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[20])); // samba_root_home = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[21])); new_pass_phrase = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[22])); add_user_script = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[23])); add_user_to_group_script = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[24])); add_group_script = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[25])); del_user_script = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[26])); del_user_from_group_script = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[27])); del_group_script = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[28])); add_machine_script = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[29])); idmap_uid = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[30])); idmap_gid = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[31])); template_shell = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[32])); winbind_separator = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_entry[33])); /* Get settings from the spinbuttons */ max_log_file_size = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[0])); username_match_level = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[1])); password_match_level = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[2])); election_level = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[3])); password_chat_timeout = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[4])); machine_password_timeout = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[5])); winbind_cache_timeout = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[6])); if( strlen(server_name) == 0 ) { info = g_strdup_printf(_("Please specify the server name.\n")); show_info(info); g_free(info); return; } if( strlen(domain_workgroup) == 0 ) { info = g_strdup_printf(_("Please specify a workgroup or domain name.\n")); show_info(info); g_free(info); return; } /* Change the server configuration. */ if((fp=fopen(SAMBA_CONF, "r"))==NULL) { info = g_strdup_printf(_("Cant open smb.conf here: \n%s\n"), SAMBA_CONF); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); conf_line = allocate(conf_size+1024); /* Additional bytes for changes, 350 chars per entry widget * 100 widgets + 20000 for the directives */ new_conf = allocate(conf_size+(350*100)+20000); /* First scroll to the global section */ if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { strcat(new_conf, line); if( strstr(line, "[global]") && ! commented(line) ) { global_section_found = 1; break; } } if( ! global_section_found ) { info = g_strdup_printf(_("Can not find the [global] section in %s\nNo changes made.\n"), SAMBA_CONF); show_info(info); g_free(info); fclose(fp); free(line); free(conf_line); free(new_conf); return; } if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { if( commented(line) ) continue; if( strlen(line) > 4000 ) { info = g_strdup_printf(_("A line with over 4000 chars is not valid in: %s\n"), SAMBA_CONF); show_info(info); g_free(info); fclose(fp); free(line); free(conf_line); free(new_conf); return; } /* Break at any share definition "[" and collect them in the next while loop */ if( strstr(line, "[") && strstr(line, "]") ) { /* Add the "wins server =" option if an IP or DNS name is specified. */ if( wins_servers!=NULL && strlen(wins_servers) > 7 ) { sprintf(conf_line, "wins server = %s\n", wins_servers); strcat(new_conf, conf_line); } strcat(new_conf, line); break; } /* Change matching server directives otherwise just gather them */ if( strstr(line, "netbios name") ) { sprintf(conf_line, "netbios name = %s\n", server_name); strcat(new_conf, conf_line); } else if( strstr(line, "server string") ) { sprintf(conf_line, "server string = %s\n", server_comment); strcat(new_conf, conf_line); } else if( strstr(line, "workgroup") ) { sprintf(conf_line, "workgroup = %s\n", domain_workgroup); strcat(new_conf, conf_line); } else if( strstr(line, "hosts allow") ) { sprintf(conf_line, "hosts allow = %s\n", allowed_nets); strcat(new_conf, conf_line); } else if( strstr(line, "interfaces") && ! strstr(line, "bind interfaces only") ) { sprintf(conf_line, "interfaces = %s\n", listen_nets); strcat(new_conf, conf_line); } else if( strstr(line, "remote announce") ) { sprintf(conf_line, "remote announce = %s\n", announce_server_to); strcat(new_conf, conf_line); } else if( strstr(line, "remote browse sync") ) { sprintf(conf_line, "remote browse sync = %s\n", retrieve_announce_from); strcat(new_conf, conf_line); } else if( strstr(line, "printcap name") ) { sprintf(conf_line, "printcap name = %s\n", printcap_path); strcat(new_conf, conf_line); } else if( strstr(line, "guest account") ) { sprintf(conf_line, "guest account = %s\n", guest_users); strcat(new_conf, conf_line); } else if( strstr(line, "log file") ) { sprintf(conf_line, "log file = %s\n", samba_logfile); strcat(new_conf, conf_line); } else if( strstr(line, "username map") ) { sprintf(conf_line, "username map = %s\n", samba_username_mapfile); strcat(new_conf, conf_line); } else if( strstr(line, "add user script") ) { sprintf(conf_line, "add user script = %s\n", add_user_script); strcat(new_conf, conf_line); } else if( strstr(line, "passwd program") ) { sprintf(conf_line, "passwd program = %s\n", samba_password_program); strcat(new_conf, conf_line); } else if( strstr(line, "passwd chat") && ! strstr(line, "passwd chat timeout") ) { sprintf(conf_line, "passwd chat = %s\n", new_pass_phrase); strcat(new_conf, conf_line); } else if( strstr(line, "socket options") ) { sprintf(conf_line, "socket options = %s\n", socket_options); strcat(new_conf, conf_line); } else if( strstr(line, "name resolve order") ) { sprintf(conf_line, "name resolve order = %s\n", name_resolve_order); strcat(new_conf, conf_line); } else if( strstr(line, "wins server") ) { /* Remove this line/option and add it last if an IP or DNS name is given. */ /* sprintf(conf_line, "wins server = %s\n", wins_servers); strcat(new_conf, conf_line); */ } else if( strstr(line, "idmap uid") ) { sprintf(conf_line, "idmap uid = %s\n", idmap_uid); strcat(new_conf, conf_line); } else if( strstr(line, "idmap gid") ) { sprintf(conf_line, "idmap gid = %s\n", idmap_gid); strcat(new_conf, conf_line); } else if( strstr(line, "template shell") ) { sprintf(conf_line, "template shell = %s\n", template_shell); strcat(new_conf, conf_line); } else if( strstr(line, "logon drive") ) { sprintf(conf_line, "logon drive = %s\n", logon_drive); strcat(new_conf, conf_line); } else if( strstr(line, "logon home") ) { sprintf(conf_line, "logon home = %s\n", logon_home); strcat(new_conf, conf_line); } else if( strstr(line, "logon path") ) { sprintf(conf_line, "logon path = %s\n", logon_path); strcat(new_conf, conf_line); } else if( strstr(line, "logon script") ) { sprintf(conf_line, "logon script = %s\n", logon_script); strcat(new_conf, conf_line); } else if( strstr(line, "realm") ) { sprintf(conf_line, "realm = %s\n", realm); strcat(new_conf, conf_line); } else /* Doesnt seem to work if( strstr(line, "root directory") ) { sprintf(conf_line, "root directory = %s\n", samba_root_home); strcat(new_conf, conf_line); } else */ if( strstr(line, "add user script") ) { sprintf(conf_line, "add user script = %s\n", add_user_script); strcat(new_conf, conf_line); } else if( strstr(line, "add user to group script") ) { sprintf(conf_line, "add user to group script = %s\n", add_user_to_group_script); strcat(new_conf, conf_line); } else if( strstr(line, "add group script") ) { sprintf(conf_line, "add group script = %s\n", add_group_script); strcat(new_conf, conf_line); } else if( strstr(line, "del user script") ) { sprintf(conf_line, "del user script = %s\n", del_user_script); strcat(new_conf, conf_line); } else if( strstr(line, "del user from group script") ) { sprintf(conf_line, "del user from group script = %s\n", del_user_from_group_script); strcat(new_conf, conf_line); } else if( strstr(line, "del group script") ) { sprintf(conf_line, "del group script = %s\n", del_group_script); strcat(new_conf, conf_line); } else if( strstr(line, "add machine script") ) { sprintf(conf_line, "add machine script = %s\n", add_machine_script); strcat(new_conf, conf_line); } else if( strstr(line, "winbind separator") ) { sprintf(conf_line, "winbind separator = %s\n", winbind_separator); strcat(new_conf, conf_line); } else /* Combos */ /* Security level */ if( strstr(line, "security =") || strstr(line, "security=") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[0])); if( active_index == 0 ) sprintf(conf_line, "security = user\n"); else if( active_index == 1 ) /* Backup domain */ sprintf(conf_line, "security = user\n"); else if( active_index == 2 ) /* Primary domain */ sprintf(conf_line, "security = domain\n"); else if( active_index == 3 ) sprintf(conf_line, "security = ads\n"); else sprintf(conf_line, "security = user\n"); /* Default to user sec level */ strcat(new_conf, conf_line); } else if( strstr(line, "load printers") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[1])); if( active_index == 0 ) sprintf(conf_line, "load printers = yes\n"); else sprintf(conf_line, "load printers = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "cups options") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[2])); if( active_index == 0 ) sprintf(conf_line, "cups options = raw\n"); else sprintf(conf_line, "cups options =\n"); strcat(new_conf, conf_line); } else if( strstr(line, "null passwords") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[3])); if( active_index == 0 ) sprintf(conf_line, "null passwords = yes\n"); else sprintf(conf_line, "null passwords = no\n"); strcat(new_conf, conf_line); } else /* Security level change dependant */ if( strstr(line, "encrypt passwords") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[4])); if( sec_changed && (sec_index == 1 || sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "encrypt passwords = yes\n"); else if( sec_changed && sec_index == 0 ) sprintf(conf_line, "encrypt passwords = yes\n"); /* We still want this for user sec */ else if( active_index == 0 ) sprintf(conf_line, "encrypt passwords = yes\n"); else sprintf(conf_line, "encrypt passwords = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "unix password sync") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[5])); if( sec_changed && (sec_index == 1 || sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "unix password sync = yes\n"); else if( sec_changed && sec_index == 0 ) sprintf(conf_line, "unix password sync = yes\n"); /* We still want this for user sec */ else if( active_index == 0 ) sprintf(conf_line, "unix password sync = yes\n"); else sprintf(conf_line, "unix password sync = no\n"); strcat(new_conf, conf_line); } else /* Security level change dependant */ if( strstr(line, "local master") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[6])); if( sec_changed && (sec_index == 1 || sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "local master = yes\n"); else if( sec_changed && sec_index == 0 ) sprintf(conf_line, "local master = no\n"); else if( active_index == 0 ) sprintf(conf_line, "local master = yes\n"); else sprintf(conf_line, "local master = no\n"); strcat(new_conf, conf_line); } else /* Security level change dependant (Auto: no for User and BDC) */ if( strstr(line, "domain master") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[7])); if( sec_changed && (sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "domain master = yes\n"); else if( sec_changed && (sec_index == 0 || sec_index == 1) ) sprintf(conf_line, "domain master = no\n"); else if( active_index == 0 ) sprintf(conf_line, "domain master = yes\n"); else sprintf(conf_line, "domain master = no\n"); strcat(new_conf, conf_line); } else /* Security level change dependant (Auto: no for User and BDC) */ if( strstr(line, "preferred master") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[8])); if( sec_changed && (sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "preferred master = yes\n"); else if( sec_changed && sec_index == 0 ) sprintf(conf_line, "preferred master = no\n"); else if( active_index == 0 ) sprintf(conf_line, "preferred master = yes\n"); else sprintf(conf_line, "preferred master = no\n"); strcat(new_conf, conf_line); } else /* Security level change dependant */ if( strstr(line, "time server") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[9])); if( sec_changed && (sec_index == 1 || sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "time server = yes\n"); else if( sec_changed && sec_index == 0 ) sprintf(conf_line, "time server = no\n"); else if( active_index == 0 ) sprintf(conf_line, "time server = yes\n"); else sprintf(conf_line, "time server = no\n"); strcat(new_conf, conf_line); } else /* Security level change dependant */ if( strstr(line, "domain logons") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[10])); if( sec_changed && (sec_index == 1 || sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "domain logons = yes\n"); else if( sec_changed && sec_index == 0 ) sprintf(conf_line, "domain logons = no\n"); else if( active_index == 0 ) sprintf(conf_line, "domain logons = yes\n"); else if( active_index == 1 ) sprintf(conf_line, "domain logons = no\n"); strcat(new_conf, conf_line); } else /* Security level change dependant */ if( strstr(line, "wins support") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[11])); if( sec_changed && (sec_index == 1 || sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "wins support = yes\n"); else if( sec_changed && sec_index == 0 ) sprintf(conf_line, "wins support = no\n"); else if( active_index == 0 ) sprintf(conf_line, "wins support = yes\n"); else if( active_index == 1 ) sprintf(conf_line, "wins support = no\n"); strcat(new_conf, conf_line); } else /* Security level change dependant */ if( strstr(line, "wins proxy") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[12])); if( sec_changed && (sec_index == 1 || sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "wins proxy = yes\n"); else if( sec_changed && sec_index == 0 ) sprintf(conf_line, "wins proxy = no\n"); else if( active_index == 0 ) sprintf(conf_line, "wins proxy = yes\n"); else if( active_index == 1 ) sprintf(conf_line, "wins proxy = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "dns proxy") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[13])); if( active_index == 0 ) sprintf(conf_line, "dns proxy = yes\n"); else sprintf(conf_line, "dns proxy = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "short preserve case") ) { /* Just remove the line */ } else if( strstr(line, "preserve case") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[14])); if( active_index == 0 ) sprintf(conf_line, "preserve case = yes\nshort preserve case = yes\n"); else sprintf(conf_line, "preserve case = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "client use spnego") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[15])); if( active_index == 0 ) sprintf(conf_line, "client use spnego = yes\n"); else sprintf(conf_line, "client use spnego = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "client signing") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[16])); if( active_index == 0 ) sprintf(conf_line, "client signing = yes\n"); else sprintf(conf_line, "client signing = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "client schannel") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[17])); if( active_index == 0 ) sprintf(conf_line, "client schannel = yes\n"); else sprintf(conf_line, "client schannel = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "server signing") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[18])); if( active_index == 0 ) sprintf(conf_line, "server signing = yes\n"); else sprintf(conf_line, "server signing = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "server schannel") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[19])); if( active_index == 0 ) sprintf(conf_line, "server schannel = yes\n"); else sprintf(conf_line, "server schannel = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "nt pipe support") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[20])); if( active_index == 0 ) sprintf(conf_line, "nt pipe support = yes\n"); else sprintf(conf_line, "nt pipe support = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "nt status support") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[21])); if( active_index == 0 ) sprintf(conf_line, "nt status support = yes\n"); else sprintf(conf_line, "nt status support = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "allow trusted domains") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[22])); if( active_index == 0 ) sprintf(conf_line, "allow trusted domains = yes\n"); else sprintf(conf_line, "allow trusted domains = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "obey pam restrictions") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[23])); if( active_index == 0 ) sprintf(conf_line, "obey pam restrictions = yes\n"); else sprintf(conf_line, "obey pam restrictions = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "enable spoolss") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[24])); if( active_index == 0 ) sprintf(conf_line, "enable spoolss = yes\n"); else sprintf(conf_line, "enable spoolss = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "client plaintext auth") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[25])); if( active_index == 0 ) sprintf(conf_line, "client plaintext auth = yes\n"); else sprintf(conf_line, "client plaintext auth = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "disable netbios") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[26])); if( active_index == 0 ) sprintf(conf_line, "disable netbios = yes\n"); else sprintf(conf_line, "disable netbios = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "follow symlinks") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[27])); if( active_index == 0 ) sprintf(conf_line, "follow symlinks = yes\n"); else sprintf(conf_line, "follow symlinks = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "update encrypted") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[28])); if( active_index == 0 ) sprintf(conf_line, "update encrypted = yes\n"); else sprintf(conf_line, "update encrypted = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "pam password change") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[29])); if( active_index == 0 ) sprintf(conf_line, "pam password change = yes\n"); else sprintf(conf_line, "pam password change = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "hostname lookups") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[30])); if( active_index == 0 ) sprintf(conf_line, "hostname lookups = yes\n"); else sprintf(conf_line, "hostname lookups = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "hostname lookups") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[30])); if( active_index == 0 ) sprintf(conf_line, "hostname lookups = yes\n"); else sprintf(conf_line, "hostname lookups = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "winbind use default domain") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[31])); if( active_index == 0 || (sec_changed && (sec_index == 1 || sec_index == 2 || sec_index == 3)) ) sprintf(conf_line, "winbind use default domain = yes\n"); else sprintf(conf_line, "winbind use default domain = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "winbind trusted domains only") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[32])); if( active_index == 0 ) sprintf(conf_line, "winbind trusted domains only = yes\n"); else sprintf(conf_line, "winbind trusted domains only = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "winbind nested groups") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[33])); if( active_index == 0 ) sprintf(conf_line, "winbind nested groups = yes\n"); else sprintf(conf_line, "winbind nested groups = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "winbind nss info") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[34])); if( active_index == 0 ) sprintf(conf_line, "winbind nss info = yes\n"); else sprintf(conf_line, "winbind nss info = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "winbind refresh tickets") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[35])); if( active_index == 0 ) sprintf(conf_line, "winbind refresh tickets = yes\n"); else sprintf(conf_line, "winbind refresh tickets = no\n"); strcat(new_conf, conf_line); } else if( strstr(line, "winbind offline logon") ) { active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->server_set_combo[36])); if( active_index == 0 ) sprintf(conf_line, "winbind offline logon = yes\n"); else sprintf(conf_line, "winbind offline logon = no\n"); strcat(new_conf, conf_line); } else /* Spinbuttons */ if( strstr(line, "max log size") ) { sprintf(conf_line, "max log size = %s\n", max_log_file_size); strcat(new_conf, conf_line); } else if( strstr(line, "username level") ) { sprintf(conf_line, "username level = %s\n", username_match_level); strcat(new_conf, conf_line); } else if( strstr(line, "password level") ) { sprintf(conf_line, "password level = %s\n", password_match_level); strcat(new_conf, conf_line); } else /* Security level change dependant */ if( strstr(line, "os level") ) { /* Set it to something high for Primary domains and active directory */ if( sec_changed && (sec_index == 2 || sec_index == 3) ) sprintf(conf_line, "os level = 80\n"); /* 35 is max but 80 doesnt hurt */ else if( sec_changed && (sec_index == 0 || sec_index == 1) ) sprintf(conf_line, "os level = 33\n"); /* 33 is default for user level security */ else sprintf(conf_line, "os level = %s\n", election_level); strcat(new_conf, conf_line); } else if( strstr(line, "passwd chat timeout") ) { sprintf(conf_line, "passwd chat timeout = %s\n", password_chat_timeout); strcat(new_conf, conf_line); } else if( strstr(line, "machine password timeout") ) { sprintf(conf_line, "machine password timeout = %s\n", machine_password_timeout); strcat(new_conf, conf_line); } else if( strstr(line, "winbind cache time") ) { sprintf(conf_line, "winbind cache time = %s\n", winbind_cache_timeout); strcat(new_conf, conf_line); } else strcat(new_conf, line); /* Gather all other values */ } /* Collect the rest of the file, share definitions etc */ if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) strcat(new_conf, line); free(line); free(conf_line); fclose(fp); /* Write the new file if defined */ if( WRITE_CHANGES ) { if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { info = g_strdup_printf(_("Cant write smb.conf here:\n%s\n"), SAMBA_CONF); show_info(info); g_free(info); return; } fputs(new_conf, fp); fclose(fp); } else printf("New configuration:\n%s\nThe configuration was not changed, only printed\n", new_conf); free(new_conf); if( sec_changed ) { if( sec_index == 0 ) { remove_global_option("realm"); /* Can realm be used here ? */ info = g_strdup_printf(_("Auto configuration for \"user\" security level done.\nReview any changes.\n")); } else if( sec_index == 1 ) { remove_global_option("realm"); /* Can realm be used here ? */ info = g_strdup_printf(_("Auto configuration for (BDC) \"backup domain controller\" done.\nUnlock and supply a samba password for the samba root account if needed.\n")); } else if( sec_index == 2 ) { remove_global_option("realm"); /* Can realm be used here ? */ info = g_strdup_printf(_("Auto configuration for (PDC) \"primary domain controller\" done.\nConnect to this domain as root after giving it a samba password and unlocking it.\n")); } else if( sec_index == 3 ) { /* The kerberos realm entry is enabled or disabled in populate_server_settings() depending on whats selected */ add_global_option("realm"); info = g_strdup_printf(_("Auto configuration for (ADS) \"Active directory\" security level done.\nSetup the kerberos realm and connect to this domain as root after giving it a samba password and unlocking it.\n")); } else info = g_strdup_printf(_("Error!!! Auto configuration for \"No\" security level done.\nPlease review any changes.\n")); show_info(info); g_free(info); } fix_newlines_in_conf(); /* Populate the server settings */ populate_server_settings(widgets); populate_conf_tab(widgets); reread_conf(widgets); } gadmin-samba-0.3.2/src/functions.h0000644000000000000000000000360511527565344015522 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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; void add_global_option(char *option); void remove_global_option(char *option); int cmplowercase(char *buf, char *cmpstring); char *encrypt_password(G_CONST_RETURN gchar *password); int fix_newlines_in_conf(); void fix_path(char *path); void randomize_username(struct w *widgets); void randomize_password(struct w *widgets); char *random_string(int len); int smbuser_exists(G_CONST_RETURN gchar*username); int smbuser_locked(G_CONST_RETURN gchar*username); int user_exists(G_CONST_RETURN gchar *username); int group_exists(G_CONST_RETURN gchar *username); gchar *get_user_comment(gchar *user); gchar *get_user_setting(gchar *user, gchar *what); gchar *get_group_name(gchar *groupnr); void password_user(G_CONST_RETURN gchar *username, G_CONST_RETURN gchar *password); int is_banned(char *user); void make_file_chmod(gchar *file, char perm[128]); void make_dir_chmod(gchar *directory, char perm[128]); int file_exists(char *entity); #endif gadmin-samba-0.3.2/src/widgets.h0000644000000000000000000000166211527565345015162 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/file_chooser.c0000644000000000000000000000510411527565344016142 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 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-samba-0.3.2/src/commands.c0000644000000000000000000001232711527565344015307 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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" extern int MAX_READ_POPEN; extern int global_start_winbindd; 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 > 0 ) // Was == 1 exit_status = 0; else exit_status = 1; return exit_status; } void init_start(struct w *widgets) { gchar *cmd; /* RH/Fedora has a separate winbindd service */ if( global_start_winbindd && strstr(SYSINIT_START_CMD, "chkconfig") ) cmd = g_strdup_printf("%s && chkconfig winbind on", SYSINIT_START_CMD); else 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; /* RH/Fedora has a separate winbindd service */ if( global_start_winbindd && strstr(SYSINIT_STOP_CMD, "chkconfig") ) cmd = g_strdup_printf("%s && chkconfig winbind off", SYSINIT_STOP_CMD); else 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; } void get_gadmin_samba_users() { gchar *cmd; /* Secure the gadmin_samba_users file. */ cmd = g_strdup_printf("touch %s && chmod 600 %s\n", GADMIN_SAMBA_USERS, GADMIN_SAMBA_USERS); if( ! run_command(cmd) ) { printf("Show info here: Creating an initial gadmin_samba_users file failed.\n"); } g_free(cmd); /* List users like the smbpasswd file. (Use -v instead of -w to get more info) */ cmd = g_strdup_printf("%s -L -w > %s\n", PDBEDIT_BINARY, GADMIN_SAMBA_USERS); if( ! run_command(cmd) ) { printf("Show info here: pbedit -L -w -v failed.\n"); } g_free(cmd); } int add_locked_samba_user(gchar *username) { FILE *fp; gchar *info, *cmd; /* Add the user */ cmd = g_strdup_printf("%s -t -a -u '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed adding locked samba user: %s\n"), username); show_info(info); g_free(info); g_free(cmd); return 0; } fputs("\n", fp); fputs("\n", fp); pclose(fp); g_free(cmd); /* Disable it */ cmd = g_strdup_printf("%s -c \"[D ]\" -u '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed disabling/locking samba user: %s\n"), username); show_info(info); g_free(info); g_free(cmd); return 0; } pclose(fp); g_free(cmd); return 1; } int add_null_password_samba_user(gchar *username) { FILE *fp; gchar *info, *cmd; /* Add the user */ cmd = g_strdup_printf("%s -t -a -u '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed adding null password samba user: %s\n"), username); show_info(info); g_free(info); g_free(cmd); return 0; } fputs("\n", fp); fputs("\n", fp); pclose(fp); g_free(cmd); /* Set null password / require no password if NULL passwords are allowed */ cmd = g_strdup_printf("%s -c \"[N ]\" -u '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed locking null password samba user: %s\n"), username); show_info(info); g_free(info); g_free(cmd); return 0; } return 1; } gadmin-samba-0.3.2/src/save_settings.c0000644000000000000000000000670311527565345016366 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "commands.h" #include "allocate.h" #include "save_settings.h" #include "load_settings.h" #include "standard_conf.h" void save_settings(struct w *widgets) { FILE *fp; long conf_size; char *line, *new_conf; gchar *settings_file, *setting; G_CONST_RETURN gchar *set_smb_conf; /* APPCONFDIR is defined at compiletime */ settings_file = g_strdup_printf("%s/settings.conf", APPCONFDIR); if((fp=fopen(settings_file, "r"))==NULL) { printf("Could not open the settings file: %s\n", settings_file); g_free(settings_file); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); new_conf = allocate(conf_size+1); /* Remove the old settings */ if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { if( strlen(line) > 1000 ) continue; if( strstr(line, "show_conf_question:") ) continue; if( strstr(line, "start_winbindd:") ) continue; if( strstr(line, "smb_conf:") ) continue; strcat(new_conf, line); } fclose(fp); free(line); set_smb_conf = gtk_entry_get_text(GTK_ENTRY(widgets->settings_entry[0])); /* Update global paths */ /* Write the new settings */ if((fp=fopen(settings_file, "w+"))==NULL) { printf(_("Couldnt open the settings file here:\n%s\n"), settings_file); g_free(settings_file); return; } fputs(new_conf, fp); if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->settings_checkbutton[0])) ) setting = g_strdup_printf("\nshow_conf_question: yes\n"); else setting = g_strdup_printf("\nshow_conf_question: no\n"); fputs(setting, fp); g_free(setting); if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->settings_checkbutton[1])) ) setting = g_strdup_printf("\nstart_winbindd: yes\n"); else setting = g_strdup_printf("\nstart_winbindd: no\n"); fputs(setting, fp); g_free(setting); if( strlen(set_smb_conf) > 5 ) { setting = g_strdup_printf("smb_conf: %s\n", set_smb_conf); fputs(setting, fp); g_free(setting); } fclose(fp); g_free(settings_file); free(new_conf); /* Load the new settings */ load_settings(widgets); /* If new configuration is selected, show standard conf question */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->settings_checkbutton[0])) ) { create_standard_conf_question(widgets); } } gadmin-samba-0.3.2/src/create_share_tab.h0000644000000000000000000000176411527565344016771 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_share_tab_H # define create_share_tab_H extern struct w *widgets; void create_share_tab(struct w *widgets); #endif gadmin-samba-0.3.2/src/populate_conns.h0000644000000000000000000000175311527565345016546 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_conns_H # define populate_conns_H extern struct w *widgets; void populate_conns(struct w *widgets); #endif gadmin-samba-0.3.2/src/delete_share.h0000644000000000000000000000175011527565344016135 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_share_H # define delete_share_H extern struct w *widgets; void delete_share(struct w *widgets); #endif gadmin-samba-0.3.2/src/share_treeview_row_clicked.h0000644000000000000000000000213711527565345021073 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_share_treeview_row_clicked_H # define gadmin_samba_share_treeview_row_clicked_H extern struct w *widgets; void share_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, gpointer data); #endif gadmin-samba-0.3.2/src/system_defines.h0000644000000000000000000000170711527565345016535 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/status_update.h0000644000000000000000000000206011527565345016372 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 * process_running(char process[1024]); //, char extmatch[1024]); int status_update(struct w *widgets); #endif gadmin-samba-0.3.2/src/create_security_tab.c0000644000000000000000000000742411527565344017530 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_vbox8), 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_vbox8), 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-samba-0.3.2/src/create_import_question.c0000644000000000000000000002441711527565344020275 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "make_settings_checkbuttons.h" #include "create_import_question.h" #include "create_import_selection.h" extern int global_import_local; extern int global_import_remote; extern int global_import_users; extern int global_import_groups; extern int global_import_valid; extern int global_import_invalid; extern int global_import_write; extern int global_import_admin; /* Local checkbutton callback */ void import_local_checkbutton_toggled(GtkButton *button, struct w *widgets) { /* The local checkbutton is active */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_local)) ) { global_import_local = 1; global_import_remote = 0; gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_remote), FALSE); } } /* Remote checkbutton callback */ void import_remote_checkbutton_toggled(GtkButton *button, struct w *widgets) { /* The remote checkbutton is active */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_remote)) ) { global_import_local = 0; global_import_remote = 1; gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_local), FALSE); } } /* Users checkbutton callback */ void import_users_checkbutton_toggled(GtkButton *button, struct w *widgets) { /* The users checkbutton is active */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_users)) ) { global_import_users = 1; global_import_groups = 0; gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_groups), FALSE); } } /* Groups checkbutton callback */ void import_groups_checkbutton_toggled(GtkButton *button, struct w *widgets) { /* The groups checkbutton is active */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_groups)) ) { global_import_users = 0; global_import_groups = 1; gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_users), FALSE); } } /* Valid checkbutton callback */ void import_valid_checkbutton_toggled(GtkButton *button, struct w *widgets) { /* The valid checkbutton is active */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_valid)) ) global_import_valid = 1; else global_import_valid = 0; } /* Invalid checkbutton callback */ void import_invalid_checkbutton_toggled(GtkButton *button, struct w *widgets) { /* The invalid checkbutton is active */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_invalid)) ) global_import_invalid = 1; else global_import_invalid = 0; } /* Write checkbutton callback */ void import_write_checkbutton_toggled(GtkButton *button, struct w *widgets) { /* The write checkbutton is active */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_write)) ) global_import_write = 1; else global_import_write = 0; } /* Admin checkbutton callback */ void import_admin_checkbutton_toggled(GtkButton *button, struct w *widgets) { /* The admin checkbutton is active */ if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_admin)) ) global_import_admin = 1; else global_import_admin = 0; } /* A question for how to import users or groups */ void create_import_question(struct w *widgets) { GtkWidget *frame1, *frame2, *frame3; GtkWidget *table1, *table2, *table3; GtkWidget *question_vbox; GtkTooltips *tooltips; gchar *utf8=NULL; gchar *info; int a=0, b=1; widgets->import_question_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_position(GTK_WINDOW (widgets->import_question_window), GTK_WIN_POS_CENTER); gtk_widget_set_size_request(widgets->import_question_window, 450, -1); /* Set window information */ info = g_strdup_printf(_("GADMIN-SAMBA %s access permissions"), VERSION); gtk_window_set_title(GTK_WINDOW(widgets->import_question_window), info); g_free(info); g_signal_connect(GTK_WINDOW(widgets->import_question_window), "delete_event", G_CALLBACK(gtk_widget_destroy), NULL); question_vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(widgets->import_question_window), question_vbox); tooltips = gtk_tooltips_new(); /* 3 tables with some settings and 2 columns */ table1 = gtk_table_new(2, 2, FALSE); table2 = gtk_table_new(2, 2, FALSE); table3 = gtk_table_new(3, 2, FALSE); frame1 = gtk_frame_new("Add users or groups from:"); gtk_box_pack_start(GTK_BOX(question_vbox), frame1, TRUE, TRUE, 1); gtk_container_add(GTK_CONTAINER(frame1), table1); frame2 = gtk_frame_new("Add users or groups:"); gtk_box_pack_start(GTK_BOX(question_vbox), frame2, TRUE, TRUE, 1); gtk_container_add(GTK_CONTAINER(frame2), table2); frame3 = gtk_frame_new("Permissions:"); gtk_box_pack_start(GTK_BOX(question_vbox), frame3, TRUE, TRUE, 1); gtk_container_add(GTK_CONTAINER(frame3), table3); /* Settings */ /* Import from */ widgets->import_chkbtn_local = make_checkbutton_with_label(GTK_TABLE(table1), _("Local computer:"), 0,1,a,b); a++; b++; widgets->import_chkbtn_remote = make_checkbutton_with_label(GTK_TABLE(table1), _("Remote master domain:"), 0,1,a,b); a=0; b=1; /* Import users or groups */ widgets->import_chkbtn_users = make_checkbutton_with_label(GTK_TABLE(table2), _("Users:"), 0,1,a,b); a++; b++; widgets->import_chkbtn_groups = make_checkbutton_with_label(GTK_TABLE(table2), _("Groups:"), 0,1,a,b); a=0; b=1; /* Import permissions (valid users, invalid users, write list and admin users) */ widgets->import_chkbtn_valid = make_checkbutton_with_label(GTK_TABLE(table3), _("Access allowed:"), 0,1,a,b); a++; b++; widgets->import_chkbtn_invalid = make_checkbutton_with_label(GTK_TABLE(table3), _("Access denied:"), 0,1,a,b); a++; b++; widgets->import_chkbtn_write = make_checkbutton_with_label(GTK_TABLE(table3), _("Write access:"), 0,1,a,b); a++; b++; widgets->import_chkbtn_admin = make_checkbutton_with_label(GTK_TABLE(table3), _("Administrators:"), 0,1,a,b); /* Buttons, "Abort", "Next"*/ GtkWidget *hbutton_box = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(hbutton_box), GTK_BUTTONBOX_SPREAD); GtkWidget *cancel_button, *forward_button; cancel_button = gtk_button_new_from_stock(GTK_STOCK_QUIT); forward_button = gtk_button_new_from_stock(GTK_STOCK_GO_FORWARD); gtk_box_pack_start(GTK_BOX(hbutton_box), cancel_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbutton_box), forward_button, FALSE, FALSE, 0); gtk_container_add(GTK_CONTAINER(question_vbox), hbutton_box); /* Set default import states.. same as in gadmin_samba.c (globals origin) */ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_local), TRUE); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_users), TRUE); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->import_chkbtn_valid), TRUE); /* We need to reset global_* options so that it matches the default settings */ global_import_local = 1; global_import_remote = 0; global_import_users = 1; global_import_groups = 0; global_import_valid = 1; global_import_invalid = 0; global_import_write = 0; global_import_admin = 0; /* Signal hookups for the checkbuttons, all uses the same function to set globals */ g_signal_connect((gpointer)widgets->import_chkbtn_local, "toggled", G_CALLBACK(import_local_checkbutton_toggled), widgets); g_signal_connect((gpointer)widgets->import_chkbtn_remote, "toggled", G_CALLBACK(import_remote_checkbutton_toggled), widgets); g_signal_connect((gpointer)widgets->import_chkbtn_users, "toggled", G_CALLBACK(import_users_checkbutton_toggled), widgets); g_signal_connect((gpointer)widgets->import_chkbtn_groups, "toggled", G_CALLBACK(import_groups_checkbutton_toggled), widgets); g_signal_connect((gpointer)widgets->import_chkbtn_valid, "toggled", G_CALLBACK(import_valid_checkbutton_toggled), widgets); g_signal_connect((gpointer)widgets->import_chkbtn_invalid, "toggled", G_CALLBACK(import_invalid_checkbutton_toggled), widgets); g_signal_connect((gpointer)widgets->import_chkbtn_write, "toggled", G_CALLBACK(import_write_checkbutton_toggled), widgets); g_signal_connect((gpointer)widgets->import_chkbtn_admin, "toggled", G_CALLBACK(import_admin_checkbutton_toggled), widgets); /* Quit button */ g_signal_connect_swapped((gpointer)cancel_button, "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(widgets->import_question_window)); /* Forward button */ g_signal_connect_swapped((gpointer)forward_button, "clicked", G_CALLBACK(create_import_selection), widgets); gtk_widget_show_all(widgets->import_question_window); if( utf8 != NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/change_macct.h0000644000000000000000000000174611527565344016112 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 change_macct_H # define change_macct_H extern struct w *widgets; void change_macct(struct w *widgets); #endif gadmin-samba-0.3.2/src/delete_user.c0000644000000000000000000002100711527565344016001 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "commented.h" #include "get_option_pos.h" #include "system_defines.h" #include "create_del_system_user_question.h" #include "populate_users.h" #include "select_first_user.h" #include "populate_user_settings.h" #include "populate_shares.h" #include "select_first_share.h" #include "populate_share_settings.h" #include "populate_conf_tab.h" #include "reread_conf.h" #ifdef USE_DARWIN #include "osx_functions.h" #endif extern char global_user_name[1024]; extern int activated; void delete_user(struct w *widgets) { /* Deletes the samba user, deletes its settings from smb.conf and asks to delete the system user as well */ FILE *fp; long conf_size, opt_pos; char *line, *user_line, *new_line, *new_conf, *temp; int root_user=0, i=0, length=0, user_deleted=0; gchar *info, *cmd; G_CONST_RETURN gchar *username; 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(_("No user specified.\n")); show_info(info); g_free(info); return; } /* Delete all traces of this username in smb.conf's shares */ if((fp=fopen(SAMBA_CONF, "r"))==NULL) { info = g_strdup_printf(_("Cant open smb.conf here: %s run gadmin-samba as root.\n"), SAMBA_CONF); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); new_conf = allocate(conf_size+1); new_line = allocate(conf_size+1); user_line = allocate(conf_size+1); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { if( commented(line) ) continue; /* Lines where this user could be listed */ if( strstr(line, "valid users =") || strstr(line, "invalid users =") || strstr(line, "write list =" ) || strstr(line, "admin users =") ) { user_deleted = 0; new_line[0]='\0'; /* Only handle the users and groups */ opt_pos = get_option_pos(line); snprintf(user_line, conf_size, "%s", &line[opt_pos]); for(i=strlen(user_line)-1; user_line[i]!='\0'; i--) if( user_line[i]!='\r' || user_line[i]!='\n' ) { user_line[i]='\0'; break; } /* There must be an extra whitespace at the end for strtok */ strcat(user_line, " "); temp = strtok(user_line, " "); while( temp != NULL ) { if( ! strcmp(temp, username) ) { /* The user is deleted */ user_deleted = 1; } else { /* Contents: username username username etc */ strcat(new_line, " "); /* Add whitespace */ strcat(new_line, temp); /* Add the user */ } /* We pass NULL to strtok to get the next token in the string */ temp = strtok(NULL, " "); } if( user_deleted ) { if( strstr(line, "valid users =") ) strcat(new_conf, "valid users ="); /* Whitespace added above */ if( strstr(line, "write list =") ) strcat(new_conf, "write list ="); /* Whitespace added above */ if( strstr(line, "admin users =") ) strcat(new_conf, "admin users ="); /* Whitespace added above */ strcat(new_conf, new_line); /* Add the users that wherent deleted */ strcat(new_conf, "\n"); } else /* No changes where made */ strcat(new_conf, line); } else /* Copy everything else */ strcat(new_conf, line); } fclose(fp); free(line); free(new_line); free(user_line); /* Write the new config without the deleted users settings */ if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { printf("Error Writing configuration here: %s\n", SAMBA_CONF); return; } fputs(new_conf, fp); fclose(fp); free(new_conf); /* Dont ever ask to delete the root system user */ if( username[0]=='r' && username[1]=='o' && username[2]=='o' && username[3]=='t' && strlen(username)==4 ) { info = g_strdup_printf(_("The samba root user was deleted.\nThe root system user can not be deleted.\n")); show_info(info); g_free(info); root_user = 1; } /* Delete the samba user */ if( ! root_user ) { cmd = g_strdup_printf("%s -x -u '%s'", PDBEDIT_BINARY, username); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Could not remove the samba user: %s\n"), username); show_info(info); g_free(info); /* Dont return.. just tell the user */ } g_free(cmd); } /* Ask to delete the system user if its not "root" */ if( user_exists(username) && ! root_user ) { /* Repopulation is done after the question */ create_del_system_user_question(widgets); gtk_widget_show_all(widgets->del_system_user_question_window); } else { /* Repopulate affected things */ populate_users(widgets); select_first_user(widgets); populate_user_settings(widgets); populate_shares(widgets); select_first_share(widgets); populate_share_settings(widgets); populate_conf_tab(widgets); /* Update the server */ reread_conf(widgets); } } void dont_delete_system_user(struct w *widgets) { gtk_widget_destroy(widgets->del_system_user_question_window); /* Update the user list and the user settings */ populate_users(widgets); select_first_user(widgets); populate_user_settings(widgets); populate_shares(widgets); select_first_share(widgets); populate_share_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 char *command; #endif int deleted = 0; int length = 0; gchar *utf8 = NULL; gchar *info; gchar *username; gtk_widget_destroy(widgets->del_system_user_question_window); username = g_strdup_printf("%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 to delete system user: %s\n"), username); show_info(info); g_free(info); } if( utf8!=NULL ) g_free(utf8); /* Update the user list and the user settings */ populate_users(widgets); select_first_user(widgets); populate_user_settings(widgets); populate_shares(widgets); select_first_share(widgets); populate_share_settings(widgets); populate_conf_tab(widgets); /* Update the server */ reread_conf(widgets); } gadmin-samba-0.3.2/src/create_import_selection.h0000644000000000000000000000203411527565344020407 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_selection_H # define create_import_selection_H extern struct w *widgets; void create_import_selection(struct w *widgets); #endif gadmin-samba-0.3.2/src/chars_are_digits.c0000644000000000000000000000245511527565344017001 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/status_update.c0000644000000000000000000001160511527565345016372 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 global_smbd_activated; extern int global_nmbd_activated; extern int global_winbindd_activated; extern int MAX_READ_POPEN; char * get_process_pid(char process[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, "NONE"); 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 string is in this file its running */ if( strstr(line, process) ) { 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) { /* Activation status for smbd, nmbd and winbindd. */ gchar *info, *utf8=NULL; char *pid1, *pid2, *pid3, *ext_info; GdkColor color; pid1 = get_process_pid("smbd"); pid2 = get_process_pid("nmbd"); pid3 = get_process_pid("winbindd"); /* First set activation status globally (used when deactivating) */ if( strstr(pid1, "NONE") ) global_smbd_activated = 0; else global_smbd_activated = 1; if( strstr(pid2, "NONE") ) global_nmbd_activated = 0; else global_nmbd_activated = 1; if( strstr(pid3, "NONE") ) global_winbindd_activated = 0; else global_winbindd_activated = 1; /* If no daemons are running its deactivated */ if( ! global_smbd_activated && ! global_nmbd_activated && ! global_winbindd_activated ) { 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); free(pid1); free(pid2); free(pid3); /* Set status color */ gdk_color_parse("red", &color); gtk_widget_modify_fg(widgets->status_label, GTK_STATE_NORMAL, &color); return(TRUE); } else { /* Atleast one of the daemons are running */ activated = 1; if( ! global_smbd_activated || ! global_nmbd_activated || ! global_winbindd_activated ) { ext_info = allocate(1024); strcpy(ext_info,", inactive servers:"); if( ! global_smbd_activated ) strcat(ext_info," smbd "); if( ! global_nmbd_activated ) strcat(ext_info," nmbd "); if( ! global_winbindd_activated ) strcat(ext_info," winbindd "); info = g_strdup_printf(_("Status: Activated %s"), ext_info); free(ext_info); /* Set status color */ gdk_color_parse("dark green", &color); gtk_widget_modify_fg(widgets->status_label, GTK_STATE_NORMAL, &color); } else { info = g_strdup_printf(_("Status: Activated")); /* Set status color */ gdk_color_parse("dark green", &color); gtk_widget_modify_fg(widgets->status_label, GTK_STATE_NORMAL, &color); } utf8 = g_locale_to_utf8(info, strlen(info), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->status_label), utf8); g_free(info); } free(pid1); free(pid2); free(pid3); if( utf8!=NULL ) g_free(utf8); return(TRUE); } gadmin-samba-0.3.2/src/make_settings_spinbuttons.c0000644000000000000000000001324611527565345021015 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_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-samba-0.3.2/src/create_server_tab.c0000644000000000000000000000640411527565344017164 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "apply_server_settings.h" /* Wether or not to let the server settings section expand */ #define EXPAND_SERVER_SETTINGS_SECTION TRUE void create_server_tab(struct w *widgets) { GtkWidget *settings_treeview_hbox; GtkWidget *frame; gchar *utf8=NULL; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* 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_AUTOMATIC, GTK_POLICY_ALWAYS); /* 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(_("Server 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); /* The Apply server button */ // GtkWidget *apply_server_button = gtk_button_new_from_stock(GTK_STOCK_APPLY); // GtkWidget *server_button_hbox = gtk_hbutton_box_new(); // gtk_box_pack_start(GTK_BOX(server_button_hbox), apply_server_button, FALSE, FALSE, 0); // gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox1), server_button_hbox, FALSE, TRUE, 0); // g_signal_connect_swapped(G_OBJECT(apply_server_button), "clicked", // G_CALLBACK(apply_server_settings), widgets); gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/add_macct.h0000644000000000000000000000173511527565344015413 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct_H # define add_macct_H extern struct w *widgets; void add_macct(struct w *widgets); #endif gadmin-samba-0.3.2/src/share_treeview_row_clicked.c0000644000000000000000000000434411527565345021070 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "share_treeview_row_clicked.h" #include "populate_share_settings.h" extern char global_share_name[1024]; void share_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, gpointer data) { gchar *share; 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, &share, -1); snprintf(global_share_name, 1000, "%s", (gchar *)share); g_free(share); gtk_tree_path_free(path); populate_share_settings(data); } } } gadmin-samba-0.3.2/src/make_settings_entries.h0000644000000000000000000000274211527565344020101 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_make_settings_entries_H # define gadmin_samba_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-samba-0.3.2/src/populate_macct_settings.h0000644000000000000000000000201111527565345020421 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct_settings_H # define populate_macct_settings_H extern struct w *widgets; void populate_macct_settings(struct w *widgets); #endif gadmin-samba-0.3.2/src/make_settings_combos.c0000644000000000000000000001347011527565344017705 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_set_size_request(combo, combo_length, -1); gtk_widget_show(combo); return combo; } gadmin-samba-0.3.2/src/create_user_settings.h0000644000000000000000000000200011527565344017717 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_gadmin_samba.c0000644000000000000000000000446111527565345020022 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba.h" #include "populate_server_settings.h" #include "populate_users.h" #include "select_first_user.h" #include "populate_user_settings.h" #include "populate_shares.h" #include "populate_share_settings.h" #include "populate_maccts.h" #include "select_first_macct.h" #include "populate_macct_settings.h" #include "populate_disc_tab.h" #include "populate_security_tab.h" #include "populate_conf_tab.h" void populate_gadmin_samba(struct w *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 share tab */ populate_shares(widgets); /* Populate the share settings */ populate_share_settings(widgets); /* Populate the machine account tab */ populate_maccts(widgets); /* Set the first machine account as selected */ select_first_macct(widgets); /* Populate the machine account settings */ populate_macct_settings(widgets); /* Populate the disc tab */ populate_discs(widgets); /* Populate the security tab */ populate_security(widgets); /* Populate the conf tab */ populate_conf_tab(widgets); } gadmin-samba-0.3.2/src/create_disc_tab.h0000644000000000000000000000176111527565344016606 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/change_macct.c0000644000000000000000000000505611527565344016103 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "show_info.h" #include "allocate.h" #include "change_macct.h" #include "populate_maccts.h" #include "select_first_macct.h" #include "populate_macct_settings.h" #include "commands.h" /* Add the system and samba machine account */ void change_macct(struct w *widgets) { gchar *info, *cmd, *machine_acct; G_CONST_RETURN gchar *username; // Machine name, same thing except ($) G_CONST_RETURN gchar *comment; /* Get the users widget settings */ username = gtk_entry_get_text(GTK_ENTRY(widgets->macct_set_entry[0])); comment = gtk_entry_get_text(GTK_ENTRY(widgets->macct_set_entry[1])); machine_acct = g_strdup_printf("%s$", username); /* If the machine account doesnt exist, tell the user and return. */ if( ! user_exists(machine_acct) ) { info = g_strdup_printf(_("The machine account: %s\ncan not be changed because it does not exist.\n"), machine_acct); show_info(info); g_free(info); g_free(machine_acct); return; } /* Change the machine account comment */ cmd = g_strdup_printf("%s -c '%s' '%s'\n", "usermod", comment, machine_acct); if( ! run_command(cmd) ) { printf("Error changing the machine accounts system comment: %s\n", machine_acct); printf("The command was: %s\n", cmd); g_free(cmd); g_free(machine_acct); return; } g_free(cmd); g_free(machine_acct); /* Update the machine account tab */ populate_maccts(widgets); select_first_macct(widgets); populate_macct_settings(widgets); } gadmin-samba-0.3.2/src/make_settings_hseparators.h0000644000000000000000000000221111527565344020752 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_make_settings_hseparators_H # define gadmin_samba_make_settings_hseparators_H void make_3columns_hseparator(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach); #endif gadmin-samba-0.3.2/src/credits_window.h0000644000000000000000000000173511527565344016540 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/create_macct_tab.c0000644000000000000000000001173211527565344016745 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct_tab.h" //#include "populate_shell_combo.h" #include "macct_treeview_row_clicked.h" #define EXPAND_MACCT_SECTION FALSE #define EXPAND_MACCT_SETTINGS_SECTION TRUE void create_macct_tab(struct w *widgets) { GtkCellRenderer *macct_cell_renderer; GtkWidget *macct_treeview_hbox, *macct_settings_treeview_hbox; GtkWidget *macct_scrolled_window; GtkWidget *frame; gchar *utf8=NULL; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* Create the machine account list treeview in a scrolled window */ macct_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox4), macct_treeview_hbox, EXPAND_MACCT_SECTION, TRUE, 0); macct_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(macct_treeview_hbox), macct_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(macct_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(macct_scrolled_window, -1, 150); widgets->macct_store = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); widgets->macct_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->macct_treeview), GTK_TREE_MODEL(widgets->macct_store)); gtk_container_add(GTK_CONTAINER(macct_scrolled_window), widgets->macct_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->macct_treeview), TRUE); /* Set the column labels in the treeview */ macct_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *macct_col = gtk_tree_view_column_new_with_attributes(_("NetBIOS machine name"), macct_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->macct_treeview), GTK_TREE_VIEW_COLUMN(macct_col)); GtkTreeViewColumn *group_col = gtk_tree_view_column_new_with_attributes(_("Machine group"), macct_cell_renderer, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->macct_treeview), GTK_TREE_VIEW_COLUMN(group_col)); GtkTreeViewColumn *comment_col = gtk_tree_view_column_new_with_attributes(_("Machine comment"), macct_cell_renderer, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->macct_treeview), GTK_TREE_VIEW_COLUMN(comment_col)); g_signal_connect((gpointer)widgets->macct_treeview, "button_press_event", G_CALLBACK(macct_treeview_row_clicked), widgets); /* Create the machine account settings scrolled window with a frame and a table */ macct_settings_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox4), macct_settings_treeview_hbox, EXPAND_MACCT_SETTINGS_SECTION, TRUE, 0); widgets->macct_settings_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(macct_settings_treeview_hbox), widgets->macct_settings_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widgets->macct_settings_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(widgets->macct_settings_scrolled_window, -1, 100); /* Add a vbox to the scrolled window */ widgets->macct_settings_vbox = gtk_vbox_new(FALSE, 0); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(widgets->macct_settings_scrolled_window), widgets->macct_settings_vbox); /* Add a frame */ frame = gtk_frame_new(_("Machine account settings:")); /* A table with NUM settings and 2 columns FIXME, Count */ //FIXME.. wrong count widgets->macct_set_table = gtk_table_new(NUM_MACCTTAB_ENTRIES, 2, FALSE); gtk_box_pack_start(GTK_BOX(widgets->macct_settings_vbox), frame, TRUE, TRUE, 1); gtk_container_add(GTK_CONTAINER(frame), widgets->macct_set_table); // Use tab... gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/gadmin_samba.c0000644000000000000000000001401711527565344016106 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "support.h" #include "widgets.h" /* For getuid */ #include #include #include #include "create_main_window.h" #include "gadmin_samba.h" #include "commands.h" #include "set_version.h" #include "standard_conf.h" #include "add_standard_users.h" #include "create_server_tab.h" #include "create_server_settings.h" #include "create_user_tab.h" #include "create_user_settings.h" #include "create_share_tab.h" #include "create_share_settings.h" #include "create_macct_tab.h" #include "create_macct_settings.h" #include "create_conn_tab.h" #include "create_disc_tab.h" #include "create_security_tab.h" #include "create_conf_tab.h" #include "populate_gadmin_samba.h" #include "show_info.h" #include "load_settings.h" #include "status_update.h" int MAX_READ_POPEN = 16384; int activated = 0; int global_smbd_activated = 0; int global_nmbd_activated = 0; int global_winbindd_activated = 0; int global_share_access_treeview_num = 0; /* Wether or not to start winbindd */ int global_start_winbindd = 1; int info_window_exit_main = 0; char global_user_name[1024]=""; char global_share_name[1024]=""; char global_share_comment[1024]=""; char global_share_directory[16384]=""; char global_macct_name[1024]=""; /* Default values for the importer */ int global_import_local = 1; int global_import_remote = 0; int global_import_users = 1; int global_import_groups = 0; int global_import_valid = 1; int global_import_invalid = 0; int global_import_write = 0; int global_import_admin = 0; int main(int argc, char *argv[]) { gchar *gadmin_samba_settings, *conf_path, *cmd, *info; int i = 0; #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; } /* Add standard users (nobody etc) also makes sure that we have sambas configuration directory and required files */ add_standard_users(widgets); /* Create the main window */ create_main_window(widgets); /* Set SAMBA Version */ set_version(widgets); /* 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 share tab */ create_share_tab(widgets); create_share_settings(widgets); /* Create the machine account tab */ create_macct_tab(widgets); create_macct_settings(widgets); /* Create the connection tab */ create_conn_tab(widgets); /* Create the disc tab */ create_disc_tab(widgets); /* Create the security tab */ create_security_tab(widgets); /* Create the conf tab */ create_conf_tab(widgets); /* Load settings from gadmin_sambas settings file */ load_settings(widgets); /* Move the old settings directory as the new /etc/gadmin-samba directory. This is used for smoothly moving from gsambad to gadmin-samba */ cmd = g_strdup_printf("test -e %s/gsambad && mv %s/gsambad %s/gadmin-samba || exit 0", SYSCONFDIR, SYSCONFDIR, SYSCONFDIR); if( ! run_command(cmd) ) { printf("Error running transitional command: %s\n", cmd); } g_free(cmd); conf_path = g_strdup_printf("%s", SAMBA_CONF); gadmin_samba_settings = g_strdup_printf("%s", SETTINGS_FILE); /* If theres no smb.conf, add one and populate the entire gui */ if( ! file_exists(conf_path) ) { add_standard_conf(widgets); populate_gadmin_samba(widgets); } else /* Ask to add a new conf if we havnt done so before. Depends on show_conf_question: yes/no in gadmin-sambas settings */ if( ! conf_ok(gadmin_samba_settings) ) create_standard_conf_question(widgets); else /* The conf is ok, populate the entire gui */ populate_gadmin_samba(widgets); g_free(conf_path); g_free(gadmin_samba_settings); /* Always backup the samba configuration when new gadmin-samba versions are released */ backup_samba_conf(widgets); /* Window close button (x) */ g_signal_connect(GTK_OBJECT(widgets->main_window), "destroy", GTK_SIGNAL_FUNC(gtk_main_quit), NULL); /* Activated/Deactivated status */ gtk_timeout_add(1000, (GtkFunction) status_update, widgets); gtk_main(); g_free(widgets); return 0; } gadmin-samba-0.3.2/src/functions.c0000644000000000000000000007047511527565344015526 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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" #include "commented.h" #include "get_option_pos.h" #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE #endif #if ! defined USE_DARWIN #ifndef _CRYPT_H #include #endif #endif /* 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; } /* Transform a string to lower case. char *lowercase(char *buf) { char *p; if( buf==NULL || strlen(buf)<2 ) return buf; for(p = buf; *p!='\0'; ++p) *p = tolower(*p); return buf; } */ void add_global_option(char *option) { /* Adds a global option if it doesnt exist */ FILE *fp; char *line; char *new_buffer; long conf_size; int option_existed = 0; gchar *option1, *option2; /* To ways to identify an option and avoid mixups */ option1 = g_strdup_printf("%s=", option); option2 = g_strdup_printf("%s =", option); if( option==NULL || strlen(option)<3 ) { printf("Add global option: Option length too short.\n"); return; } if((fp=fopen(SAMBA_CONF, "r"))==NULL) { printf("Cant open: %s\n", SAMBA_CONF); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); new_buffer = allocate(conf_size+4096); line = allocate(conf_size+1); /* Dont add a new option if it already exists */ while(fgets(line, conf_size, fp)!=NULL) { if( (cmplowercase(line, option1) || cmplowercase(line, option2)) && ! commented(line) ) { option_existed = 1; break; } } g_free(option1); g_free(option2); if( option_existed ) { fclose(fp); free(new_buffer); free(line); return; } rewind(fp); /* Get everything up to and including "[global]" or the first option "=" */ while(fgets(line, conf_size, fp)!=NULL) { strcat(new_buffer, line); if( cmplowercase(line, "[global]") && ! commented(line) ) break; if( cmplowercase(line, "=") && ! commented(line) ) break; } /* Add the new option */ strcat(new_buffer, option); strcat(new_buffer, " =\n"); while(fgets(line, conf_size, fp)!=NULL) strcat(new_buffer, line); fclose(fp); /* Write the new conf */ if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { printf("Cant write to: %s\n", SAMBA_CONF); return; } fputs(new_buffer, fp); fclose(fp); free(line); free(new_buffer); } void remove_global_option(char *option) { FILE *fp; char *line; char *new_buffer; long conf_size; gchar *option1, *option2; /* To ways to identify an option and avoid mixups */ option1 = g_strdup_printf("%s=", option); option2 = g_strdup_printf("%s =", option); if( option==NULL || strlen(option)<3 ) { printf("Remove global option: Option length too short.\n"); g_free(option1); g_free(option2); return; } if((fp=fopen(SAMBA_CONF, "r"))==NULL) { printf("Cant open: %s\n", SAMBA_CONF); g_free(option1); g_free(option2); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); new_buffer = allocate(conf_size+4096); line = allocate(conf_size+1); /* Get everything up to and including the first share definition "[" and skips the option */ while(fgets(line, conf_size, fp)!=NULL) { /* Break at any share definition */ if( strstr(line, "[") && ! cmplowercase(line, "[global]") && ! commented(line) ) { strcat(new_buffer, line); break; } /* Skip the specified option. */ if( (cmplowercase(line, option1) || cmplowercase(line, option2)) && ! commented(line) ) { printf("Removed option: %s\n", option); continue; } else strcat(new_buffer, line); } g_free(option1); g_free(option2); /* Gather the rest */ while(fgets(line, conf_size, fp)!=NULL) strcat(new_buffer, line); fclose(fp); /* Write the new conf */ if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { printf("Cant write to: %s\n", SAMBA_CONF); return; } fputs(new_buffer, fp); fclose(fp); free(line); free(new_buffer); } int smbuser_exists(G_CONST_RETURN gchar *username) { /* Checks if the system user exists */ FILE *fp; char *line; long conf_size; int x, user_exists = 0; char tempname[4096]=""; /* Puts the pdbedit userlist as: /etc/gadmin-samba/gadmin_samba_users */ get_gadmin_samba_users(); /* Checks if the user exists */ if((fp=fopen(GADMIN_SAMBA_USERS,"r"))==NULL) { /* Dont show anything */ } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { for(x=0; line[x]; x++) { if( line[x]==':' ) { snprintf(tempname, 4000, "%s", line); tempname[x]='\0'; if( ! strcmp(username, tempname) ) { user_exists = 1; break; } } } if( user_exists ) break; } free(line); fclose(fp); } return user_exists; } int smbuser_locked(G_CONST_RETURN gchar *username) { /* Checks if the samba user is locked */ /* Return values: 0="Not locked" 1="Locked" 2="NULL password" */ FILE *fp; char *line; long conf_size; int x, user_exists = 0; int prop_found = 0, account_locked = 0; char tempname[4096]=""; get_gadmin_samba_users(); if((fp=fopen(GADMIN_SAMBA_USERS,"r"))==NULL) { /* Dont show anything */ } 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) { for(x=0; line[x]!='\0'; x++) { if( line[x]==':' ) { snprintf(tempname, 4000, "%s", line); tempname[x]='\0'; if( ! strcmp(username, tempname) ) { user_exists = 1; break; } } } if( user_exists ) break; } /* The samba user exists, see if its locked */ if( user_exists ) for(x=0; line[x]!='\0'; x++) { /* Account properties are located between "[" and "]" */ if( line[x]=='[' ) { prop_found = 1; break; } } if( user_exists && prop_found ) for(x=x; line[x]!='\0'; x++) { /* Read to the end of account properties "]" */ if( line[x]==']' ) break; /* Disabled accounts with previously set passwords can be enabled without setting a new one */ if( line[x]=='D' ) { account_locked = 1; break; } /* Enabling accounts with no previous passwords requires new passwords */ if( strstr(line, "XXXXXXXXXXXX:[") ) { account_locked = 2; break; } /* Enabling accounts with NULL passwords requires new passwords */ if( line[x]=='N' ) account_locked = 3; } free(line); fclose(fp); return account_locked; } int user_exists(G_CONST_RETURN gchar *username) { /* Checks if the system user exists */ FILE *fp; char *line; long conf_size; int x, user_exists = 0; char tempname[4096]=""; /* Checks if the user exists in passwd */ if((fp=fopen(PASSWD_FILE,"r"))==NULL) { printf("Unable to read file: [%s]\n", PASSWD_FILE); return 0; } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { for(x=0; line[x]; x++) { if( line[x]==':' ) { snprintf(tempname, 4000, "%s", line); tempname[x]='\0'; if( strcmp(username, tempname) == 0 ) { user_exists = 1; break; } } } if( user_exists ) break; } free(line); fclose(fp); } /* Checks if the user exists in shadow */ if((fp=fopen(SHADOW_FILE,"r"))==NULL) { /* Dont show anything */ } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { for(x=0; line[x]!='\0'; x++) { if( line[x]==':' ) { snprintf(tempname, 4000, "%s", line); tempname[x]='\0'; if( strcmp(username, tempname) == 0 ) // if( strstr(username, tempname) // && strlen(username) == strlen(tempname) ) { user_exists = 1; break; } } if( user_exists ) break; } } free(line); fclose(fp); } return user_exists; } int group_exists(G_CONST_RETURN gchar *groupname) { /* Checks if the system group already exists */ FILE *fp; char *line; long conf_size; int x, group_exists = 0; char tempname[4096]=""; /* Checks if the group exists in group */ if((fp=fopen(GROUP_FILE,"r"))==NULL) { /* Dont show anything */ } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { for(x=0; line[x]!='\0'; x++) { if( line[x]==':' ) { snprintf(tempname, 4000, "%s", line); tempname[x]='\0'; if( strcmp(groupname, tempname) == 0 ) { group_exists = 1; break; } } } if( group_exists ) break; } free(line); fclose(fp); } /* Checks if the group exists in gshadow */ if((fp = fopen(GSHADOW_FILE,"r"))==NULL) { /* Dont show anything */ } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { for(x=0; line[x]!='\0'; x++) { if( line[x]==':' ) { snprintf(tempname, 4000, "%s", line); tempname[x]='\0'; if( strcmp(groupname, tempname) == 0 ) // if( strstr(groupname, tempname) // && strlen(groupname) == strlen(tempname) ) { group_exists = 1; break; } } } if( group_exists ) break; } free(line); fclose(fp); } return group_exists; } 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(GROUP_FILE,"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) ) { 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); /* New default samba group if not found. */ retval = g_strdup_printf("sambausers"); return retval; } /* The above func can be used with this func */ gchar *get_user_setting(gchar *user, gchar *what) { /* Gets the users comment from passwd */ FILE *fp; char *line; long conf_size; int x=0, y=0, found_user=0, found_val=0, count=0; char *tempname; gchar *retval = NULL; gint val_pos = 0; 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(PASSWD_FILE,"r"))==NULL) { retval = g_strdup_printf(_("User setting not found")); free(tempname); return retval; } else { fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { for(x=0; line[x]!='\0'; x++) { if( line[x]==':' ) { snprintf(tempname, 4000, "%s", line); tempname[x]='\0'; if( ! strcmp(user, tempname) ) { found_user = 1; break; } } } if( found_user ) break; } } fclose(fp); /* If the user is found, get the specified section */ if( found_user ) for(x=0; line[x]!='\0'; x++) { if( line[x]==':' ) { count++; /* The val_pos colon is found, beginning of the value to get */ if( count == val_pos ) { snprintf(tempname, 4000, "%s", &line[x+1]); break; } } } free(line); /* 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, ":") ) { retval = g_strdup_printf("%s", tempname); found_val = 1; break; } } } free(tempname); /* g_free'd after the return */ if( found_val ) return retval; /* Return values if not found. Same as in add_change_user.c's clear_user_profile() */ if( strstr(what, "group") ) retval = g_strdup_printf("group1"); else if( strstr(what, "comment") ) retval = g_strdup_printf(_("Comment")); else if( strstr(what, "homedir") ) retval = g_strdup_printf("/home/user1"); else if( strstr(what, "shell") ) retval = g_strdup_printf("/dev/null"); else retval = g_strdup_printf(_("No value has been set")); return retval; } void password_user(G_CONST_RETURN gchar *username, G_CONST_RETURN gchar *password) { FILE *fp; char *user_pass, *encrypted_pass; if( ! user_exists(username) ) 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 snprintf(user_pass, 8000, "echo %s:%s | chpasswd", username, password); #endif #if defined USE_OPENBSD || USE_NETBSD || USE_FREEBSD snprintf(user_pass, 8000, "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"); snprintf(user_pass, 8000, "echo passwd/username %s:%s", username, password); #endif } else { /* Using encrypted passwords */ #if defined USE_LINUX snprintf(user_pass, 8000, "usermod -p '%s' %s", encrypted_pass, username); #endif #if defined USE_OPENSBD || USE_NETBSD || USE_FREEBSD || USE_AIX || USE_HPUX snprintf(user_pass, 8000, "pw usermod -p '%s' %s", encrypted_pass, username); #endif #if defined USE_DARWIN snprintf(user_pass, 8000, "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"); // info = g_strdup_printf(_("Error changing password for user: %s\n"), username); // show_info(info); // g_free(info); } 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); } 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); } void make_file_chmod(gchar *file, char perm[128]) { gchar *command; command = g_strdup_printf("touch '%s' && chmod %s '%s'", file, perm, file); if( ! run_command(command) ) printf("Error running command: %s\n", command); g_free(command); } int fix_newlines_in_conf() { /* Strip all newlines between directives. Add newlines before any share "[" "]" */ FILE *fp; char *old_buffer, *new_buffer; long conf_size, allocate_extra=0; /* First remove any newlines first on all lines in the config. Check how many new chars we will be adding */ if((fp=fopen(SAMBA_CONF, "r"))==NULL) { printf("Error reading samba configuration: %s\n", SAMBA_CONF); return 0; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size+1024); new_buffer = allocate(conf_size+1024); if( conf_size > 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, "[") && strstr(old_buffer, "]") ) allocate_extra++; } fclose(fp); free(old_buffer); strcat(new_buffer, "\n"); /* Write the newline stripped conf */ if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { printf("Error writing newline stripped configuration: %s\n", SAMBA_CONF); free(new_buffer); return 0; } fputs(new_buffer, fp); fclose(fp); free(new_buffer); /* Add the newlines */ if((fp=fopen(SAMBA_CONF, "r"))==NULL) { printf("Error reading newline stipped configuration: %s\n", SAMBA_CONF); return 0; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size+1024); new_buffer = allocate(conf_size+1024+allocate_extra); if( conf_size > 1 ) while(fgets(old_buffer, conf_size, fp)!=NULL) { if( strstr(old_buffer, "[") && strstr(old_buffer, "]") ) { strcat(new_buffer, "\n"); strcat(new_buffer, old_buffer); } else strcat(new_buffer, old_buffer); } fclose(fp); free(old_buffer); /* Write the newline added conf */ if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { printf("Error writing newline added configuration: %s\n", SAMBA_CONF); free(new_buffer); return 0; } fputs(new_buffer, fp); fclose(fp); free(new_buffer); return 1; } void fix_path(char *path) { char *temp; temp = allocate(4096); /* Take away an unwanted star at the end */ if( path[strlen(path)-1]=='*' ) path[strlen(path)-1]='\0'; /* Take away an extra slash at the end */ if( path[strlen(path)-1]=='/' ) path[strlen(path)-1]='\0'; /* Make sure we have a slash at the beginning of the path */ if( path[0]!='/' ) { snprintf(temp, 1024, "/%s", path); snprintf(path, 1024, "%s", temp); } if( temp!=NULL ) free(temp); } void randomize_username(struct w *widgets) { char *rnd_string; char *homedir_username; int len; gchar *info; gchar *utf8=NULL; // G_CONST_RETURN gchar *default_username_length; char *default_username_length; char *default_homedir; // G_CONST_RETURN gchar *default_homedir; // default_username_length = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[7])); // Fixme, get from settings default_username_length = allocate(100); snprintf(default_username_length, 10, "%s", MIN_PASS_LEN); 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); free(default_username_length); return; } } else { info = g_strdup_printf(_("Randomize username length can only contain digits\n")); show_info(info); g_free(info); free(default_username_length); return; } free(default_username_length); 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); /* Insert the randomized username after the path in the homedir entry */ homedir_username = allocate(16384); default_homedir = allocate(16384); // default_homedir = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[4])); // Fixme.. get from gadmin-sambas settings snprintf(default_homedir, 8190, "%s", "/home"); if( strlen((char *)default_homedir) > 8192 ) { info = g_strdup_printf(_("Max home directory length is 8192 chars.\n")); show_info(info); g_free(info); free(homedir_username); return; } snprintf(homedir_username, 8192, "%s", default_homedir); free(default_homedir); /* Strip some slashes and things we dont want */ if( homedir_username[strlen(homedir_username)-1]=='/' ) homedir_username[strlen(homedir_username)-1]='\0'; if( homedir_username[strlen(homedir_username)-1]=='/' ) homedir_username[strlen(homedir_username)-1]='\0'; if( homedir_username[strlen(homedir_username)-1]=='*' ) homedir_username[strlen(homedir_username)-1]='\0'; /* Add a slash to the end then the username */ strcat(homedir_username, "/"); strcat(homedir_username, rnd_string); utf8 = g_locale_to_utf8(homedir_username, strlen(homedir_username), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[4]), utf8); if( utf8!=NULL ) g_free(utf8); free(rnd_string); free(homedir_username); } void randomize_password(struct w *widgets) { char *rnd_string; int len; gchar *info; gchar *utf8=NULL; char *default_password_length; // G_CONST_RETURN gchar *default_password_length; // default_password_length = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[8])); // Should be user configurable in the settings dlg default_password_length = allocate(100); snprintf(default_password_length, 10, "%s", MIN_PASS_LEN); if( chars_are_digits(default_password_length) ) { if( strlen(default_password_length) < 4 ) len = atoi(default_password_length); else { info = g_strdup_printf(_("Max randomize password length is 999\n")); show_info(info); g_free(info); free(default_password_length); return; } } else { info = g_strdup_printf(_("Randomize password length can only contain digits\n")); show_info(info); g_free(info); free(default_password_length); return; } rnd_string = random_string(len); free(default_password_length); /* 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[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; /* Give "deep thought" some time to come up with the number "42" :) */ 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; } gadmin-samba-0.3.2/src/select_first_user.h0000644000000000000000000000176711527565345017246 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/add_change_user.c0000644000000000000000000003530611527565344016603 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "show_info.h" #include "allocate.h" #include "add_change_user.h" #include "populate_users.h" #include "select_first_user.h" #include "populate_user_settings.h" #include "populate_shell_combo.h" #include "commands.h" int user_profiling_info_shown = 0; extern int activated; /* The add button clears the user profile and informs the user about user profiling */ void clear_user_profile(struct w *widgets) { gchar *info; /* Same default values as in functions.c's get_user_setting() */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[0]), "user1"); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[1]), ""); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[2]), "group1"); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[3]), _("Comment")); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[4]), "/dev/null"); /* Set account locked to the unlocked state */ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0]), FALSE); /* Repopulate shells */ populate_shell_combo(widgets->user_set_combo[0]); /* 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); g_free(info); } void account_locked_checkbutton_clicked(struct w *widgets) { FILE *fp; int locked = 0; int have_password = 0; gchar *info, *cmd; G_CONST_RETURN gchar *username, *password; username = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[0])); password = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[1])); if( password!=NULL && strlen(password) >= atoi(MIN_PASS_LEN) ) have_password = 1; if( ! smbuser_exists(username) ) { /* Dont show this popup. info = g_strdup_printf(_("Can not lock or unlock a samba user that does not exist.\n")); show_info(info); g_free(info); */ return; } /* Get the samba accounts lock state */ locked = smbuser_locked(username); /* Sanitycheck. Not required anymore */ if( username == NULL || strlen(username) < 1 ) { info = g_strdup_printf(_("A username must be specified.\n")); show_info(info); g_free(info); /* Set account locked checkbutton [x] if its still locked */ // FIXME: treats users with NULL passwords as locked. if( locked ) 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); return; } /* Disable an existing samba account if selected */ if( ! locked && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0])) ) { cmd = g_strdup_printf("%s -c \"[D ]\" -u '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed to lock samba account: %s\n"), username); show_info(info); g_free(info); g_free(cmd); /* Set account locked checkbutton [x] if its still locked */ if( locked ) 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); return; } g_free(cmd); fclose(fp); } /* Enable an existing samba account if thats selected */ if( locked && ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0])) ) { /* No password given and the user already had a password before beeing disabled so just enable the account */ if( ! have_password && locked == 1 ) { cmd = g_strdup_printf("%s -c \"[ ]\" -u '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed to unlock samba account: %s using no password\n"), username); show_info(info); g_free(info); g_free(cmd); /* Set account locked checkbutton [x] if its still locked */ if( locked ) 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); return; } } /* The user had no password before beeing locked or has a NULL password so require a new password */ if( (have_password) && (locked == 1 || locked == 2 || locked == 3) ) { cmd = g_strdup_printf("%s -t -a -u '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed to unlock samba account: %s using a password\n"), username); show_info(info); g_free(info); g_free(cmd); /* Set account locked checkbutton [x] if its still locked */ if( locked ) 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); return; } fputs(password, fp); fputs("\n", fp); fputs(password, fp); fputs("\n", fp); pclose(fp); g_free(cmd); } if( (! have_password) && (locked == 2 || locked == 3) ) { info = g_strconcat(_("Failed to unlock samba account: "), username, "\n", _("A new password is required to unlock users that have no previous\n"), _("passwords or empty passwords. The provided password is too short.\n"), NULL); show_info(info); g_free(info); /* Set account locked checkbutton [x] if its still locked */ if( locked ) 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); } } /* Examples where a password is required for unlocking [ND ...] (NULL/Disabled): pommes:534:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[DU ]:LCT-00000000: frites:517:NO PASSWORDXXXXXXXXXXXXXXXXXXXXX:NO PASSWORDXXXXXXXXXXXXXXXXXXXXX:[NU ]:LCT-00000000: */ } /* Add or change the system and samba user */ void add_change_user(struct w *widgets) { FILE *fp; gchar *info, *path, *cmd; G_CONST_RETURN gchar *username; G_CONST_RETURN gchar *password; G_CONST_RETURN gchar *groupname; G_CONST_RETURN gchar *comment; G_CONST_RETURN gchar *homedir; G_CONST_RETURN gchar *shell; /* Get the users settings */ username = gtk_entry_get_text(GTK_ENTRY(widgets->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])); homedir = gtk_entry_get_text(GTK_ENTRY(widgets->user_set_entry[4])); /* Its a gtk combo box entry new text */ shell = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(widgets->user_set_combo[0])->child)); /* Puts the pdbedit userlist as: /etc/gadmin-samba/gadmin_samba_users */ get_gadmin_samba_users(); if( ! smbuser_exists(username) && ( password == NULL || strlen(password) < atoi(MIN_PASS_LEN) )) { info = g_strdup_printf(_("You must specify a valid password for this new user.\n")); show_info(info); g_free(info); return; } path = g_strdup_printf("%s", GADMIN_SAMBA_USERS); if( ! file_exists(path) ) make_file_chmod(path, "0600"); if( ! file_exists(path) ) { info = g_strdup_printf(_("Failed to create missing samba password file:\n%s\n"), path); show_info(info); g_free(info); g_free(path); return; } g_free(path); /* Sanitychecks... */ if( username == NULL || strlen(username) < 1 ) { info = g_strdup_printf(_("A username must be specified.\n")); show_info(info); g_free(info); return; } if( groupname == NULL || strlen(groupname) < 1 ) { info = g_strdup_printf(_("A groupname must be specified.\n")); show_info(info); g_free(info); return; } if( comment == NULL || strlen(comment) < 1 ) { info = g_strdup_printf(_("A comment must be specified.\n")); show_info(info); g_free(info); return; } if( homedir == NULL || strlen(homedir) < 2 ) { info = g_strdup_printf(_("A home directory must be specified.\n")); show_info(info); g_free(info); return; } if( shell == NULL || strlen(shell) < 2 ) { info = g_strdup_printf(_("A shell must be specified.\n")); show_info(info); g_free(info); return; } /* Root user specified, only change its samba settings */ if( strcmp(username, "root") == 0 ) { /* If the root system user doesnt exist, tell the user and return. */ if( ! user_exists(username) ) { info = g_strdup_printf(_("The root system user doesnt exist, nothing was done.\n")); show_info(info); g_free(info); return; } if( password!=NULL && strlen(password) >= atoi(MIN_PASS_LEN) ) { cmd = g_strdup_printf("%s -t -a -u '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed changing samba password or adding samba user: %s\n"), username); show_info(info); g_free(info); g_free(cmd); return; } fputs(password, fp); fputs("\n", fp); fputs(password, fp); fputs("\n", fp); pclose(fp); g_free(cmd); info = g_strdup_printf(_("The samba password for root was changed.\nNothing else was changed for this user.\n")); show_info(info); g_free(info); return; } else { info = g_strdup_printf(_("The password is too short, adding or changing samba user root failed.\n")); show_info(info); g_free(info); return; } /* End of modifications for samba user root */ return; } /* Non root user modification follows... */ /* The system user doesnt exist, add it */ if( ! user_exists(username) ) { /* Add the system group if it doesnt exist */ if( ! group_exists(groupname) ) { cmd = g_strdup_printf("%s %s", "groupadd", groupname); if( ! run_command(cmd) ) { printf("Error adding system group: %s\n", groupname); printf("The command was: %s\n", cmd); g_free(cmd); return; } g_free(cmd); } /* Add the user to the specified group */ cmd = g_strdup_printf("%s '%s' -d '%s' -c '%s' -s '%s' -g '%s'", "useradd", username, homedir, comment, shell, groupname); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error adding system user: %s\nThe command was: %s\n"), username, cmd); show_info(info); g_free(info); g_free(cmd); return; } g_free(cmd); } /* Make sure that the system user exists */ if( ! user_exists(username) ) { info = g_strdup_printf(_("Error adding system user: %s\n"), username); show_info(info); g_free(info); return; } /* The system user exists, modify its system and samba settings... */ /* Add a new samba user with this password or change the old password. */ if( password!=NULL && strlen(password) >= atoi(MIN_PASS_LEN) ) { cmd = g_strdup_printf("%s -t -a -u '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed changing password or adding samba user: %s\n"), username); show_info(info); g_free(info); g_free(cmd); return; } fputs(password, fp); fputs("\n", fp); fputs(password, fp); fputs("\n", fp); pclose(fp); g_free(cmd); /* Also change the system accounts password. */ password_user(username, password); } /* Change this users system comment */ cmd = g_strdup_printf("%s -c '%s' '%s'\n", "usermod", comment, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed changing system comment for samba user: %s\n"), username); show_info(info); g_free(info); g_free(cmd); return; } pclose(fp); g_free(cmd); /* Maybe fix: Change other settings as well */ // printf("Selected group : %s\n", groupname); // printf("Selected home: %s\n", homedir); // printf("Selected Shell: %s\n", shell); /* Create directory: /var/lib/samba/profiles/UserName */ cmd = g_strdup_printf("mkdir -p '%s/lib/samba/profiles/%s'", LOCALSTATEDIR, username); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error creating directory: %s/lib/samba/profiles/%s\n"), LOCALSTATEDIR, username); show_info(info); g_free(info); g_free(cmd); return; } g_free(cmd); /* Chown directory: /var/lib/samba/profiles/UserName to this user:group */ cmd = g_strdup_printf("chown %s:%s %s/lib/samba/profiles/%s", username, groupname, LOCALSTATEDIR, username); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error chowning directory: %s/lib/samba/profiles/%s\n"), LOCALSTATEDIR, username); show_info(info); g_free(info); g_free(cmd); return; } g_free(cmd); /* Clear the password field */ gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[1]), ""); /* Update the user tab */ populate_users(widgets); select_first_user(widgets); /* Fixme: Should be scroll to and select this user */ populate_user_settings(widgets); } gadmin-samba-0.3.2/src/show_info.c0000644000000000000000000000753711527565345015511 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-SAMBA %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); 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-samba-0.3.2/src/create_conf_tab.c0000644000000000000000000000500611527565344016600 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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" /* 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; 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_vbox9), 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); /* The save conf button */ GtkWidget *conf_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox9), conf_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(conf_button_box), GTK_BUTTONBOX_SPREAD); 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-samba-0.3.2/src/create_main_window.h0000644000000000000000000000172011527565344017344 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/make_settings_combos.h0000644000000000000000000000426011527565344017707 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/create_conf_tab.h0000644000000000000000000000176011527565344016610 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_shell_combo.c0000644000000000000000000000467211527565345017712 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 *line, *new_buf; gchar *utf8=NULL; gchar *combo_text=NULL; gchar *info; /* Append a /dev/null shell first and select it */ 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); if((fp=fopen(SHELLS_FILE, "r"))==NULL) { info = g_strdup_printf(_("Cant find the shells file here:\n%s\n"), SHELLS_FILE); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+2); new_buf = allocate(conf_size+2); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { /* Append all other shells but not /dev/null */ if( strlen(line) > 3 && ! strstr(line, "#") && ! strstr(line, "/dev/null") ) { shell_found = 1; strcpy(new_buf, line); utf8 = g_locale_to_utf8(new_buf, strlen(new_buf)-1, NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(shell_combo), utf8); } } fclose(fp); free(line); free(new_buf); if( utf8!=NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/select_first_user.c0000644000000000000000000000315011527565345017225 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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); snprintf(global_user_name, 1000, "%s", (gchar *)user); gtk_tree_path_free(path); g_free(user); } gadmin-samba-0.3.2/src/populate_disc_tab.h0000644000000000000000000000172011527565345017170 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/select_first_share.h0000644000000000000000000000177211527565345017366 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_share_H # define select_first_share_H extern struct w *widgets; void select_first_share(struct w *widgets); #endif gadmin-samba-0.3.2/src/chars_are_digits.h0000644000000000000000000000172011527565344017000 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/create_import_question.h0000644000000000000000000000307311527565344020275 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_question_H # define create_import_question_H extern struct w *widgets; void create_import_question(struct w *widgets); void import_local_checkbutton_toggled(GtkButton *button, struct w *widgets); void import_remote_checkbutton_toggled(GtkButton *button, struct w *widgets); void import_users_checkbutton_toggled(GtkButton *button, struct w *widgets); void import_groups_checkbutton_toggled(GtkButton *button, struct w *widgets); void import_valid_checkbutton_toggled(GtkButton *button, struct w *widgets); void import_write_checkbutton_toggled(GtkButton *button, struct w *widgets); void import_admin_checkbutton_toggled(GtkButton *button, struct w *widgets); #endif gadmin-samba-0.3.2/src/Makefile.in0000644000000000000000000006521611527565344015414 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-samba$(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_samba_OBJECTS = gadmin_samba.$(OBJEXT) widgets.$(OBJEXT) \ support.$(OBJEXT) create_main_window.$(OBJEXT) \ create_server_tab.$(OBJEXT) populate_gadmin_samba.$(OBJEXT) \ create_server_settings.$(OBJEXT) \ populate_server_settings.$(OBJEXT) \ apply_server_settings.$(OBJEXT) create_user_tab.$(OBJEXT) \ populate_users.$(OBJEXT) user_treeview_row_clicked.$(OBJEXT) \ create_user_settings.$(OBJEXT) \ populate_user_settings.$(OBJEXT) select_first_user.$(OBJEXT) \ add_change_user.$(OBJEXT) delete_user.$(OBJEXT) \ create_del_system_user_question.$(OBJEXT) \ make_settings_buttons.$(OBJEXT) \ make_settings_entries.$(OBJEXT) make_settings_combos.$(OBJEXT) \ make_settings_spinbuttons.$(OBJEXT) \ make_settings_checkbuttons.$(OBJEXT) \ make_settings_progressbars.$(OBJEXT) \ make_settings_labels.$(OBJEXT) \ make_settings_hseparators.$(OBJEXT) create_macct_tab.$(OBJEXT) \ populate_maccts.$(OBJEXT) macct_treeview_row_clicked.$(OBJEXT) \ create_macct_settings.$(OBJEXT) \ populate_macct_settings.$(OBJEXT) select_first_macct.$(OBJEXT) \ add_macct.$(OBJEXT) delete_macct.$(OBJEXT) \ change_macct.$(OBJEXT) create_conn_tab.$(OBJEXT) \ populate_conns.$(OBJEXT) create_disc_tab.$(OBJEXT) \ populate_disc_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) \ status_update.$(OBJEXT) apply_button_clicked.$(OBJEXT) \ reread_conf.$(OBJEXT) commands.$(OBJEXT) functions.$(OBJEXT) \ credits_window.$(OBJEXT) activate_button_clicked.$(OBJEXT) \ deactivate_button_clicked.$(OBJEXT) show_info.$(OBJEXT) \ chars_are_digits.$(OBJEXT) allocate.$(OBJEXT) \ commented.$(OBJEXT) get_option_pos.$(OBJEXT) \ system_defines.$(OBJEXT) create_import_question.$(OBJEXT) \ create_import_selection.$(OBJEXT) import_functions.$(OBJEXT) \ standard_conf.$(OBJEXT) add_standard_users.$(OBJEXT) \ settings_window.$(OBJEXT) load_settings.$(OBJEXT) \ save_settings.$(OBJEXT) create_share_tab.$(OBJEXT) \ share_treeview_row_clicked.$(OBJEXT) populate_shares.$(OBJEXT) \ create_share_settings.$(OBJEXT) select_first_share.$(OBJEXT) \ populate_share_settings.$(OBJEXT) add_share.$(OBJEXT) \ delete_share.$(OBJEXT) apply_share_settings.$(OBJEXT) \ populate_shell_combo.$(OBJEXT) file_chooser.$(OBJEXT) \ show_help.$(OBJEXT) gadmin_samba_OBJECTS = $(am_gadmin_samba_OBJECTS) gadmin_samba_DEPENDENCIES = 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_samba_SOURCES) DIST_SOURCES = $(gadmin_samba_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@ 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_samba_SOURCES = \ gadmin_samba.c gadmin_samba.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_gadmin_samba.c populate_gadmin_samba.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 \ create_user_tab.c create_user_tab.h \ populate_users.c populate_users.h \ user_treeview_row_clicked.c user_treeview_row_clicked.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 \ add_change_user.c add_change_user.h \ delete_user.c delete_user.h \ create_del_system_user_question.c create_del_system_user_question.h \ make_settings_buttons.c make_settings_buttons.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_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_macct_tab.c create_macct_tab.h \ populate_maccts.c populate_maccts.h \ macct_treeview_row_clicked.c macct_treeview_row_clicked.h \ create_macct_settings.c create_macct_settings.h \ populate_macct_settings.c populate_macct_settings.h \ select_first_macct.c select_first_macct.h \ add_macct.c add_macct.h \ delete_macct.c delete_macct.h \ change_macct.c change_macct.h \ create_conn_tab.c create_conn_tab.h \ populate_conns.c populate_conns.h \ create_disc_tab.c create_disc_tab.h \ populate_disc_tab.c populate_disc_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 \ status_update.c status_update.h \ apply_button_clicked.c apply_button_clicked.h \ reread_conf.c reread_conf.h \ commands.c commands.h \ functions.c functions.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 \ commented.c commented.h \ get_option_pos.c get_option_pos.h \ system_defines.c system_defines.h \ create_import_question.c create_import_question.h \ create_import_selection.c create_import_selection.h \ import_functions.c import_functions.h \ standard_conf.c standard_conf.h \ add_standard_users.c add_standard_users.h \ settings_window.c settings_window.h \ load_settings.c load_settings.h \ save_settings.c save_settings.h \ create_share_tab.c create_share_tab.h \ share_treeview_row_clicked.c share_treeview_row_clicked.h \ populate_shares.c populate_shares.h \ create_share_settings.c create_share_settings.h \ select_first_share.c select_first_share.h \ populate_share_settings.c populate_share_settings.h \ add_share.c add_share.h \ delete_share.c delete_share.h \ apply_share_settings.c apply_share_settings.h \ populate_shell_combo.c populate_shell_combo.h \ file_chooser.c file_chooser.h \ show_help.c show_help.h gadmin_samba_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-samba$(EXEEXT): $(gadmin_samba_OBJECTS) $(gadmin_samba_DEPENDENCIES) @rm -f gadmin-samba$(EXEEXT) $(LINK) $(gadmin_samba_OBJECTS) $(gadmin_samba_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_change_user.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_macct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_share.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_standard_users.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_share_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/change_macct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chars_are_digits.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_conn_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_import_question.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_import_selection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_macct_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_macct_tab.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_share_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_share_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_macct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete_share.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete_user.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_samba.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_option_pos.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/import_functions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macct_treeview_row_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_conns.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_disc_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_gadmin_samba.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_macct_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_maccts.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_share_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/populate_shares.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)/save_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select_first_macct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select_first_share.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select_first_user.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings_window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/share_treeview_row_clicked.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)/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-samba-0.3.2/src/create_user_tab.h0000644000000000000000000000176111527565344016642 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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); #endif gadmin-samba-0.3.2/src/clear_security_tab.h0000644000000000000000000000177211527565344017360 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_security_tab.c0000644000000000000000000000516711527565345020121 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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; gtk_list_store_clear(widgets->security_store); // printf("/var/log/samba/smbd.log nmbd.log winbindd.log ugly logs\n"); if((fp=fopen("/var/log/samba/samba.log", "r"))==NULL) // SECURE_LOG... hmm { // info = g_strdup_printf(_("Cant open the security log here:\n%s\n"), "/var/log/secure"); // 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( strlen(buffy) < 10 ) continue; 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); 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-samba-0.3.2/src/standard_conf.c0000644000000000000000000005200311527565345016307 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "commented.h" #include "standard_conf.h" #include "system_defines.h" #include "populate_gadmin_samba.h" #include "show_info.h" int conf_ok(gchar *file_path) { FILE *fp; long conf_size; char *line; int retval = 0; int have_security = 0; /* The configuration is ok if gadmin-sambas settings contains "show_conf_question: (no OR false)" */ if((fp=fopen(file_path, "r"))==NULL) { /* Return false */ 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) { /* Skip commented options */ if( commented(line) ) continue; if( strlen(line) > 5 ) { if( strstr(line, "show_conf_question:") && (strstr(line, "false") || strstr(line, "no")) ) { retval = 1; break; } } } fclose(fp); free(line); /* If the security option is missing the conf is still bad */ if((fp=fopen(SAMBA_CONF, "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) { /* Skip commented options */ if( commented(line) ) continue; if( strlen(line) > 5 ) { if( strstr(line, "security=") || strstr(line, "security =") ) { have_security = 1; break; } } } if( ! have_security ) retval = 0; fclose(fp); free(line); return retval; } void backup_samba_conf(struct w *widgets) { gchar *cmd, *info; if( ! file_exists(SAMBA_CONF_BACKUP) && file_exists(SAMBA_CONF) ) { cmd = g_strdup_printf("cp %s %s", SAMBA_CONF, SAMBA_CONF_BACKUP); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error: Could not backup the current configuration:\n%s\n"), SAMBA_CONF); show_info(info); } else { info = g_strdup_printf(_("The samba configuration was backed up here for safety:\n%s\n"), SAMBA_CONF_BACKUP); show_info(info); } g_free(cmd); g_free(info); } } void add_standard_conf(struct w *widgets) { /* This backs up the old configuration and adds the default configuration */ FILE *fp; char *buffer; gchar *cmd, *info; /* First take a backup of the old configuration as SAMBA_CONF_BACKUP if it doesnt exist */ backup_samba_conf(widgets); /* Write the default configuration */ if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { info = g_strdup_printf(_("Cant write a new smb.conf here:\n%s\n"), SAMBA_CONF); show_info(info); return; } buffer = allocate(100000); strcpy(buffer, "[global]\n"); strcat(buffer, "netbios name = Samba24\n"); strcat(buffer, "server string = Samba file and print server\n"); strcat(buffer, "workgroup = Workgroup\n"); strcat(buffer, "security = user\n"); /* Automatically adds ADS security level option: realm = domain.example.org */ strcat(buffer, "hosts allow = 127. 192.168.0.\n"); strcat(buffer, "interfaces = 127.0.0.1/8 192.168.0.0/24\n"); strcat(buffer, "bind interfaces only = yes\n"); strcat(buffer, "remote announce = 192.168.0.255\n"); strcat(buffer, "remote browse sync = 192.168.0.255\n"); strcat(buffer, "printcap name = cups\n"); strcat(buffer, "load printers = yes\n"); strcat(buffer, "cups options = raw\n"); strcat(buffer, "printing = cups\n"); /* Fixme: Combo: cups, bsd etc */ strcat(buffer, "guest account = smbguest\n"); info = g_strdup_printf("log file = %s/log/samba/samba.log\n", LOCALSTATEDIR); strcat(buffer, info); g_free(info); strcat(buffer, "max log size = 1000\n"); strcat(buffer, "null passwords = no\n"); strcat(buffer, "username level = 6\n"); strcat(buffer, "password level = 6\n"); strcat(buffer, "encrypt passwords = yes\n"); strcat(buffer, "unix password sync = yes\n"); strcat(buffer, "socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192\n"); strcat(buffer, "local master = no\n"); /* Only one per subnet. */ strcat(buffer, "domain master = no\n"); strcat(buffer, "preferred master = no\n"); strcat(buffer, "domain logons = no\n"); strcat(buffer, "os level = 33\n"); strcat(buffer, "logon drive = m:\n"); strcat(buffer, "logon home = \\\\%L\\homes\\%u\n"); strcat(buffer, "logon path = \\\\%L\\profiles\\%u\n"); strcat(buffer, "logon script = %G.bat\n"); strcat(buffer, "time server = no\n"); strcat(buffer, "name resolve order = wins lmhosts bcast\n"); strcat(buffer, "wins support = no\n"); /* strcat(buffer, "wins server =\n"); This option is added if IP or DNS name is given. */ strcat(buffer, "wins proxy = no\n"); strcat(buffer, "dns proxy = no\n"); strcat(buffer, "preserve case = yes\n"); strcat(buffer, "short preserve case = yes\n"); strcat(buffer, "client use spnego = no\n"); strcat(buffer, "client signing = no\n"); strcat(buffer, "client schannel = no\n"); strcat(buffer, "server signing = no\n"); strcat(buffer, "server schannel = no\n"); strcat(buffer, "nt pipe support = yes\n"); strcat(buffer, "nt status support = yes\n"); strcat(buffer, "allow trusted domains = no\n"); strcat(buffer, "obey pam restrictions = yes\n"); strcat(buffer, "enable spoolss = yes\n"); strcat(buffer, "client plaintext auth = no\n"); strcat(buffer, "disable netbios = no\n"); strcat(buffer, "follow symlinks = no\n"); strcat(buffer, "update encrypted = yes\n"); strcat(buffer, "pam password change = no\n"); strcat(buffer, "passwd chat timeout = 120\n"); strcat(buffer, "hostname lookups = no\n"); info = g_strdup_printf("username map = %s/samba/smbusers\n", SYSCONFDIR); strcat(buffer, info); g_free(info); /* Specify that tdbsam is used. */ strcat(buffer, "passdb backend = tdbsam\n"); strcat(buffer, "passwd program = /usr/bin/passwd '%u'\n"); /* Doesnt seem to work info = g_strdup_printf("root directory = %s/lib/samba/root\n", LOCALSTATEDIR); strcat(buffer, info); g_free(info); */ strcat(buffer, "passwd chat = *New*password* %n\\n *ReType*new*password* %n\\n *passwd*changed*\\n\n"); strcat(buffer, "add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'\n"); strcat(buffer, "add user to group script=/usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'\n"); strcat(buffer, "add group script = /usr/sbin/groupadd '%g'\n"); strcat(buffer, "delete user script = /usr/sbin/userdel '%u'\n"); strcat(buffer, "delete user from group script = /usr/sbin/userdel '%u' '%g'\n"); strcat(buffer, "delete group script = /usr/sbin/groupdel '%g'\n"); strcat(buffer, "add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'\n"); strcat(buffer, "machine password timeout = 120\n"); strcat(buffer, "idmap uid = 16777216-33554431\n"); strcat(buffer, "idmap gid = 16777216-33554431\n"); strcat(buffer, "template shell = /dev/null\n"); /* Winbindd stuff */ strcat(buffer, "winbind use default domain = yes\n"); strcat(buffer, "winbind separator = @\n"); strcat(buffer, "winbind cache time = 360\n"); strcat(buffer, "winbind trusted domains only = yes\n"); strcat(buffer, "winbind nested groups = no\n"); strcat(buffer, "winbind nss info = no\n"); strcat(buffer, "winbind refresh tickets = no\n"); strcat(buffer, "winbind offline logon = no\n"); /* Shared home directories */ strcat(buffer, "\n"); strcat(buffer, "[homes]\n"); strcat(buffer, "comment = Home Directories\n"); strcat(buffer, "path = /home\n"); strcat(buffer, "valid users = %U\n"); strcat(buffer, "read only = no\n"); strcat(buffer, "available = yes\n"); strcat(buffer, "browseable = yes\n"); strcat(buffer, "writable = yes\n"); strcat(buffer, "guest ok = no\n"); strcat(buffer, "public = no\n"); strcat(buffer, "printable = no\n"); strcat(buffer, "locking = no\n"); strcat(buffer, "strict locking = no\n"); strcat(buffer, "\n"); strcat(buffer, "[netlogon]\n"); strcat(buffer, "comment = Network Logon Service\n"); strcat(buffer, "path = "); strcat(buffer, LOCALSTATEDIR); strcat(buffer, "/lib/samba/netlogon\n"); strcat(buffer, "read only = no\n"); strcat(buffer, "available = yes\n"); strcat(buffer, "browseable = yes\n"); strcat(buffer, "writable = no\n"); strcat(buffer, "guest ok = no\n"); strcat(buffer, "public = no\n"); strcat(buffer, "printable = no\n"); strcat(buffer, "locking = no\n"); strcat(buffer, "strict locking = no\n"); /* Profiles are created automatically for each user, clients adds the files */ strcat(buffer, "\n"); strcat(buffer, "[profiles]\n"); /* This must be writable */ strcat(buffer, "comment = User Profiles\n"); strcat(buffer, "path = "); strcat(buffer, LOCALSTATEDIR); strcat(buffer, "/lib/samba/profiles\n"); strcat(buffer, "read only = no\n"); strcat(buffer, "available = yes\n"); strcat(buffer, "browseable = yes\n"); strcat(buffer, "writable = yes\n"); strcat(buffer, "guest ok = no\n"); strcat(buffer, "public = no\n"); strcat(buffer, "printable = no\n"); strcat(buffer, "create mode = 0600\n"); strcat(buffer, "directory mask = 0700\n"); strcat(buffer, "locking = no\n"); strcat(buffer, "strict locking = no\n"); strcat(buffer, "\n"); strcat(buffer, "[printers]\n"); strcat(buffer, "comment = All Printers\n"); info = g_strdup_printf("path = %s/spool/samba\n", LOCALSTATEDIR); strcat(buffer, info); g_free(info); strcat(buffer, "browseable = yes\n"); strcat(buffer, "writable = no\n"); strcat(buffer, "guest ok = no\n"); strcat(buffer, "public = no\n"); strcat(buffer, "printable = yes\n"); strcat(buffer, "locking = no\n"); strcat(buffer, "strict locking = no\n"); /* We want to be able to print anything as pdf documents to a directory */ strcat(buffer, "\n"); strcat(buffer, "[pdf-documents]\n"); strcat(buffer, "path = "); strcat(buffer, LOCALSTATEDIR); strcat(buffer, "/lib/samba/pdf-documents\n"); strcat(buffer, "comment = Converted PDF Documents\n"); strcat(buffer, "admin users = %U\n"); strcat(buffer, "available = yes\n"); strcat(buffer, "browseable = yes\n"); strcat(buffer, "writeable = yes\n"); strcat(buffer, "guest ok = yes\n"); strcat(buffer, "locking = no\n"); strcat(buffer, "strict locking = no\n"); /* The pdf printer service (converter) */ strcat(buffer, "\n"); strcat(buffer, "[pdf-printer]\n"); strcat(buffer, "path = /tmp\n"); strcat(buffer, "comment = PDF Printer Service\n"); strcat(buffer, "printable = yes\n"); strcat(buffer, "guest ok = yes\n"); strcat(buffer, "use client driver = yes\n"); strcat(buffer, "printing = bsd\n"); strcat(buffer, "print command = /usr/bin/gadmin-samba-pdf %s %u\n"); strcat(buffer, "lpq command =\n"); strcat(buffer, "lprm command =\n"); fputs(buffer, fp); fclose(fp); free(buffer); if( GTK_IS_WINDOW(widgets->default_conf_question_window) ) gtk_widget_destroy(widgets->default_conf_question_window); populate_gadmin_samba(widgets); /* Create default directories */ cmd = g_strdup_printf("mkdir -p '%s/lib/samba/netlogon' '%s/lib/samba/pdf-documents' '%s/lib/samba/profiles/root' '%s/log/samba'\n", LOCALSTATEDIR, LOCALSTATEDIR, LOCALSTATEDIR, LOCALSTATEDIR); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strconcat(_("Failed to create directories:\n%s\n"), LOCALSTATEDIR, "/lib/samba/netlogon\n", LOCALSTATEDIR, "/lib/samba/pdf-documents\n", LOCALSTATEDIR, "/lib/samba/profiles/root\n", LOCALSTATEDIR, "/log/samba\n", NULL); show_info(info); g_free(info); g_free(cmd); return; } pclose(fp); g_free(cmd); /* Chmod the profiles directory */ cmd = g_strdup_printf("chmod 1755 %s/lib/samba/profiles\n", LOCALSTATEDIR); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed chmodding directory: %s/lib/samba/profiles\n"), LOCALSTATEDIR); show_info(info); g_free(info); g_free(cmd); return; } pclose(fp); g_free(cmd); /* Create the samba root users home directory */ cmd = g_strdup_printf("mkdir -p '%s/lib/samba/root'\n", LOCALSTATEDIR); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed to create directory: %s/%s\n"), LOCALSTATEDIR, "/lib/samba/root"); show_info(info); g_free(info); g_free(cmd); return; } pclose(fp); g_free(cmd); /* Fixme: add username mappings to /etc/samba/smbusers */ // root = administrator // nobody = guest // net groupmap modify ntgroup="Domain Admins" unixgroup=root // net groupmap modify ntgroup="Administrators" unixgroup=root // net groupmap modify ntgroup="Power Users" unixgroup=sys // net groupmap modify ntgroup="Domain Users" unixgroup=users // net groupmap modify ntgroup="Domain Guests" unixgroup=nobody /* net groupmap list (lists the group mappings) */ } void dont_add_standard_conf(struct w *widgets) { gtk_widget_destroy(widgets->default_conf_question_window); populate_gadmin_samba(widgets); } void create_standard_conf_question(struct w *widgets) { FILE *fp; char *line, *conf; long conf_size; int found_conf_question = 0; GtkWidget *vbox18, *label182; GtkWidget *scrolledwindow18; 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; gchar *cmd, *info, *text, *utf8; widgets->default_conf_question_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(widgets->default_conf_question_window, 550, 340); gtk_window_set_title(GTK_WINDOW(widgets->default_conf_question_window), _("GADMIN-SAMBA 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); scrolledwindow18 = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(vbox18), scrolledwindow18, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow18), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); default_question_textview = gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(scrolledwindow18), 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); text = g_strconcat( _("GADMIN-SAMBA could not find SAMBAs configuration (smb.conf) or the current\n"), _("configuration doesnt have all the features that GADMIN-SAMBA requires.\n\n"), _("Do you want to overwrite the current samba configuration ?\n"), _("\t\t\t(If you dont know then press yes)\n"), NULL); utf8 = g_locale_to_utf8(text, strlen(text), NULL, NULL, NULL); gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(default_question_textview)), utf8, -1); g_free(text); 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); if( utf8!=NULL ) g_free(utf8); 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); /* The gadmin-samba settings directory doesnt exist, make it (could be due to bad packaging etc) */ if( ! file_exists(APPCONFDIR) ) { cmd = g_strdup_printf("mkdir -p '%s'", APPCONFDIR); if( ! run_command(cmd) ) { info = g_strdup_printf(_("Error: cant create the settings directory here:\n%s\n"), APPCONFDIR); show_info(info); g_free(info); g_free(cmd); return; } g_free(cmd); } /* The settings file doesnt exist, create and write the setting to it */ if( ! file_exists(SETTINGS_FILE) ) { if((fp=fopen(SETTINGS_FILE, "w+"))==NULL) { info = g_strdup_printf(_("Error: cant write the settings file here:\n%s\n"), SETTINGS_FILE); show_info(info); g_free(info); return; } fputs("show_conf_question: false\n", fp); fclose(fp); return; } /* Gather old values and re/write 'show_conf_question: false' to gadmin-sambas settings */ if((fp=fopen(SETTINGS_FILE, "r"))==NULL) { info = g_strdup_printf(_("Error: cant write the settings file here:\n%s\n"), SETTINGS_FILE); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); conf = allocate(conf_size+1024); if( conf_size > 1 ) while(fgets(line, conf_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_FILE, "w+"))==NULL) { info = g_strdup_printf(_("Error: cant write the settings file here:\n%s\n"), SETTINGS_FILE); show_info(info); g_free(info); return; } fputs(conf, fp); fclose(fp); free(conf); } gadmin-samba-0.3.2/src/create_security_tab.h0000644000000000000000000000177411527565344017537 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/deactivate_button_clicked.h0000644000000000000000000000201611527565344020667 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_server_settings.c0000644000000000000000000010022211527565345020636 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "commented.h" #include "get_option_pos.h" #include "show_info.h" #include "functions.h" void populate_server_settings(struct w *widgets) { /* Lists the values in the server tab */ FILE *fp; int val = 0, global_section_found = 0; int is_user = 0, is_bdc = 0; long conf_size, opt_pos; char *line, *new_buffer; gchar *info, *utf8 = NULL; if((fp=fopen(SAMBA_CONF, "r"))==NULL) { info = g_strdup_printf(_("Cant open smb.conf here:\n%s\n"), SAMBA_CONF); show_info(info); g_free(info); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); new_buffer = allocate(conf_size+1); /* First determine if security is "user", set as: is_user */ if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { if( commented(line) ) continue; /* Break at any share definition */ if( strstr(line, "[") && ! cmplowercase(line, "[global]") ) break; /* Security is user */ if( cmplowercase(line, "security = ") && cmplowercase(line, "user") ) is_user = 1; } rewind(fp); /* We know that security is USER, now see if its a BDC, set as: is_bdc */ if( is_user && conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { if( commented(line) ) continue; /* Break at any share definition */ if( strstr(line, "[") && ! cmplowercase(line, "[global]") ) break; /* If domain logons is specified its a BDC */ if( cmplowercase(line, "domain logons = ") && cmplowercase(line, "yes") ) is_bdc = 1; } rewind(fp); /* First scroll to the global section */ if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { if( cmplowercase(line, "[global]") && ! commented(line) ) { global_section_found = 1; break; } } if( ! global_section_found ) { info = g_strdup_printf(_("Can not find the [global] section in %s\nNo changes made.\n"), SAMBA_CONF); show_info(info); g_free(info); fclose(fp); free(line); free(new_buffer); return; } if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { /* Scroll past any comment */ if( commented(line) ) continue; /* Break at any share definition "[" */ if( strstr(line, "[") ) break; /* Entries... */ /* Populate matching server directives */ if( cmplowercase(line, "netbios name") ) { /* Positions are at the first char located after "=" not including whitespace */ opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[0]), utf8); } else if( cmplowercase(line, "server string") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[1]), utf8); } else if( cmplowercase(line, "workgroup") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } else if( cmplowercase(line, "realm") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } else if( cmplowercase(line, "hosts allow") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[4]), utf8); } else if( cmplowercase(line, "interfaces") && ! cmplowercase(line, "bind interfaces only") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[5]), utf8); } else if( cmplowercase(line, "remote announce") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } else if( cmplowercase(line, "remote browse sync") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[7]), utf8); } else if( cmplowercase(line, "printcap name") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } else if( cmplowercase(line, "guest account") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } else if( cmplowercase(line, "log file") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } else if( cmplowercase(line, "socket options") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[11]), utf8); } else if( cmplowercase(line, "logon drive") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[12]), utf8); } else if( cmplowercase(line, "logon home") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } else if( cmplowercase(line, "logon path") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } else if( cmplowercase(line, "logon script") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } else if( cmplowercase(line, "name resolve order") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[16]), utf8); } else if( cmplowercase(line, "wins server") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[17]), utf8); } else if( cmplowercase(line, "username map") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[18]), utf8); } else if( cmplowercase(line, "passwd program") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[20]), utf8); } else if( cmplowercase(line, "passwd chat") && ! cmplowercase(line, "passwd chat timeout") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[22]), utf8); } else if( cmplowercase(line, "add user script") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[23]), utf8); } else if( cmplowercase(line, "add user to group script") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[24]), utf8); } else if( cmplowercase(line, "add group script") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[25]), utf8); } else if( cmplowercase(line, "delete user script") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[26]), utf8); } else if( cmplowercase(line, "delete user from group script") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[27]), utf8); } else if( cmplowercase(line, "delete group script") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[28]), utf8); } else if( cmplowercase(line, "add machine script") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[29]), utf8); } else /* Didnt seem to work if( cmplowercase(line, "root directory") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[21]), utf8); } else */ if( cmplowercase(line, "idmap uid") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[30]), utf8); } else if( cmplowercase(line, "idmap gid") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[31]), utf8); } else if( cmplowercase(line, "template shell") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[32]), utf8); } else if( cmplowercase(line, "winbind separator") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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[33]), utf8); } else /* Combos... */ /* Security level, also sets realm usability */ if( cmplowercase(line, "security") ) { /* User */ if( ! is_bdc && cmplowercase(line, "user") ) { gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[0]), 0); /* Clear Realm entry, disable input and remove the option */ gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[3]), ""); gtk_widget_set_sensitive(GTK_WIDGET(widgets->server_set_entry[3]), 0); } else /* BDC */ if( is_bdc && cmplowercase(line, "user") ) { gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[0]), 1); /* Can realm be used here ? */ gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[3]), ""); gtk_widget_set_sensitive(GTK_WIDGET(widgets->server_set_entry[3]), 0); } else if( cmplowercase(line, "domain") ) { gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[0]), 2); /* Can realm be used here ? */ gtk_entry_set_text(GTK_ENTRY(widgets->server_set_entry[3]), ""); gtk_widget_set_sensitive(GTK_WIDGET(widgets->server_set_entry[3]), 0); } else /* ADS */ { gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[0]), 3); /* Enable Kerberos Realm entry (Disabled in apply server settings) */ gtk_widget_set_sensitive(GTK_WIDGET(widgets->server_set_entry[3]), 1); } } else if( cmplowercase(line, "load printers") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[1]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[1]), 1); } else if( cmplowercase(line, "cups options") ) { if( cmplowercase(line, "raw") ) 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); } else // printing = cups missing, dunno what extra options it has. if( cmplowercase(line, "null passwords") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "encrypt passwords") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "unix password sync") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "local master") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "domain master") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "preferred master") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "domain logons") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "time server") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "wins support") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "wins proxy") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "dns proxy") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "preserve case") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[14]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[14]), 1); } else if( cmplowercase(line, "client use spnego") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "client signing") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "client schannel") ) { if( cmplowercase(line, "yes") ) 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); } else if( cmplowercase(line, "server signing") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[18]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[18]), 1); } else if( cmplowercase(line, "server schannel") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[19]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[19]), 1); } else if( cmplowercase(line, "nt pipe support") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[20]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[20]), 1); } else if( cmplowercase(line, "nt status support") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[21]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[21]), 1); } else if( cmplowercase(line, "allow trusted domains") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[22]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[22]), 1); } else if( cmplowercase(line, "obey pam restrictions") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[23]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[23]), 1); } else if( cmplowercase(line, "enable spoolss") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[24]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[24]), 1); } else if( cmplowercase(line, "client plaintext auth") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[25]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[25]), 1); } else if( cmplowercase(line, "disable netbios") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[26]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[26]), 1); } else if( cmplowercase(line, "follow symlinks") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[27]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[27]), 1); } else if( cmplowercase(line, "update encrypted") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[28]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[28]), 1); } else if( cmplowercase(line, "pam password change") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[29]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[29]), 1); } else if( cmplowercase(line, "hostname lookups") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[30]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[30]), 1); } else if( cmplowercase(line, "winbind use default domain") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[31]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[31]), 1); } else if( cmplowercase(line, "winbind trusted domains only") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[32]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[32]), 1); } else if( cmplowercase(line, "winbind nested groups") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[33]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[33]), 1); } else if( cmplowercase(line, "winbind nss info") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[34]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[34]), 1); } else if( cmplowercase(line, "winbind refresh tickets") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[35]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[35]), 1); } else if( cmplowercase(line, "winbind offline logon") ) { if( cmplowercase(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[36]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->server_set_combo[36]), 1); } else /* Spinbuttons... */ if( cmplowercase(line, "max log size") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } } else if( cmplowercase(line, "username level") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } } else if( cmplowercase(line, "password level") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } } else if( cmplowercase(line, "os level") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } } else if( cmplowercase(line, "passwd chat timeout") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } } else if( cmplowercase(line, "machine password timeout") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } } else if( cmplowercase(line, "winbind cache time") ) { opt_pos = get_option_pos(line); sprintf(new_buffer, "%s", &line[opt_pos]); 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); } } } fclose(fp); free(line); free(new_buffer); if( utf8!=NULL ) g_free(utf8); gtk_widget_show_all(widgets->main_window); } gadmin-samba-0.3.2/src/create_user_settings.c0000644000000000000000000001637411527565344017735 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "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 "create_user_settings.h" #include "populate_shell_combo.h" #include "add_change_user.h" #include "delete_user.h" #include "functions.h" #include "file_chooser.h" gulong account_disabled_toggled_signal; void select_home_path_clicked(struct w *widgets) { gchar *path = NULL; path = get_dialog_path_selection("DIR", "/home", "None"); if( path!=NULL ) { gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[4]), path); g_free(path); } } void create_user_settings(struct w *widgets) { GtkTooltips *tooltips; GtkWidget *hbuttonbox; GtkWidget *delete_user_button; GtkWidget *apply_user_button; /* For the custom new user button */ GtkWidget *new_user_button; GtkWidget *new_user_hbox; GtkWidget *new_user_image; GtkWidget *new_user_label; GtkWidget *new_user_alignment; int a = 0; int b = 1; int ent = 0; int comb = 0; int check = 0; tooltips = gtk_tooltips_new(); /* Account locked checkbutton and label */ widgets->user_set_checkbutton[check] = gtk_check_button_new(); widgets->acclock_label = gtk_label_new(_("Account locked:")); /* The delete, add 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, TRUE, TRUE, 0); new_user_label = gtk_label_new_with_mnemonic(_("New user")); gtk_box_pack_start(GTK_BOX(new_user_hbox), new_user_label, TRUE, TRUE, 0); gtk_label_set_justify(GTK_LABEL(new_user_label), GTK_JUSTIFY_LEFT); /* Custom new user button end */ /* The apply button */ apply_user_button = gtk_button_new_from_stock(GTK_STOCK_APPLY); hbuttonbox = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(hbuttonbox), widgets->acclock_label, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbuttonbox), widgets->user_set_checkbutton[check], TRUE, TRUE, 0); check++; gtk_box_pack_start(GTK_BOX(hbuttonbox), delete_user_button, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbuttonbox), new_user_button, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbuttonbox), apply_user_button, TRUE, TRUE, 0); gtk_table_attach(GTK_TABLE(widgets->user_set_table), hbuttonbox, 0, 3, a, b, 0, 0, 5, 5); a++; b++; g_signal_connect_swapped(G_OBJECT(delete_user_button), "clicked", G_CALLBACK(delete_user), widgets); g_signal_connect_swapped(G_OBJECT(apply_user_button), "clicked", G_CALLBACK(add_change_user), widgets); g_signal_connect_swapped(G_OBJECT(new_user_button), "clicked", G_CALLBACK(clear_user_profile), widgets); /* Fetch the gulong as well as hooking up the connect signal. Borked like this in 2006 ? */ account_disabled_toggled_signal = g_signal_connect_swapped(G_OBJECT(widgets->user_set_checkbutton[0]), "clicked", G_CALLBACK(account_locked_checkbutton_clicked), widgets); /* 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->user_set_table), widgets->user_set_entry[ent], "gtk-refresh", _("Username:"), // fixed, Quax _("Create a randomized username"), // fixed, Quax 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->user_set_entry[ent], _("The name of the user."), NULL); 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->user_set_table), widgets->user_set_entry[ent], "gtk-refresh", _("Password:"), // fixed, Quax _("Create a randomized password"), // fixed, Quax 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->user_set_entry[ent], _("The users password."), NULL); 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->user_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->user_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++; /* Home directory */ GtkWidget *homedir_button; widgets->user_set_entry[ent] = gtk_entry_new(); homedir_button = make_button_with_entry(GTK_TABLE(widgets->user_set_table), widgets->user_set_entry[ent], "gtk-refresh", _("Home directory:"), // fixed, Quax _("Choose a home directory for this user"), // fixed, Quax 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->user_set_entry[ent], _("The users home directory, IE: /home/UserName or /dev/null to skip making a homedirectory."), NULL); a++; b++; ent++; g_signal_connect_swapped(G_OBJECT(homedir_button), "clicked", G_CALLBACK(select_home_path_clicked), widgets); widgets->user_set_combo[comb] = make_label_textcombo_label(GTK_TABLE(widgets->user_set_table), _(" Shell: "), 0,1,a,b, 80); populate_shell_combo(widgets->user_set_combo[comb]); a++; b++; comb++; gtk_widget_show_all(widgets->main_window); } gadmin-samba-0.3.2/src/populate_shell_combo.h0000644000000000000000000000175211527565345017713 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_security_tab.h0000644000000000000000000000173111527565345020117 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/gadmin_samba.h0000644000000000000000000000175511527565344016120 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_H # define HAVE_gadmin_samba_H extern struct w *widgets; int main(int argc, char *argv[]); #endif gadmin-samba-0.3.2/src/populate_share_settings.h0000644000000000000000000000200611527565345020440 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_share_settings_H # define populate_share_settings_H extern struct w *widgets; void populate_share_settings(struct w *widgets); #endif gadmin-samba-0.3.2/src/populate_server_settings.h0000644000000000000000000000201411527565345020643 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/import_functions.h0000644000000000000000000000231611527565344017112 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 do_import(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets); void import_button_clicked(GtkButton *button, struct w *widgets); int in_access_list(gchar *name, GtkListStore *list_store); #endif gadmin-samba-0.3.2/src/populate_users.c0000644000000000000000000001037111527565345016556 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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" #include "commented.h" extern char global_user_name[1024]; void populate_users(struct w *widgets) { /* Lists all samba users in the userlist */ FILE *fp; GtkTreeIter iter; GtkTreePath *path; char *line, *username; long conf_size; gboolean edit=0; int i, found_user=0; gchar *utf8=NULL; gchar *what, *val, *groupname; gtk_list_store_clear(widgets->user_store); /* Puts the pdbedit userlist as: /etc/gadmin-samba/gadmin_samba_users */ get_gadmin_samba_users(); /* Populate the userlist */ if((fp=fopen(GADMIN_SAMBA_USERS, "r"))==NULL) { /* Dont show a popup */ printf("Error opening: [%s]\nwhen listing users.\n", GADMIN_SAMBA_USERS); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); username = allocate(conf_size+1); /* Add the users to the user list */ if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines and computer accounts */ if( commented(line) || strstr(line, "$") || strlen(line) < 10 ) continue; for(i=0; i < conf_size-1; i++) { if(line[i]==':') { found_user = 1; /* Add a row and insert the username in the list */ snprintf(username, i+1, "%s", line); utf8 = g_locale_to_utf8(username, strlen(username), 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, 0, utf8, -1); /* Get the group number for this user then translate it into the group name and insert it in the list */ what = g_strdup_printf("group"); val = get_user_setting(username, what); groupname = get_group_name(val); utf8 = g_locale_to_utf8(groupname, strlen(groupname), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 1, utf8, -1); g_free(what); g_free(val); g_free(groupname); /* Get the users homedir and insert it in the list */ what = g_strdup_printf("homedir"); val = get_user_setting(username, what); utf8 = g_locale_to_utf8(val, strlen(val), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 2, utf8, -1); g_free(what); g_free(val); /* Get the users comment and insert it in the list */ what = g_strdup_printf("comment"); val = get_user_setting(username, what); utf8 = g_locale_to_utf8(val, strlen(val), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->user_store), &iter, 3, utf8, -1); g_free(what); g_free(val); break; } } } fclose(fp); free(line); free(username); if( utf8 !=NULL ) g_free(utf8); /* Cant set treepath if there arent any users/rows, then itll crash */ if( ! found_user ) { /* Unset global_user_name */ 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); gtk_tree_path_free(path); } gadmin-samba-0.3.2/src/populate_users.h0000644000000000000000000000175311527565345016567 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/save_conf_tab.c0000644000000000000000000000350111527565345016272 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_gadmin_samba.h" void save_conf_tab(struct w *widgets) { /* Save the configuration in the conf tab to SAMBA_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(SAMBA_CONF, "w+"))==NULL) { return; } fputs(conf, fp); fclose(fp); /* Update the entire gui */ populate_gadmin_samba(widgets); /* Dont update the conf tab */ if( conf!=NULL ) g_free(conf); if( utf8!=NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/save_conf_tab.h0000644000000000000000000000175311527565345016306 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/allocate.h0000644000000000000000000000173511527565344015300 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_ALLOCATE_H # define gadmin_samba_ALLOCATE_H char * allocate(long allocate_size); #endif gadmin-samba-0.3.2/src/select_first_macct.h0000644000000000000000000000177211527565345017353 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct_H # define select_first_macct_H extern struct w *widgets; void select_first_macct(struct w *widgets); #endif gadmin-samba-0.3.2/src/support.h0000644000000000000000000000524611527565345015232 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/make_settings_progressbars.c0000644000000000000000000000476011527565345021142 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_maccts.h0000644000000000000000000000175611527565345016703 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_maccts_H # define populate_maccts_H extern struct w *widgets; void populate_maccts(struct w *widgets); #endif gadmin-samba-0.3.2/src/populate_conns.c0000644000000000000000000002002011527565345016525 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_conns.h" #include "show_info.h" #include "commands.h" void populate_conns(struct w *widgets) { /* Lists connections to the samba server and its shares */ FILE *fp; GtkTreeIter iter; GtkTreePath *path; char *line, *input1, *input2, *input3, *input4, *input5, *input6, *tmp_pid; gboolean edit = 0; int found_conn = 0; int i=0,z=0, delim=0, space=0; long file_size=0, old_pos=0; gchar *combined=NULL; gchar *utf8=NULL; char *cmd_buf; char filename[]="/tmp/gadmin-samba-XXXXXX"; int tmpfd = -1; gtk_list_store_clear(widgets->conns_store); if( ! file_exists("/tmp") ) { printf("The directory: /tmp doesnt exist, returning.\n"); return; } /* Flush stdin and stdout */ fflush(stdin); fflush(stdout); /* Create a temp file to hold our smbstatus output */ tmpfd = mkstemp(filename); if( tmpfd < 0 ) { printf("Could not create temporary file: %s\n", filename); return; } close(tmpfd); /* Write the output to the temp file */ cmd_buf = allocate(4096); snprintf(cmd_buf, 4000, "smbstatus 2>&1 > %s", filename); if((fp=popen(cmd_buf, "w"))==NULL) { if( strstr(filename, "/tmp/gadmin-samba") ) unlink(filename); /* Dont show a popup */ free(cmd_buf); return; } pclose(fp); free(cmd_buf); /* We want the output in a tempfile so we can scroll around in it properly */ if((fp=fopen((char *)filename, "r"))==NULL) { if( strstr(filename, "/tmp/gadmin-samba") ) unlink(filename); /* Dont show a popup */ return; } fseek(fp, 0, SEEK_END); file_size = ftell(fp); rewind(fp); /* >= glibc-2.4 crazyness-avoidance */ if( file_size < 2 ) { if( strstr(filename, "/tmp/gadmin-samba") ) unlink(filename); fclose(fp); return; } line = allocate(file_size+1); input1 = allocate(4096); input2 = allocate(4096); input3 = allocate(4096); input4 = allocate(4096); /* For the filepaths */ input5 = allocate(16384); tmp_pid = allocate(16384); /* PID User Group Machine (IP = doesnt show) (Share, pop downwards with PID to PID matching) ------------------------------------------------------------------- 7324 mange mange samba24 (127.0.0.1) /home/foo/glibc... 7326 mange mange samba24 (127.0.0.1) /var/cad/dwg.dwg Service ........... connected at etc etc ------------------------------------------------------------------- Locked files: Pid DenyMode Access R/W Oplock SharePath Name ---------------------------------------------------------------------------------------- 7324 DENY_NONE 0x120089 RDONLY NONE /home mange/GLIBC/glibc-2.3.6.tar.bz2 Sun Jun 25 23:34:59 2006 7326 DENY_NONE 0x120089 RDONLY NONE /home mange/GLIBC/glibc-2.3.6.tar.bz2 Sun Jun 25 23:35:17 2006 */ /* Scroll to the first divider line "------" */ while(fgets(line, file_size, fp)!=NULL) if( strstr(line, "---") ) break; while(fgets(line, file_size, fp)!=NULL) { /* Skip stuff we dont want to list */ if( strlen(line) < 10 || strlen(line) > 4000 ) continue; if( strstr(line, "---") || strstr(line, "Connected at") ) break; /* Grab row output */ sscanf(line, "%s %s %s %s %s", input1, input2, input3, input4, input5); /* Add a row */ gtk_list_store_append(GTK_LIST_STORE(widgets->conns_store), &iter); /* Insert PID */ utf8 = g_locale_to_utf8(input1, strlen(input1), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->conns_store), &iter, 0, utf8, -1); /* Insert User name */ utf8 = g_locale_to_utf8(input2, strlen(input2), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->conns_store), &iter, 1, utf8, -1); /* Insert Group name */ utf8 = g_locale_to_utf8(input3, strlen(input3), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->conns_store), &iter, 2, utf8, -1); /* Insert Server name */ utf8 = g_locale_to_utf8(input4, strlen(input4), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->conns_store), &iter, 3, utf8, -1); /* Insert IP-Address */ utf8 = g_locale_to_utf8(input5, strlen(input5), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->conns_store), &iter, 4, utf8, -1); found_conn = 1; if( strstr(line, "---") ) break; /* Record the old position */ old_pos = ftell(fp); /* Scroll to the second divider line "------" */ while(fgets(line, file_size, fp)!=NULL) if( strstr(line, "---") ) break; /* Scroll to the third divider line "------" */ while(fgets(line, file_size, fp)!=NULL) if( strstr(line, "---") ) break; /* List the files on the corresponding PID line */ while(fgets(line, file_size, fp)!=NULL) { /* Skip stuff we dont want to list */ if( strlen(line) < 10 || strlen(line) > 16000 ) continue; /* Grab row output (PID, /sharepath, dir/file) */ sscanf(line, "%s %*s %*s %*s %*s %s", tmp_pid, input5); /* Handle Split filenames (grab from the first '/' to the end) */ delim = 0; for(i=0; line[i]!='\0'; i++) { /* Scroll to the second '/', the first share path is collected above */ if( line[i]=='/' ) delim++; if( delim == 2 ) break; } /* Delimiter '/' found twice and its the correct PID, insert the line */ if( delim == 2 && found_conn && ! strcmp(tmp_pid, input1) ) { /* The line also contains the date at the end, skip it */ space = 0; for(z=strlen(line)-1; z>0; z--) { if( line[z]!=' ' && line[z+1]==' ' ) space++; if( space == 5 ) break; } z=z+2; if( z-1 < 16000 ) { input6 = allocate(16384); snprintf(input6, z-i, "%s", &line[i]); /* Snip at the end */ input6[z]='\0'; combined = g_strdup_printf("%s%s", input5, input6); utf8 = g_locale_to_utf8(combined, strlen(combined), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->conns_store), &iter, 5, utf8, -1); g_free(combined); free(input6); } break; } } found_conn = 0; /* Scroll to the old position */ fseek(fp, old_pos, SEEK_SET); } fclose(fp); /* Remove temporary file */ if( strstr(filename, "/tmp/gadmin-samba") ) unlink(filename); free(line); free(input1); free(input2); free(input3); free(input4); free(input5); free(tmp_pid); if( utf8!=NULL ) g_free(utf8); /* Cant set path if there are no rows */ if( ! found_conn ) return; path = gtk_tree_path_new_first(); gtk_tree_view_set_cursor(GTK_TREE_VIEW(widgets->conns_treeview), path, NULL, edit); gtk_tree_path_free(path); } gadmin-samba-0.3.2/src/macct_treeview_row_clicked.h0000644000000000000000000000210411527565344021051 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 macct_treeview_row_clicked_H # define macct_treeview_row_clicked_H extern struct w *widgets; void macct_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, gpointer data); #endif gadmin-samba-0.3.2/src/make_settings_checkbuttons.c0000644000000000000000000000717111527565344021120 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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; } /* 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; 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_spinbutton(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint spinbutton_length) { GtkWidget *spinbutton; 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-samba-0.3.2/src/create_share_settings.c0000644000000000000000000007220011527565344020047 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "make_settings_entries.h" #include "make_settings_buttons.h" #include "make_settings_combos.h" #include "make_settings_spinbuttons.h" #include "make_settings_checkbuttons.h" #include "delete_share.h" #include "add_share.h" #include "create_import_question.h" #include "apply_share_settings.h" #include "file_chooser.h" #include "show_info.h" int new_share_info_shown = 0; extern int global_share_access_treeview_num; GtkTreeIter global_access_iter; void share_access_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, gpointer data) { GtkTreePath *path; GtkTreeModel *list_store; GtkTreeSelection *selection; /* The left button is pressed */ if( ! event->type == GDK_BUTTON_PRESS || ! event->button == 1 ) return; /* Get the number for the treeview (0-3) */ global_share_access_treeview_num = (int) g_object_get_data(G_OBJECT(treeview), "column"); 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_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, &global_access_iter, path); gtk_tree_path_free(path); } } } void show_share_selection_info() { gchar *info; info = g_strdup_printf("Select a user or group to remove access for first."); show_info(info); g_free(info); } void new_share_clicked(GtkButton *button, struct w *widgets) { gchar *info; int i = 0; /* Clear all share entries */ for(i=0; i<7; i++) gtk_entry_set_text(GTK_ENTRY(widgets->share_set_entry[i]), ""); /* Set all share combos to commonly used settings. */ for(i=0; i<8; i++) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[i]), 1); /* Set combo 1 and 2 to yes. (Available and browseable) */ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[1]), 0); gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[2]), 0); /* Clear the user access treeviews */ gtk_list_store_clear(widgets->valid_users_store); gtk_list_store_clear(widgets->invalid_users_store); gtk_list_store_clear(widgets->write_users_store); gtk_list_store_clear(widgets->admin_users_store); /* Only show profiling info once */ if( new_share_info_shown ) return; else new_share_info_shown = 1; info = g_strconcat( _("Write the new share name and other settings in the share settings below.\n"), _("Press add to add this new share with the selected settings.\n\n"), _("You can also skip this step and directly alter an existing shares name,\n"), _("settings and then press add. This can save administration time.\n"), NULL); show_info(info); g_free(info); } void del_share_access_clicked(GtkButton *button, struct w *widgets) { GtkTreeSelection *selection; gboolean edited = 0; if( global_share_access_treeview_num == 0 ) { selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->valid_users_treeview)); if( gtk_tree_selection_count_selected_rows(selection) < 1 ) { show_share_selection_info(); return; } edited = gtk_list_store_remove(GTK_LIST_STORE(widgets->valid_users_store), &global_access_iter); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->valid_users_treeview)); gtk_tree_selection_unselect_all(selection); } if( global_share_access_treeview_num == 1 ) { selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->invalid_users_treeview)); if( gtk_tree_selection_count_selected_rows(selection) < 1 ) { show_share_selection_info(); return; } edited = gtk_list_store_remove(GTK_LIST_STORE(widgets->invalid_users_store), &global_access_iter); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->invalid_users_treeview)); gtk_tree_selection_unselect_all(selection); } if( global_share_access_treeview_num == 2 ) { selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->write_users_treeview)); if( gtk_tree_selection_count_selected_rows(selection) < 1 ) { show_share_selection_info(); return; } edited = gtk_list_store_remove(GTK_LIST_STORE(widgets->write_users_store), &global_access_iter); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->write_users_treeview)); gtk_tree_selection_unselect_all(selection); } if( global_share_access_treeview_num == 3 ) { selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->admin_users_treeview)); if( gtk_tree_selection_count_selected_rows(selection) < 1 ) { show_share_selection_info(); return; } edited = gtk_list_store_remove(GTK_LIST_STORE(widgets->admin_users_store), &global_access_iter); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->admin_users_treeview)); gtk_tree_selection_unselect_all(selection); } apply_share_settings(widgets); } void select_share_path_clicked(struct w *widgets) { gchar *path = NULL, *sharesdir = NULL; sharesdir = g_strdup_printf("%s/lib/samba", LOCALSTATEDIR); path = get_dialog_path_selection("DIR", sharesdir, "None"); if( path!=NULL ) { printf("Selected directory: %s\n", path); gtk_entry_set_text(GTK_ENTRY(widgets->share_set_entry[1]), path); g_free(path); } g_free(sharesdir); } void create_share_settings(struct w *widgets) { GtkTooltips *tooltips; gchar *combo_text = NULL; gchar *utf8 = NULL; GtkWidget *hbox; GtkWidget *delete_share_button; GtkWidget *add_share_button; GtkWidget *apply_share_button; GtkWidget *add_access_button; GtkWidget *add_access_hbox; GtkWidget *add_access_image; GtkWidget *add_access_label; GtkWidget *add_access_alignment; GtkWidget *del_access_button; GtkWidget *del_access_hbox; GtkWidget *del_access_image; GtkWidget *del_access_label; GtkWidget *del_access_alignment; GtkWidget *new_share_button; GtkWidget *new_share_hbox; GtkWidget *new_share_image; GtkWidget *new_share_label; GtkWidget *new_share_alignment; int a = 0; int b = 1; int ent = 0; int comb = 0; tooltips = gtk_tooltips_new(); hbox = gtk_hbox_new(FALSE, 3); /* The delete add share and apply share settings buttons */ delete_share_button = gtk_button_new_from_stock(GTK_STOCK_DELETE); add_share_button = gtk_button_new_from_stock(GTK_STOCK_ADD); apply_share_button = gtk_button_new_from_stock(GTK_STOCK_APPLY); /* Custom "New share" button */ new_share_button = gtk_button_new(); new_share_alignment = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(new_share_button), new_share_alignment); new_share_hbox = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(new_share_alignment), new_share_hbox); new_share_image = gtk_image_new_from_stock("gtk-add", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(new_share_hbox), new_share_image, FALSE, FALSE, 0); new_share_label = gtk_label_new_with_mnemonic(_("New share")); gtk_box_pack_start(GTK_BOX(new_share_hbox), new_share_label, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(new_share_label), GTK_JUSTIFY_LEFT); /* Add the buttons to the hbox */ gtk_box_pack_start(GTK_BOX(hbox), delete_share_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), new_share_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), add_share_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), apply_share_button, FALSE, FALSE, 0); /* table, left, right, top, bottom, fill, expand, length, xpad, ypad */ gtk_table_attach(GTK_TABLE(widgets->share_set_table), hbox, 1, 2, 0, 1, 0, 0, 5, 5); a++; b++; g_signal_connect_swapped(G_OBJECT(delete_share_button), "clicked", G_CALLBACK(delete_share), widgets); g_signal_connect((gpointer)new_share_button, "clicked", G_CALLBACK(new_share_clicked), widgets); g_signal_connect_swapped(G_OBJECT(add_share_button), "clicked", G_CALLBACK(add_share), widgets); g_signal_connect_swapped(G_OBJECT(apply_share_button), "clicked", G_CALLBACK(apply_share_settings), widgets); /* Sharename */ /* Max length and input 350 chars */ widgets->share_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->share_set_table), _(" Share name: "), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->share_set_entry[ent], _("The name of the Share"), NULL); a++; b++; ent++; /* Share path */ GtkWidget *sharepath_button; widgets->share_set_entry[ent] = gtk_entry_new(); sharepath_button = make_button_with_entry(GTK_TABLE(widgets->share_set_table), widgets->share_set_entry[ent], "gtk-refresh", _("Shared directory:"), _("Select a directory to share"), 0,1,a,b,350); a++; b++; ent++; g_signal_connect_swapped(G_OBJECT(sharepath_button), "clicked", G_CALLBACK(select_share_path_clicked), widgets); /* A comment */ widgets->share_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->share_set_table), _(" Comment: "), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->share_set_entry[ent], "A comment for this share", NULL); a++; b++; ent++; /* Add a description label for the treeviews */ GtkWidget *access_label1, *access_label2; access_label1 = gtk_label_new(NULL); access_label2 = gtk_label_new(NULL); /* Add a spacer label to the table */ gtk_label_set_text(GTK_LABEL(access_label1), ""); gtk_table_attach(GTK_TABLE(widgets->share_set_table), access_label1, 0, 2, a, b, -1, 1, 1, 0); a++; b++; gtk_label_set_text(GTK_LABEL(access_label2), _("Access permissions for users and groups in the selected share:")); gtk_table_attach(GTK_TABLE(widgets->share_set_table), access_label2, 0, 2, a, b, -1, 1, 1, 0); a++; b++; GtkWidget *access_hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(widgets->share_set_table), access_hseparator, 0, 2, a, b, -1, 1, 1, 0); a++; b++; /* Create a hbox that holds the user access scrolled windows and treeviews */ GtkWidget *user_access_hbox1, *user_access_hbox2; /* Valid users treeview (Access allowed) */ GtkCellRenderer *valid_users_cell_renderer; GtkWidget *valid_users_scrolled_window; /* Invalid users treeview (Access denied) */ GtkCellRenderer *invalid_users_cell_renderer; GtkWidget *invalid_users_scrolled_window; /* Write list treeview (Write access) */ GtkCellRenderer *write_users_cell_renderer; GtkWidget *write_users_scrolled_window; /* Admin users treeview (Administrators) */ GtkCellRenderer *admin_users_cell_renderer; GtkWidget *admin_users_scrolled_window; /* Create and add 2 hboxes to the table */ user_access_hbox1 = gtk_hbox_new(TRUE, 0); user_access_hbox2 = gtk_hbox_new(TRUE, 0); /* table, left, right, top, bottom, fill, expand, length, xpad, ypad */ gtk_table_attach(GTK_TABLE(widgets->share_set_table), user_access_hbox1, 0, 2, a, b, -1, 1, 20, 10); a++; b++; gtk_table_attach(GTK_TABLE(widgets->share_set_table), user_access_hbox2, 0, 2, a, b, -1, 1, 20, 10); a++; b++; /* Create and add the valid users treeview to hbox1 */ valid_users_scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(user_access_hbox1), valid_users_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(valid_users_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(valid_users_scrolled_window, -1, 120); widgets->valid_users_store = gtk_list_store_new(1, G_TYPE_STRING); widgets->valid_users_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->valid_users_treeview), GTK_TREE_MODEL(widgets->valid_users_store)); gtk_container_add(GTK_CONTAINER(valid_users_scrolled_window), widgets->valid_users_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->valid_users_treeview), TRUE); /* Set the column labels in the treeview */ valid_users_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *valid_users_col = gtk_tree_view_column_new_with_attributes(_("Access allowed"), valid_users_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->valid_users_treeview), GTK_TREE_VIEW_COLUMN(valid_users_col)); /* Set a number reference for the treeview to indicate what treeview was clicked */ g_object_set_data(G_OBJECT(widgets->valid_users_treeview), "column", (void*)(0)); g_signal_connect((gpointer)widgets->valid_users_treeview, "button_press_event", G_CALLBACK(share_access_treeview_row_clicked), widgets); /* Create and add invalid users treeview to hbox1 */ invalid_users_scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(user_access_hbox1), invalid_users_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(invalid_users_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(invalid_users_scrolled_window, -1, 120); widgets->invalid_users_store = gtk_list_store_new(1, G_TYPE_STRING); widgets->invalid_users_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->invalid_users_treeview), GTK_TREE_MODEL(widgets->invalid_users_store)); gtk_container_add(GTK_CONTAINER(invalid_users_scrolled_window), widgets->invalid_users_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->invalid_users_treeview), TRUE); /* Set the column labels in the treeview */ invalid_users_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *invalid_users_col = gtk_tree_view_column_new_with_attributes(_("Access denied"), invalid_users_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->invalid_users_treeview), GTK_TREE_VIEW_COLUMN(invalid_users_col)); gtk_tooltips_set_tip(tooltips, widgets->invalid_users_treeview, _("If a group has been allowed access you can deny access for some of the users in this group here"), NULL); /* Set a number reference for the treeview to indicate what treeview was clicked */ g_object_set_data(G_OBJECT(widgets->invalid_users_treeview), "column", (void*)(1)); g_signal_connect((gpointer)widgets->invalid_users_treeview, "button_press_event", G_CALLBACK(share_access_treeview_row_clicked), widgets); /* Create and add write list users treeview to hbox2 */ write_users_scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(user_access_hbox2), write_users_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(write_users_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(write_users_scrolled_window, -1, 120); widgets->write_users_store = gtk_list_store_new(1, G_TYPE_STRING); widgets->write_users_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->write_users_treeview), GTK_TREE_MODEL(widgets->write_users_store)); gtk_container_add(GTK_CONTAINER(write_users_scrolled_window), widgets->write_users_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->write_users_treeview), TRUE); /* Set the column labels in the treeview */ write_users_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *write_users_col = gtk_tree_view_column_new_with_attributes(_("Write access"), write_users_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->write_users_treeview), GTK_TREE_VIEW_COLUMN(write_users_col)); /* Set a number reference for the treeview to indicate what treeview was clicked */ g_object_set_data(G_OBJECT(widgets->write_users_treeview), "column", (void*)(2)); g_signal_connect((gpointer)widgets->write_users_treeview, "button_press_event", G_CALLBACK(share_access_treeview_row_clicked), widgets); /* Create and add admin users treeview to hbox2 */ admin_users_scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(user_access_hbox2), admin_users_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(admin_users_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(admin_users_scrolled_window, -1, 120); widgets->admin_users_store = gtk_list_store_new(1, G_TYPE_STRING); widgets->admin_users_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->admin_users_treeview), GTK_TREE_MODEL(widgets->admin_users_store)); gtk_container_add(GTK_CONTAINER(admin_users_scrolled_window), widgets->admin_users_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->admin_users_treeview), TRUE); /* Set the column labels in the treeview */ admin_users_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *admin_users_col = gtk_tree_view_column_new_with_attributes(_("Administrators"), admin_users_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->admin_users_treeview), GTK_TREE_VIEW_COLUMN(admin_users_col)); /* Set a number reference for the treeview to indicate what treeview was clicked */ g_object_set_data(G_OBJECT(widgets->admin_users_treeview), "column", (void*)(3)); g_signal_connect((gpointer)widgets->admin_users_treeview, "button_press_event", G_CALLBACK(share_access_treeview_row_clicked), widgets); a++; b++; GtkWidget *access_hbuttonbox = gtk_hbutton_box_new(); /* Custom "Delete access for users and groups" button */ del_access_button = gtk_button_new(); del_access_alignment = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(del_access_button), del_access_alignment); del_access_hbox = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(del_access_alignment), del_access_hbox); del_access_image = gtk_image_new_from_stock("gtk-remove", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(del_access_hbox), del_access_image, FALSE, FALSE, 0); del_access_label = gtk_label_new_with_mnemonic(_("Delete access permission")); gtk_box_pack_start(GTK_BOX(del_access_hbox), del_access_label, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(del_access_label), GTK_JUSTIFY_LEFT); /* Custom "Add access for users and groups" button */ add_access_button = gtk_button_new(); add_access_alignment = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(add_access_button), add_access_alignment); add_access_hbox = gtk_hbox_new(FALSE, 2); gtk_container_add(GTK_CONTAINER(add_access_alignment), add_access_hbox); add_access_image = gtk_image_new_from_stock("gtk-add", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(add_access_hbox), add_access_image, FALSE, FALSE, 0); add_access_label = gtk_label_new_with_mnemonic(_("Add access permissions")); gtk_box_pack_start(GTK_BOX(add_access_hbox), add_access_label, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(add_access_label), GTK_JUSTIFY_LEFT); /* Add the buttons to the table */ gtk_box_pack_start(GTK_BOX(access_hbuttonbox), del_access_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(access_hbuttonbox), add_access_button, FALSE, FALSE, 0); gtk_widget_set_size_request(access_hbuttonbox, -1, 40); gtk_button_box_set_layout(GTK_BUTTON_BOX(access_hbuttonbox), GTK_BUTTONBOX_SPREAD); gtk_table_attach(GTK_TABLE(widgets->share_set_table), access_hbuttonbox, 0, 2, a, b, -1, 1, 20, 10); g_signal_connect((gpointer)del_access_button, "clicked", G_CALLBACK(del_share_access_clicked), widgets); g_signal_connect_swapped(G_OBJECT(add_access_button), "clicked", G_CALLBACK(create_import_question), widgets); a++; b++; /* Directory mask */ widgets->share_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->share_set_table), _(" Directory mask: "), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->share_set_entry[ent], "A Directory mask like 0644 or 0755", NULL); a++; b++; ent++; /* Create mode */ widgets->share_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->share_set_table), _(" Create mode: "), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->share_set_entry[ent], "A creation mode like: 0644 or 0777", NULL); a++; b++; ent++; /* Force user */ widgets->share_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->share_set_table), _(" Force user: "), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->share_set_entry[ent], "All files and directories written to this share are owned by this user", NULL); a++; b++; ent++; /* Force group */ widgets->share_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->share_set_table), _(" Force group: "), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->share_set_entry[ent], "All files and directories written to this share are owned by this group", NULL); a++; b++; ent++; /* read only combo */ widgets->share_set_combo[comb] = make_label_combo_label(GTK_TABLE(widgets->share_set_table), _(" Read only: "), 0,1,a,b, 80); combo_text = g_strdup_printf(_("Yes")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("No")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* available combo */ widgets->share_set_combo[comb] = make_label_combo_label(GTK_TABLE(widgets->share_set_table), _(" Available: "), 0,1,a,b, 80); combo_text = g_strdup_printf(_("Yes")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("No")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* browseable combo */ widgets->share_set_combo[comb] = make_label_combo_label(GTK_TABLE(widgets->share_set_table), _(" Browseable: "), 0,1,a,b, 80); combo_text = g_strdup_printf(_("Yes")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("No")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* writable combo */ widgets->share_set_combo[comb] = make_label_combo_label(GTK_TABLE(widgets->share_set_table), _(" Writable: "), 0,1,a,b, 80); combo_text = g_strdup_printf(_("Yes")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("No")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* guest ok combo */ widgets->share_set_combo[comb] = make_label_combo_label(GTK_TABLE(widgets->share_set_table), _(" Guest ok: "), 0,1,a,b, 80); combo_text = g_strdup_printf(_("Yes")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("No")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* public combo */ widgets->share_set_combo[comb] = make_label_combo_label(GTK_TABLE(widgets->share_set_table), _(" Public: "), 0,1,a,b, 80); combo_text = g_strdup_printf(_("Yes")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("No")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* printable combo */ widgets->share_set_combo[comb] = make_label_combo_label(GTK_TABLE(widgets->share_set_table), _(" Printable: "), 0,1,a,b, 80); combo_text = g_strdup_printf(_("Yes")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("No")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* File locking combo */ widgets->share_set_combo[comb] = make_label_combo_label(GTK_TABLE(widgets->share_set_table), _(" File locking: "), 0,1,a,b, 80); combo_text = g_strdup_printf(_("Yes")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("No")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; /* Strict file locking */ widgets->share_set_combo[comb] = make_label_combo_label(GTK_TABLE(widgets->share_set_table), _(" Strict locking: "), 0,1,a,b, 80); combo_text = g_strdup_printf(_("Yes")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); combo_text = g_strdup_printf(_("No")); utf8 = g_locale_to_utf8(combo_text, strlen(combo_text), NULL, NULL, NULL); gtk_combo_box_append_text(GTK_COMBO_BOX(widgets->share_set_combo[comb]), utf8); g_free(combo_text); g_free(utf8); a++; b++; comb++; gtk_widget_show_all(widgets->main_window); } gadmin-samba-0.3.2/src/gettext.h0000644000000000000000000000272311527565344015176 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/make_settings_entries.c0000644000000000000000000000573511527565344020101 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/add_change_user.h0000644000000000000000000000213111527565344016576 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_change_user_H # define add_change_user_H extern struct w *widgets; void clear_user_profile(struct w *widgets); void account_locked_checkbutton_clicked(struct w *widgets); void add_change_user(struct w *widgets); #endif gadmin-samba-0.3.2/src/select_first_macct.c0000644000000000000000000000316311527565345017342 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct.h" extern char global_macct_name[1024]; void select_first_macct(struct w *widgets) { GtkTreePath *path; GtkTreeIter iter; GtkTreeModel *list_store; gchar *macct=NULL; path = gtk_tree_path_new_first(); list_store = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->macct_treeview)); if( ! gtk_tree_model_get_iter(list_store, &iter, path) ) { gtk_tree_path_free(path); strcpy(global_macct_name, ""); return; } gtk_tree_model_get(list_store, &iter, 0, &macct, -1); snprintf(global_macct_name, 1000, "%s$", (gchar *)macct); gtk_tree_path_free(path); g_free(macct); } gadmin-samba-0.3.2/src/delete_share.c0000644000000000000000000000571411527565344016134 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "allocate.h" #include "chars_are_digits.h" #include "delete_share.h" #include "reread_conf.h" #include "commented.h" #include "get_option_pos.h" #include "show_info.h" #include "functions.h" #include "populate_shares.h" #include "populate_share_settings.h" #include "commands.h" extern char global_share_name[1024]; void delete_share(struct w *widgets) { /* Deletes the selected share */ FILE *fp; char *line, *new_conf; long conf_size; int found_share = 0; if((fp=fopen(SAMBA_CONF, "r"))==NULL) { /* Dont show a popup */ printf("Error opening: [%s] for listing shares\n", SAMBA_CONF); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); new_conf = allocate(conf_size+1); gchar *share_name = g_strdup_printf("[%s]", global_share_name); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines */ if( commented(line) ) continue; /* The selected share is found */ if( strstr(line, share_name) ) { found_share = 1; while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines */ if( commented(line) ) continue; /* If a new share is found, break */ if( strstr(line, "[") && strstr(line, "]") && ! commented(line) ) { strcat(new_conf, line); break; } } } else strcat(new_conf, line); } fclose(fp); free(line); g_free(share_name); // if( ! found_share ) // { // Tell the user.... strcat(global_share_name, ""); // free(new_conf); // return; // } if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { /* Dont show a popup */ printf("Error writing: [%s] for deleting shares\n", SAMBA_CONF); return; } fputs(new_conf, fp); fclose(fp); free(new_conf); fix_newlines_in_conf(); populate_shares(widgets); populate_share_settings(widgets); reread_conf(widgets); } gadmin-samba-0.3.2/src/apply_server_settings.h0000644000000000000000000000200111527565344020132 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/apply_button_clicked.h0000644000000000000000000000174211527565344017710 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/delete_macct.c0000644000000000000000000000527611527565344016124 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "show_info.h" #include "allocate.h" #include "delete_macct.h" #include "populate_maccts.h" #include "select_first_macct.h" #include "populate_macct_settings.h" #include "commands.h" #include "system_defines.h" extern int activated; extern char global_macct_name[1024]; /* Delete the system and samba machine account */ void delete_macct(struct w *widgets) { FILE *fp; gchar *info, *cmd, *machine_acct; G_CONST_RETURN gchar *username; // Machine name, same thing almost /* Get the users widget settings */ username = gtk_entry_get_text(GTK_ENTRY(widgets->macct_set_entry[0])); machine_acct = g_strdup_printf("%s$", username); /* Delete the samba machine account if it exists. */ cmd = g_strdup_printf("%s -x '%s'", PDBEDIT_BINARY, machine_acct); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed deleting samba machine account: %s\n"), username); show_info(info); g_free(info); g_free(cmd); g_free(machine_acct); return; } pclose(fp); g_free(cmd); /* Delete the system machine account if it exists. */ if( user_exists(machine_acct) ) { /* Delete the system machine account */ cmd = g_strdup_printf("%s '%s'", "userdel", machine_acct); if( ! run_command(cmd) ) { printf("Error deleting the system machine account: %s\n", machine_acct); printf("The command was: %s\n", cmd); g_free(cmd); g_free(machine_acct); return; } g_free(cmd); } g_free(machine_acct); /* Update the machine account tab */ populate_maccts(widgets); select_first_macct(widgets); populate_macct_settings(widgets); } gadmin-samba-0.3.2/src/populate_macct_settings.c0000644000000000000000000000417611527565345020432 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct_settings.h" #include "chars_are_digits.h" #include "show_info.h" extern char global_macct_name[1024]; void populate_macct_settings(struct w *widgets) { gchar *info; gchar *utf8=NULL; int i=0; gchar *what, *val, *machine_name; machine_name = g_strdup_printf("%s", global_macct_name); info = g_strdup_printf("%s", global_macct_name); if( info == NULL || strlen(info) < 1 ) { /* User not specified, clear all widgets */ for( i=0; i<2; i++) gtk_entry_set_text(GTK_ENTRY(widgets->macct_set_entry[i]), ""); } g_free(info); /* Set the comment before modding the machine name */ what = g_strdup_printf("comment"); val = get_user_setting(machine_name, what); gtk_entry_set_text(GTK_ENTRY(widgets->macct_set_entry[1]), val); g_free(what); g_free(val); /* Set the machine name */ if( machine_name!=NULL && strlen(machine_name) > 1 ) machine_name[strlen(machine_name)-1]='\0'; gtk_entry_set_text(GTK_ENTRY(widgets->macct_set_entry[0]), machine_name); if( utf8!=NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/show_info.h0000644000000000000000000000171011527565345015501 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/standard_conf.h0000644000000000000000000000221111527565345016310 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 backup_samba_conf(struct w *widgets); void create_standard_conf_question(struct w *widgets); void add_standard_conf(struct w *widgets); #endif gadmin-samba-0.3.2/src/make_settings_labels.h0000644000000000000000000000226511527565345017673 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_make_settings_labels_H # define gadmin_samba_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-samba-0.3.2/src/make_settings_checkbuttons.h0000644000000000000000000000364111527565344021123 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/make_settings_buttons.h0000644000000000000000000000236311527565344020125 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/support.c0000644000000000000000000001132011527565345015213 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/delete_user.h0000644000000000000000000000216011527565344016005 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/show_help.c0000644000000000000000000001637711527565345015510 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-SAMBA 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( _("\nServer settings:\n"), _("If all you want to do is share some directories you only need to change\n"), _("the first visible part in the server settings tab and then press apply.\n"), _("When you scroll down more advanced options will be shown.\n"), _("\nUsers:\n"), _("Adding a user can be done by specifying its username, group, password\n"), _("and other settings, then clicking apply.\n"), _("After one user has been added this user can serve as a profile for other users.\n"), _("Select a user in the user list, change its username and password then click apply.\n"), _("Both users will then have the same settings except for the username and password.\n"), _("The new user button can be used to clear and insert default user settings, making it\n"), _("ready for adding new users.\n\n"), _("Deleting a user can be done by selecting it in the list and then clicking delete.\n"), _("The deleted user will also be deleted from any shared resource.\n\n"), _("Changing a users settings is done by changing the settings and clicking apply.\n"), _("When you add a user you can randomize its name and password or use your own.\n"), _("You can also select its login shell and where this user should have its home directory.\n"), _("If the selected shell is /dev/null or /sbin/nologin the user can only login to this\n"), _("server, otherwise the user can login via ssh etc if the server allows this user to do so.\n\n"), _("Shares:\n"), _("Shares can be added by selecting a directory to share, setting its share permissions and clicking add.\n"), _("Deleting a share is done by selecting the share to delete and clicking delete.\n"), _("Changing share settings can be done by changing its settings and then clicking the apply button.\n\n"), _("Adding user and group access to shares:\n"), _("Share access for users and groups can be added in several ways. Those ways are:\n"), _("local users and groups, remote domain users and groups and each of these can have 4 different\n"), _("permission classes. Multiple users and groups can be imported at once and duplicate additions are ignored.\n\n"), _("The new share button can be used to clear and insert default share settings, making it ready\n"), _("for adding new shares.\n\n"), _("Joining a samba domain with MSFT'tm(c)(r) (extreme copyright) clients:\n"), _("First disconnect all current connections on the client with: net use * /d\n"), _("As administrator, select properties for \"this computer\" and write example.org in the domain\n"), _("field then press join domain. Use root as username and the samba root password in the dialog.\n\n"), _("Joining the domain with Linux or other open source clients:\n"), _("net rpc join example.org -S samba24 -U root then supply the samba root password\n\n"), _("Mounting shares:\n"), _("If you want to add directories thats not under the users root directory you can do this:\n\n"), _("Linux (as of kernel 2.4.0):\n"), _("mount --bind /some/directory/to/share /home/bob/make_this_directory_first\n\n"), _("Alternatively:\nmount -o bind /var/data /home/bob/mounted_data\n\n"), _("*BSD (as of 4.4BSD):\nmount_null /var/data /home/bob/mounted_data\n\n"), _("Solaris:\nmount -F lofs /var/data /home/bob/mounted_data\n\n"), _("For more detailed information about the server and its configuration directives visit:\n"), _("http://www.samba.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-samba-0.3.2/src/clear_security_tab.c0000644000000000000000000000267311527565344017354 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 samba logfile */ FILE *fp; gchar *path; path = g_strdup_printf("/var/log/samba/samba.log"); if((fp=fopen(path, "w+"))==NULL) { g_free(path); return; } fclose(fp); g_free(path); populate_security(widgets); } gadmin-samba-0.3.2/src/add_standard_users.c0000644000000000000000000001640611527565344017341 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "allocate.h" #include "commands.h" #include "add_standard_users.h" #include "system_defines.h" #include "functions.h" #include "commented.h" #include "show_info.h" /* Check if we have a good smbusers username map file */ int smb_usermap_ok(gchar *path) { FILE *fp; char *line; long file_size; int valid_root = 0, valid_guest = 0; int retval = 0; if((fp=fopen(path, "r"))==NULL) { /* Dont show a dialog here */ return retval; } 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( strstr(line, "root") && strstr(line, "=") && strstr(line, "administrator") && ! commented(line) ) valid_root = 1; if( strstr(line, "nobody") && strstr(line, "=") && strstr(line, "smbguest") && ! commented(line) ) valid_guest = 1; } fclose(fp); free(line); if( valid_root && valid_guest ) retval = 1; return retval; } int add_standard_users() { /* The sambamachines group and users NOBODY and smbguest accounts must exist so add them if they are missing */ FILE *fp; gchar *cmd, *info, *path, *conf, *name; /* SYSCONFDIR/samba is required */ cmd = g_strdup_printf("mkdir -p '%s/samba'", SYSCONFDIR); if( ! run_command(cmd) ) { printf("Error creating directory: %s/samba\n", SYSCONFDIR); g_free(cmd); return 0; } g_free(cmd); /* SYSCONFDIR/samba/smbusers is required */ cmd = g_strdup_printf("touch %s/samba/smbusers", SYSCONFDIR); if( ! run_command(cmd) ) { printf("Error creating directory: %s/samba/smbusers\n", SYSCONFDIR); g_free(cmd); return 0; } g_free(cmd); /* SYSCONFDIR/samba/smb.conf is required */ cmd = g_strdup_printf("touch %s/samba/smb.conf", SYSCONFDIR); if( ! run_command(cmd) ) { printf("Error creating directory: %s/samba/smb.conf\n", SYSCONFDIR); g_free(cmd); return 0; } g_free(cmd); /* We want username mappings in /etc/samba/smbusers */ conf = g_strconcat( "# Unix_name = SMB_Name1 SMB_Name2 ...\n", "root = administrator\n", "nobody = guest smbguest pcguest\n", NULL); path = g_strdup_printf("%s", SAMBA_USERMAP); if( ! file_exists(path) || ! smb_usermap_ok(path) ) { if((fp=fopen(path, "w+"))==NULL) { info = g_strdup_printf(_("Failed adding default smbusers file here:\n%s\n"), SAMBA_USERMAP); show_info(info); g_free(info); g_free(path); g_free(conf); return 0; } fputs(conf, fp); fclose(fp); info = g_strdup_printf(_("A new smbusers map file was added here:\n%s\n It has the following contents: \"root = administrator\" and \"nobody = smbguest\".\n"), SAMBA_USERMAP); show_info(info); g_free(info); } g_free(path); g_free(conf); /* Add the NOBODY system group if it doesnt exist */ name = g_strdup_printf("%s", NOBODY); if( ! group_exists(name) ) { cmd = g_strdup_printf("%s %s", "groupadd", name); if( ! run_command(cmd) ) { printf("Error adding system group: %s\n", name); printf("The command was: %s\n", cmd); g_free(cmd); g_free(name); return 0; } g_free(cmd); } g_free(name); /* Add the NOBODY system user to the NOBODY group as a locked account */ name = g_strdup_printf("%s", NOBODY); if( ! user_exists(name) ) { cmd = g_strdup_printf("%s '%s' -d /dev/null -c Nobody -s /dev/null -g '%s'", "useradd", name, name); if( ! run_command(cmd) ) { printf("Error adding the system user: %s\n", name); printf("The command was: %s\n", cmd); g_free(cmd); g_free(name); return 0; } g_free(cmd); /* To be really sure we check it again with the same function */ if( ! user_exists(name) ) { info = g_strdup_printf(_("Failed adding the system user:\n%s\n"), name); show_info(info); g_free(info); g_free(name); return 0; } } g_free(name); /* Add the smbguest system user to the NOBODY group and lock the account */ name = g_strdup_printf("%s", "smbguest"); if( ! user_exists(name) ) { /* Add the system user to the NOBODY group */ cmd = g_strdup_printf("%s '%s' -d /dev/null -c 'Samba guest account' -s /dev/null -g '%s'", "useradd", name, NOBODY); if( ! run_command(cmd) ) { printf("Error adding the system user: %s\n", name); printf("The command was: %s\n", cmd); g_free(cmd); g_free(name); return 0; } g_free(cmd); /* To be really sure we check it again with the same function */ if( ! user_exists(name) ) { info = g_strdup_printf(_("Failed adding the system user:\n%s\n"), name); show_info(info); g_free(info); g_free(name); return 0; } } g_free(name); /* The smbguest user also needs to be added to the samba user/pass file as a locked user */ name = g_strdup_printf("%s", "smbguest"); if( ! smbuser_exists(name) ) { if( ! add_locked_samba_user(name) ) { printf("Error adding standard samba user: %s\n", name); } } g_free(name); /* The sambamachines account also needs to exist in order to automatically add valid(username+password) connecting computers BIOS-id's as computer accounts */ name = g_strdup_printf("%s", "sambamachines"); if( ! group_exists(name) ) { cmd = g_strdup_printf("%s %s", "groupadd", name); if( ! run_command(cmd) ) { printf("Error adding system group: %s\n", name); printf("The command was: %s\n", cmd); g_free(cmd); g_free(name); return 0; } g_free(cmd); } g_free(name); /* The samba root user also needs to be added to be able to join this domain */ name = g_strdup_printf("%s", "root"); if( ! smbuser_exists(name) ) { if( ! add_locked_samba_user(name) ) { printf("Error adding standard samba user: %s\n", name); } } g_free(name); return 1; } gadmin-samba-0.3.2/src/allocate.c0000644000000000000000000000225011527565344015264 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_conf_tab.h0000644000000000000000000000176711527565345017206 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/create_server_settings.c0000644000000000000000000011714611527565344020264 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "make_settings_entries.h" #include "make_settings_combos.h" #include "make_settings_spinbuttons.h" #include "make_settings_progressbars.h" #include "make_settings_labels.h" #include "make_settings_hseparators.h" #include "create_server_settings.h" #include "apply_server_settings.h" void create_server_settings(struct w *widgets) { GtkTooltips *tooltips; gchar *utf8 = NULL; 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 = 250; tooltips = gtk_tooltips_new(); /* Apply server settings button */ GtkWidget *apply_server_button = gtk_button_new_from_stock(GTK_STOCK_APPLY); g_signal_connect_swapped(G_OBJECT(apply_server_button), "clicked", G_CALLBACK(apply_server_settings), widgets); /* The servers hostname */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" The servers host name: "), 0,1,a,b,entry_size); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("IE: Samba24. Use this name to connect to this server from the clients"), NULL); /* Insert the apply button */ gtk_table_attach(GTK_TABLE(widgets->srv_set_table), apply_server_button, 2, 3, a, b, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 20, 2); a++; b++; ent++; /* The server comment */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Comment: "), 0,1,a,b,entry_size); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("A comment for this server, IE: SAMBA Server racoon city, 3rd floor 15th room, crazy scientist dudes"), NULL); a++; b++; ent++; /* Workgroup or domain name */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Workgroup or domain name: "), 0,1,a,b,entry_size); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("IE: work-group-name or sambaserver2.example.org (spaces arent allowed). If SAMBA is set up as a domain then use this domain name to connect to from the clients"), NULL); a++; b++; ent++;; /* Security level combo */ widgets->server_set_combo[comb] = make_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Security level: "), 0,1,a,b,50); /* Default SAMBA security level */ combo_text = g_strdup_printf(_("User")); 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); /* Backup Domain security level = Domain */ combo_text = g_strdup_printf(_("Backup Domain")); 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); /* Primary Domain security level = Domain */ combo_text = g_strdup_printf(_("Primary Domain")); 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); /* Active directory security level = ADS */ combo_text = g_strdup_printf(_("Active directory")); 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++;; /* Kerberos Realm for ADS */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Active directory kerberos realm: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("ADS Kerberos realm, IE: domain.example.org"), NULL); a++; b++; ent++; /* Allowed hosts and networks */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Allowed hosts and networks: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Hosts and networks allowed to connect to this server, IE: 127. 192.168.0."), NULL); a++; b++; ent++; /* Interfaces to listen on */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Handle connections on: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Network interfaces to listen on, IE: eth0 127.0.0.1/8 192.168.0.120/24"), NULL); a++; b++; ent++; /* Remote announce */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Announce this server to: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Announce this servers precence to the specified networks, IE: 192.168.0.255 192.168.2.44"), NULL); a++; b++; ent++; /* Retrieve announcements from (Remote browse sync) */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Retrieve announcements from: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Retrieve announcements from the specified networks, IE: 192.168.0.255 192.168.2.44"), NULL); a++; b++; ent++; /* Printcap file name */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Printcap filepath: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Path to the printcap file, IE: /etc/printcap"), NULL); a++; b++; ent++; /* Automatically load printer list */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Automatically load printer list: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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 options above are the only options simple sharing requires */ make_3columns_hseparator(GTK_TABLE(widgets->srv_set_table), 0, 1, a, b); a++; b++; make_3columns_label(GTK_TABLE(widgets->srv_set_table), _("Server settings for advanced administrators:"), 0, 1, a, b); a++; b++; /* CUPS Options */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" CUPS Options: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Raw")); 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++; /* Guest user */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Guest user: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The name of the guest user, IE: guest"), NULL); a++; b++; ent++; /* Logfile */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" SAMBA log file: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Path to the log file, IE: /var/log/samba/samba.log or /var/log/samba/%m.log for individual computer logs"), NULL); a++; b++; ent++; /* Max logfile size */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_(" Max logfile size: "), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("The maximum logfile size in Kb."), NULL); a++; b++; spin++; /* Null Passwords */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Allow empty passwords: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Username level */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_(" Username match level: "), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Username match level allows matching of _n_ characters of the username for all combinations of upper and lower case."), NULL); a++; b++; spin++; /* Password level */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_(" Password match level: "), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Password match level allows matching of _n_ characters of the password for all combinations of upper and lower case."), NULL); a++; b++; spin++; /* Encrypt passwords */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Encrypt passwords: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Password syncronization */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Syncronize passwords: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Socket options */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Socket transfer options: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The Socket transfer options, IE: TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192"), NULL); a++; b++; ent++; /* Local Master Browser */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Local master browser: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Domain master browser */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Domain master browser: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Preferred Master */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Preferred master: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Master browser election level (OS level) */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_(" Master browser election level: "), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Determines the precedence of this server in master browser elections."), NULL); a++; b++; spin++; /* Domain logons */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Domain logons: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Logon drive */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Logon drive: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The drive letter of the home directory, IE: h: or m:"), NULL); a++; b++; ent++; /* Logon home */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Logon home: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The path to the users home, \\\\%L\\homes\\%u"), NULL); a++; b++; ent++; /* Logon path */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Logon profile path: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The logon profile path, IE: \\\\%L\\profiles\\%u"), NULL); a++; b++; ent++; /* Logon script */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Logon script: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The logon script. IE: %U.bat (user_name.bat),%G.bat (group_name.bat), %m.bat (machine_name.bat) or just login.bat. Place the scripts in the netlogon directory"), NULL); a++; b++; ent++; /* Time server */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Time server: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* NetBIOS name resolve order */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" NetBIOS name resolve order: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The NetBIOS name resolve order, IE: wins lmhosts bcast"), NULL); a++; b++; ent++; /* WINS support */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" WINS support: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Wins servers */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Wins servers: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The Wins servers, IE: 192.168.0.130"), NULL); a++; b++; ent++; /* Act as a WINS proxy */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Act as a WINS proxy: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Act as a DNS proxy */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Act as a DNS proxy: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Case sensitive filenames */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Case sensitive filenames: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Client use spnego */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Client use spnego: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Client signing */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Client signing: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Client schannel */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Client schannel: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Server signing */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Server signing: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Server schannel */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Server schannel: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* NT pipe support */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Pipe support: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* NT status support */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Status support: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Allow trusted domains */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Allow trusted domains: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Obey PAM restrictions */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Obey PAM restrictions: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Enable spoolss */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Enable print spooler: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Client plain text auth */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Allow plain text authentication: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Disable netbios */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Disable netbios: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Follow symlinks */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Follow symlinks: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Update encrypted */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Update encrypted: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* PAM password change */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" PAM password change: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Password chat timeout */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_(" Password chat timeout: "), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Time until password chats time out."), NULL); a++; b++; spin++; /* Hostname lookups */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Hostname lookups: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Username map file */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" SAMBA username file: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The path to SAMBA's username file, IE: /etc/samba/smbusers"), NULL); a++; b++; ent++; /* DEPRECATED: Samba password file, leave these... */ a++; b++; ent++; /* The systems passwd program */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" The systems password program: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The path to the systems passwd program, IE: /usr/bin/passwd"), NULL); a++; b++; ent++; /* Leave these... */ a++; b++; ent++; /* Password chat phrase */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" New password phraze: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The new password phrase, IE: *new*password* \%n\\n *ReType*new*password* \%n\\n *password:*changed*sucessfully*"), NULL); a++; b++; ent++; /* Add user script */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Add user script: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Add user script, IE: /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null"), NULL); a++; b++; ent++; /* Add user to group script */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Add user to group script: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Add user to group script, IE: /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g'"), NULL); a++; b++; ent++; /* Add group script */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Add group script: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Add group script, IE: /usr/sbin/groupadd '%g'"), NULL); a++; b++; ent++; /* Delete user script */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Delete user script: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Delete user script, IE: /usr/sbin/userdel '%u'"), NULL); a++; b++; ent++; /* Delete user from group script */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Delete user from group script: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Delete user from group script, IE: /usr/sbin/userdel '%u' '%g'"), NULL); a++; b++; ent++; /* Delete group script */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Delete group script: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Delete group script, IE: /usr/sbin/groupdel '%g'"), NULL); a++; b++; ent++; /* Add machine account script */ widgets->server_set_entry[ent] = make_long_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Add machine account script: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("IE: /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M %u"), NULL); a++; b++; ent++; /* Machine password timeout */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_(" Machine password timeout: "), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Machine password timeout, IE: 120 (seconds)"), NULL); a++; b++; spin++; /* idmap_uid */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Username id range: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The users uids, IE: 16777216-33554431"), NULL); a++; b++; ent++; /* idmap_gid */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Group id range: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The users gids, IE: 16777216-33554431"), NULL); a++; b++; ent++; /* Template shell */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Template shell: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("The template shell, IE: /dev/null"), NULL); a++; b++; ent++; /* Winbind use default domain */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Winbind use default domain: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Winbind separator */ widgets->server_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->srv_set_table), _(" Winbind separator: "), 0,1,a,b,200); gtk_tooltips_set_tip(tooltips, widgets->server_set_entry[ent], _("Winbind separator, IE: @ for user@server.org"), NULL); a++; b++; ent++; /* Winbind cache time */ widgets->server_set_spinbutton[spin] = make_short_spinbutton_with_label(GTK_TABLE(widgets->srv_set_table),_(" Winbind cache timeout: "), 0,1,a,b,50); gtk_tooltips_set_tip(tooltips, widgets->server_set_spinbutton[spin], _("Time until winbind cache times out."), NULL); a++; b++; spin++; /* Winbind trusted domains only */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Winbind trusted domains only: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Winbind nested groups */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Winbind nested groups: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Winbind nss info */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Winbind nss info: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Winbind refresh tickets */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Winbind refresh tickets: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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++; /* Winbind offline logon */ widgets->server_set_combo[comb] = make_short_combo_with_label(GTK_TABLE(widgets->srv_set_table), _(" Winbind offline logon: "), 0,1,a,b,50); combo_text = g_strdup_printf(_("Yes")); 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(_("No")); 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-samba-0.3.2/src/populate_maccts.c0000644000000000000000000001061211527565345016665 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_maccts.h" #include "show_info.h" #include "commands.h" extern char global_macct_name[1024]; void populate_maccts(struct w *widgets) { /* Lists all the samba machine accounts in the macine account list */ FILE *fp; GtkTreeIter iter; GtkTreePath *path; char *line, *username; long conf_size; gboolean edit=0; int i, found_user=0; gchar *utf8=NULL; gchar *what, *val, *groupname; gtk_list_store_clear(widgets->macct_store); /* Puts the pdbedit userlist as: /etc/gadmin-samba/gadmin_samba_users */ get_gadmin_samba_users(); /* Populate the machine account list */ if((fp=fopen(GADMIN_SAMBA_USERS, "r"))==NULL) { /* Dont show a popup */ printf("Error opening: [%s] for listing machine accounts\n", GADMIN_SAMBA_USERS); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); username = allocate(conf_size+1); /* Add the machine accounts to the list */ if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines, skip regular user accounts */ if( strstr(line, "#") || ! strstr(line, "$") || strlen(line) < 10 ) continue; for(i=0; i < conf_size-1; i++) { if(line[i]==':') { found_user = 1; /* Add a row and insert the machine account (minus '$') in the list */ snprintf(username, i+1, "%s", line); utf8 = g_locale_to_utf8(username, strlen(username)-1, NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->macct_store), &iter); gtk_list_store_set(GTK_LIST_STORE(widgets->macct_store), &iter, 0, utf8, -1); /* Get the group number for this user then translate it into the group name and insert it in the list */ what = g_strdup_printf("group"); val = get_user_setting(username, what); groupname = get_group_name(val); utf8 = g_locale_to_utf8(groupname, strlen(groupname), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->macct_store), &iter, 1, utf8, -1); g_free(what); g_free(val); g_free(groupname); /* Get the users comment and insert it in the list */ what = g_strdup_printf("comment"); val = get_user_setting(username, what); utf8 = g_locale_to_utf8(val, strlen(val), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->macct_store), &iter, 2, utf8, -1); g_free(what); g_free(val); break; } } } fclose(fp); free(line); free(username); if( utf8 !=NULL ) g_free(utf8); /* Cant set treepath if there arent any users/rows, then itll crash */ /* Also unset global_macct_name */ if( ! found_user ) { strcat(global_macct_name, ""); return; } // else // { /* Set the name and comment in the machine account entries */ // gtk_entry_set_text(GTK_ENTRY(widgets->macct_set_entry[0]), global_macct_name); // what = g_strdup_printf("comment"); // val = get_user_setting((gchar *)global_macct_name, what); // gtk_entry_set_text(GTK_ENTRY(widgets->macct_set_entry[1]), val); // g_free(what); g_free(val); // } path = gtk_tree_path_new_first(); gtk_tree_view_set_cursor(GTK_TREE_VIEW(widgets->macct_treeview), path, NULL, edit); gtk_tree_path_free(path); } gadmin-samba-0.3.2/src/populate_user_settings.h0000644000000000000000000000200611527565345020314 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_shares.c0000644000000000000000000001113511527565345016701 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_shares.h" #include "populate_share_settings.h" #include "select_first_share.h" #include "show_info.h" #include "commands.h" #include "commented.h" #include "get_option_pos.h" extern char global_share_name[1024]; extern char global_share_comment[1024]; extern char global_share_directory[16384]; void populate_shares(struct w *widgets) { /* Lists all shares in the sharelist */ FILE *fp; GtkTreeIter iter; GtkTreePath *path; char *line, *sharepath; long conf_size, old_pos = 0, opt_pos; long i, share_begin, share_end; gboolean edit=0; int found_share = 0; gchar *utf8 = NULL; gtk_list_store_clear(widgets->share_store); /* Populate the sharelist */ if((fp=fopen(SAMBA_CONF, "r"))==NULL) { /* Dont show a popup */ printf("Error opening: [%s] for listing shares\n", SAMBA_CONF); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); sharepath = allocate(conf_size+1); /* Add the shares to the share list */ if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines */ if( commented(line) ) continue; /* A share is found (not the global settings) */ if( strstr(line, "[") && strstr(line, "]") && ! strstr(line, "global") && ! commented(line) ) { share_begin = 0; share_end = 0; for(i=0; i < conf_size; i++) { if( line[i]=='[' ) { share_begin = i+1; break; } } for(i=i+1; i < conf_size; i++) { if( line[i]==']' ) { share_end = i; break; } } if( share_end > share_begin ) { found_share = 1; snprintf(sharepath, share_end, "%s", &line[share_begin]); utf8 = g_locale_to_utf8(sharepath, strlen(sharepath), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->share_store), &iter); gtk_list_store_set(GTK_LIST_STORE(widgets->share_store), &iter, 0, utf8, -1); old_pos = ftell(fp); } /* Append the share settings */ if( found_share ) while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines */ if( commented(line) ) continue; /* If a new share is found, scroll back and break */ if( strstr(line, "[") && strstr(line, "]") ) { fseek(fp, old_pos, SEEK_SET); break; } /* Path */ if( strstr(line, "path") ) { opt_pos = get_option_pos(line); snprintf(sharepath, conf_size, "%s", &line[opt_pos]); utf8 = g_locale_to_utf8(sharepath, strlen(sharepath)-1, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->share_store), &iter, 1, utf8, -1); } // comment if( strstr(line, "comment") ) { opt_pos = get_option_pos(line); snprintf(sharepath, conf_size, "%s", &line[opt_pos]); utf8 = g_locale_to_utf8(sharepath, strlen(sharepath)-1, NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->share_store), &iter, 2, utf8, -1); } } } } fclose(fp); free(line); free(sharepath); 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_share ) { strcat(global_share_name, ""); strcat(global_share_directory, ""); strcat(global_share_comment, ""); return; } path = gtk_tree_path_new_first(); gtk_tree_view_set_cursor(GTK_TREE_VIEW(widgets->share_treeview), path, NULL, edit); gtk_tree_path_free(path); select_first_share(widgets); } gadmin-samba-0.3.2/src/create_main_window.c0000644000000000000000000002522311527566134017341 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "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_help.h" #include "settings_window.h" void create_main_window(struct w *widgets) { gchar *info, *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, 490); /* Set window information */ info = g_strdup_printf("GADMIN-SAMBA %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-samba", PACKAGE_DATA_DIR); add_pixmap_directory(pixmap_directory); g_free(pixmap_directory); pixbuf_cell_renderer = gtk_cell_renderer_pixbuf_new(); pixbuf = create_pixbuf("gadmin-samba.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 */ 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, _("Activate"), NULL, NULL, toolbar_icon_yes, NULL, NULL); g_signal_connect_swapped(G_OBJECT(activate_button), "clicked", G_CALLBACK(activate_button_clicked), widgets); /* Deactivate button */ 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, _("Deactivate"), NULL, NULL, toolbar_icon_no, NULL, NULL); g_signal_connect_swapped(G_OBJECT(deactivate_button), "clicked", G_CALLBACK(deactivate_button_clicked), widgets); /* Apply button */ GtkWidget *toolbar_apply_icon = gtk_image_new_from_stock("gtk-refresh", 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, _("Apply"), NULL, NULL, toolbar_apply_icon, NULL, NULL); g_signal_connect_swapped(G_OBJECT(apply_button), "clicked", G_CALLBACK(apply_button_clicked), widgets); /* Settings button */ GtkWidget *toolbar_settings_icon = gtk_image_new_from_stock("gtk-index", gtk_toolbar_get_icon_size(GTK_TOOLBAR(main_toolbar))); GtkWidget *settings_button = gtk_toolbar_append_element(GTK_TOOLBAR(main_toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Settings"), NULL, NULL, toolbar_settings_icon, NULL, NULL); g_signal_connect_swapped(G_OBJECT(settings_button), "clicked", G_CALLBACK(show_settings_window), widgets); /* Help button */ 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, _("Help"), NULL, NULL, toolbar_icon_help, NULL, NULL); g_signal_connect_swapped(G_OBJECT(help_button), "clicked", G_CALLBACK(show_help), widgets); /* About button */ 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, _("About"), NULL, NULL, toolbar_icon_about, NULL, NULL); g_signal_connect_swapped(G_OBJECT(about_button), "clicked", G_CALLBACK(show_credits), widgets); /* Quit button */ 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, _("Quit"), NULL, NULL, toolbar_icon_quit, NULL, NULL); g_signal_connect_swapped(G_OBJECT(quit_button), "clicked", G_CALLBACK(gtk_main_quit), NULL); /* 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); widgets->notebook_vbox8 = gtk_vbox_new(FALSE, 0); widgets->notebook_vbox9 = 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); // gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK(main_notebook), notebook_vbox, // TRUE, TRUE, GTK_PACK_START); GtkWidget *server_label = gtk_label_new(_("Server settings")); GtkWidget *user_label = gtk_label_new(_("Users")); GtkWidget *resource_label = gtk_label_new(_("Shares")); GtkWidget *maccts_label = gtk_label_new(_("Machines")); GtkWidget *dom_mgmt_label = gtk_label_new(_("Domains")); GtkWidget *conn_label = gtk_label_new(_("Connections")); GtkWidget *disc_label = gtk_label_new(_("Disc")); GtkWidget *security_label = gtk_label_new(_("Security")); GtkWidget *conf_label = gtk_label_new(_("Configuration")); 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, resource_label, 2); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox4, maccts_label, 3); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox5, dom_mgmt_label, 4); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox6, conn_label, 5); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox7, disc_label, 6); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox8, security_label, 7); gtk_notebook_insert_page(GTK_NOTEBOOK(main_notebook), widgets->notebook_vbox9, conf_label, 8); // Do we want to have the notebook labels expanded ??? // gtk_widget_set_size_request(GTK_WIDGET(server_label), -1, -1); // gtk_label_set_justify (GTK_LABEL (server_label), GTK_JUSTIFY_LEFT); /* Set version and status labels */ widgets->version_label = gtk_label_new(_("Information: cant read version")); 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); 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); 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); 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-samba-0.3.2/src/create_del_system_user_question.h0000644000000000000000000000206711527565344022173 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/create_share_settings.h0000644000000000000000000000200211527565344020045 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_share_settings_H # define create_share_settings_H extern struct w *widgets; void create_share_settings(struct w *widgets); #endif gadmin-samba-0.3.2/src/activate_button_clicked.c0000644000000000000000000000604011527565344020352 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "commands.h" #include "activate_button_clicked.h" #include "add_standard_users.h" #include "functions.h" #include "show_info.h" #include "commands.h" extern int activated; extern int global_start_winbindd; void activate_button_clicked(struct w *widgets) { gchar *start, *test; if( activated ) return; /* If theres no file, nothing is reported so show info if thats the case */ if( ! file_exists(SAMBA_CONF) ) { test = g_strdup_printf("Cant start the server, missing configuration file:\n%s\n", SAMBA_CONF); show_info(test); g_free(test); return; } // FIXME: Use conf paths from settings. /* Start SMBD */ start = g_strdup_printf("%s -D -s %s", SMBD_BINARY, SAMBA_CONF); if( ! run_command(start) ) { printf("Starting samba (smbd) failed using this command: %s\n", start); test = g_strdup_printf("%s -D -s %s 2>&1", SMBD_BINARY, SAMBA_CONF); run_command_show_err(test); g_free(test); g_free(start); /* We dont want it started by init if its not working */ init_stop(widgets); return; } g_free(start); /* Start NMBD */ start = g_strdup_printf("%s -D -s %s", NMBD_BINARY, SAMBA_CONF); if( ! run_command(start) ) { printf("Starting samba (nmbd) failed using this command: %s\n", start); test = g_strdup_printf("%s -D -s %s 2>&1", NMBD_BINARY, SAMBA_CONF); run_command_show_err(test); g_free(test); g_free(start); return; } g_free(start); /* We want it started by init at boot */ init_start(widgets); /* Start WinBindD if the settings sais so */ if( global_start_winbindd ) { start = g_strdup_printf("%s -D -s %s", WINBINDD_BINARY, SAMBA_CONF); if( ! run_command(start) ) { printf("Starting winbindd failed using this command: %s\nThe main SAMBA servers are working ok.\n", start); test = g_strdup_printf("%s -D -s %s 2>&1", WINBINDD_BINARY, SAMBA_CONF); run_command_show_err(test); g_free(test); g_free(start); return; } g_free(start); } } gadmin-samba-0.3.2/src/set_version.h0000644000000000000000000000177711527565345016063 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_set_version_H # define gadmin_samba_set_version_H extern struct w *widgets; void set_version(struct w *widgets); #endif gadmin-samba-0.3.2/src/create_server_settings.h0000644000000000000000000000200611527565344020255 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/user_treeview_row_clicked.h0000644000000000000000000000210111527565345020736 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/add_standard_users.h0000644000000000000000000000171511527565344017343 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 int add_standard_users(); #endif gadmin-samba-0.3.2/src/populate_share_settings.c0000644000000000000000000003551011527565345020441 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_shares.h" #include "populate_share_settings.h" #include "show_info.h" #include "commands.h" #include "commented.h" #include "get_option_pos.h" extern char global_share_name[1024]; void populate_share_settings(struct w *widgets) { /* Lists all share settings */ FILE *fp; char *line, *shareopt; long conf_size, opt_pos, i, x, z; int found_share = 0; GtkTreeIter iter; gchar *utf8 = NULL; /* Clear all share entries */ for(i=0; i<7; i++) gtk_entry_set_text(GTK_ENTRY(widgets->share_set_entry[i]), ""); /* Set all share combos to the most restrictive setting ("off", "no", etc) */ for(i=0; i<9; i++) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[i]), 1); /* Clear the user access treeviews */ gtk_list_store_clear(widgets->valid_users_store); gtk_list_store_clear(widgets->invalid_users_store); gtk_list_store_clear(widgets->write_users_store); gtk_list_store_clear(widgets->admin_users_store); /* Populate the share settings */ if((fp=fopen(SAMBA_CONF, "r"))==NULL) { /* Dont show a popup */ printf("Error opening: [%s] for listing shares\n", SAMBA_CONF); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); shareopt = allocate(conf_size+10); gchar *share_name = g_strdup_printf("[%s]", global_share_name); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines */ if( commented(line) ) continue; /* The selected share is found */ if( ! strstr(line, share_name) ) continue; found_share = 1; snprintf(shareopt, conf_size, "%s", &line[1]); utf8 = g_locale_to_utf8(shareopt, strlen(shareopt)-2, NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->share_set_entry[0]), utf8); /* Append the share settings */ while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines */ if( commented(line) ) continue; /* If a new share is found, scroll back and break */ if( strstr(line, "[") && strstr(line, "]") ) { fseek(fp, 0, SEEK_END); break; } /* Only handle options */ if( ! strstr(line, "=") ) continue; /* Path */ if( cmplowercase(line, "path") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); utf8 = g_locale_to_utf8(shareopt, strlen(shareopt)-1, NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->share_set_entry[1]), utf8); } /* Comment */ if( cmplowercase(line, "comment") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); utf8 = g_locale_to_utf8(shareopt, strlen(shareopt)-1, NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->share_set_entry[2]), utf8); } /* Valid users */ if( cmplowercase(line, "valid users") && ! cmplowercase(line,"invalid users") ) { while( 1 ) { i = 0; x = 0; z = 0; /* Scroll to the first username, take '\' continued lines into account */ if( strstr(line, "=") ) { for(i=0; line[i]!='\0'; i++) if( line[i]=='=' ) break; } for(i=i; line[i]!='\0'; i++) if( line[i+1]!=' ' ) break; /* Begin at the first username */ for(x=i; line[x]!='\0'; x++) { if( (line[x]==' ' && line[x+1]!=' ') || (x==0 && line[x]!=' ' && ! strstr(line, "=")) ) for(z=x; line[z]!='\0'; z++) { if( z <= x ) continue; /* Get the end of the usernames */ if( line[z]!=' ' && (line[z+1]==' ' || line[z+1]=='\0') ) { if( x == 0 ) snprintf(shareopt, (z+2)-x, "%s", &line[x]); else snprintf(shareopt, (z+1)-x, "%s", &line[x+1]); if( shareopt[strlen(shareopt)-1]=='\n' ) shareopt[strlen(shareopt)-1]='\0'; if( strlen(shareopt) > 0 && ! strstr(shareopt, "\\") ) { utf8 = g_locale_to_utf8(shareopt, strlen(shareopt), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->valid_users_store), &iter); gtk_list_store_set(GTK_LIST_STORE(widgets->valid_users_store), &iter, 0, utf8, -1); } break; } } } /* Handle continued lines "\" or break */ if( ! strstr(line, "\\") ) break; else while(fgets(line, conf_size, fp)!=NULL) { if( commented(line) ) continue; break; } } } /* Invalid users */ if( cmplowercase(line, "invalid users") ) { while( 1 ) { i = 0; x = 0; z = 0; /* Scroll to the first username, take '\' continued lines into account */ if( strstr(line, "=") ) { for(i=0; line[i]!='\0'; i++) if( line[i]=='=' ) break; } for(i=i; line[i]!='\0'; i++) if( line[i+1]!=' ' ) break; /* Begin at the first username */ for(x=i; line[x]!='\0'; x++) { if( (line[x]==' ' && line[x+1]!=' ') || (x==0 && line[x]!=' ' && ! strstr(line, "=")) ) for(z=x; line[z]!='\0'; z++) { if( z <= x ) continue; /* Get the end of the usernames */ if( line[z]!=' ' && (line[z+1]==' ' || line[z+1]=='\0') ) { if( x == 0 ) snprintf(shareopt, (z+2)-x, "%s", &line[x]); else snprintf(shareopt, (z+1)-x, "%s", &line[x+1]); if( shareopt[strlen(shareopt)-1]=='\n' ) shareopt[strlen(shareopt)-1]='\0'; if( strlen(shareopt) > 0 && ! strstr(shareopt, "\\") ) { utf8 = g_locale_to_utf8(shareopt, strlen(shareopt), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->invalid_users_store), &iter); gtk_list_store_set(GTK_LIST_STORE(widgets->invalid_users_store), &iter, 0, utf8, -1); } break; } } } /* Handle continued lines "\" or break */ if( ! strstr(line, "\\") ) break; else while(fgets(line, conf_size, fp)!=NULL) { if( commented(line) ) continue; break; } } } /* Write list */ if( cmplowercase(line, "write list") ) { while( 1 ) { i = 0; x = 0; z = 0; /* Scroll to the first username, take '\' continued lines into account */ if( strstr(line, "=") ) { for(i=0; line[i]!='\0'; i++) if( line[i]=='=' ) break; } for(i=i; line[i]!='\0'; i++) if( line[i+1]!=' ' ) break; /* Begin at the first username */ for(x=i; line[x]!='\0'; x++) { if( (line[x]==' ' && line[x+1]!=' ') || (x==0 && line[x]!=' ' && ! strstr(line, "=")) ) for(z=x; line[z]!='\0'; z++) { if( z <= x ) continue; /* Get the end of the usernames */ if( line[z]!=' ' && (line[z+1]==' ' || line[z+1]=='\0') ) { if( x == 0 ) snprintf(shareopt, (z+2)-x, "%s", &line[x]); else snprintf(shareopt, (z+1)-x, "%s", &line[x+1]); if( shareopt[strlen(shareopt)-1]=='\n' ) shareopt[strlen(shareopt)-1]='\0'; if( strlen(shareopt) > 0 && ! strstr(shareopt, "\\") ) { utf8 = g_locale_to_utf8(shareopt, strlen(shareopt), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->write_users_store), &iter); gtk_list_store_set(GTK_LIST_STORE(widgets->write_users_store), &iter, 0, utf8, -1); } break; } } } /* Handle continued lines "\" or break */ if( ! strstr(line, "\\") ) break; else while(fgets(line, conf_size, fp)!=NULL) { if( commented(line) ) continue; break; } } } /* Admin users */ if( cmplowercase(line, "admin users") ) { while( 1 ) { i = 0; x = 0; z = 0; /* Scroll to the first username, take '\' continued lines into account */ if( strstr(line, "=") ) { for(i=0; line[i]!='\0'; i++) if( line[i]=='=' ) break; } for(i=i; line[i]!='\0'; i++) if( line[i+1]!=' ' ) break; /* Begin at the first username */ for(x=i; line[x]!='\0'; x++) { if( (line[x]==' ' && line[x+1]!=' ') || (x==0 && line[x]!=' ' && ! strstr(line, "=")) ) for(z=x; line[z]!='\0'; z++) { if( z <= x ) continue; /* Get the end of the usernames */ if( line[z]!=' ' && (line[z+1]==' ' || line[z+1]=='\0') ) { if( x == 0 ) snprintf(shareopt, (z+2)-x, "%s", &line[x]); else snprintf(shareopt, (z+1)-x, "%s", &line[x+1]); if( shareopt[strlen(shareopt)-1]=='\n' ) shareopt[strlen(shareopt)-1]='\0'; if( strlen(shareopt) > 0 && ! strstr(shareopt, "\\") ) { utf8 = g_locale_to_utf8(shareopt, strlen(shareopt), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->admin_users_store), &iter); gtk_list_store_set(GTK_LIST_STORE(widgets->admin_users_store), &iter, 0, utf8, -1); } break; } } } /* Handle continued lines "\" or break */ if( ! strstr(line, "\\") ) break; else while(fgets(line, conf_size, fp)!=NULL) { if( commented(line) ) continue; break; } } } /* Directory mask */ if( cmplowercase(line, "directory mask") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); utf8 = g_locale_to_utf8(shareopt, strlen(shareopt)-1, NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->share_set_entry[3]), utf8); } /* Create mode */ if( cmplowercase(line, "create mode") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); utf8 = g_locale_to_utf8(shareopt, strlen(shareopt)-1, NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->share_set_entry[4]), utf8); } /* Read only */ if( cmplowercase(line, "read only") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); if( strstr(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[0]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[0]), 1); } /* Available */ if( cmplowercase(line, "available") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); if( strstr(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[1]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[1]), 1); } /* Browseable */ if( cmplowercase(line, "browseable") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); if( strstr(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[2]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[2]), 1); } /* Writable */ if( cmplowercase(line, "writable") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); if( strstr(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[3]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[3]), 1); } /* Guest ok */ if( cmplowercase(line, "guest ok") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); if( strstr(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[4]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[4]), 1); } /* Public */ if( cmplowercase(line, "public") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); if( strstr(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[5]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[5]), 1); } /* Printable */ if( cmplowercase(line, "printable") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); if( strstr(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[6]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[6]), 1); } /* File locking */ if( cmplowercase(line, "locking") && ! cmplowercase(line, "strict") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); if( strstr(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[7]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[7]), 1); } /* Strict file locking. Was ~the same as the deprecated "share modes" */ if( cmplowercase(line, "strict locking") || cmplowercase(line, "share modes") ) { opt_pos = get_option_pos(line); snprintf(shareopt, conf_size, "%s", &line[opt_pos]); if( strstr(line, "yes") ) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[8]), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->share_set_combo[8]), 1); } } } fclose(fp); free(line); free(shareopt); g_free(share_name); if( utf8 !=NULL ) g_free(utf8); /* if( ! found_share ) .. Fix later if required { } */ } gadmin-samba-0.3.2/src/create_disc_tab.c0000644000000000000000000001075211527565344016601 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_vbox7), 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_vbox7), 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-samba-0.3.2/src/import_functions.c0000644000000000000000000002247211527565344017112 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "show_info.h" #include "import_functions.h" #include "get_option_pos.h" #include "commands.h" #include "commented.h" #include "apply_share_settings.h" #include "populate_users.h" #include "select_first_user.h" #include "populate_user_settings.h" #include "populate_shares.h" #include "populate_share_settings.h" #include "populate_conf_tab.h" extern int activated; extern char global_share_name[1024]; extern int global_import_local; extern int global_import_remote; extern int global_import_users; extern int global_import_groups; extern int global_import_valid; extern int global_import_invalid; extern int global_import_write; extern int global_import_admin; long num_imported = 0; int new_smbuser_added = 0; /* Checks if the user or group name is listed in a treeview */ int in_access_list(gchar *name, GtkListStore *list_store) { int retval = 0; gchar *temp_name; GtkTreeIter iter; if( list_store ) { if( gtk_tree_model_get_iter_first(GTK_TREE_MODEL(list_store), &iter) ) { do { gtk_tree_model_get(GTK_TREE_MODEL(list_store), &iter, 0, &temp_name, -1); if( temp_name ) { if( ! strcmp(name, temp_name) ) { retval = 1; break; } } } while(gtk_tree_model_iter_next(GTK_TREE_MODEL(list_store), &iter)); } } return retval; } /* The selected names in the import list are added to the share access treeviews with the selected permissions */ void do_import(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets) { FILE *fp; int imported = 0; gchar *utf8, *cmd, *name, *mod_name; /* Get users or groups depending on what is selected */ if( global_import_users ) gtk_tree_model_get(model, iter, 0, &name, -1); else if( global_import_groups ) gtk_tree_model_get(model, iter, 1, &name, -1); /* Add an @ char infront of group names */ if( global_import_users && global_import_local ) { /* The all users macro is used. FIX: Check if its the first row. */ if( strstr(name, "All users") ) mod_name = g_strdup_printf("%%U"); else mod_name = g_strdup_printf("%s", name); } else if( global_import_groups && global_import_local ) { /* The all groups macro is used. FIX: Check if its the first row. */ if( strstr(name, "All groups") ) mod_name = g_strdup_printf("%%G"); else mod_name = g_strdup_printf("@%s", name); } else { /* FIX: Add global_import_remote */ mod_name = g_strdup_printf("Avoid compile warning\n"); g_free(name); g_free(mod_name); return; } /* If the name is empty and its a local user import. */ if( strlen(mod_name) == 0 && global_import_users && global_import_local ) { printf("The import name was empty\n"); g_free(name); g_free(mod_name); return; } /* If the name only contains an '@' or is empty and its a local group import. */ if( strlen(mod_name) < 2 && global_import_groups && global_import_local ) { printf("The import name was empty\n"); g_free(name); g_free(mod_name); return; } // Fixme: Add remote defs.. /* Machine accounts arent allowed */ if( strstr((char *)name, "$") ) { printf("An import name containing $ is not allowed as it is a machine account.\n"); g_free(name); g_free(mod_name); return; } /* Add the name to the valid treeview if not there already */ if( ! in_access_list(mod_name, widgets->valid_users_store) && global_import_valid ) { utf8 = g_locale_to_utf8(mod_name, strlen(mod_name), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->valid_users_store), iter); gtk_list_store_set(GTK_LIST_STORE(widgets->valid_users_store), iter, 0, utf8, -1); if( utf8!=NULL ) g_free(utf8); imported = 1; } /* Add the name to the invalid treeview if not there already */ if( ! in_access_list(mod_name, widgets->invalid_users_store) && global_import_invalid ) { utf8 = g_locale_to_utf8(mod_name, strlen(mod_name), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->invalid_users_store), iter); gtk_list_store_set(GTK_LIST_STORE(widgets->invalid_users_store), iter, 0, utf8, -1); if( utf8!=NULL ) g_free(utf8); imported = 1; } /* Add the name to the write treeview if not there already */ if( ! in_access_list(mod_name, widgets->write_users_store) && global_import_write ) { utf8 = g_locale_to_utf8(mod_name, strlen(mod_name), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->write_users_store), iter); gtk_list_store_set(GTK_LIST_STORE(widgets->write_users_store), iter, 0, utf8, -1); if( utf8!=NULL ) g_free(utf8); imported = 1; } /* Add the name to the admin treeview if not there already */ if( ! in_access_list(mod_name, widgets->admin_users_store) && global_import_admin ) { utf8 = g_locale_to_utf8(mod_name, strlen(mod_name), NULL, NULL, NULL); gtk_list_store_append(GTK_LIST_STORE(widgets->admin_users_store), iter); gtk_list_store_set(GTK_LIST_STORE(widgets->admin_users_store), iter, 0, utf8, -1); if( utf8!=NULL ) g_free(utf8); imported = 1; } if( imported ) num_imported++; /* Return if a macro such as %U etc is used */ if( strstr((char *)name, "All users") || strstr((char *)name, "All groups") ) { /* No popup */ g_free(name); g_free(mod_name); return; } /* If its user import and this samba user doesnt exist, add it with an empty password */ if( ! smbuser_exists(name) && global_import_local && global_import_users ) { new_smbuser_added = 1; if( add_null_password_samba_user(name) ) new_smbuser_added = 1; /* Also create its /var/lib/samba/profiles/UserName directory */ cmd = g_strdup_printf("mkdir -p '%s%s/%s'", LOCALSTATEDIR, "/lib/samba/profiles", name); if((fp=popen(cmd, "w"))==NULL) perror("popen"); else pclose(fp); g_free(cmd); /* Chown this users directory to user:user so it can write the profile contents there */ cmd = g_strdup_printf("chown %s:%s %s%s/%s", name, name, LOCALSTATEDIR, "/lib/samba/profiles", name); if((fp=popen(cmd, "w"))==NULL) perror("popen"); else pclose(fp); g_free(cmd); } g_free(name); g_free(mod_name); } /* Call foreach on the group or user names in the import treeview */ void import_button_clicked(GtkButton *button, struct w *widgets) { GtkTreeSelection *selection; gchar *info=NULL; if( global_import_remote ) { info = g_strdup_printf(_("Remote operations are not yet supported.\n")); show_info(info); g_free(info); return; } /* Global counter */ num_imported = 0; new_smbuser_added = 0; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->import_treeview)); gtk_tree_selection_selected_foreach(GTK_TREE_SELECTION(selection), (GtkTreeSelectionForeachFunc) &do_import, widgets); /* Destroy the import window */ gtk_widget_destroy(widgets->import_window); if( new_smbuser_added ) { info = g_strdup_printf(_("New samba users where added with empty passwords.\nSee server settings and empty passwords.\n")); show_info(info); g_free(info); } if( global_import_users ) info = g_strdup_printf(_("Number of added users: %ld\n"), num_imported); else info = g_strdup_printf(_("Number of added groups: %ld\n"), num_imported); show_info(info); g_free(info); /* If anything was imported, update relevant parts of the gui */ if( num_imported ) { /* Apply the share so new access is written */ apply_share_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); // Done in add_share(); populate_shares(widgets); // Done in add_share(); populate_share_settings(widgets); populate_conf_tab(widgets); } } gadmin-samba-0.3.2/src/create_del_system_user_question.c0000644000000000000000000001240011527565344022156 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/Makefile0000644000000000000000000006052711527566145015007 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-samba pkgincludedir = $(includedir)/gadmin-samba pkglibdir = $(libdir)/gadmin-samba pkglibexecdir = $(libexecdir)/gadmin-samba 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-samba$(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_samba_OBJECTS = gadmin_samba.$(OBJEXT) widgets.$(OBJEXT) \ support.$(OBJEXT) create_main_window.$(OBJEXT) \ create_server_tab.$(OBJEXT) populate_gadmin_samba.$(OBJEXT) \ create_server_settings.$(OBJEXT) \ populate_server_settings.$(OBJEXT) \ apply_server_settings.$(OBJEXT) create_user_tab.$(OBJEXT) \ populate_users.$(OBJEXT) user_treeview_row_clicked.$(OBJEXT) \ create_user_settings.$(OBJEXT) \ populate_user_settings.$(OBJEXT) select_first_user.$(OBJEXT) \ add_change_user.$(OBJEXT) delete_user.$(OBJEXT) \ create_del_system_user_question.$(OBJEXT) \ make_settings_buttons.$(OBJEXT) \ make_settings_entries.$(OBJEXT) make_settings_combos.$(OBJEXT) \ make_settings_spinbuttons.$(OBJEXT) \ make_settings_checkbuttons.$(OBJEXT) \ make_settings_progressbars.$(OBJEXT) \ make_settings_labels.$(OBJEXT) \ make_settings_hseparators.$(OBJEXT) create_macct_tab.$(OBJEXT) \ populate_maccts.$(OBJEXT) macct_treeview_row_clicked.$(OBJEXT) \ create_macct_settings.$(OBJEXT) \ populate_macct_settings.$(OBJEXT) select_first_macct.$(OBJEXT) \ add_macct.$(OBJEXT) delete_macct.$(OBJEXT) \ change_macct.$(OBJEXT) create_conn_tab.$(OBJEXT) \ populate_conns.$(OBJEXT) create_disc_tab.$(OBJEXT) \ populate_disc_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) \ status_update.$(OBJEXT) apply_button_clicked.$(OBJEXT) \ reread_conf.$(OBJEXT) commands.$(OBJEXT) functions.$(OBJEXT) \ credits_window.$(OBJEXT) activate_button_clicked.$(OBJEXT) \ deactivate_button_clicked.$(OBJEXT) show_info.$(OBJEXT) \ chars_are_digits.$(OBJEXT) allocate.$(OBJEXT) \ commented.$(OBJEXT) get_option_pos.$(OBJEXT) \ system_defines.$(OBJEXT) create_import_question.$(OBJEXT) \ create_import_selection.$(OBJEXT) import_functions.$(OBJEXT) \ standard_conf.$(OBJEXT) add_standard_users.$(OBJEXT) \ settings_window.$(OBJEXT) load_settings.$(OBJEXT) \ save_settings.$(OBJEXT) create_share_tab.$(OBJEXT) \ share_treeview_row_clicked.$(OBJEXT) populate_shares.$(OBJEXT) \ create_share_settings.$(OBJEXT) select_first_share.$(OBJEXT) \ populate_share_settings.$(OBJEXT) add_share.$(OBJEXT) \ delete_share.$(OBJEXT) apply_share_settings.$(OBJEXT) \ populate_shell_combo.$(OBJEXT) file_chooser.$(OBJEXT) \ show_help.$(OBJEXT) gadmin_samba_OBJECTS = $(am_gadmin_samba_OBJECTS) gadmin_samba_DEPENDENCIES = 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_samba_SOURCES) DIST_SOURCES = $(gadmin_samba_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = ${SHELL} /root/PROJEKT/gadmin-samba/gadmin-samba-0.3.2/missing --run aclocal-1.11 AMTAR = ${SHELL} /root/PROJEKT/gadmin-samba/gadmin-samba-0.3.2/missing --run tar AUTOCONF = ${SHELL} /root/PROJEKT/gadmin-samba/gadmin-samba-0.3.2/missing --run autoconf AUTOHEADER = ${SHELL} /root/PROJEKT/gadmin-samba/gadmin-samba-0.3.2/missing --run autoheader AUTOMAKE = ${SHELL} /root/PROJEKT/gadmin-samba/gadmin-samba-0.3.2/missing --run automake-1.11 AWK = gawk CATALOGS = fr.gmo de.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-samba GMOFILES = fr.gmo de.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-samba/gadmin-samba-0.3.2/missing --run makeinfo MKDIR_P = /bin/mkdir -p MKINSTALLDIRS = ./mkinstalldirs MSGFMT = /usr/bin/msgfmt MSGFMT_OPTS = -c OBJEXT = o PACKAGE = gadmin-samba 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 POFILES = fr.po de.po POSUB = po PO_IN_DATADIR_FALSE = PO_IN_DATADIR_TRUE = SET_MAKE = SHELL = /bin/sh STRIP = SYSCONFDIR = /etc USE_NLS = yes VERSION = 0.3.2 XGETTEXT = /usr/bin/xgettext abs_builddir = /root/PROJEKT/gadmin-samba/gadmin-samba-0.3.2/src abs_srcdir = /root/PROJEKT/gadmin-samba/gadmin-samba-0.3.2/src abs_top_builddir = /root/PROJEKT/gadmin-samba/gadmin-samba-0.3.2 abs_top_srcdir = /root/PROJEKT/gadmin-samba/gadmin-samba-0.3.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-samba/gadmin-samba-0.3.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_samba_SOURCES = \ gadmin_samba.c gadmin_samba.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_gadmin_samba.c populate_gadmin_samba.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 \ create_user_tab.c create_user_tab.h \ populate_users.c populate_users.h \ user_treeview_row_clicked.c user_treeview_row_clicked.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 \ add_change_user.c add_change_user.h \ delete_user.c delete_user.h \ create_del_system_user_question.c create_del_system_user_question.h \ make_settings_buttons.c make_settings_buttons.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_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_macct_tab.c create_macct_tab.h \ populate_maccts.c populate_maccts.h \ macct_treeview_row_clicked.c macct_treeview_row_clicked.h \ create_macct_settings.c create_macct_settings.h \ populate_macct_settings.c populate_macct_settings.h \ select_first_macct.c select_first_macct.h \ add_macct.c add_macct.h \ delete_macct.c delete_macct.h \ change_macct.c change_macct.h \ create_conn_tab.c create_conn_tab.h \ populate_conns.c populate_conns.h \ create_disc_tab.c create_disc_tab.h \ populate_disc_tab.c populate_disc_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 \ status_update.c status_update.h \ apply_button_clicked.c apply_button_clicked.h \ reread_conf.c reread_conf.h \ commands.c commands.h \ functions.c functions.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 \ commented.c commented.h \ get_option_pos.c get_option_pos.h \ system_defines.c system_defines.h \ create_import_question.c create_import_question.h \ create_import_selection.c create_import_selection.h \ import_functions.c import_functions.h \ standard_conf.c standard_conf.h \ add_standard_users.c add_standard_users.h \ settings_window.c settings_window.h \ load_settings.c load_settings.h \ save_settings.c save_settings.h \ create_share_tab.c create_share_tab.h \ share_treeview_row_clicked.c share_treeview_row_clicked.h \ populate_shares.c populate_shares.h \ create_share_settings.c create_share_settings.h \ select_first_share.c select_first_share.h \ populate_share_settings.c populate_share_settings.h \ add_share.c add_share.h \ delete_share.c delete_share.h \ apply_share_settings.c apply_share_settings.h \ populate_shell_combo.c populate_shell_combo.h \ file_chooser.c file_chooser.h \ show_help.c show_help.h gadmin_samba_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-samba$(EXEEXT): $(gadmin_samba_OBJECTS) $(gadmin_samba_DEPENDENCIES) @rm -f gadmin-samba$(EXEEXT) $(LINK) $(gadmin_samba_OBJECTS) $(gadmin_samba_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c include ./$(DEPDIR)/activate_button_clicked.Po include ./$(DEPDIR)/add_change_user.Po include ./$(DEPDIR)/add_macct.Po include ./$(DEPDIR)/add_share.Po include ./$(DEPDIR)/add_standard_users.Po include ./$(DEPDIR)/allocate.Po include ./$(DEPDIR)/apply_button_clicked.Po include ./$(DEPDIR)/apply_server_settings.Po include ./$(DEPDIR)/apply_share_settings.Po include ./$(DEPDIR)/change_macct.Po include ./$(DEPDIR)/chars_are_digits.Po include ./$(DEPDIR)/clear_security_tab.Po include ./$(DEPDIR)/commands.Po include ./$(DEPDIR)/commented.Po include ./$(DEPDIR)/create_conf_tab.Po include ./$(DEPDIR)/create_conn_tab.Po include ./$(DEPDIR)/create_del_system_user_question.Po include ./$(DEPDIR)/create_disc_tab.Po include ./$(DEPDIR)/create_import_question.Po include ./$(DEPDIR)/create_import_selection.Po include ./$(DEPDIR)/create_macct_settings.Po include ./$(DEPDIR)/create_macct_tab.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_share_settings.Po include ./$(DEPDIR)/create_share_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_macct.Po include ./$(DEPDIR)/delete_share.Po include ./$(DEPDIR)/delete_user.Po include ./$(DEPDIR)/file_chooser.Po include ./$(DEPDIR)/functions.Po include ./$(DEPDIR)/gadmin_samba.Po include ./$(DEPDIR)/get_option_pos.Po include ./$(DEPDIR)/import_functions.Po include ./$(DEPDIR)/load_settings.Po include ./$(DEPDIR)/macct_treeview_row_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_conns.Po include ./$(DEPDIR)/populate_disc_tab.Po include ./$(DEPDIR)/populate_gadmin_samba.Po include ./$(DEPDIR)/populate_macct_settings.Po include ./$(DEPDIR)/populate_maccts.Po include ./$(DEPDIR)/populate_security_tab.Po include ./$(DEPDIR)/populate_server_settings.Po include ./$(DEPDIR)/populate_share_settings.Po include ./$(DEPDIR)/populate_shares.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)/save_settings.Po include ./$(DEPDIR)/select_first_macct.Po include ./$(DEPDIR)/select_first_share.Po include ./$(DEPDIR)/select_first_user.Po include ./$(DEPDIR)/set_version.Po include ./$(DEPDIR)/settings_window.Po include ./$(DEPDIR)/share_treeview_row_clicked.Po include ./$(DEPDIR)/show_help.Po include ./$(DEPDIR)/show_info.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-samba-0.3.2/src/create_import_selection.c0000644000000000000000000002447211527565344020414 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "show_info.h" #include "import_functions.h" #include "create_import_selection.h" // Use global decl #define NOBODY "nobody" extern int global_import_local; extern int global_import_remote; extern int global_import_users; extern int global_import_groups; extern int global_import_valid; extern int global_import_invalid; extern int global_import_write; extern int global_import_admin; /* Destroy both import windows */ void import_cancel_button_clicked(GtkButton *button, struct w *widgets) { if( ! GTK_IS_WIDGET(widgets->import_question_window) ) { gtk_widget_destroy(widgets->import_window); return; } gtk_widget_destroy(widgets->import_question_window); } /* User and group import selector */ void create_import_selection(struct w *widgets) { /* Create and populate the import selector */ FILE *fp; long conf_size; char *old_buffer, *new_buffer, *groupnr, *group_name; int i; GtkTreeIter iter; GtkTreeSelection *selection; gchar *import_msg=NULL, *utf8=NULL; GtkTreeViewColumn *user_col, *group_col; GtkCellRenderer *import_cell_renderer; GtkWidget *import_vbox; GtkWidget *import_label0; GtkWidget *import_scrolledwindow; 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; /* Destroy the first question window */ gtk_widget_destroy(widgets->import_question_window); tooltips = gtk_tooltips_new(); widgets->import_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(widgets->import_window, 560, 350); /* Set some descriptive texts in the window based on what was selected */ if( global_import_local && global_import_users ) import_msg = g_strdup_printf(_("Select any local users you want to import")); if( global_import_local && global_import_groups ) import_msg = g_strdup_printf(_("Select any local groups you want to import")); if( global_import_remote && global_import_users ) import_msg = g_strdup_printf(_("Select any remote users you want to import")); if( global_import_remote && global_import_groups ) import_msg = g_strdup_printf(_("Select any remote groups you want to import")); utf8 = g_locale_to_utf8(import_msg, strlen(import_msg), NULL, NULL, NULL); g_free(import_msg); /* Set a variable window title */ gtk_window_set_title(GTK_WINDOW(widgets->import_window), utf8); 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(utf8); 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(_("Group"), import_cell_renderer, "text", 1, 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); 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 cancel button */ 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); /* The import button */ 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); /* Variable import button text */ if( global_import_users ) import_msg = g_strdup_printf("Import users"); else import_msg = g_strdup_printf("Import groups"); utf8 = g_locale_to_utf8(import_msg, strlen(import_msg), NULL, NULL, NULL); g_free(import_msg); label2 = gtk_label_new_with_mnemonic(utf8); gtk_box_pack_start(GTK_BOX (hbox2), label2, FALSE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label2), GTK_JUSTIFY_LEFT); /* Callback is located in import_functions.c */ g_signal_connect((gpointer)import_button, "clicked", G_CALLBACK(import_button_clicked), widgets); /* Callback is located in this file */ g_signal_connect((gpointer)import_cancel_button, "clicked", G_CALLBACK(import_cancel_button_clicked), widgets); gtk_widget_show_all(widgets->import_window); /* Populate the import treeview with LOCAL users and groups except machine accounts */ if( global_import_local ) { /* First add macros for all users and groups. FIX: Make translatable after modifying the recieving functions. */ gtk_list_store_append(GTK_LIST_STORE(widgets->import_store), &iter); import_msg = g_strdup_printf("All users"); utf8 = g_locale_to_utf8(import_msg, strlen(import_msg), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->import_store), &iter, 0, utf8, -1); g_free(import_msg); import_msg = g_strdup_printf("All groups"); utf8 = g_locale_to_utf8(import_msg, strlen(import_msg), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->import_store), &iter, 1, utf8, -1); g_free(import_msg); if((fp=fopen(PASSWD_FILE, "r"))==NULL) { printf("Cant open passwd here:\n%s\n", PASSWD_FILE); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); old_buffer = allocate(conf_size); new_buffer = allocate(8192); if( conf_size > 1 ) 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, NOBODY) ) continue; /* Dont insert any machine account groups */ if( strstr(new_buffer, "$") ) 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); groupnr = get_user_setting(new_buffer, "group"); group_name = get_group_name(groupnr); free(groupnr); utf8 = g_locale_to_utf8(group_name, strlen(group_name), NULL, NULL, NULL); gtk_list_store_set(GTK_LIST_STORE(widgets->import_store), &iter, 1, utf8, -1); free(group_name); } } fclose(fp); free(old_buffer); free(new_buffer); } /* Populate the import treeview with REMOTE users and groups */ if( global_import_remote ) { import_msg = g_strdup_printf("Remote population is incomplete.\n"); show_info(import_msg); g_free(import_msg); } if( utf8 != NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/deactivate_button_clicked.c0000644000000000000000000000434711527565344020673 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "commands.h" #include "show_info.h" #include "commands.h" extern int activated; extern int global_smbd_activated; extern int global_nmbd_activated; extern int global_winbindd_activated; void deactivate_button_clicked(struct w *widgets) { gchar *stop, *info; /* We dont want it started by init at boot */ init_stop(widgets); if( ! activated ) return; /* Killall -15 makes a graceful shutdown but leaves the users logged on. This is not the desired result for the admin here, hence -9 */ if( global_winbindd_activated ) { stop = g_strdup_printf("killall -9 %s", WINBINDD_BINARY); if( ! run_command(stop) ) { info = g_strdup_printf("Stopping samba (winbindd) failed.\n"); show_info(info); g_free(info); } g_free(stop); } stop = g_strdup_printf("killall -9 %s", SMBD_BINARY); if( ! run_command(stop) ) { info = g_strdup_printf("Stopping samba (smbd) failed.\n"); show_info(info); g_free(info); } g_free(stop); if( global_nmbd_activated ) { stop = g_strdup_printf("killall -9 %s", NMBD_BINARY); if( ! run_command(stop) ) { info = g_strdup_printf("Stopping samba (nmbd) failed.\n"); show_info(info); g_free(info); } g_free(stop); } } gadmin-samba-0.3.2/src/create_conn_tab.h0000644000000000000000000000176111527565344016621 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_conn_tab_H # define create_conn_tab_H extern struct w *widgets; void create_conn_tab(struct w *widgets); #endif gadmin-samba-0.3.2/src/make_settings_hseparators.c0000644000000000000000000000256711527565344020763 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/add_macct.c0000644000000000000000000001036611527565344015406 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "show_info.h" #include "allocate.h" #include "add_macct.h" #include "populate_maccts.h" #include "select_first_macct.h" #include "populate_macct_settings.h" #include "commands.h" #include "system_defines.h" extern int activated; /* Add the system and samba machine account */ void add_macct(struct w *widgets) { FILE *fp; gchar *info, *path, *cmd, *machine_acct, *groupname; G_CONST_RETURN gchar *username; // Machine name, same thing except ($) G_CONST_RETURN gchar *comment; /* Get the users widget settings */ username = gtk_entry_get_text(GTK_ENTRY(widgets->macct_set_entry[0])); comment = gtk_entry_get_text(GTK_ENTRY(widgets->macct_set_entry[1])); get_gadmin_samba_users(); path = g_strdup_printf("%s", GADMIN_SAMBA_USERS); if( ! file_exists(path) ) make_file_chmod(path, "0600"); if( ! file_exists(path) ) { info = g_strdup_printf(_("Failed creating missing file:\n%s\n"), path); show_info(info); g_free(info); g_free(path); return; } g_free(path); machine_acct = g_strdup_printf("%s$", username); groupname = g_strdup_printf("%s", "sambamachines"); /* If the machine account exists, tell the user and return. */ if( user_exists(username) ) { info = g_strdup_printf(_("This machine account already exists.\n")); show_info(info); g_free(info); g_free(machine_acct); g_free(groupname); return; } /* Add the system group sambamachines if it doesnt exist */ if( ! group_exists(groupname) ) { cmd = g_strdup_printf("%s %s", "groupadd", groupname); if( ! run_command(cmd) ) { printf("Error adding system group: %s\n", groupname); printf("The command was: %s\n", cmd); g_free(cmd); g_free(machine_acct); g_free(groupname); return; } g_free(cmd); } /* Add the system machine account to the sambamachines group */ cmd = g_strdup_printf("%s '%s' -d '%s' -c '%s' -s '%s' -g '%s'", "useradd", machine_acct, FALSESHELL, comment, FALSESHELL, groupname); if( ! run_command(cmd) ) { printf("Error adding the system machine account: %s\n", machine_acct); printf("The command was: %s\n", cmd); g_free(cmd); g_free(machine_acct); g_free(groupname); return; } g_free(cmd); /* Make sure that the system machine account exists */ if( ! user_exists(machine_acct) ) { info = g_strdup_printf(_("Error adding system machine account: %s\n"), machine_acct); show_info(info); g_free(info); g_free(machine_acct); g_free(groupname); return; } /* Add the samba machine account. (No '$' or password is used) */ cmd = g_strdup_printf("%s -a -m '%s'", PDBEDIT_BINARY, username); if((fp=popen(cmd, "w"))==NULL) { perror("popen"); info = g_strdup_printf(_("Failed adding samba machine account: %s\n"), username); show_info(info); g_free(info); g_free(cmd); g_free(machine_acct); g_free(groupname); return; } pclose(fp); g_free(cmd); g_free(machine_acct); g_free(groupname); /* Update the machine account tab */ populate_maccts(widgets); select_first_macct(widgets); populate_macct_settings(widgets); } gadmin-samba-0.3.2/src/select_first_share.c0000644000000000000000000000406411527565345017356 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_share.h" extern char global_share_name[1024]; extern char global_share_comment[1024]; extern char global_share_directory[16384]; void select_first_share(struct w *widgets) { GtkTreePath *path; GtkTreeIter iter; GtkTreeModel *list_store; gchar *share_name=NULL; gchar *share_directory=NULL; gchar *share_comment=NULL; path = gtk_tree_path_new_first(); list_store = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->share_treeview)); if( ! gtk_tree_model_get_iter(list_store, &iter, path) ) { gtk_tree_path_free(path); strcpy(global_share_name, ""); return; } gtk_tree_model_get(list_store, &iter, 0, &share_name, -1); gtk_tree_model_get(list_store, &iter, 1, &share_comment, -1); gtk_tree_model_get(list_store, &iter, 1, &share_directory, -1); snprintf(global_share_name, 1000, "%s", (gchar *)share_name); snprintf(global_share_comment, 1000, "%s", (gchar *)share_comment); snprintf(global_share_directory, 16000, "%s", (gchar *)share_directory); gtk_tree_path_free(path); g_free(share_name); } gadmin-samba-0.3.2/src/reread_conf.h0000644000000000000000000000177411527565345015767 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_reread_conf_H # define gadmin_samba_reread_conf_H extern struct w *widgets; void reread_conf(struct w *widgets); #endif gadmin-samba-0.3.2/src/commands.h0000644000000000000000000000234111527565344015307 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 int run_command(gchar *command); void run_command_show_err(gchar *command); int file_exists(char *infile); int using_tls(void); void init_start(struct w *widgets); void init_stop(struct w *widgets); void get_gadmin_samba_users(); int add_locked_samba_user(gchar *username); int add_null_password_samba_user(gchar *username); #endif gadmin-samba-0.3.2/src/make_settings_spinbuttons.h0000644000000000000000000000366211527565345021023 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_spinbutton(GtkTable *table, gint left_attach, gint right_attach, gint top_attach, gint bottom_attach, gint entry_length); #endif gadmin-samba-0.3.2/src/add_share.h0000644000000000000000000000173711527565344015430 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_share_H # define add_share_H extern struct w *widgets; void add_share(struct w *widgets); #endif gadmin-samba-0.3.2/src/get_option_pos.c0000644000000000000000000000260111527565344016530 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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) { long i=0; /* Locate the position at "=" + 1 */ if( line!=NULL && strlen(line) > 0 ) { for(i=0; line[i]!='\0'; i++) { if( line[i]=='=' ) { i++; break; } } } /* Locate the position of the first char after "=" */ if( line!=NULL && strlen(line) > 0 ) { for(i=i; line[i]!='\0'; i++) { if( line[i]!=' ' ) break; } } return i; } gadmin-samba-0.3.2/src/populate_gadmin_samba.h0000644000000000000000000000203011527565345020015 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_H # define populate_gadmin_samba_H extern struct w *widgets; void populate_gadmin_samba(struct w *widgets); #endif gadmin-samba-0.3.2/src/load_settings.c0000644000000000000000000000372611527565344016350 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "commands.h" #include "allocate.h" #include "load_settings.h" extern int global_start_winbindd; //extern char RESOLV_PATH_BUF[1024]; void load_settings(struct w *widgets) { FILE *fp; long conf_size; char *line; gchar *settings_file; /* APPCONFDIR is defined at compiletime */ settings_file = g_strdup_printf("%s/settings.conf", APPCONFDIR); if((fp=fopen(settings_file, "r"))==NULL) { /* No need to notify the user, itll be created on save */ g_free(settings_file); return; } 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) { if( strlen(line) > 1000 ) continue; if( strstr(line, "start_winbindd:") ) { if( strstr(line, "yes") ) global_start_winbindd = 1; else global_start_winbindd = 0; } } fclose(fp); free(line); g_free(settings_file); } gadmin-samba-0.3.2/src/save_settings.h0000644000000000000000000000175311527565345016373 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_settings_H # define save_settings_H extern struct w *widgets; void save_settings(struct w *widgets); #endif gadmin-samba-0.3.2/src/apply_button_clicked.c0000644000000000000000000000207111527565344017677 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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" void apply_button_clicked(struct w *widgets) { reread_conf(widgets); } gadmin-samba-0.3.2/src/create_macct_settings.h0000644000000000000000000000200311527565344020033 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct_settings_H # define create_macct_settings_H extern struct w *widgets; void create_macct_settings(struct w *widgets); #endif gadmin-samba-0.3.2/src/set_version.c0000644000000000000000000000553511527565345016052 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "show_info.h" extern int MAX_READ_POPEN; void set_version(struct w *widgets) { FILE *fp; char *version; int ver_found=0; gchar *command; gchar *ver=NULL; gchar *utf8=NULL; gchar *info; /* smbd and nmbd should always be the same version so only check one. */ command = g_strdup_printf("%s -V 2>&1", SMBD_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( strstr(version, "Version") ) { /* Insert trimmed version */ ver = g_strdup_printf(_(" Information: SAMBA %s"), &version[8]); if( ver!=NULL && strlen(ver) > 50 ) ver[50]='\0'; 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; } } if( ! ver_found ) { ver = g_strdup_printf(_(" samba (smbd) 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); /* Make the labels background red and show the text in bold. Naah, dump bold */ // gchar *markup_text = g_strdup_printf("%s", ver); gchar *markup_text = g_strdup_printf("%s", ver); gchar *plain_text; PangoAttrList *attr_list; pango_parse_markup(markup_text, -1, 0, &attr_list, &plain_text, NULL, NULL); gtk_label_set_attributes(GTK_LABEL(widgets->version_label), attr_list); } free(version); g_free(ver); pclose(fp); } gadmin-samba-0.3.2/src/file_chooser.h0000644000000000000000000000222611527565344016151 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/populate_user_settings.c0000644000000000000000000001360511527565345020316 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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" extern char global_user_name[1024]; extern gulong account_disabled_toggled_signal; void populate_user_settings(struct w *widgets) { gchar *info, *utf8, *atext; int i=0, locked = 0; gchar *what, *val; info = g_strdup_printf("%s", global_user_name); if( info == NULL || strlen(info) < 1 ) { /* User not specified, clear all widgets */ for( i=0; i<5; i++) gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[i]), ""); } g_free(info); /* Get and insert the users settings */ gchar *username = g_strdup_printf("%s", global_user_name); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[0]), username); /* Locked account checkbox and label modifications, see if the account is locked. */ locked = smbuser_locked(username); /* Block the togglebuttons signal so it doesnt run its functions. */ /* This idiocy was added around 2005 ? ... Whomever thought this was a great ideea for GTK+ should be shot on sight i think. */ g_signal_handler_block(GTK_WIDGET(widgets->user_set_checkbutton[0]), account_disabled_toggled_signal); if( locked && ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0])) ) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0]), TRUE); if( ! locked && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0])) ) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->user_set_checkbutton[0]), FALSE); /* Unblock the togglebuttons signal */ g_signal_handler_unblock(GTK_WIDGET(widgets->user_set_checkbutton[0]), account_disabled_toggled_signal); if( locked == 1 ) { /* Samba user account is locked but has a previous password. */ atext = g_strdup_printf(_("Account locked:")); utf8 = g_locale_to_utf8(atext, strlen(atext), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->acclock_label), utf8); if( atext!=NULL ) g_free(atext); if( utf8!=NULL ) g_free(utf8); } else if( locked == 2 ) { /* Samba user account is locked but has no previous password. */ atext = g_strdup_printf(_("Missing password:")); utf8 = g_locale_to_utf8(atext, strlen(atext), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->acclock_label), utf8); if( atext!=NULL ) g_free(atext); if( utf8!=NULL ) g_free(utf8); } else if( locked == 3 ) { /* A samba user with a Null password is considered locked but show that it has an empty password */ atext = g_strdup_printf(_("Empty password:")); utf8 = g_locale_to_utf8(atext, strlen(atext), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->acclock_label), utf8); if( atext!=NULL ) g_free(atext); if( utf8!=NULL ) g_free(utf8); } else { /* Regular samba user is not locked (locked == 0 ) */ atext = g_strdup_printf(_("Account locked:")); utf8 = g_locale_to_utf8(atext, strlen(atext), NULL, NULL, NULL); gtk_label_set_text(GTK_LABEL(widgets->acclock_label), utf8); if( atext!=NULL ) g_free(atext); if( utf8!=NULL ) g_free(utf8); } what = g_strdup_printf("group"); val = get_user_setting(username, what); gchar *groupname = get_group_name(val); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[2]), groupname); g_free(what); g_free(val); g_free(groupname); 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); what = g_strdup_printf("homedir"); val = get_user_setting(username, what); gtk_entry_set_text(GTK_ENTRY(widgets->user_set_entry[4]), val); g_free(what); g_free(val); what = g_strdup_printf("shell"); val = get_user_setting(username, what); g_free(what); g_free(username); /* 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) ) { gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->user_set_combo[0]), &shell_iter); break; } } if( shell!=NULL ) g_free(shell); } while(gtk_tree_model_iter_next(GTK_TREE_MODEL(shell_store), &shell_iter)); } } g_free(val); } gadmin-samba-0.3.2/src/create_macct_settings.c0000644000000000000000000000646011527565344020041 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "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 "create_macct_settings.h" #include "add_macct.h" #include "delete_macct.h" #include "change_macct.h" #include "functions.h" void create_macct_settings(struct w *widgets) { GtkTooltips *tooltips; // gchar *utf8 = NULL; GtkWidget *hbuttonbox; GtkWidget *delete_macct_button; GtkWidget *add_macct_button; GtkWidget *apply_macct_button; int a = 0; int b = 1; int ent = 0; tooltips = gtk_tooltips_new(); /* The delete and apply machine account settings buttons */ delete_macct_button = gtk_button_new_from_stock(GTK_STOCK_DELETE); add_macct_button = gtk_button_new_from_stock(GTK_STOCK_ADD); apply_macct_button = gtk_button_new_from_stock(GTK_STOCK_APPLY); hbuttonbox = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(hbuttonbox), delete_macct_button, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbuttonbox), add_macct_button, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbuttonbox), apply_macct_button, TRUE, TRUE, 0); gtk_table_attach(GTK_TABLE(widgets->macct_set_table), hbuttonbox, 0, 3, a, b, 0, 0, 5, 5); a++; b++; g_signal_connect_swapped(G_OBJECT(delete_macct_button), "clicked", G_CALLBACK(delete_macct), widgets); g_signal_connect_swapped(G_OBJECT(add_macct_button), "clicked", G_CALLBACK(add_macct), widgets); g_signal_connect_swapped(G_OBJECT(apply_macct_button), "clicked", G_CALLBACK(change_macct), widgets); /* Machine account name */ widgets->macct_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->macct_set_table), _(" Machine name: "), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->macct_set_entry[ent], "IE: SomeMachine", NULL); /* Must be able to type a new one to add gtk_widget_set_sensitive(widgets->macct_set_entry[ent], FALSE); */ a++; b++; ent++; /* Comment */ widgets->macct_set_entry[ent] = make_entry_with_label(GTK_TABLE(widgets->macct_set_table), _(" Comment: "), 0,1,a,b,350); gtk_tooltips_set_tip(tooltips, widgets->macct_set_entry[ent], "IE: The name of the user on the client machine", NULL); a++; b++; ent++; gtk_widget_show_all(widgets->main_window); } gadmin-samba-0.3.2/src/commented.h0000644000000000000000000000172711527565344015470 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_COMMENTED_H # define gadmin_samba_COMMENTED_H int commented(char *line); #endif gadmin-samba-0.3.2/src/create_conn_tab.c0000644000000000000000000001417611527565344016620 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "create_conn_tab.h" #include "populate_conns.h" #include "commands.h" /* Wether or not to let the connection section expand */ #define EXPAND_CONN_SECTION TRUE void disconnect_conn(struct w *widgets); void kill_pid(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets); void disconnect_conn(struct w *widgets) { GtkTreeSelection *selection; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->conns_treeview)); gtk_tree_selection_selected_foreach(GTK_TREE_SELECTION(selection), (GtkTreeSelectionForeachFunc) &kill_pid, widgets); /* We need to sleep some before we can update the gui */ sleep(1); populate_conns(widgets); } /* The contents of the selections in the list is iterated and the selected PIDs are killed */ void kill_pid(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets) { gchar *pid, *cmd; gtk_tree_model_get(model, iter, 0, &pid, -1); /* SIGTERM the PID */ cmd = g_strdup_printf("kill -15 %s", pid); if( ! run_command(cmd) ) { printf("Error killing PID: %s\n", pid); } g_free(cmd); g_free(pid); } void create_conn_tab(struct w *widgets) { GtkCellRenderer *conn_cell_renderer; GtkWidget *conn_treeview_hbox; GtkWidget *conn_scrolled_window; GtkTreeSelection *selection; gchar *utf8=NULL; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* Create the conn treeview in a scrolled window */ conn_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox6), conn_treeview_hbox, EXPAND_CONN_SECTION, TRUE, 0); conn_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(conn_treeview_hbox), conn_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(conn_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); widgets->conns_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->conns_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->conns_treeview), GTK_TREE_MODEL(widgets->conns_store)); /* Selection is multiple */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->conns_treeview)); gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_MULTIPLE); gtk_container_add(GTK_CONTAINER(conn_scrolled_window), widgets->conns_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->conns_treeview), TRUE); /* Set the column labels in the treeview */ conn_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *pid_col = gtk_tree_view_column_new_with_attributes(_("Process ID"), conn_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->conns_treeview), GTK_TREE_VIEW_COLUMN(pid_col)); GtkTreeViewColumn *user_col = gtk_tree_view_column_new_with_attributes(_("User"), conn_cell_renderer, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->conns_treeview), GTK_TREE_VIEW_COLUMN(user_col)); GtkTreeViewColumn *group_col = gtk_tree_view_column_new_with_attributes(_("Group"), conn_cell_renderer, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->conns_treeview), GTK_TREE_VIEW_COLUMN(group_col)); GtkTreeViewColumn *server_col = gtk_tree_view_column_new_with_attributes(_("Client computer"), conn_cell_renderer, "text", 3, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->conns_treeview), GTK_TREE_VIEW_COLUMN(server_col)); GtkTreeViewColumn *ip_col = gtk_tree_view_column_new_with_attributes(_("Client address"), conn_cell_renderer, "text", 4, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->conns_treeview), GTK_TREE_VIEW_COLUMN(ip_col)); GtkTreeViewColumn *file_col = gtk_tree_view_column_new_with_attributes(_("File in use"), conn_cell_renderer, "text", 5, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->conns_treeview), GTK_TREE_VIEW_COLUMN(file_col)); /* The update conn button */ GtkWidget *conn_button_box = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox6), conn_button_box, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(conn_button_box), GTK_BUTTONBOX_SPREAD); GtkWidget *dc_conn_button = gtk_button_new_from_stock(GTK_STOCK_DELETE); gtk_box_pack_start(GTK_BOX(conn_button_box), dc_conn_button, FALSE, FALSE, 0); gtk_tooltips_set_tip(tooltips, dc_conn_button, _("Disconnect selected processes"), NULL); GtkWidget *update_conn_button = gtk_button_new_from_stock(GTK_STOCK_REFRESH); gtk_box_pack_start(GTK_BOX(conn_button_box), update_conn_button, FALSE, FALSE, 0); g_signal_connect_swapped(G_OBJECT(update_conn_button), "clicked", G_CALLBACK(populate_conns), widgets); g_signal_connect_swapped(G_OBJECT(dc_conn_button), "clicked", G_CALLBACK(disconnect_conn), widgets); gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/Makefile.am0000644000000000000000000000711211527565344015372 0ustar rootroot INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ sbin_PROGRAMS = gadmin-samba gadmin_samba_SOURCES = \ gadmin_samba.c gadmin_samba.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_gadmin_samba.c populate_gadmin_samba.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 \ create_user_tab.c create_user_tab.h \ populate_users.c populate_users.h \ user_treeview_row_clicked.c user_treeview_row_clicked.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 \ add_change_user.c add_change_user.h \ delete_user.c delete_user.h \ create_del_system_user_question.c create_del_system_user_question.h \ make_settings_buttons.c make_settings_buttons.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_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_macct_tab.c create_macct_tab.h \ populate_maccts.c populate_maccts.h \ macct_treeview_row_clicked.c macct_treeview_row_clicked.h \ create_macct_settings.c create_macct_settings.h \ populate_macct_settings.c populate_macct_settings.h \ select_first_macct.c select_first_macct.h \ add_macct.c add_macct.h \ delete_macct.c delete_macct.h \ change_macct.c change_macct.h \ create_conn_tab.c create_conn_tab.h \ populate_conns.c populate_conns.h \ create_disc_tab.c create_disc_tab.h \ populate_disc_tab.c populate_disc_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 \ status_update.c status_update.h \ apply_button_clicked.c apply_button_clicked.h \ reread_conf.c reread_conf.h \ commands.c commands.h \ functions.c functions.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 \ commented.c commented.h \ get_option_pos.c get_option_pos.h \ system_defines.c system_defines.h \ create_import_question.c create_import_question.h \ create_import_selection.c create_import_selection.h \ import_functions.c import_functions.h \ standard_conf.c standard_conf.h \ add_standard_users.c add_standard_users.h \ settings_window.c settings_window.h \ load_settings.c load_settings.h \ save_settings.c save_settings.h \ create_share_tab.c create_share_tab.h \ share_treeview_row_clicked.c share_treeview_row_clicked.h \ populate_shares.c populate_shares.h \ create_share_settings.c create_share_settings.h \ select_first_share.c select_first_share.h \ populate_share_settings.c populate_share_settings.h \ add_share.c add_share.h \ delete_share.c delete_share.h \ apply_share_settings.c apply_share_settings.h \ populate_shell_combo.c populate_shell_combo.h \ file_chooser.c file_chooser.h \ show_help.c show_help.h gadmin_samba_LDADD = @PACKAGE_LIBS@ gadmin-samba-0.3.2/src/apply_share_settings.h0000644000000000000000000000177511527565344017747 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_share_settings_H # define apply_share_settings_H extern struct w *widgets; void apply_share_settings(struct w *widgets); #endif gadmin-samba-0.3.2/src/activate_button_clicked.h0000644000000000000000000000201111527565344020351 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/delete_macct.h0000644000000000000000000000174611527565344016127 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct_H # define delete_macct_H extern struct w *widgets; void delete_macct(struct w *widgets); #endif gadmin-samba-0.3.2/src/make_settings_labels.c0000644000000000000000000000266011527565344017664 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/credits_window.c0000644000000000000000000001600611527565344016530 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 SAMBA developers.\n\n"), "Sebastian Schoss ", _("for"), " www.gadmintools.org\n", "Bjoern Lindner ", _("for the program icons.\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) \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) Martial Lillo \n", _("Galician"), " (gl) NAME \n", _("German"), " (de) M.Mueller aka Quax \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-samba-0.3.2/src/user_treeview_row_clicked.c0000644000000000000000000000426211527565345020743 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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); snprintf(global_user_name, 1000, "%s", (gchar *)user); g_free(user); gtk_tree_path_free(path); populate_user_settings(data); } } } gadmin-samba-0.3.2/src/populate_disc_tab.c0000644000000000000000000000641111527565345017165 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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); /* Unref the model */ // g_object_unref(model); 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-samba-0.3.2/src/commented.c0000644000000000000000000000255111527565344015457 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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++) { /* Skip whitespace */ if( line[i]==' ' ) continue; /* If the first char thats not whitespace is "#" then the line is commented out */ if( line[i]=='#' || line[i]==';' ) ret = 1; else ret = 0; break; } } return ret; } gadmin-samba-0.3.2/src/get_option_pos.h0000644000000000000000000000174611527565344016546 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_samba_GET_OPTION_POS_H # define gadmin_samba_GET_OPTION_POS_H int get_option_pos(char *line); #endif gadmin-samba-0.3.2/src/load_settings.h0000644000000000000000000000175211527565344016352 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 load_settings_H # define load_settings_H extern struct w *widgets; void load_settings(struct w *widgets); #endif gadmin-samba-0.3.2/src/settings_window.c0000644000000000000000000001166111527565345016736 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "allocate.h" #include "gettext.h" #include "widgets.h" #include "commands.h" #include "make_settings_entries.h" #include "make_settings_combos.h" #include "make_settings_checkbuttons.h" #include "reread_conf.h" #include "load_settings.h" #include "save_settings.h" #include "settings_window.h" #define MAX_CONF_LINE 1000 extern int global_start_winbindd; void show_settings_window(struct w *widgets) { GtkWidget *frame; GtkWidget *table; GtkWidget *settings_vbox; GtkTooltips *tooltips; gchar *utf8=NULL; gchar *info; widgets->settings_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_position(GTK_WINDOW (widgets->settings_window), GTK_WIN_POS_CENTER); gtk_widget_set_size_request(widgets->settings_window, -1, -1); /* Set window information */ info = g_strdup_printf(_("GADMIN-SAMBA %s settings"), VERSION); gtk_window_set_title(GTK_WINDOW(widgets->settings_window), info); g_free(info); g_signal_connect(GTK_WINDOW(widgets->settings_window), "delete_event", G_CALLBACK (gtk_widget_destroy), NULL); settings_vbox = gtk_vbox_new(FALSE, 0); gtk_container_add (GTK_CONTAINER (widgets->settings_window), settings_vbox); tooltips = gtk_tooltips_new(); frame = gtk_frame_new(_("Settings:")); /* A table with 6 settings and 2 columns */ table = gtk_table_new(6, 2, FALSE); gtk_box_pack_start(GTK_BOX(settings_vbox), frame, TRUE, TRUE, 1); gtk_container_add(GTK_CONTAINER(frame), table); /* Max length and input 350 chars */ /* Show standard conf question */ widgets->settings_checkbutton[0] = make_checkbutton_with_label(GTK_TABLE(table), _(" New samba configuration: "), 0,1,1,2); /* Start winbindd checkbutton */ widgets->settings_checkbutton[1] = make_checkbutton_with_label(GTK_TABLE(table), _(" Start winbind server: "), 0,1,2,3); if( global_start_winbindd ) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->settings_checkbutton[1]), TRUE); else gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widgets->settings_checkbutton[1]), FALSE); /* Path to smb.conf */ widgets->settings_entry[0] = make_entry_with_label(GTK_TABLE(table), _(" Path to smb.conf: "), 0,1,4,5,350); utf8 = g_locale_to_utf8(SAMBA_CONF, strlen(SAMBA_CONF), NULL, NULL, NULL); gtk_entry_set_text(GTK_ENTRY(widgets->settings_entry[0]), utf8); /* Button and entry */ // widgets->settings_entry[3] = gtk_entry_new(); // GtkWidget *gen_key_button = make_gen_key_button_with_entry(GTK_TABLE(table), widgets->settings_entry[3], 0,1,5,6,350); // g_signal_connect_swapped(G_OBJECT(gen_key_button), "clicked", // G_CALLBACK(new_rndc_key), widgets); GtkWidget *settings_hbuttonbox = gtk_hbutton_box_new(); gtk_box_pack_start(GTK_BOX(settings_vbox), settings_hbuttonbox, FALSE, FALSE, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(settings_hbuttonbox), GTK_BUTTONBOX_SPREAD); GtkWidget *apply_settings_button = gtk_button_new_from_stock(GTK_STOCK_APPLY); gtk_container_add(GTK_CONTAINER(settings_hbuttonbox), apply_settings_button); g_signal_connect_swapped(G_OBJECT(apply_settings_button), "clicked", G_CALLBACK(apply_settings_button_clicked), widgets); GtkWidget *cancel_settings_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); gtk_container_add(GTK_CONTAINER(settings_hbuttonbox), cancel_settings_button); g_signal_connect_swapped(G_OBJECT(cancel_settings_button), "clicked", G_CALLBACK(cancel_settings_button_clicked), widgets); if( utf8!=NULL ) g_free(utf8); gtk_widget_show_all(widgets->settings_window); } void cancel_settings_button_clicked(struct w *widgets) { gtk_widget_destroy(widgets->settings_window); } void apply_settings_button_clicked(struct w *widgets) { /* The apply button in the settings window */ save_settings(widgets); load_settings(widgets); gtk_widget_destroy(widgets->settings_window); } gadmin-samba-0.3.2/src/make_settings_progressbars.h0000644000000000000000000000323611527565345021144 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/create_user_tab.c0000644000000000000000000001206411527565344016633 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_user_tab.h" #include "user_treeview_row_clicked.h" #define EXPAND_USER_SECTION FALSE #define EXPAND_USER_SETTINGS_SECTION TRUE void create_user_tab(struct w *widgets) { GtkCellRenderer *user_cell_renderer; GtkWidget *user_treeview_hbox, *user_settings_treeview_hbox; GtkWidget *user_scrolled_window; GtkWidget *frame; 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 (4, 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 *homedir_col = gtk_tree_view_column_new_with_attributes(_("Home directory"), user_cell_renderer, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_VIEW_COLUMN(homedir_col)); GtkTreeViewColumn *comment_col = gtk_tree_view_column_new_with_attributes(_("Comment"), user_cell_renderer, "text", 3, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->user_treeview), GTK_TREE_VIEW_COLUMN(comment_col)); g_signal_connect((gpointer)widgets->user_treeview, "button_press_event", G_CALLBACK(user_treeview_row_clicked), widgets); /* 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:")); /* A table with NUM settings and 2 columns FIXME, Count */ widgets->user_set_table = gtk_table_new(NUM_USERTAB_ENTRIES+NUM_USERTAB_SPINBUTTONS+NUM_USERTAB_CHECKBUTTONS, 2, FALSE); gtk_box_pack_start(GTK_BOX(widgets->user_settings_vbox), frame, TRUE, TRUE, 1); gtk_container_add(GTK_CONTAINER(frame), widgets->user_set_table); gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/create_share_tab.c0000644000000000000000000001206411527565344016757 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_share_tab.h" #include "share_treeview_row_clicked.h" #define EXPAND_SHARE_SECTION FALSE #define EXPAND_SHARE_SETTINGS_SECTION TRUE void create_share_tab(struct w *widgets) { GtkCellRenderer *share_cell_renderer; GtkWidget *share_treeview_hbox, *share_settings_treeview_hbox; GtkWidget *share_scrolled_window; GtkWidget *frame; gchar *utf8=NULL; GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); /* Create the sharelist treeview in a scrolled window */ share_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox3), share_treeview_hbox, EXPAND_SHARE_SECTION, TRUE, 0); share_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(share_treeview_hbox), share_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(share_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(share_scrolled_window, -1, 100); widgets->share_store = gtk_list_store_new (15, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, 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->share_treeview = gtk_tree_view_new(); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->share_treeview), GTK_TREE_MODEL(widgets->share_store)); gtk_container_add(GTK_CONTAINER(share_scrolled_window), widgets->share_treeview); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widgets->share_treeview), TRUE); /* Set the column labels in the treeview */ share_cell_renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *share_col = gtk_tree_view_column_new_with_attributes(_("Share name"), share_cell_renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->share_treeview), GTK_TREE_VIEW_COLUMN(share_col)); GtkTreeViewColumn *dir_col = gtk_tree_view_column_new_with_attributes(_("Directory"), share_cell_renderer, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->share_treeview), GTK_TREE_VIEW_COLUMN(dir_col)); GtkTreeViewColumn *comment_col = gtk_tree_view_column_new_with_attributes(_("Comment"), share_cell_renderer, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(widgets->share_treeview), GTK_TREE_VIEW_COLUMN(comment_col)); g_signal_connect((gpointer)widgets->share_treeview, "button_press_event", G_CALLBACK(share_treeview_row_clicked), widgets); /* Create the share settings scrolled window with a frame and a table */ share_settings_treeview_hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(widgets->notebook_vbox3), share_settings_treeview_hbox, EXPAND_SHARE_SETTINGS_SECTION, TRUE, 0); widgets->share_settings_scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(share_settings_treeview_hbox), widgets->share_settings_scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widgets->share_settings_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); /* Must set a larger size or it wont scroll */ gtk_widget_set_size_request(widgets->share_settings_scrolled_window, -1, 100); /* Add a vbox to the scrolled window */ widgets->share_settings_vbox = gtk_vbox_new(FALSE, 0); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(widgets->share_settings_scrolled_window), widgets->share_settings_vbox); /* Add a frame */ frame = gtk_frame_new(_("Share settings:")); /* A table with NUM settings and 2 columns FIXME, Count */ widgets->share_set_table = gtk_table_new(NUM_SHARETAB_ENTRIES+NUM_SHARETAB_SPINBUTTONS+NUM_SHARETAB_CHECKBUTTONS, 2, FALSE); gtk_box_pack_start(GTK_BOX(widgets->share_settings_vbox), frame, TRUE, TRUE, 1); gtk_container_add(GTK_CONTAINER(frame), widgets->share_set_table); gtk_widget_show_all(widgets->main_window); if( utf8 != NULL ) g_free(utf8); } gadmin-samba-0.3.2/src/apply_share_settings.c0000644000000000000000000000736111527565344017737 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "commented.h" #include "reread_conf.h" #include "show_info.h" #include "apply_share_settings.h" #include "add_share.h" #include "populate_share_settings.h" #include "populate_server_settings.h" #include "populate_conf_tab.h" extern char global_share_name[1024]; extern int activated; /* Changes the selected share configuration by removing the old old share and adding a new one via add_share.c */ void apply_share_settings(struct w *widgets) { FILE *fp; char *line, *new_conf; long conf_size; int found_share = 0; gchar *info; gchar *share_name = g_strdup_printf("[%s]", global_share_name); /* FIXME: Some default shares cant be changed without loosing options atm so dont */ if( ! strcmp(share_name, "[homes]") || ! strcmp(share_name, "[profiles]") || ! strcmp(share_name, "[netlogon]") || ! strcmp(share_name, "[printers]") || ! strcmp(share_name, "[pdf-documents]") || ! strcmp(share_name, "[pdf-printer]") ) { g_free(share_name); info = g_strdup_printf(_("These default shares cant be changed at the moment.\nEdit the configuration for now\n")); show_info(info); g_free(info); return; } /* First delete the old share definition */ if((fp=fopen(SAMBA_CONF, "r"))==NULL) { /* Dont show a popup */ printf("Error opening: [%s] for listing shares\n", SAMBA_CONF); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); new_conf = allocate(conf_size+1); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines */ if( commented(line) ) continue; /* The selected share is found, skip it */ if( strstr(line, share_name) ) { found_share = 1; while(fgets(line, conf_size, fp)!=NULL) { /* Skip commented lines */ if( commented(line) ) continue; /* If a new share is found, break */ if( strstr(line, "[") && strstr(line, "]") ) { strcat(new_conf, line); break; } } } else strcat(new_conf, line); } fclose(fp); free(line); g_free(share_name); if( ! found_share ) { free(new_conf); // info... return; } if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { /* Dont show a popup */ printf("Error writing: [%s] when deleting a share\n", SAMBA_CONF); return; } fputs(new_conf, fp); fclose(fp); free(new_conf); /* Add the new share definition */ add_share(widgets); /* Reread the conf */ reread_conf(widgets); } gadmin-samba-0.3.2/src/reread_conf.c0000644000000000000000000000435111527565345015754 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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; extern int global_winbindd_activated; extern int global_nmbd_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", SMBD_BINARY); if( ! run_command(command) ) { printf("Restarting samba (smbd) failed\n"); test = g_strdup_printf("killall -1 %s 2>&1", SMBD_BINARY); run_command_show_err(test); g_free(test); } g_free(command); if( global_nmbd_activated ) { command = g_strdup_printf("killall -1 %s", NMBD_BINARY); if( ! run_command(command) ) { printf("Restarting samba (nmbd) failed\n"); test = g_strdup_printf("killall -1 %s 2>&1", NMBD_BINARY); run_command_show_err(test); g_free(test); } g_free(command); } if( global_winbindd_activated ) { command = g_strdup_printf("killall -1 %s", WINBINDD_BINARY); if( ! run_command(command) ) { printf("Restarting samba (winbindd) failed\n"); test = g_strdup_printf("killall -1 %s 2>&1", WINBINDD_BINARY); run_command_show_err(test); g_free(test); } g_free(command); } } gadmin-samba-0.3.2/src/macct_treeview_row_clicked.c0000644000000000000000000000431111527565344021046 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct_settings.h" extern char global_macct_name[1024]; void macct_treeview_row_clicked(GtkTreeView *treeview, GdkEventButton *event, gpointer data) { gchar *macct_name; 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, &macct_name, -1); sprintf(global_macct_name, "%s$", (gchar *)macct_name); g_free(macct_name); gtk_tree_path_free(path); populate_macct_settings(data); } } } gadmin-samba-0.3.2/src/system_defines.c0000644000000000000000000000607111527565345016527 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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. */ #include "../config.h" #ifdef USE_LINUX #define NOBODY "nobody" #define ADDUSER "useradd" #define ADDGROUP "groupadd" #define DELUSER "userdel" #define FALSESHELL "/dev/null" #define USERSHOME "/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_SUNOS #define NOBODY "nobody" #define ADDUSER "useradd" #define ADDGROUP "groupadd" #define DELUSER "userdel" #define FALSESHELL "/dev/null" #define USERSHOME "/opt/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_FREEBSD #define NOBODY "nobody" #define ADDUSER "pw useradd" #define ADDGROUP "pw groupadd" #define DELUSER "pw userdel" #define FALSESHELL "/dev/null" #define USERSHOME "/usr/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_OPENBSD #define NOBODY "nobody" #define ADDUSER "useradd" #define ADDGROUP "groupadd" #define DELUSER "userdel" #define FALSESHELL "/dev/null" #define USERSHOME "/usr/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_NETBSD #define NOBODY "nobody" #define ADDUSER "useradd" #define ADDGROUP "groupadd" #define DELUSER "userdel" #define FALSESHELL "/dev/null" #define USERSHOME "/usr/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_DARWIN #define NOBODY "nobody" #define ADDUSER "useradd" #define ADDGROUP "groupadd" #define DELUSER "userdel" #define FALSESHELL "/dev/null" #define USERSHOME "/Users/" #define DISC_USAGE "df -hP |grep /" #include "osx_functions.c" #elif defined USE_AIX #define NOBODY "nobody" #define ADDUSER "useradd" #define ADDGROUP "groupadd" #define DELUSER "userdel" #define FALSESHELL "/dev/null" #define USERSHOME "/home/" #define DISC_USAGE "df -hP |grep /" #elif defined USE_HPUX #define NOBODY "nobody" #define ADDUSER "useradd" #define ADDGROUP "groupadd" #define DELUSER "userdel" #define FALSESHELL "/dev/null" #define USERSHOME "/home/" #define DISC_USAGE "df -hP |grep /" #else /* Default macros */ #define NOBODY "nobody" #define ADDUSER "useradd" #define ADDGROUP "groupadd" #define DELUSER "userdel" #define FALSESHELL "/dev/null" #define USERSHOME "/home/" #define DISC_USAGE "df -hP |grep /" #endif gadmin-samba-0.3.2/src/settings_window.h0000644000000000000000000000217111527565345016737 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 GBzINDNS_settings_window_H # define GBzINDNS_settings_window_H extern struct w *widgets; void show_settings_window(struct w *widgets); void cancel_settings_button_clicked(struct w *widgets); void apply_settings_button_clicked(struct w *widgets); #endif gadmin-samba-0.3.2/src/populate_shares.h0000644000000000000000000000175611527565345016716 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_shares_H # define populate_shares_H extern struct w *widgets; void populate_shares(struct w *widgets); #endif gadmin-samba-0.3.2/src/create_macct_tab.h0000644000000000000000000000176411527565344016756 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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_macct_tab_H # define create_macct_tab_H extern struct w *widgets; void create_macct_tab(struct w *widgets); #endif gadmin-samba-0.3.2/src/show_help.h0000644000000000000000000000166111527565345015503 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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-samba-0.3.2/src/add_share.c0000644000000000000000000003575411527565344015431 0ustar rootroot/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server. * Copyright (C) 2006 - 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 "add_share.h" #include "reread_conf.h" #include "commented.h" #include "functions.h" #include "get_option_pos.h" #include "show_info.h" #include "populate_shares.h" #include "populate_share_settings.h" #include "populate_conf_tab.h" #define MAX_USERS_PER_ROW 10 int get_data_size = 0; int access_type = 0; long num_users = 0; long data_size = 0; char *access_buffer = NULL; extern char global_share_name[1024]; int add_access_to_buffer(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, struct w *widgets) { gchar *conf_line=NULL; gchar *option1; gtk_tree_model_get(model, iter, 0, &option1, -1); /* No more users in this treeview. */ if( option1==NULL ) { num_users = 0; if( option1!=NULL ) g_free(option1); /* Return false to continue iteration in case something odd happens */ return FALSE; } /* Get the byte size of all lines in this treeview */ if( get_data_size ) { /* +15 For "option =" and newlines (optimize later) */ data_size = data_size + (strlen(option1)+15); if( option1!=NULL ) g_free(option1); return FALSE; } /* Access type "valid users = ..." */ if( access_type == 0 ) { if( num_users == 0 ) { conf_line = g_strdup_printf("valid users = %s", option1); } else if( num_users == MAX_USERS_PER_ROW ) { num_users = 0; /* Adds a continued line ('\') plus the user */ conf_line = g_strdup_printf(" \\\n%s", option1); } else { conf_line = g_strdup_printf(" %s", option1); } /* Add to global buffer */ strcat(access_buffer, conf_line); } /* Access type: "invalid users = ..." */ if( access_type == 1 ) { if( num_users == 0 ) { conf_line = g_strdup_printf("invalid users = %s", option1); } else if( num_users == MAX_USERS_PER_ROW ) { num_users = 0; conf_line = g_strdup_printf(" \\\n%s", option1); } else { conf_line = g_strdup_printf(" %s", option1); } /* Add to global buffer */ strcat(access_buffer, conf_line); } /* Access type: "write list = ..." */ if( access_type == 2 ) { if( num_users == 0 ) { conf_line = g_strdup_printf("write list = %s", option1); } else if( num_users == MAX_USERS_PER_ROW ) { num_users = 0; conf_line = g_strdup_printf(" \\\n%s", option1); } else { conf_line = g_strdup_printf(" %s", option1); } /* Add to global buffer */ strcat(access_buffer, conf_line); } /* Access type: "admin users = ..." */ if( access_type == 3 ) { if( num_users == 0 ) { conf_line = g_strdup_printf("admin users = %s", option1); } else if( num_users == MAX_USERS_PER_ROW ) { num_users = 0; conf_line = g_strdup_printf(" \\\n%s", option1); } else { conf_line = g_strdup_printf(" %s", option1); } /* Add to global buffer */ strcat(access_buffer, conf_line); } num_users++; if( conf_line!=NULL ) g_free(conf_line); if( option1!=NULL ) g_free(option1); /* Return false to continue iteration */ return FALSE; } /* Adds a new share. Apply also uses this but first removes the share */ void add_share(struct w *widgets) { FILE *fp; long conf_size; char *line, *new_conf; gchar *dir, *cmd, *opt, *info; gchar *cmp_global_share_name; gint active_index; GtkTreeModel *model; /* Entries, get all share settings */ G_CONST_RETURN gchar *share_name = gtk_entry_get_text(GTK_ENTRY(widgets->share_set_entry[0])); G_CONST_RETURN gchar *directory = gtk_entry_get_text(GTK_ENTRY(widgets->share_set_entry[1])); G_CONST_RETURN gchar *comment = gtk_entry_get_text(GTK_ENTRY(widgets->share_set_entry[2])); G_CONST_RETURN gchar *dir_mask = gtk_entry_get_text(GTK_ENTRY(widgets->share_set_entry[3])); G_CONST_RETURN gchar *create_mode = gtk_entry_get_text(GTK_ENTRY(widgets->share_set_entry[4])); G_CONST_RETURN gchar *force_user = gtk_entry_get_text(GTK_ENTRY(widgets->share_set_entry[5])); G_CONST_RETURN gchar *force_group = gtk_entry_get_text(GTK_ENTRY(widgets->share_set_entry[6])); if( share_name == NULL || strlen(share_name) < 1 ) { info = g_strdup_printf(_("The share name is missing, the share was not added.\n")); show_info(info); g_free(info); return; } if( directory == NULL || strlen(directory) < 2 ) { info = g_strdup_printf(_("The directory to share is missing, the share was not added.\n")); show_info(info); g_free(info); return; } /* Call foreach on all access treeviews with get_data_size=1 to get total data size */ data_size = 0; get_data_size = 1; model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->valid_users_treeview)); gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) &add_access_to_buffer, widgets); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->invalid_users_treeview)); gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) &add_access_to_buffer, widgets); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->write_users_treeview)); gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) &add_access_to_buffer, widgets); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->admin_users_treeview)); gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) &add_access_to_buffer, widgets); access_buffer = allocate(data_size+10); get_data_size = 0; /* Call foreach on the treeview with access_type=0 to get all valid users */ access_type = 0; num_users = 0; model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->valid_users_treeview)); gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) &add_access_to_buffer, widgets); if( access_buffer!=NULL && strlen(access_buffer) > 2 && access_buffer[strlen(access_buffer)-1]!='\n' ) strcat(access_buffer, "\n"); /* Call foreach on the treeview with access_type=1 to get all invalid users */ access_type = 1; num_users = 0; model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->invalid_users_treeview)); gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) &add_access_to_buffer, widgets); if( access_buffer!=NULL && strlen(access_buffer) > 2 && access_buffer[strlen(access_buffer)-1]!='\n' ) strcat(access_buffer, "\n"); /* Call foreach on the treeview with access_type=2 to get all write list users */ access_type = 2; num_users = 0; model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->write_users_treeview)); gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) &add_access_to_buffer, widgets); if( access_buffer!=NULL && strlen(access_buffer) > 2 && access_buffer[strlen(access_buffer)-1]!='\n' ) strcat(access_buffer, "\n"); /* Call foreach on the treeview with access_type=3 to get all admin users */ access_type = 3; num_users = 0; model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->admin_users_treeview)); gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) &add_access_to_buffer, widgets); if( access_buffer!=NULL && strlen(access_buffer) > 2 && access_buffer[strlen(access_buffer)-1]!='\n' ) strcat(access_buffer, "\n"); if((fp=fopen(SAMBA_CONF, "r"))==NULL) { info = g_strdup_printf(_("Cant open smb.conf here:\n%s\n"), SAMBA_CONF); show_info(info); g_free(info); free(access_buffer); return; } fseek(fp, 0, SEEK_END); conf_size = ftell(fp); rewind(fp); line = allocate(conf_size+1); /* Plus for the share options and users */ new_conf = allocate(conf_size+2000+data_size); /* First collect the entire conf, if the share exists then return */ gchar *sharedef = g_strdup_printf("[%s]", share_name); if( conf_size > 1 ) while(fgets(line, conf_size, fp)!=NULL) { if( strstr(line, sharedef) ) { free(line); free(new_conf); fclose(fp); info = g_strdup_printf(_("The share already exists.\n")); show_info(info); g_free(info); free(access_buffer); return; } strcat(new_conf, line); } fclose(fp); free(line); /* Entries... */ /* Add the new share definition */ opt = g_strdup_printf("\n[%s]\n", share_name); strcat(new_conf, opt); opt = g_strdup_printf("path = %s\n", directory); strcat(new_conf, opt); if( comment !=NULL && strlen(comment) > 1 ) { opt = g_strdup_printf("comment = %s\n", comment); strcat(new_conf, opt); } else { // Fixme: Make it translatable opt = g_strdup_printf("comment = No comment\n"); strcat(new_conf, opt); } /* Add the access_buffer contents */ if( access_buffer!=NULL && strlen(access_buffer) > 5 ) { strcat(new_conf, access_buffer); } free(access_buffer); /* If these 4 arent specified at share creation then dont use them */ if( dir_mask !=NULL && strlen(dir_mask) > 1 ) { opt = g_strdup_printf("directory mask = %s\n", dir_mask); strcat(new_conf, opt); } if( create_mode !=NULL && strlen(create_mode) > 1 ) { opt = g_strdup_printf("create mode = %s\n", create_mode); strcat(new_conf, opt); } if( force_user !=NULL && strlen(force_user) > 1 ) { opt = g_strdup_printf("force user = %s\n", force_user); strcat(new_conf, opt); } if( force_group !=NULL && strlen(force_group) > 1 ) { opt = g_strdup_printf("force group = %s\n", force_group); strcat(new_conf, opt); } /* Combos... */ active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->share_set_combo[0])); if( active_index == 0 ) opt = g_strdup_printf("read only = yes\n"); else opt = g_strdup_printf("read only = no\n"); strcat(new_conf, opt); active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->share_set_combo[1])); if( active_index == 0 ) opt = g_strdup_printf("available = yes\n"); else opt = g_strdup_printf("available = no\n"); strcat(new_conf, opt); active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->share_set_combo[2])); if( active_index == 0 ) opt = g_strdup_printf("browseable = yes\n"); else opt = g_strdup_printf("browseable = no\n"); strcat(new_conf, opt); active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->share_set_combo[3])); if( active_index == 0 ) opt = g_strdup_printf("writable = yes\n"); else opt = g_strdup_printf("writable = no\n"); strcat(new_conf, opt); active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->share_set_combo[4])); if( active_index == 0 ) opt = g_strdup_printf("guest ok = yes\n"); else opt = g_strdup_printf("guest ok = no\n"); strcat(new_conf, opt); active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->share_set_combo[5])); if( active_index == 0 ) opt = g_strdup_printf("public = yes\n"); else opt = g_strdup_printf("public = no\n"); strcat(new_conf, opt); active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->share_set_combo[6])); if( active_index == 0 ) opt = g_strdup_printf("printable = yes\n"); else opt = g_strdup_printf("printable = no\n"); strcat(new_conf, opt); active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->share_set_combo[7])); if( active_index == 0 ) opt = g_strdup_printf("locking = yes\n"); else opt = g_strdup_printf("locking = no\n"); strcat(new_conf, opt); active_index = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->share_set_combo[8])); if( active_index == 0 ) opt = g_strdup_printf("strict locking = yes\n"); else opt = g_strdup_printf("strict locking = no\n"); strcat(new_conf, opt); g_free(opt); /* Make the directory if it doesnt exist */ /* Fixme: Add dir if( ! sys_users_dir() ) Check /path/AllUsers. If /home/sysuser, dont add the directory and inform the user */ dir = g_strdup_printf("%s", directory); if( ! file_exists(dir) ) { cmd = g_strdup_printf("mkdir -p '%s'", dir); if((fp=popen(cmd, "w"))==NULL) perror("popen"); pclose(fp); g_free(cmd); /* Chmod it to 777 otherwise "write list =" wont work unless chown is used. In that case "admin users =" is the only thing that works for 2 or more users if they arent in the same group. */ cmd = g_strdup_printf("chmod 777 '%s'", dir); if((fp=popen(cmd, "w"))==NULL) perror("popen"); pclose(fp); g_free(cmd); } g_free(dir); /* Write the new conf */ if((fp=fopen(SAMBA_CONF, "w+"))==NULL) { info = g_strdup_printf(_("Can not write new samba configuration here:\n%s\n"), SAMBA_CONF); show_info(info); g_free(info); return; } fputs(new_conf, fp); fclose(fp); free(new_conf); cmp_global_share_name = g_strdup_printf("%s", (char *)global_share_name); // cmp_global_share_directory = g_strdup_printf("%s", global_share_directory); // cmp_global_share_comment = g_strdup_printf("%s", global_share_comment); // Fixme: Also check directory and comment (listed in the treeview) /* Dont repopulate if the sharename,directory or comment is unchanged */ if( strcmp(cmp_global_share_name, share_name) ) { populate_shares(widgets); populate_share_settings(widgets); } g_free(cmp_global_share_name); fix_newlines_in_conf(); populate_conf_tab(widgets); reread_conf(widgets); } gadmin-samba-0.3.2/README0000644000076400007640000000040011346736150013664 0ustar mangemangeGADMIN-SAMBA is an easy to use GTK+ frontend for the SAMBA file and print server. Additional required packages: ----------------------------- gtk+ >= 2.0.0 samba >= 3.4.0 I hope you like it. Send bugreports, patches or comments to magnus-swe@telia.com gadmin-samba-0.3.2/MAKE_RPM0000755000076400007640000000046211527511635014175 0ustar mangemange#!/bin/sh # Make an rpm. version='0.3.2' cd .. # Works for Fedora up to FC9: tar -zhcvf /usr/src/redhat/SOURCES/gadmin-samba-$version.tar.gz gadmin-samba-$version tar -zhcvf /root/rpmbuild/SOURCES/gadmin-samba-$version.tar.gz gadmin-samba-$version cd gadmin-samba-$version rpmbuild -ba gadmin-samba.spec gadmin-samba-0.3.2/config.h.in0000644000000000000000000000704511346723354014573 0ustar rootroot/* config.h.in. Generated from configure.in by autoheader. */ /* application config dir */ #undef APPCONFDIR /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* needed for gettext... */ #undef GETTEXT_PACKAGE /* path to group */ #undef GROUP_FILE /* path to gshadow */ #undef GSHADOW_FILE /* 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 kerberos configuration */ #undef KERBEROS_CONF /* var dir */ #undef LOCALSTATEDIR /* The minimum accepted password length. */ #undef MIN_PASS_LEN /* Path to the nmbd binary */ #undef NMBD_BINARY /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* path to passwd */ #undef PASSWD_FILE /* path to the proc filesystem */ #undef PROC_PATH /* Path to smbd.conf */ #undef SAMBA_CONF /* Path to backup smb.conf */ #undef SAMBA_CONF_BACKUP /* Path to the gadmin_samba_users file */ #undef GADMIN_SAMBA_USERS /* The user that samba runs as IE: nobody. */ #undef SAMBA_USER /* Path to smbusers */ #undef SAMBA_USERMAP /* path to the security log */ #undef SECURE_LOG /* application config file */ #undef SETTINGS_FILE /* path to shadow */ #undef SHADOW_FILE /* path to shells */ #undef SHELLS_FILE /* Path to the smbd binary */ #undef SMBD_BINARY /* Path to the pdbedit binary */ #undef PDBEDIT_BINARY /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* etc dir */ #undef SYSCONFDIR /* 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 /* Path to the winbindd binary */ #undef WINBINDD_BINARY gadmin-samba-0.3.2/missing0000755000076400007640000002403607521233631014412 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-samba-0.3.2/config.sub0000755000076400007640000006710007615210750014776 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-samba-0.3.2/aclocal.m40000644000000000000000000015605011443240411014373 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.63],, [m4_warning([this file was generated for autoconf 2.63. 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.in. 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_in,[],[ 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 -*- # # 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])dnl 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. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure 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_ifval([$2], [$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 _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 ifelse([$4], , [AC_MSG_ERROR(dnl [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 ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$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-samba-0.3.2/ChangeLog0000644000076400007640000001036011527565133014566 0ustar mangemangeVersion 0.3.2 ------------------------------------------------------ Allow more then 30 chars for the samba version string. Added Valid users = %U as default for the [homes] share. Version 0.3.1 ------------------------------------------------------ Allows for more dynamic configuration of netlogon, profiles and pdf-documents. (Thanks to Nathan Owens of Arch Linux) Version 0.3.0 ------------------------------------------------------ Changed paths to /var/lib/samba for netlogon, profiles and pdf-documents. All users and All groups macros can now be imported. Added and updated Deutsch translation (Thanks to Manfred Mueller). Adds better default user profile values. Improved handling of directories with spaces. A small helpfile change (add user/apply user). Version 0.2.9 ------------------------------------------------------ Requires samba >= 3.4.0. Now using pdbedit and the tdbsam files instead of the smbpasswd file and binary. Edit smb.conf options as follows: ------------------------------------ Remove: smb passwd file = /etc/samba/smbpasswd Add: passdb backend = tdbsam Version 0.2.8 (Codename: Carpe Diem) ------------------------------------------------------ Added a share path selector. Added a home directory selector. Shows status color. Array comparizon fixes. Option "share modes" has been deprecated and will be removed automatically when a share is applied. Options "locking" and "strict locking" can be used instead. Version 0.2.7 ------------------------------------------------------ Added "bind interfaces only = yes" to the standard configuration. Added French translation thanks to (Martial Lillo) Only adds "wins server =" option if an IP or DNS name is given. Version 0.2.6 ------------------------------------------------------ Adds gtk-remove button icon for access permissions. Changes standard conf so that cups printers work again: - printcap name = /etc/printcap + printcap name = cups Version 0.2.5 ------------------------------------------------------ Adds support for continued lines (\). Improves automatic smb.conf backups. Version 0.2.4 ------------------------------------------------------ Changed name from gsambad to GAdmin-SAMBA. Automatically adjusts gsambads application settings. Version 0.1.9 ------------------------------------------------------ Added "short preserve case" and set defaults to case sensitive. Pam adjustment in the rpm spec file. Option follow symlinks is disabled by default. Selecting new configuration in the settings shows a standard configuration question. Updated the help window. Fixes automatic configuration backups. Version 0.1.8 ------------------------------------------------------ Changed to GPL version 3. Unlocking a user requires a new password to be set if it has a NULL or no previous password, no password is ok otherwise. Clicking the account locked checkbutton instantly enables or disables the selected user. The version information label becomes red if samba isnt installed. The add user button is now called new user, it clears the user profile and shows some information about adding users the first time its pressed. User and group access now consists of 4 treeviews and is unlimited by dividing users and groups of 10 into as many configuration lines as required. The invalid users option was added. For each new version installed gsambad will write a backup of the old configuration like this: /etc/samba/smb.conf.old.gsambad-0.1.7. Removes excess whitespace from configuration after changes. Added a "New share" share button that clears the share settings and sets defaults. There are now 4 different samba account states: 0 = Not locked. 1 = Locked and has a valid password. 2 = Locked but has no previous password set. 3 = Has an empty/Null password. "Empty password: [x]" is shown. Version 0.1.7 ------------------------------------------------------ Fixes insecure temp file creation in populate_conns.c Thanks to Steve Kemp and Michael Bienia for finding it. Version 0.1.6 ------------------------------------------------------ Shell population fixes. Added SYSINIT_START_CMD and SYSINIT_STOP_CMD's so the servers will be automatically started at boot. Changed the /etc/pam.d authentication file to work with new pam specs. Main window size adjustments. Updated the English translation. gadmin-samba-0.3.2/depcomp0000755000076400007640000002753307521233631014375 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-samba-0.3.2/AUTHORS0000644000076400007640000000004310371163337014055 0ustar mangemangeMagnus Loef gadmin-samba-0.3.2/install-sh0000755000076400007640000001270107521233631015013 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-samba-0.3.2/INSTALL0000644000076400007640000000105110757332704014042 0ustar mangemange Installation instructions: ---------------------------------- This package cant be installed without giving the correct configure options. The "Autoinstall" file shows how this can be done. Currently gadmin-samba has support for the following systems to a varying degree: Linux FreeBSD OpenBSD NetBSD Darwin Mac OSX AIX HP-UX Solaris SunOS If gadmin-samba 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-samba-0.3.2/po/0000755000076400007640000000000011527566322013433 5ustar mangemangegadmin-samba-0.3.2/po/POTFILES0000644000000000000000000000000011527566144014321 0ustar rootrootgadmin-samba-0.3.2/po/POTFILES.in0000644000076400007640000000007110371165112015172 0ustar mangemange# List of source files containing translatable strings. gadmin-samba-0.3.2/po/translation_howto.sh0000755000000000000000000000172110757330153017272 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-samba.pot ../src/*.c # Copy the resulting gadmin-samba.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 it and check the result. # If the result looks good then send me the .po file. gadmin-samba-0.3.2/po/gadmin-samba.pot0000644000000000000000000006332111427556022016225 0ustar rootroot# 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. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-08-06 19:59+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" msgid "" "Write the new users name and other settings in the user profile below.\n" msgstr "" msgid "" "Press apply to add this new user with the selected settings.\n" "\n" msgstr "" msgid "" "You can also skip this step and directly alter an existing users name and\n" msgstr "" msgid "settings and then press apply. This can save administration time.\n" msgstr "" msgid "Can not lock or unlock a samba user that does not exist.\n" msgstr "" msgid "A username must be specified.\n" msgstr "" #, c-format msgid "Failed to lock samba account: %s\n" msgstr "" #, c-format msgid "Failed to unlock samba account: %s using no password\n" msgstr "" #, c-format msgid "Failed to unlock samba account: %s using a password\n" msgstr "" msgid "Failed to unlock samba account: " msgstr "" msgid "A new password is required to unlock users that have no previous\n" msgstr "" msgid "passwords or empty passwords. The provided password is too short.\n" msgstr "" msgid "You must specify a valid password for this new user.\n" msgstr "" #, c-format msgid "" "Failed to create missing samba password file:\n" "%s\n" msgstr "" msgid "A groupname must be specified.\n" msgstr "" msgid "A comment must be specified.\n" msgstr "" msgid "A home directory must be specified.\n" msgstr "" msgid "A shell must be specified.\n" msgstr "" msgid "The root system user doesnt exist, nothing was done.\n" msgstr "" #, c-format msgid "Failed changing samba password or adding samba user: %s\n" msgstr "" msgid "" "The samba password for root was changed.\n" "Nothing else was changed for this user.\n" msgstr "" msgid "The password is too short, adding or changing samba user root failed.\n" msgstr "" #, c-format msgid "" "Error adding system user: %s\n" "The command was: %s\n" msgstr "" #, c-format msgid "Error adding system user: %s\n" msgstr "" #, c-format msgid "Failed changing password or adding samba user: %s\n" msgstr "" #, c-format msgid "Failed changing system comment for samba user: %s\n" msgstr "" #, c-format msgid "Error creating directory: %s/samba/profiles/%s\n" msgstr "" #, c-format msgid "Error chowning directory: %s/samba/profiles/%s\n" msgstr "" #, c-format msgid "" "Failed creating missing file:\n" "%s\n" msgstr "" msgid "This machine account already exists.\n" msgstr "" #, c-format msgid "Error adding system machine account: %s\n" msgstr "" #, c-format msgid "Failed adding samba machine account: %s\n" msgstr "" msgid "The share name is missing, the share was not added.\n" msgstr "" msgid "The directory to share is missing, the share was not added.\n" msgstr "" #, c-format msgid "" "Cant open smb.conf here:\n" "%s\n" msgstr "" msgid "The share already exists.\n" msgstr "" #, c-format msgid "" "Can not write new samba configuration here:\n" "%s\n" msgstr "" #, c-format msgid "" "Failed adding default smbusers file here:\n" "%s\n" msgstr "" #, c-format msgid "" "A new smbusers map file was added here:\n" "%s\n" " It has the following contents: \"root = administrator\" and \"nobody = " "smbguest\".\n" msgstr "" #, c-format msgid "" "Failed adding the system user:\n" "%s\n" msgstr "" #, c-format msgid "" "Cant open smb.conf here: \n" "%s\n" msgstr "" msgid "The define for SAMBA_CONF is bad, please reinstall the application.\n" msgstr "" msgid "Please specify the server name.\n" msgstr "" msgid "Please specify a workgroup or domain name.\n" msgstr "" #, c-format msgid "" "Can not find the [global] section in %s\n" "No changes made.\n" msgstr "" #, c-format msgid "A line with over 4000 chars is not valid in: %s\n" msgstr "" #, c-format msgid "" "Cant write smb.conf here:\n" "%s\n" msgstr "" msgid "" "Auto configuration for \"user\" security level done.\n" "Review any changes.\n" msgstr "" msgid "" "Auto configuration for (BDC) \"backup domain controller\" done.\n" "Unlock and supply a samba password for the samba root account if needed.\n" msgstr "" msgid "" "Auto configuration for (PDC) \"primary domain controller\" done.\n" "Connect to this domain as root after giving it a samba password and " "unlocking it.\n" msgstr "" msgid "" "Auto configuration for (ADS) \"Active directory\" security level done.\n" "Setup the kerberos realm and connect to this domain as root after giving it " "a samba password and unlocking it.\n" msgstr "" msgid "" "Error!!! Auto configuration for \"No\" security level done.\n" "Please review any changes.\n" msgstr "" msgid "" "These default shares cant be changed at the moment.\n" "Edit the configuration for now\n" msgstr "" #, c-format msgid "" "The machine account: %s\n" "can not be changed because it does not exist.\n" msgstr "" #, c-format msgid "Failed adding locked samba user: %s\n" msgstr "" #, c-format msgid "Failed disabling/locking samba user: %s\n" msgstr "" #, c-format msgid "Failed adding null password samba user: %s\n" msgstr "" #, c-format msgid "Failed locking null password samba user: %s\n" msgstr "" msgid "Process ID" msgstr "" msgid "User" msgstr "" msgid "Group" msgstr "" msgid "Client computer" msgstr "" msgid "Client address" msgstr "" msgid "File in use" msgstr "" msgid "Disconnect selected processes" msgstr "" msgid "Delete this system user ?" msgstr "" msgid "Do you also want to delete the system user ?" msgstr "" msgid "Username: " msgstr "" msgid "No" msgstr "" msgid "Delete" msgstr "" msgid "Mounted on" msgstr "" msgid "Free space" msgstr "" msgid "Used space" msgstr "" msgid "Total space" msgstr "" msgid "Percent used" msgstr "" msgid "Device" msgstr "" #, c-format msgid "GADMIN-SAMBA %s access permissions" msgstr "" msgid "Local computer:" msgstr "" msgid "Remote master domain:" msgstr "" msgid "Users:" msgstr "" msgid "Groups:" msgstr "" msgid "Access allowed:" msgstr "" msgid "Access denied:" msgstr "" msgid "Write access:" msgstr "" msgid "Administrators:" msgstr "" msgid "Select any local users you want to import" msgstr "" msgid "Select any local groups you want to import" msgstr "" msgid "Select any remote users you want to import" msgstr "" msgid "Select any remote groups you want to import" msgstr "" msgid "Username" msgstr "" msgid "Cancel" msgstr "" msgid " Machine name: " msgstr "" msgid " Comment: " msgstr "" msgid "NetBIOS machine name" msgstr "" msgid "Machine group" msgstr "" msgid "Machine comment" msgstr "" msgid "Machine account settings:" msgstr "" msgid "Activate" msgstr "" msgid "Deactivate" msgstr "" msgid "Reread" msgstr "" msgid "Settings" msgstr "" msgid "Help" msgstr "" msgid "About" msgstr "" msgid "Quit" msgstr "" msgid "Server settings" msgstr "" msgid "Users" msgstr "" msgid "Shares" msgstr "" msgid "Machines" msgstr "" msgid "Domain management" msgstr "" msgid "Connections" msgstr "" msgid "Disc" msgstr "" msgid "Security" msgstr "" msgid "Configuration" msgstr "" msgid "Information: cant read version" msgstr "" msgid "Status: unknown" msgstr "" msgid "Security information" msgstr "" msgid " The servers host name: " msgstr "" msgid "IE: Samba24. Use this name to connect to this server from the clients" msgstr "" msgid "" "A comment for this server, IE: SAMBA Server racoon city, 3rd floor 15th " "room, crazy scientist dudes" msgstr "" msgid " Workgroup or domain name: " msgstr "" msgid "" "IE: work-group-name or sambaserver2.example.org (spaces arent allowed). If " "SAMBA is set up as a domain then use this domain name to connect to from the " "clients" msgstr "" msgid " Security level: " msgstr "" msgid "Backup Domain" msgstr "" msgid "Primary Domain" msgstr "" msgid "Active directory" msgstr "" msgid " Active directory kerberos realm: " msgstr "" msgid "ADS Kerberos realm, IE: domain.example.org" msgstr "" msgid " Allowed hosts and networks: " msgstr "" msgid "" "Hosts and networks allowed to connect to this server, IE: 127. 192.168.0." msgstr "" msgid " Handle connections on: " msgstr "" msgid "Network interfaces to listen on, IE: eth0 127.0.0.1/8 192.168.0.120/24" msgstr "" msgid " Announce this server to: " msgstr "" msgid "" "Announce this servers precence to the specified networks, IE: 192.168.0.255 " "192.168.2.44" msgstr "" msgid " Retrieve announcements from: " msgstr "" msgid "" "Retrieve announcements from the specified networks, IE: 192.168.0.255 " "192.168.2.44" msgstr "" msgid " Printcap filepath: " msgstr "" msgid "Path to the printcap file, IE: /etc/printcap" msgstr "" msgid " Automatically load printer list: " msgstr "" msgid "Yes" msgstr "" msgid "Server settings for advanced administrators:" msgstr "" msgid " CUPS Options: " msgstr "" msgid "Raw" msgstr "" msgid " Guest user: " msgstr "" msgid "The name of the guest user, IE: guest" msgstr "" msgid " SAMBA log file: " msgstr "" #, c-format msgid "" "Path to the log file, IE: /var/log/samba/samba.log or /var/log/samba/%m.log " "for individual computer logs" msgstr "" msgid " Max logfile size: " msgstr "" msgid "The maximum logfile size in Kb." msgstr "" msgid " Allow empty passwords: " msgstr "" msgid " Username match level: " msgstr "" msgid "" "Username match level allows matching of _n_ characters of the username for " "all combinations of upper and lower case." msgstr "" msgid " Password match level: " msgstr "" msgid "" "Password match level allows matching of _n_ characters of the password for " "all combinations of upper and lower case." msgstr "" msgid " Encrypt passwords: " msgstr "" msgid " Syncronize passwords: " msgstr "" msgid " Socket transfer options: " msgstr "" msgid "" "The Socket transfer options, IE: TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192" msgstr "" msgid " Local master browser: " msgstr "" msgid " Domain master browser: " msgstr "" msgid " Preferred master: " msgstr "" msgid " Master browser election level: " msgstr "" msgid "Determines the precedence of this server in master browser elections." msgstr "" msgid " Domain logons: " msgstr "" msgid " Logon drive: " msgstr "" msgid "The drive letter of the home directory, IE: h: or m:" msgstr "" msgid " Logon home: " msgstr "" msgid "The path to the users home, \\\\%L\\homes\\%u" msgstr "" msgid " Logon profile path: " msgstr "" msgid "The logon profile path, IE: \\\\%L\\profiles\\%u" msgstr "" msgid " Logon script: " msgstr "" msgid "" "The logon script. IE: %U.bat (user_name.bat),%G.bat (group_name.bat), %m.bat " "(machine_name.bat) or just login.bat. Place the scripts in the netlogon " "directory" msgstr "" msgid " Time server: " msgstr "" msgid " NetBIOS name resolve order: " msgstr "" msgid "The NetBIOS name resolve order, IE: wins lmhosts bcast" msgstr "" msgid " WINS support: " msgstr "" msgid " Wins servers: " msgstr "" msgid "The Wins servers, IE: 192.168.0.130" msgstr "" msgid " Act as a WINS proxy: " msgstr "" msgid " Act as a DNS proxy: " msgstr "" msgid " Case sensitive filenames: " msgstr "" msgid " Client use spnego: " msgstr "" msgid " Client signing: " msgstr "" msgid " Client schannel: " msgstr "" msgid " Server signing: " msgstr "" msgid " Server schannel: " msgstr "" msgid " Pipe support: " msgstr "" msgid " Status support: " msgstr "" msgid " Allow trusted domains: " msgstr "" msgid " Obey PAM restrictions: " msgstr "" msgid " Enable print spooler: " msgstr "" msgid " Allow plain text authentication: " msgstr "" msgid " Disable netbios: " msgstr "" msgid " Follow symlinks: " msgstr "" msgid " Update encrypted: " msgstr "" msgid " PAM password change: " msgstr "" msgid " Password chat timeout: " msgstr "" msgid "Time until password chats time out." msgstr "" msgid " Hostname lookups: " msgstr "" msgid " SAMBA username file: " msgstr "" msgid "The path to SAMBA's username file, IE: /etc/samba/smbusers" msgstr "" msgid " The systems password program: " msgstr "" msgid "The path to the systems passwd program, IE: /usr/bin/passwd" msgstr "" msgid " New password phraze: " msgstr "" #, c-format msgid "" "The new password phrase, IE: *new*password* \\%n\\n *ReType*new*password* \\%" "n\\n *password:*changed*sucessfully*" msgstr "" msgid " Add user script: " msgstr "" msgid "" "Add user script, IE: /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -" "s /dev/null" msgstr "" msgid " Add user to group script: " msgstr "" #, c-format msgid "" "Add user to group script, IE: /usr/sbin/useradd -d /dev/null -c 'Samba User " "Account' -s /dev/null -g '%g'" msgstr "" msgid " Add group script: " msgstr "" #, c-format msgid "Add group script, IE: /usr/sbin/groupadd '%g'" msgstr "" msgid " Delete user script: " msgstr "" #, c-format msgid "Delete user script, IE: /usr/sbin/userdel '%u'" msgstr "" msgid " Delete user from group script: " msgstr "" #, c-format msgid "Delete user from group script, IE: /usr/sbin/userdel '%u' '%g'" msgstr "" msgid " Delete group script: " msgstr "" #, c-format msgid "Delete group script, IE: /usr/sbin/groupdel '%g'" msgstr "" msgid " Add machine account script: " msgstr "" #, c-format msgid "" "IE: /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine " "Account' -s /dev/null -M %u" msgstr "" msgid " Machine password timeout: " msgstr "" msgid "Machine password timeout, IE: 120 (seconds)" msgstr "" msgid " Username id range: " msgstr "" msgid "The users uids, IE: 16777216-33554431" msgstr "" msgid " Group id range: " msgstr "" msgid "The users gids, IE: 16777216-33554431" msgstr "" msgid " Template shell: " msgstr "" msgid "The template shell, IE: /dev/null" msgstr "" msgid " Winbind use default domain: " msgstr "" msgid " Winbind separator: " msgstr "" msgid "Winbind separator, IE: @ for user@server.org" msgstr "" msgid " Winbind cache timeout: " msgstr "" msgid "Time until winbind cache times out." msgstr "" msgid " Winbind trusted domains only: " msgstr "" msgid " Winbind nested groups: " msgstr "" msgid " Winbind nss info: " msgstr "" msgid " Winbind refresh tickets: " msgstr "" msgid " Winbind offline logon: " msgstr "" msgid "" "Write the new share name and other settings in the share settings below.\n" msgstr "" msgid "" "Press add to add this new share with the selected settings.\n" "\n" msgstr "" msgid "" "You can also skip this step and directly alter an existing shares name,\n" msgstr "" msgid "settings and then press add. This can save administration time.\n" msgstr "" msgid "New share" msgstr "" msgid " Share name: " msgstr "" msgid "The name of the Share" msgstr "" msgid "Shared directory:" msgstr "" msgid "Select a directory to share" msgstr "" msgid "Access permissions for users and groups in the selected share:" msgstr "" msgid "Access allowed" msgstr "" msgid "Access denied" msgstr "" msgid "" "If a group has been allowed access you can deny access for some of the users " "in this group here" msgstr "" msgid "Write access" msgstr "" msgid "Administrators" msgstr "" msgid "Delete access permission" msgstr "" msgid "Add access permissions" msgstr "" msgid " Directory mask: " msgstr "" msgid " Create mode: " msgstr "" msgid " Force user: " msgstr "" msgid " Force group: " msgstr "" msgid " Read only: " msgstr "" msgid " Available: " msgstr "" msgid " Browseable: " msgstr "" msgid " Writable: " msgstr "" msgid " Guest ok: " msgstr "" msgid " Public: " msgstr "" msgid " Printable: " msgstr "" msgid " File locking: " msgstr "" msgid " Strict locking: " msgstr "" msgid "Share name" msgstr "" msgid "Directory" msgstr "" msgid "Comment" msgstr "" msgid "Share settings:" msgstr "" msgid "Account locked:" msgstr "" msgid "New user" msgstr "" msgid "Username:" msgstr "" msgid "Create a randomized username" msgstr "" msgid "The name of the user." msgstr "" msgid "Password:" msgstr "" msgid "Create a randomized password" msgstr "" msgid "The users password." msgstr "" msgid " Group: " msgstr "" msgid "The group the user belongs to" msgstr "" msgid "A comment about the user" msgstr "" msgid "Home directory:" msgstr "" msgid "Choose a home directory for this user" msgstr "" msgid "" "The users home directory, IE: /home/UserName or /dev/null to skip making a " "homedirectory." msgstr "" msgid " Shell: " msgstr "" msgid "Home directory" msgstr "" msgid "User settings:" msgstr "" msgid "Credits" msgstr "" msgid "Author: " msgstr "" msgid "I want to thank the following for their contributions:" msgstr "" msgid "" "The SAMBA developers.\n" "\n" msgstr "" msgid "for" msgstr "" msgid "for the program icons.\n" msgstr "" msgid "for the RPM spec file." msgstr "" 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" 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 "" #, c-format msgid "Failed deleting samba machine account: %s\n" msgstr "" msgid "No user specified.\n" msgstr "" #, c-format msgid "Cant open smb.conf here: %s run gadmin-samba as root.\n" msgstr "" msgid "" "The samba root user was deleted.\n" "The root system user can not be deleted.\n" msgstr "" #, c-format msgid "Could not remove the samba user: %s\n" msgstr "" msgid "No username specified.\n" msgstr "" msgid "The root user can not be deleted.\n" msgstr "" #, c-format msgid "Failed to delete system user: %s\n" msgstr "" msgid "Group file not found" msgstr "" msgid "Group name not found" msgstr "" msgid "User setting not found" msgstr "" msgid "No value has been set" msgstr "" msgid "Max randomize username length is 999\n" msgstr "" msgid "Randomize username length can only contain digits\n" msgstr "" msgid "Max home directory length is 8192 chars.\n" msgstr "" msgid "Max randomize password length is 999\n" msgstr "" msgid "Randomize password length can only contain digits\n" msgstr "" msgid "Randomize length too long, changed it to 256.\n" msgstr "" msgid "Remote operations are not yet supported.\n" msgstr "" msgid "" "New samba users where added with empty passwords.\n" "See server settings and empty passwords.\n" msgstr "" #, c-format msgid "Number of added users: %ld\n" msgstr "" #, c-format msgid "Number of added groups: %ld\n" msgstr "" #, c-format msgid "" "Cant find the shells file here:\n" "%s\n" msgstr "" msgid "Missing password:" msgstr "" msgid "Empty password:" msgstr "" #, c-format msgid "" "Couldnt open the settings file here:\n" "%s\n" msgstr "" msgid "Set version failed\n" msgstr "" #, c-format msgid " Information: SAMBA %s" msgstr "" msgid " samba (smbd) is not installed or not in your path." msgstr "" #, c-format msgid "GADMIN-SAMBA %s settings" msgstr "" msgid "Settings:" msgstr "" msgid " New samba configuration: " msgstr "" msgid " Start winbind server: " msgstr "" msgid " Path to smb.conf: " msgstr "" msgid "GADMIN-SAMBA Help" msgstr "" msgid "" "\n" "Server settings:\n" msgstr "" msgid "" "If all you want to do is share some directories you only need to change\n" msgstr "" msgid "" "the first visible part in the server settings tab and then press apply.\n" msgstr "" msgid "When you scroll down more advanced options will be shown.\n" msgstr "" msgid "" "\n" "Users:\n" msgstr "" msgid "Adding a user can be done by specifying its username, group, password\n" msgstr "" msgid "and other settings, then clicking add.\n" msgstr "" msgid "" "After one user has been added this user can serve as a profile for other " "users.\n" msgstr "" msgid "" "Select a user in the user list, change its username and password then click " "add.\n" msgstr "" msgid "" "Both users will then have the same settings except for the username and " "password.\n" msgstr "" msgid "" "The new user button can be used to clear and insert default user settings, " "making it\n" msgstr "" msgid "" "ready for adding new users.\n" "\n" msgstr "" msgid "" "Deleting a user can be done by selecting it in the list and then clicking " "delete.\n" msgstr "" msgid "" "The deleted user will also be deleted from any shared resource.\n" "\n" msgstr "" msgid "" "Changing a users settings is done by changing the settings and clicking " "apply.\n" msgstr "" msgid "" "When you add a user you can randomize its name and password or use your " "own.\n" msgstr "" msgid "" "You can also select its login shell and where this user should have its home " "directory.\n" msgstr "" msgid "" "If the selected shell is /dev/null or /sbin/nologin the user can only login " "to this\n" msgstr "" msgid "" "server, otherwise the user can login via ssh etc if the server allows this " "user to do so.\n" "\n" msgstr "" msgid "Shares:\n" msgstr "" msgid "" "Shares can be added by selecting a directory to share, setting its share " "permissions and clicking add.\n" msgstr "" msgid "" "Deleting a share is done by selecting the share to delete and clicking " "delete.\n" msgstr "" msgid "" "Changing share settings can be done by changing its settings and then " "clicking the apply button.\n" "\n" msgstr "" msgid "Adding user and group access to shares:\n" msgstr "" msgid "" "Share access for users and groups can be added in several ways. Those ways " "are:\n" msgstr "" msgid "" "local users and groups, remote domain users and groups and each of these can " "have 4 different\n" msgstr "" msgid "" "permission classes. Multiple users and groups can be imported at once and " "duplicate additions are ignored.\n" "\n" msgstr "" msgid "" "The new share button can be used to clear and insert default share settings, " "making it ready\n" msgstr "" msgid "" "for adding new shares.\n" "\n" msgstr "" msgid "" "Joining a samba domain with MSFT'tm(c)(r) (extreme copyright) clients:\n" msgstr "" msgid "" "First disconnect all current connections on the client with: net use * /d\n" msgstr "" msgid "" "As administrator, select properties for \"this computer\" and write example." "org in the domain\n" msgstr "" msgid "" "field then press join domain. Use root as username and the samba root " "password in the dialog.\n" "\n" msgstr "" msgid "Joining the domain with Linux or other open source clients:\n" msgstr "" msgid "" "net rpc join example.org -S samba24 -U root then supply the samba root " "password\n" msgstr "" msgid "Mounting shares:\n" msgstr "" msgid "" "If you want to add directories thats not under the users root directory you " "can do this:\n" "\n" msgstr "" msgid "Linux (as of kernel 2.4.0):\n" msgstr "" msgid "" "mount --bind /some/directory/to/share /home/bob/make_this_directory_first\n" "\n" msgstr "" msgid "" "Alternatively:\n" "mount -o bind /var/data /home/bob/mounted_data\n" "\n" msgstr "" msgid "" "*BSD (as of 4.4BSD):\n" "mount_null /var/data /home/bob/mounted_data\n" "\n" msgstr "" msgid "" "Solaris:\n" "mount -F lofs /var/data /home/bob/mounted_data\n" "\n" msgstr "" msgid "" "For more detailed information about the server and its configuration " "directives visit:\n" msgstr "" msgid "http://www.samba.org\n" msgstr "" #, c-format msgid "GADMIN-SAMBA %s information" msgstr "" #, c-format msgid "" "Error: Could not backup the current configuration:\n" "%s\n" msgstr "" #, c-format msgid "" "The samba configuration was backed up here for safety:\n" "%s\n" msgstr "" #, c-format msgid "" "Cant write a new smb.conf here:\n" "%s\n" msgstr "" #, c-format msgid "" "Failed to create directories:\n" "%s\n" msgstr "" #, c-format msgid "Failed chmodding a+r for directory: %s\n" msgstr "" #, c-format msgid "Failed chowning the directories: %s\n" msgstr "" #, c-format msgid "Failed chmodding directory: %s\n" msgstr "" #, c-format msgid "Failed to create directory: %s/%s\n" msgstr "" msgid "GADMIN-SAMBA Question" msgstr "" msgid "" "GADMIN-SAMBA could not find SAMBAs configuration (smb.conf) or the current\n" msgstr "" msgid "" "configuration doesnt have all the features that GADMIN-SAMBA requires.\n" "\n" msgstr "" msgid "Do you want to overwrite the current samba configuration ?\n" msgstr "" msgid "\t\t\t(If you dont know then press yes)\n" msgstr "" #, c-format msgid "" "Error: cant create the settings directory here:\n" "%s\n" msgstr "" #, c-format msgid "" "Error: cant write the settings file here:\n" "%s\n" msgstr "" msgid "Status: Deactivated" msgstr "" #, c-format msgid "Status: Activated %s" msgstr "" msgid "Status: Activated" msgstr "" #, c-format msgid "Couldn't find pixmap file: %s" msgstr "" gadmin-samba-0.3.2/po/Makefile.in0000644000000000000000000001634111527566145015236 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-samba PACKAGE = gadmin-samba VERSION = 0.3.2 SHELL = /bin/sh srcdir = . top_srcdir = .. prefix = /usr exec_prefix = ${prefix} datadir = ${prefix}/share 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 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 = fr.po de.po GMOFILES = fr.gmo de.gmo DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = fr.gmo de.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) -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_ \ --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-samba-0.3.2/po/fr.po0000644000076400007640000012713211016273235014377 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. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-11-30 14:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \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 "" "Entrez ci-dessous les éléments de l'utilisateurs.\n" msgid "" "Press apply to add this new user with the selected settings.\n" "\n" msgstr "" "Appuyez sur Appliquer pour ajouter l'utilisateur et ses paramétres.\n" "\n" msgid "" "You can also skip this step and directly alter an existing users name and\n" msgstr "" "vous pouvez passer cette étape et directement changer le nom des utilisateurs et\n" msgid "settings and then press apply. This can save administration time.\n" msgstr "paramétres puis cliquez sur Appliquer. Ceci sauvegarde la gestion du temp.\n" msgid "Can not lock or unlock a samba user that does not exist.\n" msgstr "Ne peux vérrouiller ou dévérouiller un utilisateur inexistant.\n" msgid "A username must be specified.\n" msgstr "Spécifiez le NomD'Utilisateur.\n" #, c-format msgid "Failed to lock samba account: %s\n" msgstr "Impossible de verrouiller le compte: %s\n" #, c-format msgid "Failed to unlock samba account: %s using no password\n" msgstr "Impossible de déverouiller le compte: %s n'utilisant pas de MotDePasse\n" #, c-format msgid "Failed to unlock samba account: %s using a password\n" msgstr "Impossible de dévérouiller le compte: %s utilisant un mot de passe\n" msgid "Failed to unlock samba account: " msgstr "Dévérouillage du compte impossible: " msgid "A new password is required to unlock users that have no previous\n" msgstr "Il faut un MotDePasse pour déverouiller les utilisateurs\n" msgid "passwords or empty passwords. The provided password is too short.\n" msgstr "qui n'en avaient pas. Le MotDePasse entré est trop court.\n" #, c-format msgid "" "Failed to create missing samba password file:\n" "%s\n" msgstr "" "Impossible de créer le fichier sans MotsDePasse:\n" "%s\n" msgid "A groupname must be specified.\n" msgstr "Specifiez un NomDeGroupe.\n" msgid "A comment must be specified.\n" msgstr "Specifiez un commentaire.\n" msgid "A home directory must be specified.\n" msgstr "Specifiez un dossier personnel.\n" msgid "A shell must be specified.\n" msgstr "Specifiez une commande.\n" msgid "The root system user doesnt exist, nothing was done.\n" msgstr "L'administrateur n'existe pas, aucune action appliquée.\n" #, c-format msgid "Failed changing samba password or adding samba user: %s\n" msgstr "Le changement de MotDePasse ou l'ajout d'utilisateur a échouer: %s\n" msgid "" "The samba password for root was changed.\n" "Nothing else was changed for this user.\n" msgstr "" "Seul le mot du MotDePasse de\n" "l'administrateur SAMBA à été changé.\n" msgid "The password is too short, adding or changing samba user root failed.\n" msgstr "Impossible de changer ou d'ajouter l'administrateur car le MotDePasse est trop court.\n" #, c-format msgid "" "Error adding system user: %s\n" "The command was: %s\n" msgstr "" "Erreur lors de l'ajout de l'utilisateur: %s\n" "La commande était: %s\n" #, c-format msgid "Error adding system user: %s\n" msgstr "Erreur a l'ajout de l'utilisateur: %s\n" #, c-format msgid "Failed changing password or adding samba user: %s\n" msgstr "Impossible de changer ou d'ajouter l'utilisateur: %s.\n" #, c-format msgid "Failed changing system comment for samba user: %s\n" msgstr "Impossible de changer les commentaires de l'utilisateur: %s\n" #, c-format msgid "Error creating directory: %s/samba/profiles/%s\n" msgstr "Impossible de créer le répertoire: %s/samba/profiles.%s\n" #, c-format msgid "Error chowning directory: %s/samba/profiles/%s\n" msgstr "Impossible de parcourir le répertoire: %s/samba/profiles.%s\n" #, c-format msgid "" "Failed creating missing file:\n" "%s\n" msgstr "" "Impossible de créer le fichier manquant:\n" "%s\n" msgid "This machine account already exists.\n" msgstr "Ce compte d'ordinateur existe déjà.\n" #, c-format msgid "Error adding system machine account: %s\n" msgstr "" #, c-format msgid "Failed adding samba machine account: %s\n" msgstr "Ajout du compte d'ordinateur impossible: %s\n" msgid "The share name is missing, the share was not added.\n" msgstr "Le nom de partage est manquant, le partage n'a pas été ajouté.\n" msgid "The directory to share is missing, the share was not added.\n" msgstr "Le répertoire de partage est manquant, le partage n'a pas été ajouté.\n" #, c-format msgid "" "Cant open smb.conf here:\n" "%s\n" msgstr "" "Ouverture de smb.conf impossible:\n" "%s\n" msgid "The share already exists.\n" msgstr "Le partage existe déjà.\n" #, c-format msgid "" "Can not write new samba configuration here:\n" "%s\n" msgstr "" "Ecriture de la nouvelle configuration de SAMBA impossible:\n" "%s\n" #, c-format msgid "" "Failed adding default smbusers file here:\n" "%s\n" msgstr "" "Ajout du fichier smbusers impossible:\n" "%s\n" #, c-format msgid "" "A new smbusers map file was added here:\n" "%s\n" " It has the following contents: \"root = administrator\" and \"nobody = " "smbguest\".\n" msgstr "" "Un nouveau fichier smbusers a été ajouté:\n" " Il contient les éléments suivants: \"root = administrator\" and \"nobody = " "smbguest\".\n" #, c-format msgid "" "Failed adding the system user:\n" "%s\n" msgstr "" "Impossible d'ajouter l'utilisateur:\n" "%s\n" #, c-format msgid "Failed adding default samba user: %s\n" msgstr "Ajout de l'utilisateur samba par defaut impossible: %s\n" #, c-format msgid "" "Cant open smb.conf here: \n" "%s\n" msgstr "" "fichier smb.conf absent: \n" "%s\n" msgid "The define for SAMBA_CONF is bad, please reinstall the application.\n" msgstr "Les definitions de SAMBA_CONF sont corromptus, réinstallez l'application.\n" msgid "Please specify the server name.\n" msgstr "Spécifiez le nom du serveur.\n" msgid "Please specify a workgroup or domain name.\n" msgstr "Spécifiez le nom du groupe de travail ou du domaine.\n" #, c-format msgid "" "Can not find the [global] section in %s\n" "No changes made.\n" msgstr "" "Impossible de trouver la section [global] dans %s\n" "Aucun changement appliqué.\n" #, c-format msgid "A line with over 4000 chars is not valid in: %s\n" msgstr "La line ne peut dépasser 4000 caractéres dans: %s\n" #, c-format msgid "" "Cant write smb.conf here:\n" "%s\n" msgstr "" "Ecriture de smb.conf impossible ici:\n" "%s\n" msgid "" "Auto configuration for \"user\" security level done.\n" "Review any changes.\n" msgstr "" "Auto configuration de \"user\" sécurité appliquée.\n" "Revoir tous les changements.\n" msgid "" "Auto configuration for (BDC) \"backup domain controller\" done.\n" "Unlock and supply a samba password for the samba root account if needed.\n" msgstr "" "Auto configuration du (BDC) \"sauvegarde controleur de dommaine\" fait.\n" "Au besoin, dévérouillez et fournissez un MotDePasse pour l'administrateur samba.\n" msgid "" "Auto configuration for (PDC) \"primary domain controller\" done.\n" "Connect to this domain as root after giving it a samba password and " "unlocking it.\n" msgstr "" "Auto configuration du (PDC) \"premier controleur de dommaine\" fait.\n" "Pour vous connectez au domaine, donnez un MotDePasse " "à l'administrateur samba et ensuite dévérouillez le.\n" msgid "" "Auto configuration for (ADS) \"Active directory\" security level done.\n" "Setup the kerberos realm and connect to this domain as root after giving it " "a samba password and unlocking it.\n" msgstr "" "Auto configuration de (ADS) \"Active directory\" sécurité appliquée.\n" "Pour vous connectez au domaine, donnez un MotDePasse " "à l'adminsitrateur samba et ensuite déverouillez " "le puis paramétrez Kerberos realm.\n" msgid "" "Error!!! Auto configuration for \"No\" security level done.\n" "Please review any changes.\n" msgstr "" "Erreur!!! Auto configuration de \"No\" sécurité appliquée.\n" "Revoir les modifications.\n" msgid "" "These default shares cant be changed at the moment.\n" "Edit the configuration for now\n" msgstr "" "Les partages par défaut ne peuvent être modifiés pour le moment.\n" "Editez les configurations\n" #, c-format msgid "" "The machine account: %s\n" "can not be changed because it does not exist.\n" msgstr "" "Le compte de machine: %s\n" "ne peux être changer car il n'existe pas.\n" msgid "Process ID" msgstr "ID du processus" msgid "User" msgstr "Utilisateur" msgid "Group" msgstr "Groupe" msgid "Client computer" msgstr "Ordinateur client" msgid "Client address" msgstr "Adresse du client" msgid "File in use" msgstr "Fichier utilisé" msgid "Disconnect selected processes" msgstr "Déconnexion des processus sélectionnés" msgid "Delete this system user ?" msgstr "Destruction de cet utilisateur ?" msgid "Do you also want to delete the system user ?" msgstr "Souhaitez-vous aussi détruire l'utilisateur ?" msgid "Username: " msgstr "Nom d'utilisateur: " msgid "No" msgstr "Non" msgid "Delete" msgstr "Détruire" msgid "Mounted on" msgstr "Monté" 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 "Périphérique" #, c-format msgid "GSAMBAD %s access permissions" msgstr "GSAMBAD %s permissions d'accés" msgid "Local computer:" msgstr "Ordinateur local:" msgid "Remote master domain:" msgstr "Domaine principal distant:" msgid "Users:" msgstr "Utilisateurs:" msgid "Groups:" msgstr "Groupes:" msgid "Access allowed:" msgstr "Accés autorisés:" msgid "Access denied:" msgstr "Accés interdit:" msgid "Write access:" msgstr "Accés en écriture:" msgid "Administrators:" msgstr "Administrateurs:" msgid "Select any local users you want to import" msgstr "Selectionnez les utilisateurs à importer" msgid "Select any local groups you want to import" msgstr "Selectionnez les groupes à importer" msgid "Select any remote users you want to import" msgstr "Selectionnez les utilisateurs distants à importer" msgid "Select any remote groups you want to import" msgstr "Selectionnez les groupes distants à importer" msgid "Username" msgstr "Nom d'utilisateur" msgid "Cancel" msgstr "Annuler" msgid " Machine name: " msgstr " Nom machine: " msgid " Comment: " msgstr " Commentaire: " msgid "NetBIOS machine name" msgstr "Nom NetBIOS de la machine" msgid "Machine group" msgstr "Groupe de la machine" msgid "Machine comment" msgstr "Commentaire de la machine" msgid "Machine account settings:" msgstr "Paramétrages du compte de la machine:" msgid "Activate" msgstr "Mise en route" msgid "Deactivate" msgstr "Arrêt" msgid "Reread" msgstr "Nouvelle lecture" msgid "Settings" msgstr "Paramétres" msgid "Help" msgstr "Aide" msgid "About" msgstr "A propos" msgid "Quit" msgstr "Quitter" msgid "Server settings" msgstr "Paramétres Serveur" msgid "Users" msgstr "Utilisateurs" msgid "Shares" msgstr "Partages" msgid "Machines" msgstr "Machines" msgid "Domain management" msgstr "Gestion du Domaine" msgid "Connections" msgstr "Connexions" msgid "Disc" msgstr "Disque" msgid "Security" msgstr "Sécurité" msgid "Configuration" msgstr "Configuration" msgid "Information: cant read version" msgstr "Information: Lecture de la version impossible" msgid "Status: unknown" msgstr "Etat: unconnu" msgid "Security information" msgstr "Information de sécurité" msgid " The servers host name: " msgstr " Le nom des serveurs hôtes: " msgid "IE: Samba24. Use this name to connect to this server from the clients" msgstr "Ex: Samba24. Utilisez ce mon pour la connection des clients à ce serveur" msgid "" "A comment for this server, IE: SAMBA Server racoon city, 3rd floor 15th " "room, crazy scientist dudes" msgstr "" "Commentaire pour ce serveur, Ex: SAMBA Server racoon city, 3eme etage, bureaux 15" ", crazy scientist dudes" msgid " Workgroup or domain name: " msgstr " Nom du groupe de travail ou du domaine: " msgid "" "IE: work-group-name or sambaserver2.exemple.org (spaces arent allowed). If " "SAMBA is set up as a domain then use this domain name to connect to from the " "clients" msgstr "" "Ex: work-group-name ou sambaserver2.exemple.org (espaces interdits). Si " "SAMBA est paramétré en tant que domain, utilisez ce nom de domaine pour " "vous connectez depuis les clients" msgid " Security level: " msgstr " Niveau de sécurité: " msgid "Backup Domain" msgstr "Domain de secour" msgid "Primary Domain" msgstr "Domaine principal" msgid "Active directory" msgstr "Active directory" msgid " Active directory kerberos realm: " msgstr " Active directory kerberos realm: " msgid "ADS Kerberos realm, IE: domain.example.org" msgstr "ADS Kerberos realm, Ex: domaine.exemple.org" msgid " Allowed hosts and networks: " msgstr " Réseaux et hôtes autorisés: " msgid "" "Hosts and networks allowed to connect to this server, IE: 127. 192.168.0." msgstr "" "Réseaux et hôtes autorisés à se connecter à ce serveur, Ex: 127. 192.168.0." msgid " Handle connections on: " msgstr " Maintenir la connexion sur: " msgid "Network interfaces to listen on, IE: eth0 127.0.0.1/8 192.168.0.120/24" msgstr "Interface réseau à écouter, Ex: eth0 127.0.0.1/8 192.168.0.120/24" msgid " Announce this server to: " msgstr " Annoncer ce serveur a: " msgid "" "Announce this servers precence to the specified networks, IE: 192.168.0.255 " "192.168.2.44" msgstr "" "Annoncer la présence de ces serveurs aux réseaux spécifiés, IE: 192.168.0.255 " "192.168.2.44" msgid " Retrieve announcements from: " msgstr " Retrouver les annonces depuis: " msgid "" "Retrieve announcements from the specified networks, IE: 192.168.0.255 " "192.168.2.44" msgstr "" "Retrouver les annonces depuis des réseau spécifiés, IE: 192.168.0.255 " "192.168.2.44" msgid " Printcap filepath: " msgstr " Chemin d'impression: " msgid "Path to the printcap file, IE: /etc/printcap" msgstr "Chemin pour le fichier d'impression, Ex: /etc/printcap" msgid " Automatically load printer list: " msgstr " Chargement automatique de la liste des imprimantes: " msgid "Yes" msgstr "Oui" msgid "Server settings for advanced administrators:" msgstr "Paramétres des Serveurs pour utilisateurs avancés:" msgid " CUPS Options: " msgstr " Options CUPS: " msgid "Raw" msgstr "Raw" msgid " Guest user: " msgstr " Utilisateur invité: " msgid "The name of the guest user, IE: guest" msgstr "Nom de l'utilisateur invité, Ex: invite" msgid " SAMBA log file: " msgstr " Journaux de SAMBA: " #, c-format msgid "" "Path to the log file, IE: /var/log/samba/samba.log or /var/log/samba/%m.log " "for individual computer logs" msgstr "" "Chemin des journaux, Ex: /var/log/samba/samba.log ou /var/log/samba/%m.log " "pour l'individualisation des journaux de chaque ordinateur" msgid " Max logfile size: " msgstr " Taille Max des journaux: " msgid "The maximum logfile size in Kb." msgstr "La taille max des journaux en Kb." msgid " Allow empty passwords: " msgstr " Autoriser l'abscence de MotDePasse: " msgid " Username match level: " msgstr " Niveau de la correspondance du Nom d'utilisateur: " msgid "" "Username match level allows matching of _n_ characters of the username for " "all combinations of upper and lower case." msgstr "" "Le niveau de la correspondance du Nom d'utilisateur permet une correspondance de _n_ caractères" "du Nom d'utilisateur pour les combinaisons majuscules/minuscules." msgid " Password match level: " msgstr " Niveau de la correspondance des MotsDePasse: " msgid "" "Password match level allows matching of _n_ characters of the password for " "all combinations of upper and lower case." msgstr "" "Le niveau de la correspondance du mot de passe permet une correspondance de _n_ caractères " "du MotDePasse pour les combinaisons majuscules/minuscules." msgid " Encrypt passwords: " msgstr " MotDePasse cryptés: " msgid " Syncronize passwords: " msgstr " Synchroniser les mots de passe: " msgid " Socket transfer options: " msgstr " Options des couches de transfert: " msgid "" "The Socket transfer options, IE: TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192" msgstr "" "Les options des couches de transfert, Ex: TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192" msgid " Local master browser: " msgstr " Explorateur pricipal local: " msgid " Domain master browser: " msgstr " Explorateur principal du domaine: " msgid " Preferred master: " msgstr " Maître préféré: " msgid " Master browser election level: " msgstr " Master browser election level: " msgid "Determines the precedence of this server in master browser elections." msgstr "Détermine la présélection de ce serveur dans l'élection des explorateurs maîtres." msgid " Domain logons: " msgstr " Domaines montés: " msgid " Logon drive: " msgstr " Ressource montés: " msgid "The drive letter of the home directory, IE: h: or m:" msgstr "La lettre du lecteur du répertoire personnel, Ex: h: or m:" msgid " Logon home: " msgstr " Dossiers personnels: " msgid "The path to the users home, \\\\%L\\homes\\%u" msgstr "Chemin des dossiers personnels, \\\\%L\\homes\\%u" msgid " Logon profile path: " msgstr " Chemin des profils montés: " msgid "The logon profile path, IE: \\\\%L\\profiles\\%u" msgstr "Chemin des profils montés, Ex: \\\\%L\\profiles\\%u" msgid " Logon script: " msgstr " Script de démarrage: " msgid "" "The logon script. IE: %U.bat (user_name.bat),%G.bat (group_name.bat), %m.bat " "(machine_name.bat) or just login.bat. Place the scripts in the netlogon " "directory" msgstr "" "Les script utilisateurs. Ex: %U.bat (user_name.bat),%G.bat (group_name.bat), %m.bat " "(machine_name.bat) ou simplement login.bat. Placez les scripts dans les répertoires " "réseaux des utilisateurs" msgid " Time server: " msgstr " Serveur de temps: " msgid " NetBIOS name resolve order: " msgstr " Ordre de résolution NetBIOS: " msgid "The NetBIOS name resolve order, IE: wins lmhosts bcast" msgstr "Ordre de résolution NetBIOS, Ex: wins lmhosts bcast" msgid " WINS support: " msgstr " Support WINS: " msgid " Wins servers: " msgstr " Serveurs Wins: " msgid "The Wins servers, IE: 192.168.0.130" msgstr "Serveurs Wins, Ex: 192.168.0.130" msgid " Act as a WINS proxy: " msgstr " Agir en tant que proxy WINS: " msgid " Act as a DNS proxy: " msgstr " Agir en tant que proxy DNS: " msgid " Case sensitive filenames: " msgstr " Sensibilité des noms de fichier à la casse: " msgid " Client use spnego: " msgstr " Client utilisant spnego: " msgid " Client signing: " msgstr " Signature du client: " msgid " Client schannel: " msgstr " Client schannel: " msgid " Server signing: " msgstr " Signature du serveur: " msgid " Server schannel: " msgstr " Server schannel: " msgid " Pipe support: " msgstr " Support des liens: " msgid " Status support: " msgstr " Etat du support: " msgid " Allow trusted domains: " msgstr " Autoriser les domaines de confiance: " msgid " Obey PAM restrictions: " msgstr " Restrictions Obey PAM: " msgid " Enable print spooler: " msgstr " Autoriser le spooler d'impression: " msgid " Allow plain text authentication: " msgstr " Permettre l'authentification textplein: " msgid " Disable netbios: " msgstr " Désactiver netbios: " msgid " Follow symlinks: " msgstr " Suivre les liens symboliques: " msgid " Update encrypted: " msgstr " Update encrypted: " msgid " PAM password change: " msgstr " PAM password change: " msgid " Password chat timeout: " msgstr " Password chat timeout: " msgid "Time until password chats time out." msgstr "Time until password chats time out." msgid " Hostname lookups: " msgstr " Hostname lookups: " msgid " SAMBA username file: " msgstr " Fichier d'utilisateur SAMBA:" msgid "The path to SAMBA's username file, IE: /etc/samba/smbusers" msgstr "Chemin du fichier utilisateur SAMBA, EX: /etc/samba/smbusers" msgid " SAMBA password file: " msgstr " Fichier des MotDePasse SAMBA: " msgid "The path to SAMBA's passwd file, IE: /etc/samba/smbpasswd" msgstr "Chemin du fichier des MotDePasse de SAMBA, EX /etc/samba/smbpasswd" msgid " The systems password program: " msgstr " Programe de motDePasse: " msgid "The path to the systems passwd program, IE: /usr/bin/passwd" msgstr "Chemin vers le programme de MotDePasse; EX: /usr/bin/passwd" msgid " New password phraze: " msgstr " Nouvelle PassPhrase: " #, c-format msgid "" "The new password phrase, IE: *new*password* \\%n\\n *ReType*new*password* \\%" "n\\n *password:*changed*sucessfully*" msgstr "" "La nouvelle passphrase, Ex: *nouveau*MotDePasse* \\%n\\n *ReTape*nouveau*MotDePasse* \\%" "n\\n *password:*changed*sucessfully*" msgid " Add user script: " msgstr " Ajouter un script utilisateur: " msgid "" "Add user script, IE: /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -" "s /dev/null" msgstr "" "Ajouter un script utilisateur, Ex: /usr/sbin/useradd -d /dev/null -c 'Compte Utilisateur Samba' -" "s /dev/null" msgid " Add user to group script: " msgstr " Ajout d'un utilisateur au groupe de script: " #, c-format msgid "" "Add user to group script, IE: /usr/sbin/useradd -d /dev/null -c 'Samba User " "Account' -s /dev/null -g '%g'" msgstr "" "Ajouter un utilisateur au groupe de script, Ex: /usr/sbin/useradd -d /dev/null -c 'CompteUtilisateurSamba' " "-s /dev/null -g '%g'" msgid " Add group script: " msgstr " Ajouter un groupe de script: " #, c-format msgid "Add group script, IE: /usr/sbin/groupadd '%g'" msgstr "Ajouter un groupe de script, Ex: /usr/sbin/groupadd '%g'" msgid " Delete user script: " msgstr " Détruit le script utilisateur: " #, c-format msgid "Delete user script, IE: /usr/sbin/userdel '%u'" msgstr "Détruit le script utilisateur, Ex: /usr/sbin/userdel '%u'" msgid " Delete user from group script: " msgstr " Retirer l'utilisateur du groupe de script: " #, c-format msgid "Delete user from group script, IE: /usr/sbin/userdel '%u' '%g'" msgstr "Retirer l'utilisateur du groupe de script, Ex: /usr/sbin/userdel '%u' '%g'" msgid " Delete group script: " msgstr " Détruire un groupe de script: " #, c-format msgid "Delete group script, IE: /usr/sbin/groupdel '%g'" msgstr "Détruire un groupe de script, EX: /usr/sbin/groupdel '%g'" msgid " Add machine account script: " msgstr " Ajouter un script au compte de machine: " #, c-format msgid "" "IE: /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine " "Account' -s /dev/null -M %u" msgstr "" "Ex: /usr/sbin/useradd -d /dev/null -g sambamachines -c 'CompteDeMachineSamba' " "-s /dev/null -M %u" msgid " Machine password timeout: " msgstr " Temporisation du MotDePasee machine: " msgid "Machine password timeout, IE: 120 (seconds)" msgstr "Temporisation du MotDePasee machine, Ex: 120 (secondes)" msgid " Username id range: " msgstr " Rang de L'ID de l'utilisateur: " msgid "The users uids, IE: 16777216-33554431" msgstr "Rang de L'ID de l'utilisateur, Ex: 16777216-33554431" msgid " Group id range: " msgstr " Rang de l'ID du groupe: " msgid "The users gids, IE: 16777216-33554431" msgstr "The users gids, IE: 16777216-33554431" msgid " Template shell: " msgstr " Commande temporaire" msgid "The template shell, IE: /dev/null" msgstr "Commande temporaire, Ex: /dev/null" msgid " Winbind use default domain: " msgstr " Domain par défaut de Winbind: " msgid " Winbind separator: " msgstr " Séparateur Winbind: " msgid "Winbind separator, IE: @ for user@server.org" msgstr "Séparateur Winbind, Ex: @ pour user@server.org" msgid " Winbind cache timeout: " msgstr " Temporisation du cache Winbind: " msgid "Time until winbind cache times out." msgstr "Temps jusqu'à la péremption du cache winbind." msgid " Winbind trusted domains only: " msgstr " Seulement les domaines de confiance Winbind: " msgid " Winbind nested groups: " msgstr " Groupes imbriqués Winbind: " msgid " Winbind nss info: " msgstr " Infos nss Winbind: " msgid " Winbind refresh tickets: " msgstr " Rafraichissement des tickets Winbind: " msgid " Winbind offline logon: " msgstr " Winbind offline logon: " msgid "" "Write the new share name and other settings in the share settings below.\n" msgstr "" "Notez les nouveaux partages et autres paramétrages ci dessous.\n" msgid "" "Press add to add this new share with the selected settings.\n" "\n" msgstr "" "Cliquez sur Ajouter pour appliquer les nouveaux paramétres des partages sélectionnés.\n" "\n" msgid "" "You can also skip this step and directly alter an existing shares name,\n" msgstr "" "Vous pouvez passer cette étape et modifier directement les paramétres du\n" msgid "settings and then press add. This can save administration time.\n" msgstr "nom de partage et cliquer su Ajouter. Cela sauvegardera le temps d'administration.\n" msgid "New share" msgstr "Nouveau partage" msgid " Share name: " msgstr " Nom du partage: " msgid "The name of the Share" msgstr "Nom du partage" msgid "Shared directory:" msgstr "Répertoire partagé:" msgid "Select a directory to share" msgstr "Sélectionnez un répertoire à partager" msgid "Access permissions for users and groups in the selected share:" msgstr "Permissions des utilisateurs & groupes dans le partage sélectionné:" msgid "Access allowed" msgstr "Accés autorisé" msgid "Access denied" msgstr "Accés interdit" msgid "" "If a group has been allowed access you can deny access for some of the users " "in this group here" msgstr "" "Ici, si un groupe a des droits d'accés, vous pouvez interdire les droits " "à certains utilisateurs de ce groupe" msgid "Write access" msgstr "Ecriture" msgid "Administrators" msgstr "Administrateurs" msgid "Delete access permission" msgstr "Retirer des permissions" msgid "Add access permissions" msgstr "Ajouter des permissions" msgid " Directory mask: " msgstr " Masque de répertoire: " msgid " Create mode: " msgstr " Mode de creation: " msgid " Force user: " msgstr " Forcer un utilisateur: " msgid " Force group: " msgstr " Forcer un groupe: " msgid " Read only: " msgstr " Lecture seule: " msgid " Available: " msgstr " Disponible: " msgid " Browseable: " msgstr " Lisible: " msgid " Writable: " msgstr " Editable: " msgid " Guest ok: " msgstr " Invité ok: " msgid " Public: " msgstr " Publique: " msgid " Printable: " msgstr " Imprimable: " msgid " Share modes: " msgstr " Mode de partage: " msgid " File locking: " msgstr " Verouillage fichier: " msgid "Share name" msgstr "Nom de partage" msgid "Directory" msgstr "Répertoire" msgid "Comment" msgstr "Commentaire" msgid "Share settings:" msgstr "Paramétres du partage:" msgid "Account locked:" msgstr "Compte vérrouillé:" msgid "New user" msgstr "Nouvel utilisateur" msgid " Group: " msgstr " Groupe: " msgid " Shell: " msgstr " Commande: " msgid "Home directory" msgstr "Dossier personnel" msgid "User settings:" msgstr "Paramétres utilisateur:" msgid "Credits" msgstr "Crédits" msgid "Author: " msgstr "Auteur: " msgid "I want to thank the following for their contributions:" msgstr "Je souhaite remercier les contributeurs suivants:" msgid "" "The SAMBA developers.\n" "\n" msgstr "" "Les développeurs SAMBA.\n" "\n" msgid "for" msgstr "Pour" msgid "for the program icons.\n" msgstr "Pour les icônes du programme.\n" msgid "for the RPM spec file." msgstr "Pour les spécs des fichiers RPM." msgid "And all translators:" msgstr "Et tous les traducteurs:" msgid "Afrikaans" msgstr "Africain" msgid "Amharic" msgstr "Amharique" msgid "Arabic" msgstr "Arabe" msgid "Azerbaijani" msgstr "Azéri" 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-Taïwanais" msgid "Croatian" msgstr "Croatien" msgid "Czech" msgstr "Tchéque" msgid "Danish" msgstr "Danois" msgid "Dutch" msgstr "Néerlandais" msgid "Esperanto" msgstr "Espéranto" msgid "Estonian" msgstr "Estonien" msgid "Finnish" msgstr "Finlandais" msgid "French" msgstr "Français" msgid "Galician" msgstr "Galicien" msgid "German" msgstr "Allemand" msgid "Greek" msgstr "Grec" msgid "Hebrew" msgstr "Hebreu" msgid "Hini" msgstr "" msgid "Hungarian" msgstr "Hongrois" msgid "Icelandic" msgstr "Islandais" msgid "Indonesian" msgstr "Indonesien" msgid "Irish" msgstr "Irelandais" msgid "Italian" msgstr "Italien" msgid "Japanese" msgstr "Japonais" msgid "Korean" msgstr "Coréen" msgid "Kurdish" msgstr "Kurde" msgid "Latvian-Lettish" msgstr "" msgid "Lithuanian" msgstr "Lithuanien" msgid "Macedonian" msgstr "Macédonien" msgid "Maori" msgstr "Maori" msgid "Maltese" msgstr "Maltais" msgid "Norwegian" msgstr "Norvegien" msgid "Polish" msgstr "Polonais" msgid "Portuguese" msgstr "Portuguais" msgid "Portuguese-Brazil" msgstr "Portuguais" 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 "Tamul" msgid "Thai" msgstr "Thaï" msgid "Turkish" msgstr "Turc" msgid "Traditional Chinese" msgstr "Chinois traditionnel" msgid "Ukrainian" msgstr "Ukrainien" msgid "Vietnamese" msgstr "Vietnamien" msgid "Wallon" msgstr "Wallon" msgid "Welch" msgstr "Welch" msgid "Close" msgstr "Fermer" #, c-format msgid "Failed deleting samba machine account: %s\n" msgstr "Destruction du compte machine impossible: %s\n" msgid "No user specified.\n" msgstr "Aucun utilisateur précisé.\n" #, c-format msgid "Cant open smb.conf here: %s run gsambad as root.\n" msgstr "Impossible d'ouvrir smb.conf: %s démarrez GSAMBAD en tant que root.\n" #, c-format msgid "Could not remove the samba user: %s\n" msgstr "Impossible de retirer l'utilisateur: %s\n" msgid "" "The samba root user was deleted.\n" "The root system user can not be deleted.\n" msgstr "" "L'administrateur SAMBA à été détruit.;\n" "L'administrateur du systéme ne peut être détruit.;\n" msgid "No username specified.\n" msgstr "Aucun nom d'utlisateur.\n" msgid "The root user can not be deleted.\n" msgstr "L'adminsitrateur SAMBA ne peut être détruit.\n" #, c-format msgid "Failed to delete system user: %s\n" msgstr "Destruction de l'utilisateur impossible: %s\n" msgid "Group file not found" msgstr "Fichier du Groupe introuvable" msgid "Group name not found" msgstr "Nom de Groupe introuvable" msgid "User setting not found" msgstr "Paramétres utilisateur introuvables" msgid "No value has been set" msgstr "Aucun valeure paramétrée" msgid "Max randomize username length is 999\n" msgstr "Taille max des Nom d'utilisateur aléatoire = 999\n" msgid "Randomize username length can only contain digits\n" msgstr "Les nom d'utilisateur ne doivent contenir que des chiffres\n" msgid "Max home directory length is 8192 chars.\n" msgstr "Taille max du nom des dissiers personnels = 8 192.\n" msgid "Max randomize password length is 999\n" msgstr "Taille max des MotDePasse aléatoires = 999\n" msgid "Randomize password length can only contain digits\n" msgstr "Les MotDePasse aléatoires ne contiennent que des chiffres\n" msgid "Randomize length too long, changed it to 256.\n" msgstr "Taille aléatoire trop longue, 256 caractéres Max\n" msgid "Every certificate field must be filled in.\n" msgstr "Chaque champ du certificat doit être rempli.\n" msgid "The password field cant contain any spaces or newline chars.\n" msgstr "le champ MotDePasse ne peut contenir ni espace ni retour chariot.\n" #, c-format msgid "Error writing gprotls.conf here: %s\n" msgstr "Erreur d'écriture de gprotls.conf ici: %s\n" msgid "Creating private cert and key" msgstr "Création des clefs et certificats privés" msgid "The certificate has been created successfully\n" msgstr "Le certificat à correctement été créer\n" msgid "and placed in the correct location.\n" msgstr "et placé dans le bon répertoire.\n" msgid "It will be used by new FTP-TLS logins.\n" msgstr "Il sera utilisé par les nouveaux loging FT-TLS.\n" msgid "The certificate has not been created, something went wrong.\n" msgstr "Le certificat n'a pu être crée, quelque chose ne va pas.\n" msgid "Remote operations are not yet supported.\n" msgstr "Les opérations distantes ne sont pas encore supportées.\n" msgid "" "New samba users where added with empty passwords.\n" "See server settings and empty passwords.\n" msgstr "" "L'utilisateur à été ajouté avec un MotDePasse vide.\n" "vérifiez le paramétrage serveur pour les MotsDePasse vides.\n" #, c-format msgid "Number of added users: %ld\n" msgstr "Total Utilisateurs ajoutés: %ld\n" #, c-format msgid "Number of added groups: %ld\n" msgstr "Total groupes ajoutés: %ld\n" #, c-format msgid "" "Cant find the shells file here:\n" "%s\n" msgstr "" "Abscence du fichier de commande:\n" "%s\n" msgid "Empty password:" msgstr "MotDePasse absent:" #, c-format msgid "" "Couldnt open the settings file here:\n" "%s\n" msgstr "" "Abscence du fichier de paramétrage impossible:\n" "%s\n" #, c-format msgid "GSAMBAD %s settings" msgstr "GSAMBAD %s paramétres" msgid " New configuration: " msgstr " Nouvelle configuration: " msgid " Start winbindd: " msgstr " Démarrer le deamon Winbindd: " msgid " Path to smb.conf: " msgstr " Chemin vers smb.conf" msgid "Set version failed\n" msgstr "Vérification de la version échouée\n" #, c-format msgid " Information: SAMBA %s" msgstr " Information: SAMBA %s" msgid " samba (smbd) is not installed or not in your path." msgstr " samba (smbd) n'est pas installé ou chemin d'accés incorrect." msgid "GSAMBAD Help" msgstr "GSAMBAD Aide" msgid "" "\n" "Server settings:\n" msgstr "" "\n" "Paramétres Serveurs:\n" msgid "" "If all you want to do is share some directories you only need to change\n" msgstr "" "Si la seule chose que vous souhaitez faire est de partager des dossiers, vous avez simplement\n" msgid "" "the first visible part in the server settings tab and then press apply.\n" msgstr "" "a changer les paramétres dans l'onglet paramétres et de cliquersur Appliquer.\n" msgid "When you scroll down more advanced options will be shown.\n" msgstr "En descendant vous découvrirez les options avancées.\n" msgid "" "\n" "Users:\n" msgstr "" "\n" "Utilisateurs:\n" msgid "Adding a user can be done by specifying its username, group, password\n" msgstr "L'ajout d'un utilisateur peut être fait en spécifiant son Nom d'utilisateur, " "son groupe et son MotDePasse\n" msgid "and other settings, then clicking add.\n" msgstr "et les autres paramétrage en cliquant sur Ajouter.\n" msgid "" "After one user has been added this user can serve as a profile for other " "users.\n" msgstr "" "Le premier utilisateur ajouté sert de base pour l'ajout des autres utilisateurs.\n" msgid "" "Select a user in the user list, change its username and password then click " "add.\n" msgstr "" "Sélectionnez un utilisateur dans la liste , changez son Nom d'utilisateur et son " "MotDePasse et cliquez sur Ajouter.\n" msgid "" "Both users will then have the same settings except for the username and " "password.\n" msgstr "" "Les deux utilisateurs auront ainsi la même configuration exception faite de leur" "Nom et MotDePasse.\n" msgid "" "The new user button can be used to clear and insert default user settings, " "making it\n" msgstr "" "Le bouton Nouvel utilisateur peut servir à effacer ou a configurer de nouveaux " "paramétres utilisateurs\n" msgid "" "ready for adding new users.\n" "\n" msgstr "" "Pour la création de nouveaux utilisateurs.\n" "\n" msgid "" "Deleting a user can be done by selecting it in the list and then clicking " "delete.\n" msgstr "" "La destruction d'un tutilisateur peut être faite par le sélection d'un utilisateur " "puis par un clique sur le bouton detruire\n" "\n" msgid "" "The deleted user will also be deleted from any shared resource.\n" "\n" msgstr "" "Les utilisateurs detruits le seront aussi dans les ressources partagées.\n" "\n" msgid "" "Changing a users settings is done by changing the settings and clicking " "apply.\n" msgstr "" "Le changement de paramétrage utilisateur peutêtre fait par la saisie de nouveaux " "paramétrages puis en cliquant sur ajouter.\n" msgid "" "When you add a user you can randomize its name and password or use your " "own.\n" msgstr "" "La création d'un nom d'utilisateur et de son MotDePasse peut être fait par saisie " "aléatoire ou par saisie de son nom.\n" msgid "" "You can also select its login shell and where this user should have its home " "directory.\n" msgstr "" "Vous pouvez aussi ses commandes d'ouverture de session et l'emplacement de son répertoire " "de fichier de dossier personnel.\n" msgid "" "If the selected shell is /dev/null or /sbin/nologin the user can only login " "to this\n" msgstr "" "Si la commande est /dev/null ou /sbin/nologin l'utilisateur ne pourra que s'identifier a ces derniers\n" msgid "" "server, otherwise the user can login via ssh etc if the server allows this " "user to do so.\n" "\n" msgstr "" "serveurs, sinon l'utilisateur pourra s'identifier par SSH si le serveur le permet à l'utilisateur.\n" "\n" msgid "Shares:\n" msgstr "Partages:\n" msgid "" "Shares can be added by selecting a directory to share, setting its share " "permissions and clicking add.\n" msgstr "" "L'ajout de Partages se fait en le paramétrant par saisie des partages et des permissions " "puis en cliquant sur Ajouter.\n" msgid "" "Deleting a share is done by selecting the share to delete and clicking " "delete.\n" msgstr "" "La destruction d'un partage se fait en le sélectionnant dans la liste " "puis en cliquant sur Détruire.\n" msgid "" "Changing share settings can be done by changing its settings and then " "clicking the apply button.\n" "\n" msgstr "" "La modification des paramétrages des partages se fait en saisissant les " "bons paramétres puis en cliquant sur Appliquer.\n" "\n" msgid "Adding user and group access to shares:\n" msgstr "Ajouter des utilisateurs et des groupes aux Partages:\n" msgid "" "Share access for users and groups can be added in several ways. Those ways " "are:\n" msgstr "" "Les accés aux Partages peuvent être ajoutés de differentes façons. " "qui sont:\n" msgid "" "local users and groups, remote domain users and groups and each of these can " "have 4 different\n" msgstr "" "Utilisateurs et groupes locaux et d'un domaine distant et pour chacun " "d'entre eux 4 niveaux\n" msgid "" "permission classes. Multiple users and groups can be imported at once and " "duplicate additions are ignored.\n" "\n" msgstr "" "de permission. Plusieurs utilisateurs et groupe peuvent être importés en une seule fois, " "les duplicatas sont ignorés.\n" "\n" msgid "" "The new share button can be used to clear and insert default share settings, " "making it ready\n" msgstr "" "Le bouton Nouveau Partage peut être utiliser pour nettoyé ou inseré les paramétres par " "défaut prés à fonctionnés\n" msgid "" "for adding new shares.\n" "\n" msgstr "" "Pour l'ajout de nouveaux Partages.\n" "\n" msgid "" "Joining a samba domain with MSFT'tm(c)(r) (extreme copyright) clients:\n" msgstr "" "Connectez-vous a un domaine samba existant avec le client MSFT'tm(c)(r) (extreme copyright):\n" msgid "" "First disconnect all current connections on the client with: net use * /d\n" msgstr "" "D'abord déconnectez toutes les connexions du client avec: net use * /d\n" msgid "" "As administrator, select properties for \"this computer\" and write example." "org in the domain\n" msgstr "" "Avec les droits administrateur, saisissez les propriétés pour \"CetOrdinateur\" et écrivez-les " "dans le champ domain\n" msgid "" "field then press join domain. Use root as username and the samba root " "password in the dialog.\n" "\n" msgstr "" "puis appuyez sur Joindre un domaine. Utilisez root pour le nom et le MotDePasse associé " "dans la boite de dialogue.\n" "\n" msgid "Joining the domain with Linux or other open source clients:\n" msgstr "Joindre un domaine avec Linux ou un autre client open source:\n" msgid "" "net rpc join example.org -S samba24 -U root then supply the samba root " "password\n" msgstr "" "net rpc join example.org -S samba24 -U root ensuite entrer le MotDePasse root de SAMBA " "password\n" msgid "Mounting shares:\n" msgstr "Montage des Partages:\n" msgid "" "If you want to add directories thats not under the users root directory you " "can do this:\n" "\n" msgstr "" "Si vous souhaitez ajouter des répertoires qui ne sont pas dans le profil " "root, faites ainsi:\n" "\n" msgid "Linux (as of kernel 2.4.0):\n" msgstr "Linux (depuis le kernel 2.4.0):\n" msgid "" "mount --bind /some/directory/to/share /home/bob/make_this_directory_first\n" "\n" msgstr "" "mount --bind /some/directory/to/share /home/bob/make_this_directory_first\n" "\n" msgid "" "Alternatively:\n" "mount -o bind /var/data /home/bob/mounted_data\n" "\n" msgstr "" "Autre solution:\n" "mount -o bind /var/data /home/bob/mounted_data\n" "\n" msgid "" "*BSD (as of 4.4BSD):\n" "mount_null /var/data /home/bob/mounted_data\n" "\n" msgstr "" "*BSD (depuis 4.4BSD):\n" "mount_null /var/data /home/bob/mounted_data\n" "\n" msgid "" "Solaris:\n" "mount -F lofs /var/data /home/bob/mounted_data\n" "\n" msgstr "" "Solaris:\n" "mount -F lofs /var/data /home/bob/mounted_data\n" "\n" msgid "" "For more detailed information about the server and its configuration " "directives visit:\n" msgstr "" "Pour plus d'informations sur le serveur et des conseils de " "configuration, visitez:\n" msgid "http://www.samba.org\n" msgstr "http://www.samba.org\n" #, c-format msgid "GSAMBAD %s information" msgstr "Infos %s GSAMBAD" #, c-format msgid "" "Error: Could not backup the current configuration:\n" "%s\n" msgstr "" "Erreur: Sauvegarde du fichier de configuration actuel impossible:\n" "%s\n" #, c-format msgid "" "The samba configuration was backed up here for safety:\n" "%s\n" msgstr "" "La configuration de SAMBA à été double-sauvegardée ici:\n" "%s\n" #, c-format msgid "" "Cant write a new smb.conf here:\n" "%s\n" msgstr "" "L'ecriture du nouveau fichier smb.conf est impossible:\n" "%s\n" #, c-format msgid "" "Failed to create directories:\n" "%s\n" msgstr "" "Création des répertoires impossible:\n" "%s\n" #, c-format msgid "Failed chmodding a+r for directory: %s\n" msgstr "Application sur le répertoire des droits a+r impossible: %s\n" #, c-format msgid "Failed chowning the directories: %s\n" msgstr "Changement de propriétaire du répertoire impossible: %s\n" #, c-format msgid "Failed chmodding directory: %s\n" msgstr "Application des droits sur les répertoires impossible: %s\n" #, c-format msgid "Failed to create directory: %s/%s\n" msgstr "Création du répertoire échoué: %s/%s\n" msgid "GSAMBAD Question" msgstr "Question GSAMBAD" msgid "GSAMBAD could not find SAMBAs configuration (smb.conf) or the current\n" msgstr "Le fichier de configuration de SAMBA (smb.conf) n'a pas été trouver par GSAMBAD ou\n" msgid "" "configuration doesnt have all the features that GSAMBAD requires.\n" "\n" msgstr "" "Il manque des éléments de configuration nécesaires au fonctionnement de GSAMBAD.\n" "\n" msgid "Do you want to overwrite the current samba configuration ?\n" msgstr "Souhaitez-vous remplacer la configuration de SAMBA?\n" msgid "\t\t\t(If you dont know then press yes)\n" msgstr "\t\t\t(Si vous ne savez pas, appuyer sur Oui)\n" #, c-format msgid "" "Error: cant create the settings directory here:\n" "%s\n" msgstr "" "Erreur: Le fichier de paramétrage des répertoires ne peut être écrit ici:\n" "%s\n" #, c-format msgid "" "Error: cant write the settings file here:\n" "%s\n" msgstr "" "Erreur: Le fichier de paramétrage ne peut être écrit ici:\n" "%s\n" msgid "Status: Deactivated" msgstr "Etat: Arrêté" #, c-format msgid "Status: Activated %s" msgstr "Etat: %s Activé" msgid "Status: Activated" msgstr "Etat: Actif" #, c-format msgid "Couldn't find pixmap file: %s" msgstr "Fichier image introuvable: %s" gadmin-samba-0.3.2/po/ChangeLog0000644000076400007640000000012611427565755015214 0ustar mangemangeAdded French translation (Martial Lillo) Added Deutsch translation (Manfred Mueller) gadmin-samba-0.3.2/po/Makefile0000644000000000007640000001634111527566145014756 0ustar rootmange# 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-samba PACKAGE = gadmin-samba VERSION = 0.3.2 SHELL = /bin/sh srcdir = . top_srcdir = .. prefix = /usr exec_prefix = ${prefix} datadir = ${prefix}/share 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 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 = fr.po de.po GMOFILES = fr.gmo de.gmo DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = fr.gmo de.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) -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_ \ --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-samba-0.3.2/po/Makefile.in.in0000644000076400007640000001637410055776401016114 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 = @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@ 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@ 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 = 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) -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_ \ --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-samba-0.3.2/po/de.po0000644000000000000000000012661411427563511014117 0ustar rootrootmsgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-08-06 19:59+0200\n" "PO-Revision-Date: \n" "Last-Translator: M.Mueller aka Quax \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" msgid "Write the new users name and other settings in the user profile below.\n" msgstr "Benutzernamen und andere Einstellungen in das Benutzer-Profil schreiben.\n" msgid "" "Press apply to add this new user with the selected settings.\n" "\n" msgstr "" "Anwenden drcken um diesen Benutzer mit diesen Einstellungen hinzuzufgen. \n" "\n" msgid "You can also skip this step and directly alter an existing users name and\n" msgstr "Sie knnen diesen Schritt berspringen und den Benutzernamen sowie die\n" msgid "settings and then press apply. This can save administration time.\n" msgstr "Einstellungen eines existierenden Benutzers ndern und speichern. Das kann Administrationszeit einsparen.\n" msgid "Can not lock or unlock a samba user that does not exist.\n" msgstr "Kann keinen Samba-Nutzer sperren oder entsperren, der nicht existiert.\n" msgid "A username must be specified.\n" msgstr "Ein Benutzername mu angegeben werden.\n" msgid "Failed to lock samba account: %s\n" msgstr "Konnte Samba-Konto %s nicht sperren!\n" msgid "Failed to unlock samba account: %s using no password\n" msgstr "Konnte Samba-Konto %s ohne Passwort nicht entsperren\n" msgid "Failed to unlock samba account: %s using a password\n" msgstr "Konnte Samba-Konto %s mit Passwort nicht entsperren\n" msgid "Failed to unlock samba account: " msgstr "Konnte Samba-Konto nicht entsperren:" msgid "A new password is required to unlock users that have no previous\n" msgstr "Ein neues Passwort wird bentigt um einen Nutzer zu entsperren, \n" msgid "passwords or empty passwords. The provided password is too short.\n" msgstr "der bisher kein oder ein leeres Passwort hatte. Das eingegebene Passwort ist zu kurz.\n" msgid "You must specify a valid password for this new user.\n" msgstr "Sie mssen ein gltiges Passwort fr den neuen Benutzer angeben.\n" msgid "" "Failed to create missing samba password file:\n" "%s\n" msgstr "" "Konnte die fehlende Samba Passwort-Datei nicht erstellen:\n" "%s\n" msgid "A groupname must be specified.\n" msgstr "Ein Gruppenname mu angegeben werden.\n" msgid "A comment must be specified.\n" msgstr "Ein Kommentar mu angegeben werden.\n" msgid "A home directory must be specified.\n" msgstr "Ein Heim-Verzeichnis mu angegeben werden.\n" msgid "A shell must be specified.\n" msgstr "Eine Shell mu angegeben werden.\n" msgid "The root system user doesnt exist, nothing was done.\n" msgstr "Da Benutzer root nicht existiert, wurde nichts getan.\n" msgid "Failed changing samba password or adding samba user: %s\n" msgstr "nderung des Samba-Passwortes oder das Hinzufgen des neuen Nutzers: %s ist fehlgeschlagen\n" msgid "" "The samba password for root was changed.\n" "Nothing else was changed for this user.\n" msgstr "" "Das Samba Passwort fr root wurde gendert.\n" "Nichts anderes wurde fr diesen Benutzer gendert.\n" msgid "The password is too short, adding or changing samba user root failed.\n" msgstr "Das Passwort ist zu kurz, Hinzufgen oder ndern des Samba-Benutzers root ist misslungen.\n" msgid "" "Error adding system user: %s\n" "The command was: %s\n" msgstr "" "Fehler beim Hinzufgen von Benutzer: %s\n" "Der Befehl war: %s\n" msgid "Error adding system user: %s\n" msgstr "Fehler beim Hinzufgen des System-Benutzers: %s\n" msgid "Failed changing password or adding samba user: %s\n" msgstr "ndern des Passwortes oder Hinzufgen des Samba-Benutzers: %s ist fehlgeschlagen\n" msgid "Failed changing system comment for samba user: %s\n" msgstr "Fehler beim ndern des Systemkommentares fr Samba Benutzer: %s\n" msgid "Error creating directory: %s/samba/profiles/%s\n" msgstr "Fehler beim Erstellen des Verzeichnisses: %s/samba/profiles/%s\n" msgid "Error chowning directory: %s/samba/profiles/%s\n" msgstr "Rechtevergabe fr Verzeichnis %s/samba/profiles/%s gescheitert\n" msgid "" "Failed creating missing file:\n" "%s\n" msgstr "" "Konnte fehlende Datei nicht erstellen:\n" "%s\n" msgid "This machine account already exists.\n" msgstr "Computer-Konto existiert bereits.\n" msgid "Error adding system machine account: %s\n" msgstr "Kann das System-Computerkonto: %s nicht hinzufgen\n" msgid "Failed adding samba machine account: %s\n" msgstr "Kann das Samba-Computerkonto: %s nicht hinzufgen\n" msgid "The share name is missing, the share was not added.\n" msgstr "Der Name der Freigabe fehlt. Sie wurde nicht hinzugefgt.\n" msgid "The directory to share is missing, the share was not added.\n" msgstr "Das freizugebende Verzeichnis fehlt. Es wurde nicht hinzugefgt.\n" msgid "" "Cant open smb.conf here:\n" "%s\n" msgstr "" "smb.conf kann hier nicht geffnet werden:\n" "%s\n" msgid "The share already exists.\n" msgstr "Die Freigabe existiert bereits.\n" msgid "" "Can not write new samba configuration here:\n" "%s\n" msgstr "" "Eine neue Samba Konfiguration kann in:\n" "%s nicht geschrieben werden\n" msgid "" "Failed adding default smbusers file here:\n" "%s\n" msgstr "" "Die smbusers-Datei konnte nicht hinzugefgt werden:\n" "%s\n" msgid "" "A new smbusers map file was added here:\n" "%s\n" " It has the following contents: \"root = administrator\" and \"nobody = smbguest\".\n" msgstr "" "Eine neue smbusers map Datei wurde hier hinzugefgt:\n" "%s\n" " Sie hat den folgenden Inhalt: \"root = administrator\" und \"nobody = smbguest\".\n" msgid "" "Failed adding the system user:\n" "%s\n" msgstr "" "Konnte den Systemnutzer nicht hinzufgen:\n" "%s\n" msgid "" "Cant open smb.conf here: \n" "%s\n" msgstr "" "Kann die smb.conf hier nicht ffnen: \n" "%s\n" msgid "The define for SAMBA_CONF is bad, please reinstall the application.\n" msgstr "SAMBA_CONF ist falsch definiert, bitte die Anwendung neu installieren.\n" msgid "Please specify the server name.\n" msgstr "Bitte den Servernamen angeben.\n" msgid "Please specify a workgroup or domain name.\n" msgstr "Bitte Arbeitsgruppen- oder Domnen-Namen angeben.\n" msgid "" "Can not find the [global] section in %s\n" "No changes made.\n" msgstr "" "Kann die Sektion [global] in %s nicht finden\n" "Es wurde nichts gendert.\n" msgid "A line with over 4000 chars is not valid in: %s\n" msgstr "Eine Zeile mit ber 4000 Zeichen ist ungltig in: %s\n" msgid "" "Cant write smb.conf here:\n" "%s\n" msgstr "" "Kann smb.conf hier nicht schreiben:\n" "%s\n" msgid "" "Auto configuration for \"user\" security level done.\n" "Review any changes.\n" msgstr "" "Auto-Konfiguration fr Sicherheitsebene \"Benutzer\" fertig.\n" "Bitte nderungen prfen.\n" msgid "" "Auto configuration for (BDC) \"backup domain controller\" done.\n" "Unlock and supply a samba password for the samba root account if needed.\n" msgstr "" "Auto-Konfiguration fr (BDC) \"Backup Domnen-Kontroller\" fertig.\n" "Entsperren und ein Samba Passwort fr das Samba root Konto erforderlich.\n" msgid "" "Auto configuration for (PDC) \"primary domain controller\" done.\n" "Connect to this domain as root after giving it a samba password and unlocking it.\n" msgstr "" "Auto-Konfiguration for (PDC) \"Primrer Domnen-Kontroller\" fertig.\n" "Bitte Samba-Passwort erstellen, entsperren und mit dieser Domne als root verbinden.\n" msgid "" "Auto configuration for (ADS) \"Active directory\" security level done.\n" "Setup the kerberos realm and connect to this domain as root after giving it a samba password and unlocking it.\n" msgstr "" "Auto Konfiguration fr das (ADS) \"Active Directory\" Sicherheitsebene fertig.\n" "Kerberos Realm konfigurieren, entsperren und und mit dieser Domne als root verbinden.\n" msgid "" "Error!!! Auto configuration for \"No\" security level done.\n" "Please review any changes.\n" msgstr "" "Fehler!!! Auto Konfiguration fr die \"Keine\" Sicherheitsebene fertig.\n" "Bitte nderungen prfen.\n" msgid "" "These default shares cant be changed at the moment.\n" "Edit the configuration for now\n" msgstr "" "Diese Standard-Freigaben knnen momentan nicht gendert werden.\n" "Konfiguration fr temporr gendert.\n" msgid "" "The machine account: %s\n" "can not be changed because it does not exist.\n" msgstr "" "Das Computer-Konto: %s\n" "kann nicht gendert werden, da es nicht existiert.\n" msgid "Failed adding locked samba user: %s\n" msgstr "Konnte gesperrten Samba-Benutzer nicht hinzufgen: %s\n" msgid "Failed disabling/locking samba user: %s\n" msgstr "Konnte den Samba-Benutzer nicht deaktivieren/sperren: %s\n" msgid "Failed adding null password samba user: %s\n" msgstr "Konnte Samba-Benutzer ohne Passwort nicht hinzufgen: %s\n" msgid "Failed locking null password samba user: %s\n" msgstr "Sperren des Samba-Benutzers ohne Passwort: %s ist fehlgeschlagen\n" msgid "Process ID" msgstr "Prozess-ID" msgid "User" msgstr "Benutzer" msgid "Group" msgstr "Gruppe" msgid "Client computer" msgstr "Client-Computer" msgid "Client address" msgstr "Client-Adresse" msgid "File in use" msgstr "Datei wird benutzt" msgid "Disconnect selected processes" msgstr "Trenne die ausgewhlten Prozesse" msgid "Delete this system user ?" msgstr "Diesen System-Benutzer lschen?" msgid "Do you also want to delete the system user ?" msgstr "Den System-Benutzer ebenfalls lschen?" msgid "Username: " msgstr "Benutzername: " msgid "No" msgstr "Nein" msgid "Delete" msgstr "Lschen" msgid "Mounted on" msgstr "Eingehngt in" msgid "Free space" msgstr "Freier Platz" msgid "Used space" msgstr "Benutzter Platz" msgid "Total space" msgstr "Gesamter Platz" msgid "Percent used" msgstr "Prozent benutzt" msgid "Device" msgstr "Gert" msgid "GADMIN-SAMBA %s access permissions" msgstr "GADMIN-SAMBA %s Zugriffsrechte" msgid "Local computer:" msgstr "Client-Computer" msgid "Remote master domain:" msgstr "Entfernte Haupt-Domne:" msgid "Users:" msgstr "Benutzer:" msgid "Groups:" msgstr "Gruppen" msgid "Access allowed:" msgstr "Zugriff erlaubt:" msgid "Access denied:" msgstr "Zugriff verboten:" msgid "Write access:" msgstr "Schreibzugriff:" msgid "Administrators:" msgstr "Administratoren:" msgid "Select any local users you want to import" msgstr "Zu importierende lokale Benutzer whlen" msgid "Select any local groups you want to import" msgstr "Zu importierende lokale Gruppen whlen" msgid "Select any remote users you want to import" msgstr "Zu importierende entfernte Benutzer whlen" msgid "Select any remote groups you want to import" msgstr "Zu importierende entfernte Gruppen whlen" msgid "Username" msgstr "Benutzername" msgid "Cancel" msgstr "Abbrechen" msgid " Machine name: " msgstr " Computername:" msgid " Comment: " msgstr " Kommentar:" msgid "NetBIOS machine name" msgstr "NetBIOS-Computername" msgid "Machine group" msgstr "Computergruppe" msgid "Machine comment" msgstr "Computerkommentar" msgid "Machine account settings:" msgstr "Computerkonto-Einstellungen: " msgid "Activate" msgstr "Aktivieren" msgid "Deactivate" msgstr "Deaktivieren" msgid "Reread" msgstr "Neu einlesen" msgid "Settings" msgstr "Einstellungen" msgid "Help" msgstr "Hilfe" msgid "About" msgstr "ber" msgid "Quit" msgstr "Beenden" msgid "Server settings" msgstr "Server-Einstellungen" msgid "Users" msgstr "Benutzer" msgid "Shares" msgstr "Freigaben" msgid "Machines" msgstr "Computer" msgid "Domain management" msgstr "Domnenverwaltung" msgid "Connections" msgstr "Verbindungen" msgid "Disc" msgstr "Platte" msgid "Security" msgstr "Sicherheit" msgid "Configuration" msgstr "Konfiguration" msgid "Information: cant read version" msgstr "Information: Kann die Version nicht lesen" msgid "Status: unknown" msgstr "Status: unbekannt " msgid "Security information" msgstr "Sicherheitsinformation" msgid " The servers host name: " msgstr " Name des Servers: " msgid "IE: Samba24. Use this name to connect to this server from the clients" msgstr "zB: Samba24. Diesen Namen benutzen, um sich mit dem Server zu verbinden" msgid "A comment for this server, IE: SAMBA Server racoon city, 3rd floor 15th room, crazy scientist dudes" msgstr "Ein Kommentar zu diesem Server, zB: SAMBA Server Mlheim, 3. Stock, Raum 15, Entwicklung" msgid " Workgroup or domain name: " msgstr " Arbeitsgruppen- oder Domnen-Name:" msgid "IE: work-group-name or sambaserver2.example.org (spaces arent allowed). If SAMBA is set up as a domain then use this domain name to connect to from the clients" msgstr "zB: Arbeitsgruppe oder sambaserver2.example.org (Leerzeichen sind nicht erlaubt). Wenn SAMBA als eine Domne konfiguriert ist, diesen Domnennamen zum Verbinden benutzen" msgid " Security level: " msgstr " Sicherheitsstufe: " msgid "Backup Domain" msgstr "Backup Domne" msgid "Primary Domain" msgstr "Primre Domne" msgid "Active directory" msgstr "Active Directory" msgid " Active directory kerberos realm: " msgstr " Active Directory Kerberos-Realm: " msgid "ADS Kerberos realm, IE: domain.example.org" msgstr "ADS Kerberos-Realm, zB: entwicklung.lin2go.com" msgid " Allowed hosts and networks: " msgstr " Erlaubte Rechner und Netzwerke:" msgid "Hosts and networks allowed to connect to this server, IE: 127. 192.168.0." msgstr "Rechner und Netzwerke, die sich mit dem Server verbinden drfen, zB: 127. 192.168.0." msgid " Handle connections on: " msgstr " Behandle Verbindungen auf:" msgid "Network interfaces to listen on, IE: eth0 127.0.0.1/8 192.168.0.120/24" msgstr " Samba-Netzwerkschnittstellen, zB: eth0 127.0.0.1/8 192.168.0.120/24" msgid " Announce this server to: " msgstr " Diesen Server anzeigen als:" msgid "Announce this servers precence to the specified networks, IE: 192.168.0.255 192.168.2.44" msgstr "Diesen Server folgenden Netzwerken bekannt machen, zB: 192.168.0.255 192.168.2.44" msgid " Retrieve announcements from: " msgstr " Erhalte Bekanntmachungen von: " msgid "Retrieve announcements from the specified networks, IE: 192.168.0.255 192.168.2.44" msgstr "Erhalte Bekanntmachungen von folgenden Netzwerken, zB: 192.168.0.255 192.168.2.44" msgid " Printcap filepath: " msgstr " Printcap Dateipfad: " msgid "Path to the printcap file, IE: /etc/printcap" msgstr "Pfad zur printcap-Datei, zB: /etc/printcap" msgid " Automatically load printer list: " msgstr " Liste automatisch geladener Drucker: " msgid "Yes" msgstr "Ja" msgid "Server settings for advanced administrators:" msgstr "Server Einstellungen fr fortgeschrittene Administratoren" msgid " CUPS Options: " msgstr " CUPS Optionen" msgid "Raw" msgstr "Roh" msgid " Guest user: " msgstr " Gast-Nutzer:" msgid "The name of the guest user, IE: guest" msgstr "Der Name des Gast-Nutzers, zB: gast" msgid " SAMBA log file: " msgstr " SAMBA Log-Datei: " msgid "Path to the log file, IE: /var/log/samba/samba.log or /var/log/samba/%m.log for individual computer logs" msgstr " Pfad zur Log-Datei, zB: /var/log/samba/samba.log oder /var/log/samba/%m.log fr individuelle Computer-Logs" msgid " Max logfile size: " msgstr " Maximale Log-Datei Gre: " msgid "The maximum logfile size in Kb." msgstr "Maximale Gre der Log-Datei in KB." msgid " Allow empty passwords: " msgstr " Erlaube leere Passworte:" msgid " Username match level: " msgstr " bereinstimmungsgrad Benutzername:" msgid "Username match level allows matching of _n_ characters of the username for all combinations of upper and lower case." msgstr "Der bereinstimmungsgrad des Benutzernamens erlaubt _n_ Grobuchstaben im Benutzernamen." msgid " Password match level: " msgstr " berinstimmungsgrad Pawort:" msgid "Password match level allows matching of _n_ characters of the password for all combinations of upper and lower case." msgstr "Der bereinstimmungsgrad des Passworts erlaubt _n_ Grobuchstaben im Pawort." msgid " Encrypt passwords: " msgstr " Passworte verschlsseln:" msgid " Syncronize passwords: " msgstr " Passworte synchronisieren:" msgid " Socket transfer options: " msgstr " Sockel-bertragungsoptionen:" msgid "The Socket transfer options, IE: TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192" msgstr "Die Sockel-bertragungsoptionen, zB: TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192" msgid " Local master browser: " msgstr " Lokaler Master-Browser" msgid " Domain master browser: " msgstr " Domnen Master-Browser" msgid " Preferred master: " msgstr " Bevorzugter Master:" msgid " Master browser election level: " msgstr " Master-Browser Auswahlstufe: " msgid "Determines the precedence of this server in master browser elections." msgstr "Ermittelt die Prioritt dieses Servers in der Master-Browser-Auswahl." msgid " Domain logons: " msgstr " Domnen Logons: " msgid " Logon drive: " msgstr " Logon Laufwerk:" msgid "The drive letter of the home directory, IE: h: or m:" msgstr "Die Laufwerksbezeichnung des Heim-Verzeichnisses, zB: h: oder m:" msgid " Logon home: " msgstr " Login-Verzeichnis:" msgid "The path to the users home, \\\\%L\\homes\\%u" msgstr "Der Pfad zum Heim-Verzeichnis des Benutzers, \\\\%L\\homes\\%u" msgid " Logon profile path: " msgstr " Loginprofil-Pfad: " msgid "The logon profile path, IE: \\\\%L\\profiles\\%u" msgstr "Der Loginprofil-Pfad, zB: \\\\%L\\profiles\\%u" msgid " Logon script: " msgstr " Login-Skript: " msgid "The logon script. IE: %U.bat (user_name.bat),%G.bat (group_name.bat), %m.bat (machine_name.bat) or just login.bat. Place the scripts in the netlogon directory" msgstr "Das Login-Skript. zB: %U.bat (Benutzer_Name.bat),%G.bat (Gruppen_Name.bat), %m.bat (Computer_Name.bat) oder nur login.bat. Die Skripte im \"netlogon\"-Verzeichnis ablegen." msgid " Time server: " msgstr " Zeit-Server:" msgid " NetBIOS name resolve order: " msgstr " NetBIOS Namensauflsungs-Reihenfolge: " msgid "The NetBIOS name resolve order, IE: wins lmhosts bcast" msgstr "Die NetBIOS Namensauflsungs-Reihenfolge, zB: wins lmhosts bcast" msgid " WINS support: " msgstr " WINS Untersttzung: " msgid " Wins servers: " msgstr " Wins Server: " msgid "The Wins servers, IE: 192.168.0.130" msgstr "Die Wins Server, zB: 192.168.0.130" msgid " Act as a WINS proxy: " msgstr " Arbeite als WINS Proxy: " msgid " Act as a DNS proxy: " msgstr " Arbeite als DNS Proxy: " msgid " Case sensitive filenames: " msgstr " Gro-/Kleinschreibung Datei-Namen: " msgid " Client use spnego: " msgstr " Client benutzt spnego: " msgid " Client signing: " msgstr " Client-Signatur:" msgid " Client schannel: " msgstr " Sicherer Client-Kanal:" msgid " Server signing: " msgstr " Server-Signatur:" msgid " Server schannel: " msgstr " Sicherer Server-Kanal:" msgid " Pipe support: " msgstr " Pipe Untersttzung: " msgid " Status support: " msgstr " Status Untersttzung: " msgid " Allow trusted domains: " msgstr " Erlaube vertraute Domnen: " msgid " Obey PAM restrictions: " msgstr " Beachte PAM-Einschrnkungen:" msgid " Enable print spooler: " msgstr " Aktiviere Drucker-Warteschlange: " msgid " Allow plain text authentication: " msgstr " Erlaube reine Text-Authentifizierung: " msgid " Disable netbios: " msgstr " Deaktiviere NetBios: " msgid " Follow symlinks: " msgstr " Folge symbolischen Links: " msgid " Update encrypted: " msgstr " Verschlsselte Aktualisierung:" msgid " PAM password change: " msgstr " PAM Passwortwechsel: " msgid " Password chat timeout: " msgstr " Passwort chat timeout:" msgid "Time until password chats time out." msgstr "Zeit bis zum Zeitablauf des Chat-Passwortes." msgid " Hostname lookups: " msgstr " Hostnamensuche: " msgid " SAMBA username file: " msgstr " SAMBA Benutzernamen-Datei: " msgid "The path to SAMBA's username file, IE: /etc/samba/smbusers" msgstr "Der Pfad zur SAMBA Benutzernamen-Datei, zB: /etc/samba/smbusers" msgid " The systems password program: " msgstr " Der System-Passwortbefehl: " msgid "The path to the systems passwd program, IE: /usr/bin/passwd" msgstr "Pfad zum System-Passwortbefehl, zB: /usr/bin/passwd" msgid " New password phraze: " msgstr " Anzeige fr neues Passwort: " msgid "" "The new password phrase, IE: *new*password* \\%n\\n" " *ReType*new*password* \\%n\\n" " *password:*changed*sucessfully*" msgstr "" "Anzeige fr das neue Passwort, zB: *neues*Passwort* \\%n\\n" " *Tippe*neues*Passwort*erneut* \\%n\\n" " *Passwort:*erfolgreich*gewechselt*" msgid " Add user script: " msgstr " System-Benutzerskript: " msgid "Add user script, IE: /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null" msgstr "Benutzerskript, zB: /usr/sbin/useradd -d /dev/null -c 'Samba Benutzerkonto' -s /dev/null" msgid " Add user to group script: " msgstr " Benutzergruppenskript: " msgid "Add user to group script, IE: /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g'" msgstr "System-Benutzergruppenskript, zB: /usr/sbin/useradd -d /dev/null -c 'Samba Benutzerkonto' -s /dev/null -g '%g'" msgid " Add group script: " msgstr " Gruppenskript: " msgid "Add group script, IE: /usr/sbin/groupadd '%g'" msgstr "Grupenskript, zB: /usr/sbin/groupadd '%g'" msgid " Delete user script: " msgstr " Benutzer-Lschskript: " msgid "Delete user script, IE: /usr/sbin/userdel '%u'" msgstr "Benutzer-Lschskript, zB: /usr/sbin/userdel '%u'" msgid " Delete user from group script: " msgstr " Benutzergruppen-Lschskript:" msgid "Delete user from group script, IE: /usr/sbin/userdel '%u' '%g'" msgstr "Benutzergruppen-Lschskript, zB: /usr/sbin/userdel '%u' '%g'" msgid " Delete group script: " msgstr " Gruppen-Lschskript: " msgid "Delete group script, IE: /usr/sbin/groupdel '%g'" msgstr "Gruppen-Lschskript, zB: /usr/sbin/groupdel '%g'" msgid " Add machine account script: " msgstr " Computerkonto-Skript: " msgid "IE: /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M %u" msgstr "Computerkonto-Skript, zB: /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Computer-Konto' -s /dev/null -M %u" msgid " Machine password timeout: " msgstr " Computerpasswort-Zeitlimit" msgid "Machine password timeout, IE: 120 (seconds)" msgstr "Computerpasswort-Zeitlimit, zB: 120 (Sekunden)" msgid " Username id range: " msgstr " Benutzernamen ID-Bereich:" msgid "The users uids, IE: 16777216-33554431" msgstr "Die Benutzer uids, zB: 16777216-33554431" msgid " Group id range: " msgstr " Gruppen ID-Bereich" msgid "The users gids, IE: 16777216-33554431" msgstr "Der Gruppen ID-Bereich, zB: 16777216-33554431" msgid " Template shell: " msgstr " Beispiel-Shell:" msgid "The template shell, IE: /dev/null" msgstr "Die Beispiel-Shell, zB: /dev/null" msgid " Winbind use default domain: " msgstr " Winbind benutzt die Standard-Domne:" msgid " Winbind separator: " msgstr " Winbind Trenner: " msgid "Winbind separator, IE: @ for user@server.org" msgstr "Winbind Trenner, zB: @ fr user@server.org" msgid " Winbind cache timeout: " msgstr " Winbind Cache-Zeitlimit:" msgid "Time until winbind cache times out." msgstr "Zeit bis zum Ablauf des Winbind-Cache-Zeitlimits." msgid " Winbind trusted domains only: " msgstr " Nur Winbind vertraute Domnen:" msgid " Winbind nested groups: " msgstr " Verschachtelte Winbind-Gruppen:" msgid " Winbind nss info: " msgstr " Winbind nss Info: " msgid " Winbind refresh tickets: " msgstr " Winbind Aktualisierungs-Tickets:" msgid " Winbind offline logon: " msgstr " Winbind offline Login: " msgid "Write the new share name and other settings in the share settings below.\n" msgstr "Neuen Freigabe-Namen und andere Einstellungen in die Freigabe-Einstellungen schreiben.\n" msgid "" "Press add to add this new share with the selected settings.\n" "\n" msgstr "" "Hinzufgen drcken, um eine neue Freigabe mit den gewhlten Einstellungen zu erstellen.\n" "\n" msgid "You can also skip this step and directly alter an existing shares name,\n" msgstr "Sie knnen diesen Schritt weglassen und einen existierenden Freigabe-Namen direkt ndern,\n" msgid "settings and then press add. This can save administration time.\n" msgstr "und dann hinzufgen drcken. Dies kann Zeit fr die Administration einsparen.\n" msgid "New share" msgstr "Neue Freigabe" msgid " Share name: " msgstr " Freigabename:" msgid "The name of the Share" msgstr "Der Name der Freigabe" msgid "Shared directory:" msgstr "Freigegebenes Verzeichnis: " msgid "Select a directory to share" msgstr "Ein freizugebendes Verzeichnis whlen" msgid "Access permissions for users and groups in the selected share:" msgstr "Freigabe-Berechtigungen fr Benutzer und Gruppen:" msgid "Access allowed" msgstr "Zugriff erlaubt" msgid "Access denied" msgstr "Zugriff verweigert" msgid "If a group has been allowed access you can deny access for some of the users in this group here" msgstr "Wenn eine Gruppe Zugriff hat, kann hier einzelnen Benutzer dieser Gruppe der Zugriff verweigert werden." msgid "Write access" msgstr "Schreibzugriff" msgid "Administrators" msgstr "Administratoren" msgid "Delete access permission" msgstr "Lsche Zugriffserlaubnis" msgid "Add access permissions" msgstr "Fge Zugriffserlaubnis hinzu" msgid " Directory mask: " msgstr " Verzeichnis-Maske: " msgid " Create mode: " msgstr " Erzeuge-Modus:" msgid " Force user: " msgstr " Erzwinge Benutzer: " msgid " Force group: " msgstr " Erzwinge Gruppe: " msgid " Read only: " msgstr " Nur lesbar:" msgid " Available: " msgstr " Verfgbar:" msgid " Browseable: " msgstr " Durchsuchbar:" msgid " Writable: " msgstr " Schreibbar: " msgid " Guest ok: " msgstr " Gast-Zugriff: " msgid " Public: " msgstr " ffentlich: " msgid " Printable: " msgstr " Druckbar: " msgid " File locking: " msgstr " Datei-Sperrung: " msgid " Strict locking: " msgstr " Strikte Sperrung: " msgid "Share name" msgstr "Freigabename" msgid "Directory" msgstr "Verzeichnis" msgid "Comment" msgstr "Kommentar" msgid "Share settings:" msgstr "Freigabe-Einstellungen:" msgid "Account locked:" msgstr "Konto gesperrt:" msgid "New user" msgstr "Neuer Benutzer" msgid "Username:" msgstr "Benutzername:" msgid "Create a randomized username" msgstr "Einen zuflligen Benutzernamen generieren" msgid "The name of the user." msgstr "Der Benutzername." msgid "Password:" msgstr "Passwort:" msgid "Create a randomized password" msgstr "Ein zuflliges Passwort generieren" msgid "The users password." msgstr "Das Benutzer-Passwort" msgid " Group: " msgstr " Gruppe: " msgid "The group the user belongs to" msgstr "Die Gruppenzugehrigkeit des Benutzers" msgid "A comment about the user" msgstr "Ein Kommentar zu dem Benutzer" msgid "Home directory:" msgstr "Heimverzeichnis:" msgid "Choose a home directory for this user" msgstr "Ein Heimverzeichnis fr diesen Benutzer whlen" msgid "The users home directory, IE: /home/UserName or /dev/null to skip making a homedirectory." msgstr "Das Heimverzeichnis des Benutzers, zB: /home/BenutzerName oder /dev/null fr kein Heimverzeichnis." msgid " Shell: " msgstr " Shell:" msgid "Home directory" msgstr "Heim-Verzeichnis" msgid "User settings:" msgstr "Benutzereinstellungen:" msgid "Credits" msgstr "Dank an" msgid "Author: " msgstr "Verfasser: " msgid "I want to thank the following for their contributions:" msgstr "Ich mchte folgenden Personen fr Ihren Beitrag danken:" msgid "" "The SAMBA developers.\n" "\n" msgstr "" "Den SAMBA Entwicklern.\n" "\n" msgid "for" msgstr "fr" msgid "for the program icons.\n" msgstr "fr die Programm-Symbole.\n" msgid "for the RPM spec file." msgstr "fr die RPM-spec-Datei." msgid "And all translators:" msgstr "Und allen bersetzern:" msgid "Afrikaans" msgstr "Afrikaans" msgid "Amharic" msgstr "thiopisch" msgid "Arabic" msgstr "Arabisch" msgid "Azerbaijani" msgstr "Azerbeidschanisch" msgid "Basque" msgstr "Baskisch" msgid "Bulgarian" msgstr "Bulgarisch" msgid "Breton" msgstr "Bretonisch" msgid "Brittish-English" msgstr "Britisches Englisch" msgid "Bosnian" msgstr "Bosnisch" msgid "Byelorussian" msgstr "Weirussisch" msgid "Catalan" msgstr "Katalanisch" msgid "Chinese" msgstr "Chinesisch" msgid "Chinese-Taiwan" msgstr "Taiwanesisches Chinesisch" msgid "Croatian" msgstr "Kroatisch" msgid "Czech" msgstr "Tschechisch" msgid "Danish" msgstr "Dnisch" msgid "Dutch" msgstr "Niederlndisch" msgid "Esperanto" msgstr "Esperanto" msgid "Estonian" msgstr "Estnisch" msgid "Finnish" msgstr "Finnisch" msgid "French" msgstr "Franzsisch" msgid "Galician" msgstr "Galizisch" msgid "German" msgstr "Deutsch" msgid "Greek" msgstr "Griechisch" msgid "Hebrew" msgstr "Hebrisch" msgid "Hini" msgstr "Hindi" msgid "Hungarian" msgstr "Ungarisch" msgid "Icelandic" msgstr "Islndisch" msgid "Indonesian" msgstr "Indonesisch" msgid "Irish" msgstr "Irisch" msgid "Italian" msgstr "Italienisch" msgid "Japanese" msgstr "Japanisch" msgid "Korean" msgstr "Koreanisch" msgid "Kurdish" msgstr "Kurdisch" msgid "Latvian-Lettish" msgstr "Lettisch" msgid "Lithuanian" msgstr "Littauisch" msgid "Macedonian" msgstr "Mazedonisch" msgid "Maori" msgstr "Maori" msgid "Maltese" msgstr "Maltesisch" msgid "Norwegian" msgstr "Norwegisch" msgid "Polish" msgstr "Polnisch" msgid "Portuguese" msgstr "Portugiesisch" msgid "Portuguese-Brazil" msgstr "Brasilianisches Portugiesisch" msgid "Romanian" msgstr "Rumnisch" msgid "Russian" msgstr "Russisch" msgid "Serbian" msgstr "Serbisch" msgid "Slovak" msgstr "Slowakisch" msgid "Slovenian" msgstr "Slowenisch" msgid "Spanish" msgstr "Spanisch" msgid "Swedish" msgstr "Schwedisch" msgid "Tamil" msgstr "Tamilisch" msgid "Thai" msgstr "Thailndisch" msgid "Turkish" msgstr "Trkisch" msgid "Traditional Chinese" msgstr "Traditionelles Chinesisch" msgid "Ukrainian" msgstr "Ukrainisch" msgid "Vietnamese" msgstr "Vietnamesisch" msgid "Wallon" msgstr "Wallonisch" msgid "Welch" msgstr "Welsch" msgid "Close" msgstr "Schliessen" msgid "Failed deleting samba machine account: %s\n" msgstr "Konnte Samba-Computerkonto nicht lschen: %s\n" msgid "No user specified.\n" msgstr "Kein Benutzer angegeben.\n" msgid "Cant open smb.conf here: %s run gadmin-samba as root.\n" msgstr "Kann smb.conf hier nicht ffnen: %s betreibt gadmin-samba als root.\n" msgid "" "The samba root user was deleted.\n" "The root system user can not be deleted.\n" msgstr "" "Der Samba-Benutzer root wurde gelscht.\n" "Der System-Benutzer root kann nicht gelscht werden.\n" msgid "Could not remove the samba user: %s\n" msgstr "Konnte den Samba-Benutzer nicht entfernen: %s\n" msgid "No username specified.\n" msgstr "Kein Benutzername angegeben.\n" msgid "The root user can not be deleted.\n" msgstr "Der Benutzer root kann nicht gelscht werden.\n" msgid "Failed to delete system user: %s\n" msgstr "Konnte den System-Benutzer nicht lschen: %s\n" msgid "Group file not found" msgstr "Gruppen-Datei nicht gefunden" msgid "Group name not found" msgstr "Gruppen-Name nicht gefunden" msgid "User setting not found" msgstr "Benutzereinstellungen nicht gefunden" msgid "No value has been set" msgstr "Es wurde kein Wert gesetzt" msgid "Max randomize username length is 999\n" msgstr "Die maximale Lnge eines zuflligen Benutzernamens ist 999\n" msgid "Randomize username length can only contain digits\n" msgstr "Eine zufllige Benutznamenlnge kann nur Zahlen enthalten\n" msgid "Max home directory length is 8192 chars.\n" msgstr "Die maximale Heim-Verzeichnis Lnge betrgt 8192 Buchstaben.\n" msgid "Max randomize password length is 999\n" msgstr "Die maximale Lnge eines zuflligen Passwortes betrgt 999\n" msgid "Randomize password length can only contain digits\n" msgstr "Eine zufllige Passwortlnge kann nur Zahlen enthalten\n" msgid "Randomize length too long, changed it to 256.\n" msgstr "Zufllige Lnge zu lang, in 256 gendert.\n" msgid "Remote operations are not yet supported.\n" msgstr "Entfernte Zugriffe werden momentan nicht untersttzt.\n" msgid "" "New samba users where added with empty passwords.\n" "See server settings and empty passwords.\n" msgstr "" "Neue Samba-Benutzer wurden mit leeren Passworten hinzugefgt.\n" "Bitte Server-Einstellungen und leere Passworte berprfen.\n" msgid "Number of added users: %ld\n" msgstr "Anzahl der hinzugefgten Benutzer: %ld\n" msgid "Number of added groups: %ld\n" msgstr "Anzahl der hinzugefgten Gruppen: %ld\n" msgid "" "Cant find the shells file here:\n" "%s\n" msgstr "" "Kann die Shell-Dateien hier nicht finden:\n" "%s\n" msgid "Missing password:" msgstr "Fehlendes Passwort:" msgid "Empty password:" msgstr "Leeres Passwort:" msgid "" "Couldnt open the settings file here:\n" "%s\n" msgstr "" "Konnte die Datei mit den Einstellungen nicht ffnen:\n" "%s\n" msgid "Set version failed\n" msgstr "Setzen der Version gescheitert\n" msgid " Information: SAMBA %s" msgstr " Information: SAMBA %s" msgid " samba (smbd) is not installed or not in your path." msgstr " SAMBA (smbd) ist nicht installiert oder nicht im Pfad verfgbar." msgid "GADMIN-SAMBA %s settings" msgstr "GADMIN-SAMBA %s Einstellungen" msgid "Settings:" msgstr "Einstellungen:" msgid " New samba configuration: " msgstr " Neue SAMBA Konfiguration: " msgid " Start winbind server: " msgstr " Starte den Winbind server: " msgid " Path to smb.conf: " msgstr " Pfad zur smb.conf: " msgid "GADMIN-SAMBA Help" msgstr "GADMIN-SAMBA Hilfe" msgid "" "\n" "Server settings:\n" msgstr "" "\n" "Server Einstellungen:\n" msgid "If all you want to do is share some directories you only need to change\n" msgstr "Wenn Sie nur einige Verzeichnisse freigeben mchten, mssen Sie nur\n" msgid "the first visible part in the server settings tab and then press apply.\n" msgstr "den ersten Teil in den Server Einstellungen ndern und dann anwenden drcken.\n" msgid "When you scroll down more advanced options will be shown.\n" msgstr "Durch Herunterscrollen werden weitere Optionen sichtbar.\n" msgid "" "\n" "Users:\n" msgstr "" "\n" "Benutzer:\n" msgid "Adding a user can be done by specifying its username, group, password\n" msgstr "Ein Benutzer kann hinzugefgt werden, indem sein Benutzernamen, die Gruppe, das Passwort\n" msgid "and other settings, then clicking add.\n" msgstr "und andere Einstellungen spezifiziert und dann hinzufgen gedrckt wird.\n" msgid "After one user has been added this user can serve as a profile for other users.\n" msgstr "Nachdem ein Benutzer hinzugefgt wurde kann dieser Benutzer als ein Profil fr andere Benutzer verwendet werden.\n" msgid "Select a user in the user list, change its username and password then click add.\n" msgstr "Einen Benutzer aus der Benutzerliste auswhlen, den Benutzernamen und das Passwort ndern und dann hinzufgen drcken.\n" msgid "Both users will then have the same settings except for the username and password.\n" msgstr "Beide Benutzer werden die gleichen Einstellungen auer Benutzernamen und Passwort haben.\n" msgid "The new user button can be used to clear and insert default user settings, making it\n" msgstr "Die Schaltflche \"Neuer Benutzer\" kann zum Standard-Benutzer-Einstellungen Lschen\n" msgid "" "ready for adding new users.\n" "\n" msgstr "" "und Erstellen verwendet werden, um einen neuen Benutzer hinzuzufgen.\n" "\n" msgid "Deleting a user can be done by selecting it in the list and then clicking delete.\n" msgstr "Eine Benutzer kann durch Auswahl aus der Liste und anschlieendes Klicken auf \"Lschen\" gelscht werden.\n" msgid "" "The deleted user will also be deleted from any shared resource.\n" "\n" msgstr "Der gelschte Benutzer wird ebenfalls von allen Freigaben entfernt.\n" msgid "Changing a users settings is done by changing the settings and clicking apply.\n" msgstr "ndern der Einstellungen eines Benutzers kann durchgefhrt werden, indem man ihn in der Liste auswhlt und dann anwenden drckt.\n" msgid "When you add a user you can randomize its name and password or use your own.\n" msgstr "Beim Benutzer Hinzufgen kann man den Namen und das Passwort zufllig vergeben, oder die Eingaben selbst vornehmen.\n" msgid "You can also select its login shell and where this user should have its home directory.\n" msgstr "Sie knnen ebenfalls die Login-Umgebung und den Ort seines Heim-Verzeichnisses auswhlen.\n" msgid "If the selected shell is /dev/null or /sbin/nologin the user can only login to this\n" msgstr "Wenn die gewhlte Umgebung /dev/null oder /sbin/nologin ist, kann sich der Benutzer nur an diesem\n" msgid "" "server, otherwise the user can login via ssh etc if the server allows this user to do so.\n" "\n" msgstr "Server anmelden, ansonsten kann sich der Benutzer via ssh einloggen, sofern der Server dies dem Benutzer gestattet.\n" msgid "Shares:\n" msgstr "Freigaben:\n" msgid "Shares can be added by selecting a directory to share, setting its share permissions and clicking add.\n" msgstr "Freigaben knnen hinzugefgt werden, indem man ein Verzeichnis zum Freigeben auswhlt, die Freigaberechte einstellt und hinzufggen drckt.\n" msgid "Deleting a share is done by selecting the share to delete and clicking delete.\n" msgstr "Eine Freigabe kann man lschen in dem man sie auswhlt und dann lschen drckt.\n" msgid "" "Changing share settings can be done by changing its settings and then clicking the apply button.\n" "\n" msgstr "" "Freigabeeinstellungen kann man ndern, in dem man die Einstellungen ndert und dann Anwenden drckt.\n" "\n" msgid "Adding user and group access to shares:\n" msgstr "Benutzer und Gruppenzugriff den Ffreigaben hinzufgen:\n" msgid "Share access for users and groups can be added in several ways. Those ways are:\n" msgstr "Zugriff auf eine Freigabe fr Benutzer und Gruppen kann auf verschiedene Weisen hinzugefgt werden. Dies sind:\n" msgid "local users and groups, remote domain users and groups and each of these can have 4 different\n" msgstr "lokale Benutzer und Gruppen, entfernte Domnen-Benutzer und -Gruppen; jede von diesen kann 4 verschiedene \n" msgid "" "permission classes. Multiple users and groups can be imported at once and duplicate additions are ignored.\n" "\n" msgstr "" "Zugriffsberechitgungen haben. Mehrere Benutzer und Gruppen knnen auf einmal importiert werden; doppelte Eintrge werden ignoriert.\n" "\n" msgid "The new share button can be used to clear and insert default share settings, making it ready\n" msgstr "Die Schaltflche \"Neue Freigabe\" kann verwendet werden, um Standard-Freigabeeinstellungen zu\n" msgid "" "for adding new shares.\n" "\n" msgstr "" "lschen und zu erstellen, um so das Erstellen neuer Freigaben vorzubereiten.\n" "\n" msgid "Joining a samba domain with MSFT'tm(c)(r) (extreme copyright) clients:\n" msgstr "Einer Samba-Domne mit Microsoft (tm)(c)(r) Clients bei:\n" msgid "First disconnect all current connections on the client with: net use * /d\n" msgstr "Zuerst alle vorhandenen Verbindungen des Rechner mit: net use * /d trennen\n" msgid "As administrator, select properties for \"this computer\" and write example.org in the domain\n" msgstr "Als Administrator Eigenschaften fr \"Diesen Computer\" whlen und example.org als Domne eintragen\n" msgid "" "field then press join domain. Use root as username and the samba root password in the dialog.\n" "\n" msgstr "" "und dann \"Der Domne beitreten\" anklicken. Benutze root als Benutzername und das Samba root Passwort im Dialogfeld.\n" "\n" msgid "Joining the domain with Linux or other open source clients:\n" msgstr "Einer Domne mit Linux oder Open Source Clients beitreten:\n" msgid "net rpc join example.org -S samba24 -U root then supply the samba root password\n" msgstr "net rpc join example.org -S samba24 -U root - Dann das Samba root Passwort eingeben\n" msgid "Mounting shares:\n" msgstr "Hnge Freigaben ein:\n" msgid "" "If you want to add directories thats not under the users root directory you can do this:\n" "\n" msgstr "" "Zum Hinzufgen von nicht im Benutzerverzeichnis vorhandenen Verzeichnisses knnen Sie folgendermaen vorgehen::\n" "\n" msgid "Linux (as of kernel 2.4.0):\n" msgstr "Linux (Kernel > 2.4.0):\n" msgid "" "mount --bind /some/directory/to/share /home/bob/make_this_directory_first\n" "\n" msgstr "" "mount --bind /freizugebendes/verzeichnis /home/bob/noch_zu_erstellendes_verzeichnis\n" "\n" msgid "" "Alternatively:\n" "mount -o bind /var/data /home/bob/mounted_data\n" "\n" msgstr "" "Alternativ:\n" "mount -o bind /var/data /home/bob/mounted_data\n" "\n" msgid "" "*BSD (as of 4.4BSD):\n" "mount_null /var/data /home/bob/mounted_data\n" "\n" msgstr "" "*BSD (> 4.4BSD):\n" "mount_null /var/data /home/bob/mounted_data\n" "\n" msgid "" "Solaris:\n" "mount -F lofs /var/data /home/bob/mounted_data\n" "\n" msgstr "" "Solaris:\n" "mount -F lofs /var/data /home/bob/mounted_data\n" "\n" msgid "For more detailed information about the server and its configuration directives visit:\n" msgstr "Detailliertere Informationen ber den Server und dessen Konfiguration auf:\n" msgid "http://www.samba.org\n" msgstr "http://www.samba.org\n" msgid "GADMIN-SAMBA %s information" msgstr "GADMIN-SAMBA %s Information" msgid "" "Error: Could not backup the current configuration:\n" "%s\n" msgstr "" "Fehler: Konnte die aktuelle Konfiguration nicht sichern:\n" "%s\n" msgid "" "The samba configuration was backed up here for safety:\n" "%s\n" msgstr "" "Die Samba-Konfiguration wurde als Sicherung hier gespeichert:\n" "%s\n" msgid "" "Cant write a new smb.conf here:\n" "%s\n" msgstr "" "Kann die neue smb.conf nicht hier schreiben:\n" "%s\n" msgid "" "Failed to create directories:\n" "%s\n" msgstr "" "Erstellen folgender Verzeichnisse fehlgeschlagen:\n" "%s\n" msgid "Failed chmodding a+r for directory: %s\n" msgstr "Setzen der a+r Rechte fr das Verzeichnis %s fehlgeschlagen.\n" msgid "Failed chowning the directories: %s\n" msgstr "ndern des Besitzers von Verzeichnis %s fehlgeschlagen\n" msgid "Failed chmodding directory: %s\n" msgstr "ndern der Zugriffsrechte fr Verzeichnis %s fehlgeschlagen.\n" msgid "Failed to create directory: %s/%s\n" msgstr "Das Verzeichnis konnte nicht erstellt werden: %s/%s\n" msgid "GADMIN-SAMBA Question" msgstr "GADMIN-SAMBA Fragen" msgid "GADMIN-SAMBA could not find SAMBAs configuration (smb.conf) or the current\n" msgstr "GADMIN-SAMBA konnte die SAMBA Konfiguration (smb.conf) nicht finden oder die momentane\n" msgid "" "configuration doesnt have all the features that GADMIN-SAMBA requires.\n" "\n" msgstr "" "Konfiguration hat nicht alle von GADMIN-SAMBA bentigten Funktionen.\n" "\n" msgid "Do you want to overwrite the current samba configuration ?\n" msgstr "Mchten Sie die aktuelle Samba-Konfiguration berschreiben?\n" msgid "\t\t\t(If you dont know then press yes)\n" msgstr "\t\t\t(Im Zweifelsfall \"Ja\" drcken)\n" msgid "" "Error: cant create the settings directory here:\n" "%s\n" msgstr "" "Fehler: Kann die Verzeichnis-Einstellungen hier nicht erstellen:\n" "%s\n" msgid "" "Error: cant write the settings file here:\n" "%s\n" msgstr "" "Fehler: Kann die Verzeichnis-Einstellungen hier nicht erstellen:\n" "%s\n" msgid "Status: Deactivated" msgstr "Status: Deaktiviert " msgid "Status: Activated %s" msgstr "Status: Aktiviert " msgid "Status: Activated" msgstr "Status: Aktiviert " msgid "Couldn't find pixmap file: %s" msgstr "Konnte pixmap-Datei %s nicht finden." msgid " SAMBA password file: " msgstr " SAMBA Passwort-Datei: " msgid " Share modes: " msgstr " Freigabe-Modi: " msgid "Creating private cert and key" msgstr "Erstelle privates Zertifikat und Schlssel" msgid "Error writing gprotls.conf here: %s\n" msgstr "Fehler beim Schreiben der gprotls.conf: %s\n" msgid "Every certificate field must be filled in.\n" msgstr "Jedes Zertifikats-Feld mu gefllt sein.\n" msgid "It will be used by new FTP-TLS logins.\n" msgstr "Es wird bei neuen Samba-Anmeldungen benutzt.\n" msgid "The certificate has been created successfully\n" msgstr "Das Zertifikat wurde erfogreich erstellt\n" msgid "The certificate has not been created, something went wrong.\n" msgstr "Fehler beim Erzeugen des Zertifikates.\n" msgid "The password field cant contain any spaces or newline chars.\n" msgstr "Das Passwort-Feld darf keine Leerzeichen oder Zeilenumbrche enthalten.\n" msgid "The path to SAMBA's passwd file, IE: /etc/samba/smbpasswd" msgstr "Der Pfad zur SAMBA Passwort-Datei, zB: /etc/samba/smbpasswd" msgid "and placed in the correct location.\n" msgstr "und an der richtigen Stelle gespeichert.\n" gadmin-samba-0.3.2/COPYING0000644000000000000000000010451310642030763013572 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-samba-0.3.2/MAKE_TGZ0000755000076400007640000000037311527511651014202 0ustar mangemange#!/bin/sh version='0.3.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-samba-$version$beta.tar.gz gadmin-samba-$version gadmin-samba-0.3.2/TODO0000644000000000000000000000606611443240403013225 0ustar rootroot TODO: -------------------------------------------------------------- 0. Handle DOMAINNAME\JoeUser as well as continued lines "\". (Delete, apply, populate users. Populate and apply shares) 1. Domain management tab. Trusts, join domain etc ( ) Should also contain user and group mappings. 2. Kerberos realm add,del,change ( ) ----------------------------------------------------- When changing to ADS mode "password server" should be set to the IP or domain name of the AD-server or '*' for any. realm = DOMAIN.EXAMPLE.ORG security = ads password server = Join AD domain: kinit Administrator@DOMAIN.EXAMPLE.ORG <-Must be uppercase converted. net ads join -Uadministrator%password ----------------------------------------------------- 3. Multi local, remote user and group imports from system users to share permission entries and configuration: ----------------------------------------------------------- Local users ( OK ) Local groups ( OK ) Add smbusers with empty passwords if they dont exist ( OK ) (using '-n' to set empty passwords) Note: Set empty passwords to yes to allow these users to login and set their own. Remote users ( ) (add users as DOMAIN\user, REALM\user) Remote groups ( ) (add groups as DOMAIN\@group, REALM\@group) Use 'wbinfo' to receive a list of user and group accounts from domains. 4. Settings dialog: Create/Populate/Save/Use settings, _BUF extension for changing compiletime settings ( ) Add: "advanced mode [x]", Use add/remove tables method ( ) 5. Help file. 6. Translations. DONE... When selecting security level, automatically adjust options accordingly ( OK ) User tab (users in system and smbpasswd): Add ( OK ) Delete ( OK ) Question to delete the system user as well ( OK ) Also removes the user from any share ( OK ) Apply add_change_user.c Change password and comment ( OK ) Checkbutton or question for not changing the system users passwd ( ) Randomize usernames and passwords ( OK ) Home directory selector ( OK ) Show a locked account indicator/setting ( OK ) Shared resources tab: Add ( OK ) Delete ( OK ) Apply ( OK ) Previously added or imported users can easily be used as a template for other users ( OK ) Share path directory selector ( OK ) Imported users automatically gets /home/profiles/username directories ( OK ) Machine-accounts tab for adding and deleting machine accounts ( OK ) Connections tab for smbstatus, disconnecting users etc ( OK ) Additional commands to use: ---------------------------------------------------------- "smbclient -L //ServerName" (Lists shares) use: Yes "smbstatus" (Lists connections) use: Yes ( OK ) "findsmb" (Lists domains etc) use: Yes "smbcquotas" use: Yes "smbcacls" (Extended Permissions) use: ? "smbcontrol reload-config" use: no "wbinfo" (List domain users) use: no? "smbtree" (Lists all shares incl IPC$, ADMIN$) use: No gadmin-samba-0.3.2/configure.lineno0000755000076400007640000063164310177277422016224 0ustar mangemangeInstalled file --------------------: /root/GPROFTPD/gproftpd-8.1.7/configure Result: 3 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # 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 Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; 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 # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=100 as_lineno_2=101 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; 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 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=139 as_lineno_2=140 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with 156 # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that 161 is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); 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 sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="configure.in" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP PKG_CONFIG PACKAGE_CFLAGS PACKAGE_LIBS GETTEXT_PACKAGE USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS SYSCONFDIR LOCALSTATEDIR LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # 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. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= 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 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -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 | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$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 ;; -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 ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 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 ;; -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=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 ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac 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 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 # 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 its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | 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 if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # 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 \`..'] _ACEOF cat <<_ACEOF 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] --datadir=DIR read-only architecture-independent data [PREFIX/share] --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] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _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-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 builds --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 CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style 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 elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 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 0 fi exec 5>config.log cat >&5 <<_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.57. Invocation command line was $ $0 $@ _ACEOF { 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` hostinfo = `(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=. echo "PATH: $as_dir" done } >&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_sep= 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$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 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >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 # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:1172: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" 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. if test -f "$cache_file"; then { echo "$as_me:1183: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:1191: creating cache $cache_file" >&5 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 `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,) { echo "$as_me:1207: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:1211: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:1217: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:1219: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:1221: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`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. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:1240: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:1242: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } 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 am__api_version="1.7" 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 { { echo "$as_me:1290: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # 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" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:1310: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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/* | \ /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 $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : 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 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:1364: result: $INSTALL" >&5 echo "${ECHO_T}$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' echo "$as_me:1375: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # 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". { { echo "$as_me:1399: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:1412: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:1418: result: yes" >&5 echo "${ECHO_T}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 $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:1443: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi 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 echo "$as_me:1451: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:1467: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:1477: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:1480: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:1487: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:1507: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:1511: result: no" >&5 echo "${ECHO_T}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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:1528: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } 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=gproftpd VERSION=8.1.7 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"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # 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 echo "$as_me:1586: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:1602: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:1612: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:1615: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:1624: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:1640: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:1651: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:1654: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. ac_config_headers="$ac_config_headers config.h" echo "$as_me:1673: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-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; echo "$as_me:1682: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$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. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:1700: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:1704: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:1713: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:1717: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:1722: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:1730: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:1739: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:1744: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:1752: checking for OS type" >&5 echo $ECHO_N "checking for OS type... $ECHO_C" >&6 case $host in *-linux*) echo "$as_me:1756: result: Linux ($host) found." >&5 echo "${ECHO_T}Linux ($host) found." >&6 cat >>confdefs.h <<\_ACEOF #define USE_LINUX 1 _ACEOF ;; *-solaris*) echo "$as_me:1765: result: Solaris ($host) found." >&5 echo "${ECHO_T}Solaris ($host) found." >&6 cat >>confdefs.h <<\_ACEOF #define USE_SUNOS 1 _ACEOF ;; *-sunos*) echo "$as_me:1774: result: Solaris ($host) found." >&5 echo "${ECHO_T}Solaris ($host) found." >&6 cat >>confdefs.h <<\_ACEOF #define USE_SUNOS 1 _ACEOF ;; *-freebsd*) echo "$as_me:1783: result: Free BSD ($host) found." >&5 echo "${ECHO_T}Free BSD ($host) found." >&6 cat >>confdefs.h <<\_ACEOF #define USE_FREEBSD 1 _ACEOF ;; *-openbsd*) echo "$as_me:1792: result: Open BSD ($host) found." >&5 echo "${ECHO_T}Open BSD ($host) found." >&6 cat >>confdefs.h <<\_ACEOF #define USE_OPENBSD 1 _ACEOF ;; *-netbsd*) echo "$as_me:1801: result: Net BSD ($host) found." >&5 echo "${ECHO_T}Net BSD ($host) found." >&6 cat >>confdefs.h <<\_ACEOF #define USE_NETBSD 1 _ACEOF ;; *-darwin*) echo "$as_me:1810: result: Darwin Mac OS X ($host) found." >&5 echo "${ECHO_T}Darwin Mac OS X ($host) found." >&6 cat >>confdefs.h <<\_ACEOF #define USE_DARWIN 1 _ACEOF ;; *-aix*) echo "$as_me:1819: result: AIX ($host) found." >&5 echo "${ECHO_T}AIX ($host) found." >&6 cat >>confdefs.h <<\_ACEOF #define USE_AIX 1 _ACEOF ;; *-hpux*) echo "$as_me:1828: result: HP UX ($host) found." >&5 echo "${ECHO_T}HP UX ($host) found." >&6 cat >>confdefs.h <<\_ACEOF #define USE_HPUX 1 _ACEOF ;; *) echo "$as_me:1837: result: Unknown host found: ($host). Using Linux macros..." >&5 echo "${ECHO_T}Unknown host found: ($host). Using Linux macros..." >&6 cat >>confdefs.h <<\_ACEOF #define USE_LINUX 1 _ACEOF ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:1859: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:1887: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-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 echo "$as_me:1920: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:1936: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:1946: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:1949: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:1958: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:1974: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:1984: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:1987: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC 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 echo "$as_me:2000: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:2016: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:2026: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:2029: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:2038: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:2054: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:2064: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:2067: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" 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 echo "$as_me:2080: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:2101: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done 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 echo "$as_me:2123: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:2126: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl 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 echo "$as_me:2137: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:2153: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:2163: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:2166: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:2179: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:2195: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:2205: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:2208: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:2221: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:2228:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:2231: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:2234: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:2236: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:2239: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:2241: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:2244: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line 2248 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out 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. echo "$as_me:2268: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:2271: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:2274: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:2312: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:2320: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:2325: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:2331: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2334: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:2341: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:2351: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:2358: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:2360: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:2363: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:2365: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:2368: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:2385: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:2393: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:2399: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 2405 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:2421: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2424: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:2437: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:2446: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:2450: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 2456 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2475: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2478: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2481: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2484: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:2497: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:2503: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 2509 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2525: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2528: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2531: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2534: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:2545: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 echo "$as_me:2562: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line 2570 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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; } 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:2623: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2626: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2629: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2632: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:2650: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:2653: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2668: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2671: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2674: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2677: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line 2689 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2706: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2709: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2712: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2715: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line 2726 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2742: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2745: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2748: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2751: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext 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= echo "$as_me:2782: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 : > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} 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 # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' 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 echo "$as_me:2865: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$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 echo "$as_me:2884: checking for strerror in -lcposix" >&5 echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 if test "${ac_cv_lib_cposix_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcposix $LIBS" cat >conftest.$ac_ext <<_ACEOF #line 2892 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:2915: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:2918: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:2921: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2924: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cposix_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cposix_strerror=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:2936: result: $ac_cv_lib_cposix_strerror" >&5 echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 if test $ac_cv_lib_cposix_strerror = yes; then LIBS="$LIBS -lcposix" 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 echo "$as_me:2952: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:2968: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:2978: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:2981: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:2990: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:3006: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:3016: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:3019: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC 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 echo "$as_me:3032: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:3048: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:3058: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:3061: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:3070: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:3086: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:3096: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:3099: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" 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 echo "$as_me:3112: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:3133: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done 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 echo "$as_me:3155: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:3158: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl 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 echo "$as_me:3169: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:3185: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:3195: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:3198: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:3211: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:3227: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:3237: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:3240: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:3253: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:3260:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:3263: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:3266: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:3268: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:3271: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:3273: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:3276: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:3279: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 3285 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3304: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3307: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3310: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3313: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:3326: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:3332: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 3338 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3354: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3357: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3360: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3363: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:3374: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 echo "$as_me:3391: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line 3399 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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; } 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:3452: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3455: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3458: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3461: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:3479: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:3482: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3497: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3500: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3503: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3506: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line 3518 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3535: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3538: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3541: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3544: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line 3555 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3571: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3574: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3577: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3580: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext 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= echo "$as_me:3611: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 : > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} 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 # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' 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 echo "$as_me:3694: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$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 echo "$as_me:3714: checking for ${CC-cc} option to accept ANSI C" >&5 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6 if test "${am_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_prog_cc_stdc=no ac_save_CC="$CC" # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" cat >conftest.$ac_ext <<_ACEOF #line 3732 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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; } 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 rm -f conftest.$ac_objext if { (eval echo "$as_me:3778: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3781: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3784: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3787: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_prog_cc_stdc="$ac_arg"; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done CC="$ac_save_CC" fi if test -z "$am_cv_prog_cc_stdc"; then echo "$as_me:3802: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 else echo "$as_me:3805: result: $am_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6 fi case "x$am_cv_prog_cc_stdc" in x|xno) ;; *) CC="$CC $am_cv_prog_cc_stdc" ;; esac 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 echo "$as_me:3818: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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 echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF #line 3841 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:3854: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3860: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line 3884 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:3892: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3898: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # 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 echo "$as_me:3936: result: $CPP" >&5 echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF #line 3948 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:3961: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3967: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line 3991 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:3999: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:4005: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # 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 { { echo "$as_me:4034: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 echo "$as_me:4048: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:4058: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:4063: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 4069 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:4089: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4092: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:4095: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4098: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f 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 >conftest.$ac_ext <<_ACEOF #line 4112 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF #line 4134 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF #line 4159 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:4190: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4193: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:4195: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4198: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:4213: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi pkg_modules="gtk+-2.0 >= 1.3.13" succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo "$as_me:4231: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:4249: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then echo "$as_me:4262: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:4265: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo "$as_me:4279: checking for $pkg_modules" >&5 echo $ECHO_N "checking for $pkg_modules... $ECHO_C" >&6 if $PKG_CONFIG --exists "$pkg_modules" ; then echo "$as_me:4283: result: yes" >&5 echo "${ECHO_T}yes" >&6 succeeded=yes echo "$as_me:4287: checking PACKAGE_CFLAGS" >&5 echo $ECHO_N "checking PACKAGE_CFLAGS... $ECHO_C" >&6 PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules"` echo "$as_me:4290: result: $PACKAGE_CFLAGS" >&5 echo "${ECHO_T}$PACKAGE_CFLAGS" >&6 echo "$as_me:4293: checking PACKAGE_LIBS" >&5 echo $ECHO_N "checking PACKAGE_LIBS... $ECHO_C" >&6 PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules"` echo "$as_me:4296: result: $PACKAGE_LIBS" >&5 echo "${ECHO_T}$PACKAGE_LIBS" >&6 else PACKAGE_CFLAGS="" PACKAGE_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"` echo $PACKAGE_PKG_ERRORS fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else { { echo "$as_me:4318: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 echo "$as_me: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi GETTEXT_PACKAGE=gproftpd cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF ALL_LINGUAS="sv es" # 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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:4349: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 4355 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:4366: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4369: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:4372: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4375: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:4386: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in locale.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:4404: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:4409: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:4413: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line 4416 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:4426: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4429: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:4432: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4435: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:4445: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:4449: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line 4452 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:4460: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:4466: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:4485: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:4491: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:4493: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:4505: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:4507: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:4509: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:4521: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:4528: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then echo "$as_me:4542: checking for LC_MESSAGES" >&5 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 4548 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:4564: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4567: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:4570: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4573: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:4584: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= if test "${ac_cv_header_libintl_h+set}" = set; then echo "$as_me:4604: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6 if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:4609: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6 else # Is the header compilable? echo "$as_me:4613: checking libintl.h usability" >&5 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line 4616 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:4626: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4629: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:4632: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4635: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:4645: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:4649: checking libintl.h presence" >&5 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line 4652 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:4660: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:4666: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:4685: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:4691: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:4693: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:4705: WARNING: libintl.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} { echo "$as_me:4707: WARNING: libintl.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:4709: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:4721: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6 if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libintl_h=$ac_header_preproc fi echo "$as_me:4728: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6 fi if test $ac_cv_header_libintl_h = yes; then gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # echo "$as_me:4739: checking for dgettext in libc" >&5 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6 if test "${gt_cv_func_dgettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 4745 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return (int) dgettext ("","") ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:4763: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4766: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:4769: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4772: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_dgettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_dgettext_libc=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:4784: result: $gt_cv_func_dgettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6 if test "$gt_cv_func_dgettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:4792: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 4798 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* 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_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:4842: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4845: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:4848: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4851: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:4862: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 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 "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then echo "$as_me:4880: checking for bindtextdomain in -lintl" >&5 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line 4888 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bindtextdomain (); int main () { bindtextdomain (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:4911: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4914: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:4917: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4920: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_bindtextdomain=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_bindtextdomain=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:4932: result: $ac_cv_lib_intl_bindtextdomain" >&5 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6 if test $ac_cv_lib_intl_bindtextdomain = yes; then echo "$as_me:4935: checking for dgettext in -lintl" >&5 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_dgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line 4943 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dgettext (); int main () { dgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:4966: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4969: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:4972: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4975: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_dgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dgettext=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:4987: result: $ac_cv_lib_intl_dgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6 if test $ac_cv_lib_intl_dgettext = yes; then gt_cv_func_dgettext_libintl=yes fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then echo "$as_me:4997: checking if -liconv is needed to use gettext" >&5 echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6 echo "$as_me:4999: result: " >&5 echo "${ECHO_T}" >&6 echo "$as_me:5001: checking for dcgettext in -lintl" >&5 echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_dcgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF #line 5009 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dcgettext (); int main () { dcgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:5032: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:5035: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:5038: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5041: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_dcgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dcgettext=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:5053: result: $ac_cv_lib_intl_dcgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6 if test $ac_cv_lib_intl_dcgettext = yes; then gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv 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 # 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 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:5077: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 5083 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* 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_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:5127: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:5130: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:5133: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5136: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:5147: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 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"; 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 cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo "$as_me:5186: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:5213: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6 else echo "$as_me:5216: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:5226: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 5232 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* 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_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:5276: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:5279: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:5282: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5285: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:5296: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo "$as_me:5308: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:5326: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then echo "$as_me:5339: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6 else echo "$as_me:5342: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo "$as_me:5348: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:5375: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6 else echo "$as_me:5378: result: no" >&5 echo "${ECHO_T}no" >&6 fi cat >conftest.$ac_ext <<_ACEOF #line 5383 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:5400: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:5403: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:5406: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5409: \$? = $ac_status" >&5 (exit $ac_status); }; }; then CATOBJEXT=.gmo DATADIRNAME=share else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) echo "$as_me:5419: checking for bind_textdomain_codeset" >&5 echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6 if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 5425 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bind_textdomain_codeset (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bind_textdomain_codeset (); /* 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_bind_textdomain_codeset) || defined (__stub___bind_textdomain_codeset) choke me #else char (*f) () = bind_textdomain_codeset; #endif #ifdef __cplusplus } #endif int main () { return f != bind_textdomain_codeset; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:5469: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:5472: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:5475: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5478: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_bind_textdomain_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:5489: result: $ac_cv_func_bind_textdomain_codeset" >&5 echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6 if test $ac_cv_func_bind_textdomain_codeset = yes; then CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f 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 cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else echo "$as_me:5530: result: found xgettext program is not GNU xgettext; ignore it" >&5 echo "${ECHO_T}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 echo "$as_me:5563: checking for catalogs to be installed" >&5 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&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 echo "$as_me:5588: result: $LINGUAS" >&5 echo "${ECHO_T}$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 echo "$as_me:5629: checking for library containing crypt" >&5 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6 if test "${ac_cv_search_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_crypt=no cat >conftest.$ac_ext <<_ACEOF #line 5637 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crypt (); int main () { crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:5660: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:5663: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:5666: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5669: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_crypt="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_crypt" = no; then for ac_lib in crypt; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #line 5682 "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crypt (); int main () { crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:5705: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:5708: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:5711: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5714: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_crypt="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:5728: result: $ac_cv_search_crypt" >&5 echo "${ECHO_T}$ac_cv_search_crypt" >&6 if test "$ac_cv_search_crypt" != no; then test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $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}' cat >>confdefs.h <<_ACEOF #define GP_CONF "`eval echo "${sysconfdir}/proftpd.conf"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_VARDIR "`eval echo "${localstatedir}"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_SECURE "`eval echo "${localstatedir}/log/secure"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_XFERLOG "`eval echo "${localstatedir}/log/xferlog"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_SYSCONFDIR "`eval echo "/etc"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GP_APPCONFDIR "`eval echo "/etc/gproftpd"`" _ACEOF 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 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, don't put newlines in cache variables' values. # 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. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *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 \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!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" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" 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}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ 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[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:5911: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:5918: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:5925: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:5932: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:5942: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; 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 # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=6049 as_lineno_2=6050 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; 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 { { echo "$as_me:6074: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=6089 as_lineno_2=6090 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with 6106 # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that 6111 is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:6125: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); 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 sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet 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 ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. 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 ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:6315: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:6337: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; 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 if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:6388: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; 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 to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINT@,$MAINT,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@PACKAGE_CFLAGS@,$PACKAGE_CFLAGS,;t t s,@PACKAGE_LIBS@,$PACKAGE_LIBS,;t t s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t s,@USE_NLS@,$USE_NLS,;t t s,@MSGFMT@,$MSGFMT,;t t s,@GMSGFMT@,$GMSGFMT,;t t s,@XGETTEXT@,$XGETTEXT,;t t s,@CATALOGS@,$CATALOGS,;t t s,@CATOBJEXT@,$CATOBJEXT,;t t s,@DATADIRNAME@,$DATADIRNAME,;t t s,@GMOFILES@,$GMOFILES,;t t s,@INSTOBJEXT@,$INSTOBJEXT,;t t s,@INTLLIBS@,$INTLLIBS,;t t s,@PO_IN_DATADIR_TRUE@,$PO_IN_DATADIR_TRUE,;t t s,@PO_IN_DATADIR_FALSE@,$PO_IN_DATADIR_FALSE,;t t s,@POFILES@,$POFILES,;t t s,@POSUB@,$POSUB,;t t s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t s,@SYSCONFDIR@,$SYSCONFDIR,;t t s,@LOCALSTATEDIR@,$LOCALSTATEDIR,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:6635: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:6678: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # 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. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:6701: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:6714: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:6781: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:6792: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:6805: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #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. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # 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. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:6922: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:6958: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` { echo "$as_me:7046: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; 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. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || 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 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //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=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:7131: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; default-1 ) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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 || { (exit 1); exit 1; } fi gadmin-samba-0.3.2/Makefile.am0000644000076400007640000000677111443240341015047 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-samba; \ for pixmap in $(srcdir)/pixmaps/*; do \ if test -f $$pixmap; then \ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(datadir)/pixmaps/gadmin-samba; \ fi \ done \ fi; if test -d $(DESTDIR)$(datadir)/pixmaps; then \ cp $(srcdir)/pixmaps/gadmin-samba.png $(DESTDIR)$(datadir)/pixmaps/; \ fi; if test -f $(DESTDIR)$(bindir)/consolehelper && test ! -f $(DESTDIR)$(bindir)/gadmin-samba; then \ ln -s $(DESTDIR)$(bindir)/consolehelper $(DESTDIR)$(bindir)/gadmin-samba; \ fi; @echo "Failsafe for a mixed environment" if test -f $(DESTDIR)/usr/local/bin/consolehelper && test ! -f $(DESTDIR)/usr/local/bin/gadmin-samba; then \ ln -s $(DESTDIR)/usr/local/bin/consolehelper $(DESTDIR)/usr/local/bin/gadmin-samba; \ fi; if test -d $(DESTDIR)$(sysconfdir)/pam.d; then \ cp etc/pam.d/gadmin-samba $(DESTDIR)$(sysconfdir)/pam.d/; \ fi; if test -d $(DESTDIR)$(sysconfdir)/security/console.apps; then \ cp etc/security/console.apps/gadmin-samba $(DESTDIR)$(sysconfdir)/security/console.apps/; \ fi; if test -d $(DESTDIR)$(datadir)/applications; then \ cp desktop/gadmin-samba.desktop $(DESTDIR)$(datadir)/applications/; \ fi; if test ! -d $(DESTDIR)$(datadir)/doc/gadmin-samba; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/doc/gadmin-samba; \ fi; if test -d $(DESTDIR)$(datadir)/doc/gadmin-samba; then \ cp AUTHORS $(DESTDIR)$(datadir)/doc/gadmin-samba/; \ cp README $(DESTDIR)$(datadir)/doc/gadmin-samba/; \ cp ChangeLog $(DESTDIR)$(datadir)/doc/gadmin-samba/; \ cp COPYING $(DESTDIR)$(datadir)/doc/gadmin-samba/; \ fi; if test ! -d $(DESTDIR)$(sysconfdir)/gadmin-samba; then \ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gadmin-samba; \ fi; if test -d $(DESTDIR)$(bindir) && test ! -f $(DESTDIR)$(bindir)/gadmin-samba-pdf; then \ cp scripts/gadmin-samba-pdf $(bindir)/; \ fi; @echo Installing example logon script to $(DESTDIR)$(localstatedir)/lib/samba/netlogon. if test ! -d $(DESTDIR)$(localstatedir)/lib/samba/netlogon; then \ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/samba/netlogon; \ fi; if test -d $(DESTDIR)$(localstatedir)/lib/samba/netlogon && \ test ! -f $(DESTDIR)$(localstatedir)/lib/samba/netlogon/example.bat; then \ cp scripts/example.bat $(DESTDIR)$(localstatedir)/lib/samba/netlogon/; \ chmod a+r $(DESTDIR)$(localstatedir)/lib/samba/netlogon/example.bat; \ fi; @echo Creating the profiles directory $(DESTDIR)$(localstatedir)/lib/samba/profiles. if test ! -d $(DESTDIR)$(localstatedir)/lib/samba/profiles; then \ $(mkinstalldirs) -m 1755 $(DESTDIR)$(localstatedir)/lib/samba/profiles; \ fi; @echo Creating the pdf-documents directory $(DESTDIR)$(localstatedir)/lib/samba/pdf-documents. if test ! -d $(DESTIR)$(localstatedir)/lib/samba/pdf-documents; then \ $(mkinstalldirs) -m 1755 $(DESTDIR)$(localstatedir)/lib/samba/pdf-documents; \ fi; @echo "" @echo "Start GADMIN-SAMBA by typing gadmin-samba 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-samba-0.3.2/mkinstalldirs0000755000076400007640000000341107521233631015613 0ustar mangemange#! /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 ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg 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: 3 # End: # mkinstalldirs ends here gadmin-samba-0.3.2/configure0000755000076400007640000072660511527512150014732 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 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 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 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-samba VERSION=0.3.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 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}: 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-samba cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF ALL_LINGUAS="fr de" # 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` cat >>confdefs.h <<_ACEOF #define SYSCONFDIR "`eval echo "${sysconfdir}"`" _ACEOF LOCALSTATEDIR=`eval echo $localstatedir` cat >>confdefs.h <<_ACEOF #define LOCALSTATEDIR "`eval echo "${localstatedir}"`" _ACEOF test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' default_smbd_binary="smbd" test "x$SMBD_BINARY" = x && SMBD_BINARY=$default_smbd_binary cat >>confdefs.h <<_ACEOF #define SMBD_BINARY "`eval echo "${SMBD_BINARY}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SMBD binary: (${SMBD_BINARY})" >&5 $as_echo "Using SMBD binary: (${SMBD_BINARY})" >&6; } default_nmbd_binary="nmbd" test "x$NMBD_BINARY" = x && NMBD_BINARY=$default_nmbd_binary cat >>confdefs.h <<_ACEOF #define NMBD_BINARY "`eval echo "${NMBD_BINARY}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using NMBD binary: (${NMBD_BINARY})" >&5 $as_echo "Using NMBD binary: (${NMBD_BINARY})" >&6; } default_winbindd_binary="winbindd" test "x$WINBINDD_BINARY" = x && WINBINDD_BINARY=$default_winbindd_binary cat >>confdefs.h <<_ACEOF #define WINBINDD_BINARY "`eval echo "${WINBINDD_BINARY}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using WINBINDD binary: (${WINBINDD_BINARY})" >&5 $as_echo "Using WINBINDD binary: (${WINBINDD_BINARY})" >&6; } default_pdbedit_binary="pdbedit" test "x$PDBEDIT_BINARY" = x && PDBEDIT_BINARY=$default_pdbedit_binary cat >>confdefs.h <<_ACEOF #define PDBEDIT_BINARY "`eval echo "${PDBEDIT_BINARY}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using PDBEDIT binary: (${PDBEDIT_BINARY})" >&5 $as_echo "Using PDBEDIT binary: (${PDBEDIT_BINARY})" >&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 "`eval echo "${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_samba_user="nobody" test "x$SAMBA_USER" = x && SAMBA_USER=$default_samba_user cat >>confdefs.h <<_ACEOF #define SAMBA_USER "`eval echo "${SAMBA_USER}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using samba server user: (${SAMBA_USER})" >&5 $as_echo "Using samba server user: (${SAMBA_USER})" >&6; } default_smb_conf="/etc/samba/smb.conf" test "x$SAMBA_CONF" = x && SAMBA_CONF=$default_smb_conf cat >>confdefs.h <<_ACEOF #define SAMBA_CONF "`eval echo "${SAMBA_CONF}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using smb.conf file: (${SAMBA_CONF})" >&5 $as_echo "Using smb.conf file: (${SAMBA_CONF})" >&6; } default_smb_conf_backup="${SAMBA_CONF}.old.gadmin-samba-${VERSION}" test "x$SAMBA_CONF_BACKUP" = x && SAMBA_CONF_BACKUP=$default_smb_conf_backup cat >>confdefs.h <<_ACEOF #define SAMBA_CONF_BACKUP "`eval echo "${SAMBA_CONF_BACKUP}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using backup smb.conf file: (${SAMBA_CONF_BACKUP})" >&5 $as_echo "Using backup smb.conf file: (${SAMBA_CONF_BACKUP})" >&6; } default_gadmin_samba_users="/etc/gadmin-samba/gadmin_samba_users" test "x$GADMIN_SAMBA_USERS" = x && GADMIN_SAMBA_USERS=$default_gadmin_samba_users cat >>confdefs.h <<_ACEOF #define GADMIN_SAMBA_USERS "`eval echo "${GADMIN_SAMBA_USERS}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using gadmin_samba_users file: (${GADMIN_SAMBA_USERS})" >&5 $as_echo "Using gadmin_samba_users file: (${GADMIN_SAMBA_USERS})" >&6; } default_samba_usermap="/etc/samba/smbusers" test "x$SAMBA_USERMAP" = x && SAMBA_USERMAP=$default_samba_usermap cat >>confdefs.h <<_ACEOF #define SAMBA_USERMAP "`eval echo "${SAMBA_USERMAP}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using smbusers file: (${SAMBA_USERMAP})" >&5 $as_echo "Using smbusers file: (${SAMBA_USERMAP})" >&6; } default_kerberos_conf="/etc/krb5.conf" test "x$KERBEROS_CONF" = x && KERBEROS_CONF=$default_kerberos_conf cat >>confdefs.h <<_ACEOF #define KERBEROS_CONF "`eval echo "${KERBEROS_CONF}"`" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using kerberos krbX.conf file: (${KERBEROS_CONF})" >&5 $as_echo "Using kerberos krbX.conf file: (${KERBEROS_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_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: (${PROC_PATH})" >&5 $as_echo "Using proc: (${PROC_PATH})" >&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; } cat >>confdefs.h <<_ACEOF #define SYSCONFDIR "`eval echo "/etc"`" _ACEOF cat >>confdefs.h <<_ACEOF #define APPCONFDIR "`eval echo "/etc/gadmin-samba"`" _ACEOF cat >>confdefs.h <<_ACEOF #define SETTINGS_FILE "`eval echo "/etc/gadmin-samba/settings.conf"`" _ACEOF cat >>confdefs.h <<_ACEOF #define SHELLS_FILE "`eval echo "/etc/shells"`" _ACEOF cat >>confdefs.h <<_ACEOF #define PASSWD_FILE "`eval echo "/etc/passwd"`" _ACEOF cat >>confdefs.h <<_ACEOF #define SHADOW_FILE "`eval echo "/etc/shadow"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GROUP_FILE "`eval echo "/etc/group"`" _ACEOF cat >>confdefs.h <<_ACEOF #define GSHADOW_FILE "`eval echo "/etc/gshadow"`" _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-samba-0.3.2/Autoinstall0000755000076400007640000000171211346723302015233 0ustar mangemange### Default settings ### # SAMBA_CONF="/etc/samba/smb.conf" # SAMBA_CONF_BACKUP="${SAMBA_CONF}.old.gadmin-samba-${VERSION}" # GADMIN_SAMBA_USERS="/etc/gadmin-samba/gadmin_samba_users" # SAMBA_USERMAP="/etc/samba/smbusers" # KERBEROS_CONF="/etc/krb5.conf" # SECURE_LOG="/var/log/secure" # PROC_PATH="/proc" # MIN_PASS_LEN="6" # SAMBA_USER="nobody" # SMBD_BINARY="smbd" # NMBD_BINARY="nmbd" # WINBINDD_BINARY="winbindd" # PDBEDIT_BINARY="pdbedit" # SYSINIT_START_CMD="echo" # SYSINIT_STOP_CMD="echo" ### Debian/Ubuntu install ### # ./configure --prefix=/usr --sysconfdir=/etc \ # --localstatedir=/var --sbindir=/usr/sbin \ # SYSINIT_START_CMD="update-rc.d -f samba defaults" \ # SYSINIT_STOP_CMD="update-rc.d -f samba remove" && # make && # make install ### RH/Fedora install ### ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --sbindir=/usr/sbin \ SYSINIT_START_CMD="chkconfig smb on" \ SYSINIT_STOP_CMD="chkconfig smb off" && make && make install