add more debugging output.
authorJameson Graef Rollins <jrollins@phys.columbia.edu>
Tue, 28 Oct 2008 19:04:04 +0000 (15:04 -0400)
committerJameson Graef Rollins <jrollins@phys.columbia.edu>
Tue, 28 Oct 2008 19:04:04 +0000 (15:04 -0400)
src/monkeysphere-server

index 617c10a19ceeea4e7a73ab6facded3a1177e71cc..b6bf78b6e64d074cc74e71d14e62ac7de9439598 100755 (executable)
@@ -194,6 +194,7 @@ update_users() {
         chown -R "$MONKEYSPHERE_USER" "$TMPLOC"
 
        # process authorized_user_ids file
+       log debug "checking for authorized_user_ids..."
        # translating ssh-style path variables
        authorizedUserIDs=$(translate_ssh_variables "$uname" "$AUTHORIZED_USER_IDS")
        if [ -s "$authorizedUserIDs" ] ; then
@@ -213,20 +214,27 @@ update_users() {
                    ". ${SYSSHAREDIR}/common; process_authorized_user_ids $TMP_AUTHORIZED_USER_IDS"
                RETURN="$?"
            else
-               log verbose "not processing authorized_user_ids."
+               log debug "not processing authorized_user_ids."
            fi
+       else
+           log debug "empty or absent authorized_user_ids file."
        fi
 
        # add user-controlled authorized_keys file if specified
        # translate ssh-style path variables
        rawAuthorizedKeys=$(translate_ssh_variables "$uname" "$RAW_AUTHORIZED_KEYS")
-       if [ "$rawAuthorizedKeys" -a -s "$rawAuthorizedKeys" ] ; then
-           # check permissions on the authorized_keys file path
-           if check_key_file_permissions "$uname" "$rawAuthorizedKeys" ; then
-               log verbose "adding raw authorized_keys file... "
-               cat "$rawAuthorizedKeys" >> "$AUTHORIZED_KEYS"
+       if [ "$rawAuthorizedKeys" ] ; then
+           log debug "checking for raw authorized_keys..."
+           if [ -s "$rawAuthorizedKeys" ] ; then
+               # check permissions on the authorized_keys file path
+               if check_key_file_permissions "$uname" "$rawAuthorizedKeys" ; then
+                   log verbose "adding raw authorized_keys file... "
+                   cat "$rawAuthorizedKeys" >> "$AUTHORIZED_KEYS"
+               else
+                   log debug "not adding raw authorized_keys file."            
+               fi
            else
-               log verbose "not adding raw authorized_keys file."              
+               log debug "empty or absent authorized_keys file."
            fi
        fi