projects
/
monkeysphere.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the test for the root user, effectively reverting part of
[monkeysphere.git]
/
src
/
common
diff --git
a/src/common
b/src/common
index efee9bd69bc1c2389937b1fd66077b887a94a81d..815aacccdcc8c442e6717617273e8c40eb671e3c 100644
(file)
--- a/
src/common
+++ b/
src/common
@@
-19,6
+19,9
@@
SYSCONFIGDIR=${MONKEYSPHERE_SYSCONFIGDIR:-"/etc/monkeysphere"}
export SYSCONFIGDIR
SYSCONFIGDIR=${MONKEYSPHERE_SYSCONFIGDIR:-"/etc/monkeysphere"}
export SYSCONFIGDIR
+# monkeysphere version
+VERSION=__VERSION__
+
########################################################################
### UTILITY FUNCTIONS
########################################################################
### UTILITY FUNCTIONS
@@
-147,7
+150,7
@@
advance_date() {
local shortunits
# try things the GNU way first
local shortunits
# try things the GNU way first
- if date -d "$number $longunits" "$format" >
&/dev/null
; then
+ if date -d "$number $longunits" "$format" >
/dev/null 2>&1
; then
date -d "$number $longunits" "$format"
else
# otherwise, convert to (a limited version of) BSD date syntax:
date -d "$number $longunits" "$format"
else
# otherwise, convert to (a limited version of) BSD date syntax:
@@
-639,7
+642,7
@@
process_user_id() {
;;
'uid') # user ids
if [ "$lastKey" != pub ] ; then
;;
'uid') # user ids
if [ "$lastKey" != pub ] ; then
- log verbose "
-
got a user ID after a sub key?! user IDs should only follow primary keys!"
+ log verbose "
!
got a user ID after a sub key?! user IDs should only follow primary keys!"
continue
fi
# if an acceptable user ID was already found, skip
continue
fi
# if an acceptable user ID was already found, skip
@@
-652,6
+655,8
@@
process_user_id() {
if [ "$validity" = 'u' -o "$validity" = 'f' ] ; then
# mark user ID acceptable
uidOK=true
if [ "$validity" = 'u' -o "$validity" = 'f' ] ; then
# mark user ID acceptable
uidOK=true
+ else
+ log debug " - unacceptable user ID validity ($validity)."
fi
else
continue
fi
else
continue
@@
-669,7
+674,7
@@
process_user_id() {
else
log debug " - unacceptable primary key."
if [ -z "$sshKey" ] ; then
else
log debug " - unacceptable primary key."
if [ -z "$sshKey" ] ; then
- log
error
" ! primary key could not be translated (not RSA or DSA?)."
+ log
debug
" ! primary key could not be translated (not RSA or DSA?)."
else
echo "1:${sshKey}"
fi
else
echo "1:${sshKey}"
fi
@@
-693,10
+698,12
@@
process_user_id() {
# if sub key validity is not ok, skip
if [ "$validity" != 'u' -a "$validity" != 'f' ] ; then
# if sub key validity is not ok, skip
if [ "$validity" != 'u' -a "$validity" != 'f' ] ; then
+ log debug " - unacceptable sub key validity ($validity)."
continue
fi
# if sub key capability is not ok, skip
if ! check_capability "$usage" $requiredCapability ; then
continue
fi
# if sub key capability is not ok, skip
if ! check_capability "$usage" $requiredCapability ; then
+ log debug " - unacceptable sub key capability ($usage)."
continue
fi
continue
fi
@@
-725,7
+732,7
@@
process_user_id() {
else
log debug " - unacceptable sub key."
if [ -z "$sshKey" ] ; then
else
log debug " - unacceptable sub key."
if [ -z "$sshKey" ] ; then
- log
error
" ! sub key could not be translated (not RSA or DSA?)."
+ log
debug
" ! sub key could not be translated (not RSA or DSA?)."
else
echo "1:${sshKey}"
fi
else
echo "1:${sshKey}"
fi