Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564574 - app-crypt/mit-krb5-1.13.2-r2: mit-krb5kadmind fails to start due to new KADMIND_OPTS conf.d value
Summary: app-crypt/mit-krb5-1.13.2-r2: mit-krb5kadmind fails to start due to new KADMI...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Kerberos Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-31 15:10 UTC by John Einar Reitan
Modified: 2015-11-04 05:04 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Einar Reitan 2015-10-31 15:10:28 UTC
app-crypt/mit-krb5-1.13.2-r2 introduced KADMIND_OPTS and passes it to /usr/sbin/kadmind in the updated init.d script.

If KADMIND_OPTS is blank an empty "" is passed to /usr/sbin/kadmind, which it reports as an error.

Reproducible: Always

Steps to Reproduce:
1. Upgrade to app-crypt/mit-krb5-1.13.2-r2
2. /etc/init.d/mit-krb5kadmind restart
Actual Results:  
 * Starting MIT Kerberos 5 Admin daemon ...
 * start-stop-daemon: failed to start `/usr/sbin/kadmind'
 * Error starting MIT Kerberos 5 Admin daemon                                                                                                                                                                                                                            [ !! ]
 * ERROR: mit-krb5kadmind failed to start


Expected Results:  
* Stopping MIT Kerberos 5 Admin daemon ... [ ok ]
* Starting MIT Kerberos 5 Admin daemon ... [ ok ]

Simple strace displaying the difference:

With the empty "":
strace -e trace=process /usr/sbin/kadmind ""
execve("/usr/sbin/kadmind", ["/usr/sbin/kadmind", ""], [/* 48 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x7f2839144740) = 0
Usage: kadmind [-x db_args]* [-r realm] [-m] [-nofork] [-port port-number]
                [-proponly] [-p path-to-kdb5_util] [-F dump-file]
                [-K path-to-kprop] [-P pid_file]

where,
        [-x db_args]* - any number of database specific arguments.
                        Look at each database documentation for supported arguments
exit_group(1)                           = ?
+++ exited with 1 +++

Without the empty "":
strace -e trace=process /usr/sbin/kadmind 
execve("/usr/sbin/kadmind", ["/usr/sbin/kadmind"], [/* 48 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x7fef4363e740) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fef4363ea10) = 3247
exit_group(0)                           = ?
+++ exited with 0 +++

Simple hack/fix is to remove the quotation marks around the variable in the init.d script.
Comment 1 John Einar Reitan 2015-10-31 15:10:55 UTC
Portage 2.2.20.1 (python 3.4.3-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.21-r1, 4.0.5-gentoo x86_64)
=================================================================
System uname: Linux-4.0.5-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1220_V2_@_3.10GHz-with-gentoo-2.2
KiB Mem:    32939888 total,   4963360 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 31 Oct 2015 11:00:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p39::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://fw.debug./gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.mdfnet.se/gentoo http://ftp.ds.karen.hj.se/gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="a52 aac acl aes amd64 apache2 avx bash-completion berkdb bzip2 caps cli cpudetection cracklib crypt curl cxx device-mapper dri dts emacs encode ethereal exif expat extensions extraengine faac fbcon ffmpeg fortran ftp gd gdbm git gmp hash hwdb iconv idn imap innodb intl ipv6 ithreads jabber jpeg kerberos kpathsea ldap libclamav libwww maildir mhash mime mmx mmxext modules mp3 mpeg multilib mysql mysqli ncurses netboot nfsv4 nls nptl nptlonly oav ogg oggvorbis openldap openmp pam pcap pcre pdo perl php png popcnt python readline samba sasl seccomp session slang sms snmp sockets spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 subversion svg tcpd theora threads tiff truetype unicode usb vde vhosts vim-syntax vlc vorbis winbind x264 xattr xml xml2 xmlreader xmlrpc xmlwriter xvid zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias cgid auth_basic auth_digest authn_anon authn_core authz_core unixd socache_shmcb authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias slotmem_shm" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="no en us" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 i386 arm" QEMU_USER_TARGETS="x86_64 i386 arm" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="vesa fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Jason Zaman gentoo-dev 2015-11-04 03:43:15 UTC
Removing the quotes in the init.d file fixes the problem.

-start-stop-daemon --start --quiet --exec ${exec} -- "${KADMIND_OPTS}" 1>&2
+start-stop-daemon --start --quiet --exec ${exec} -- ${KADMIND_OPTS} 1>&2
Comment 3 Eray Aslan gentoo-dev 2015-11-04 05:04:42 UTC
Fixed in the tree.  Thanks for the report.