A Debian user requested that the log level of the messages from rssh
reiterating its configuration information be LOG_DEBUG instead of LOG_INFO
since they don't change and, unless there's some sort of bug in rssh or
the configuration, should just represent the contents of rssh's
configuration.  This seems like a reasonable request to me.  The session
information that changes per user should remain at a higher log level, as
should errors of course.

Here's a patch that I believe implements that, although I'm not sure that
I captured the logic of setting priorities in the existing code well.
Feedback is definitely welcome (including "ick, do it this other way").

(I'm not the author of this patch; it was provided by a Debian user.)

Debian Bug#325684

--- rssh-2.3.0/rsshconf.c       2005-12-23 01:02:39.000000000 +0200
+++ rssh-2.3.0/rsshconf.c       2005-12-23 01:02:34.000000000 +0200
@@ -435,7 +435,7 @@
                return FALSE;
        }
        if (log){
-               log_set_priority(LOG_INFO);
+               log_set_priority(LOG_DEBUG);
                log_msg("allowing scp to all users");
        }
        opts->shell_flags |= RSSH_ALLOW_SCP;
@@ -462,7 +462,7 @@
                return FALSE;
        }
        if (log){
-               log_set_priority(LOG_INFO);
+               log_set_priority(LOG_DEBUG);
                log_msg("allowing sftp to all users");
        }
        opts->shell_flags |= RSSH_ALLOW_SFTP;
@@ -490,7 +490,7 @@
                return FALSE;
        }
        if (log){
-               log_set_priority(LOG_INFO);
+               log_set_priority(LOG_DEBUG);
                log_msg("allowing cvs to all users");
        }
        opts->shell_flags |= RSSH_ALLOW_CVS;
@@ -517,7 +517,7 @@
                                lineno);
                return FALSE;
        }
-       log_set_priority(LOG_INFO);
+       log_set_priority(LOG_DEBUG);
        if (log){
                log_msg("allowing rdist to all users");
                opts->shell_flags |= RSSH_ALLOW_RDIST;
@@ -546,7 +546,7 @@
                return FALSE;
        }
        if (log){
-               log_set_priority(LOG_INFO);
+               log_set_priority(LOG_DEBUG);
                log_msg("allowing rsync to all users");
        }
        opts->shell_flags |= RSSH_ALLOW_RSYNC;
@@ -582,7 +582,7 @@
        /* get rid of any old value for chroot path, assign new one */
        if ( opts->chroot_path ) free(opts->chroot_path);
        if (log){
-               log_set_priority(LOG_INFO);
+               log_set_priority(LOG_DEBUG);
                log_msg("chrooting all users to %s", temp);
        }
        /* we must not free temp, since opts points to it */
@@ -780,7 +780,7 @@
                return FALSE;
        }
        if ( facname ){
-               log_set_priority(LOG_INFO);
+               log_set_priority(LOG_DEBUG);
                if (log) log_msg("setting log facility to %s", facname);
                log_set_facility(fac);
                return TRUE;
@@ -825,7 +825,7 @@
                return FALSE;
        }
        if (log){
-               log_set_priority(LOG_INFO);
+               log_set_priority(LOG_DEBUG);
                log_msg("setting umask to %#o", mask);
        }
        opts->rssh_umask = mask;
@@ -886,7 +886,7 @@
         */
        if ( (strcmp(user, username)) ) return TRUE;
        if (log){
-               log_set_priority(LOG_INFO);
+               log_set_priority(LOG_DEBUG);
                log_msg("line %d: configuring user %s", lineno, user);
        }
        if ( !(len = eat_colon(temp + pos)) ){
@@ -967,7 +967,7 @@
                tmpmask = 077;
        } 
        if (log){
-               log_set_priority(LOG_INFO);
+               log_set_priority(LOG_DEBUG);
                log_msg("setting %s's umask to %#o", user, tmpmask);
        }
        opts->rssh_umask = tmpmask;

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
rssh-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rssh-discuss

Reply via email to