From 988ed72a69dde1e5e0a028823fed0536cd926520 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sat, 13 Sep 2008 16:12:25 -0400 Subject: fixing bugs in monkeysphere-server diagnostics. --- packaging/freebsd/distinfo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packaging/freebsd/distinfo') diff --git a/packaging/freebsd/distinfo b/packaging/freebsd/distinfo index 1a3b6c5..63bc25e 100644 --- a/packaging/freebsd/distinfo +++ b/packaging/freebsd/distinfo @@ -1,3 +1,3 @@ -MD5 (monkeysphere_0.16~pre.orig.tar.gz) = 7ec79824cf814c618b39e9bf33ff65b1 -SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = bce97a2b2f90bc85b81af374cc0d32dfb23c6b2c1f1b2145f8a4d4a5bb00645b -SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58595 +MD5 (monkeysphere_0.16~pre.orig.tar.gz) = 23be1e51f2046652985ff102018549db +SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = 2caeb5ce39572400f09b66cf5df8d9f6fb7b84b3d0371c532337a29632018340 +SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58689 -- cgit v1.2.3 From f81f2c89fac457574ce9a427af6c91ba85461d34 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sun, 14 Sep 2008 17:51:13 -0400 Subject: adding another FIXME of things worth adding to monkeysphere-server diagnostics. --- packaging/freebsd/distinfo | 6 +++--- src/monkeysphere-server | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'packaging/freebsd/distinfo') diff --git a/packaging/freebsd/distinfo b/packaging/freebsd/distinfo index 63bc25e..d590579 100644 --- a/packaging/freebsd/distinfo +++ b/packaging/freebsd/distinfo @@ -1,3 +1,3 @@ -MD5 (monkeysphere_0.16~pre.orig.tar.gz) = 23be1e51f2046652985ff102018549db -SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = 2caeb5ce39572400f09b66cf5df8d9f6fb7b84b3d0371c532337a29632018340 -SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58689 +MD5 (monkeysphere_0.16~pre.orig.tar.gz) = bda65df4e378e72f3edf02936b2b5f34 +SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = d0c85ad5cdd9b7a61333adf56714e3b25f1bd619bbc40279db759347b17980fe +SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 59241 diff --git a/src/monkeysphere-server b/src/monkeysphere-server index a8cc211..b1cacf9 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -683,6 +683,9 @@ diagnostics() { # FIXME: make sure that at least one identity certifier exists +# FIXME: look at the timestamps on the monkeysphere-generated +# authorized_keys files -- warn if they seem out-of-date. + echo echo "Checking for MonkeySphere-enabled public-key authentication for users ..." # Ensure that User ID authentication is enabled: -- cgit v1.2.3 From d454019309fb9887f40b2330866f26741b4e8078 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sun, 14 Sep 2008 19:43:57 -0400 Subject: The monkeysphere system user must have bash as its shell for the simple su invocation to work. Do not try to explicitly preserve the environment across an su, as this is the default, and -m implies using the login shell of the superuser under FreeBSD. --- debian/monkeysphere.postinst | 2 +- packaging/freebsd/distinfo | 6 +++--- packaging/freebsd/pkg-install | 2 +- src/monkeysphere-server | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packaging/freebsd/distinfo') diff --git a/debian/monkeysphere.postinst b/debian/monkeysphere.postinst index d3c3b96..981c9df 100755 --- a/debian/monkeysphere.postinst +++ b/debian/monkeysphere.postinst @@ -11,7 +11,7 @@ if ! getent passwd monkeysphere >/dev/null ; then echo "adding monkeysphere user..." adduser --quiet --system --no-create-home --group \ --home "$VARLIB" \ - --shell '/bin/sh' \ + --shell '/bin/bash' \ --gecos 'monkeysphere authentication user,,,' \ monkeysphere fi diff --git a/packaging/freebsd/distinfo b/packaging/freebsd/distinfo index d590579..26aa939 100644 --- a/packaging/freebsd/distinfo +++ b/packaging/freebsd/distinfo @@ -1,3 +1,3 @@ -MD5 (monkeysphere_0.16~pre.orig.tar.gz) = bda65df4e378e72f3edf02936b2b5f34 -SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = d0c85ad5cdd9b7a61333adf56714e3b25f1bd619bbc40279db759347b17980fe -SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 59241 +MD5 (monkeysphere_0.16~pre.orig.tar.gz) = e94bc8371adf8ce30c58ec040e436417 +SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = f8543778c6ae5a7a87dcb03e34980436f6d967edeb87ccfac2cc19c750f4e588 +SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 59253 diff --git a/packaging/freebsd/pkg-install b/packaging/freebsd/pkg-install index 92a4bbc..6783ee8 100755 --- a/packaging/freebsd/pkg-install +++ b/packaging/freebsd/pkg-install @@ -38,7 +38,7 @@ POST-INSTALL) echo "You already have a user \"${USER}\", so I will use it." else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d "$VARLIB" -s /bin/sh -c "monkeysphere authentication user,,," + -d "$VARLIB" -s /usr/local/bin/bash -c "monkeysphere authentication user,,," then echo "Added user \"${USER}\"." else diff --git a/src/monkeysphere-server b/src/monkeysphere-server index b1cacf9..db3687b 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -67,7 +67,7 @@ EOF } su_monkeysphere_user() { - su -m "$MONKEYSPHERE_USER" -c "$@" + su "$MONKEYSPHERE_USER" -c "$@" } # function to interact with the host gnupg keyring @@ -571,7 +571,7 @@ diagnostics() { warndate=$(advance_date $warnwindow +%s) if ! id monkeysphere >/dev/null ; then - echo "! No monkeysphere user found! Please create a monkeysphere system user." + echo "! No monkeysphere user found! Please create a monkeysphere system user with bash as its shell." problemsfound=$(($problemsfound+1)) fi -- cgit v1.2.3 From b5e33d44a4a838b8212a156b28b186331e5e4adb Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sun, 14 Sep 2008 19:50:18 -0400 Subject: forcing monkeysphere shell to bash for FreeBSD. --- packaging/freebsd/distinfo | 4 ++-- packaging/freebsd/pkg-install | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'packaging/freebsd/distinfo') diff --git a/packaging/freebsd/distinfo b/packaging/freebsd/distinfo index 26aa939..b8ad49b 100644 --- a/packaging/freebsd/distinfo +++ b/packaging/freebsd/distinfo @@ -1,3 +1,3 @@ -MD5 (monkeysphere_0.16~pre.orig.tar.gz) = e94bc8371adf8ce30c58ec040e436417 -SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = f8543778c6ae5a7a87dcb03e34980436f6d967edeb87ccfac2cc19c750f4e588 +MD5 (monkeysphere_0.16~pre.orig.tar.gz) = c5c5211440e31d04df1f7904ec859fb9 +SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = 77faf81cc51dff754ecb7122de26818b908e06ab4e0bdbd0320346dde53612cd SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 59253 diff --git a/packaging/freebsd/pkg-install b/packaging/freebsd/pkg-install index 6783ee8..940b796 100755 --- a/packaging/freebsd/pkg-install +++ b/packaging/freebsd/pkg-install @@ -22,6 +22,7 @@ POST-INSTALL) GROUP=${USER} UID=641 GID=${UID} + SHELL=/usr/local/bin/bash if pw group show "${GROUP}" 2>/dev/null; then echo "You already have a group \"${GROUP}\", so I will use it." @@ -34,8 +35,15 @@ POST-INSTALL) fi fi - if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." + if oldshell=`pw user show "${USER}" 2>/dev/null`; then + if [ x"$oldshell" != x"$SHELL" ]; then + echo "You already have a \"${USER}\" user, but its shell is '$oldshell'." + echo "This package requires that \"${USER}\"'s shell be '$SHELL'." + echo "You should fix this by hand and then re-install the package." + echo " hint: pw usermod '$USER' -s '$SHELL'" + exit 1 + fi + echo "You already have a user \"${USER}\" with the proper shell, so I will use it." else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -d "$VARLIB" -s /usr/local/bin/bash -c "monkeysphere authentication user,,," -- cgit v1.2.3