ssh's readconf.c debug() goes to /dev/null

Pekka Savola pekkas at netcore.fi
Fri Apr 13 00:02:13 EST 2001


Hi,

Related to:
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/ssh.c.diff?r1=1.100&r2=1.101


It'd appear that logging in readconf.c:
---
				debug("Applying options for %.100s", arg);
	debug("Reading configuration data %.200s", filename);
---
Goes to /dev/null.

This is caused by the fact, that in ssh.c there is:
---
        /*
  	   * Initialize "log" output.  Since we are the client all output
  	   * actually goes to stderr.
  	 */
==>     log_init(av[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);

        /* Read per-user configuration file. */
        snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, _PATH_SSH_USER_CONFFILE);
        read_config_file(buf, host, &options);

        /* Read systemwide configuration file. */
        read_config_file(_PATH_HOST_CONFIG_FILE, host, &options);

	/* Fill configuration defaults. */
        fill_default_options(&options);

	/* reinit */
        log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 1);
---

The first time

Because of this, if you use 'ssh -v -v -v somewhere', you won't get
messages like:
---
debug1: Reading configuration data /home/pekkas/.ssh/config	<==
debug1: Reading configuration data /etc/ssh/ssh_config		<==
debug1: Applying options for *					<==
debug1: Seeding random number generator
debug1: Rhosts Authentication disabled, originating port will not be
trusted.
[...]
---

Is this intentional?

If not, changing the first

log_init(av[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);

to

log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 1);

helps.

-- 
Pekka Savola                  "Tell me of difficulties surmounted,
Netcore Oy                    not those you stumble over and fall"
Systems. Networks. Security.   -- Robert Jordan: A Crown of Swords




More information about the openssh-unix-dev mailing list