]> andersk Git - openssh.git/blobdiff - session.c
NB: big update - may break stuff. Please test!
[openssh.git] / session.c
index 20975cb6cad93e3d0cf12365cd50e57c666ca00f..51b661afbf5f69ae7ab6aea8bd9a65e5a449dd31 100644 (file)
--- a/session.c
+++ b/session.c
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.49 2001/01/18 17:00:00 markus Exp $");
+RCSID("$OpenBSD: session.c,v 1.52 2001/02/03 10:08:37 markus Exp $");
 
-#include "xmalloc.h"
 #include "ssh.h"
+#include "ssh1.h"
+#include "ssh2.h"
+#include "xmalloc.h"
 #include "pty.h"
 #include "packet.h"
 #include "buffer.h"
 #include "mpaux.h"
-#include "servconf.h"
 #include "uidswap.h"
 #include "compat.h"
 #include "channels.h"
 #include "nchan.h"
-
 #include "bufaux.h"
-#include "ssh2.h"
 #include "auth.h"
 #include "auth-options.h"
+#include "pathnames.h"
+#include "log.h"
+#include "servconf.h"
+#include "login.h"
+#include "serverloop.h"
+#include "canohost.h"
 
 #ifdef WITH_IRIX_PROJECT
 #include <proj.h>
@@ -678,7 +683,7 @@ get_remote_name_or_ip(void)
 {
        static const char *remote = "";
        if (utmp_len > 0)
-               remote = get_canonical_hostname();
+               remote = get_canonical_hostname(options.reverse_mapping_check);
        if (utmp_len == 0 || strlen(remote) > utmp_len)
                remote = get_remote_ipaddr();
        return remote;
@@ -1056,7 +1061,7 @@ do_child(const char *command, struct passwd * pw, const char *term,
 #ifdef HAVE_OSF_SIA
                extern char **saved_argv;
                extern int saved_argc;
-               char *host = get_canonical_hostname ();
+               char *host = get_canonical_hostname(options.reverse_mapping_check);
 
                if (sia_become_user(NULL, saved_argc, saved_argv, host,
                    pw->pw_name, ttyname, 0, NULL, NULL, SIA_BEU_SETLUID) !=
@@ -1333,28 +1338,28 @@ do_child(const char *command, struct passwd * pw, const char *term,
         * in this order).
         */
        if (!options.use_login) {
-               if (stat(SSH_USER_RC, &st) >= 0) {
+               if (stat(_PATH_SSH_USER_RC, &st) >= 0) {
                        if (debug_flag)
-                               fprintf(stderr, "Running %s %s\n", _PATH_BSHELL, SSH_USER_RC);
+                               fprintf(stderr, "Running %s %s\n", _PATH_BSHELL, _PATH_SSH_USER_RC);
 
-                       f = popen(_PATH_BSHELL " " SSH_USER_RC, "w");
+                       f = popen(_PATH_BSHELL " " _PATH_SSH_USER_RC, "w");
                        if (f) {
                                if (auth_proto != NULL && auth_data != NULL)
                                        fprintf(f, "%s %s\n", auth_proto, auth_data);
                                pclose(f);
                        } else
-                               fprintf(stderr, "Could not run %s\n", SSH_USER_RC);
-               } else if (stat(SSH_SYSTEM_RC, &st) >= 0) {
+                               fprintf(stderr, "Could not run %s\n", _PATH_SSH_USER_RC);
+               } else if (stat(_PATH_SSH_SYSTEM_RC, &st) >= 0) {
                        if (debug_flag)
-                               fprintf(stderr, "Running %s %s\n", _PATH_BSHELL, SSH_SYSTEM_RC);
+                               fprintf(stderr, "Running %s %s\n", _PATH_BSHELL, _PATH_SSH_SYSTEM_RC);
 
-                       f = popen(_PATH_BSHELL " " SSH_SYSTEM_RC, "w");
+                       f = popen(_PATH_BSHELL " " _PATH_SSH_SYSTEM_RC, "w");
                        if (f) {
                                if (auth_proto != NULL && auth_data != NULL)
                                        fprintf(f, "%s %s\n", auth_proto, auth_data);
                                pclose(f);
                        } else
-                               fprintf(stderr, "Could not run %s\n", SSH_SYSTEM_RC);
+                               fprintf(stderr, "Could not run %s\n", _PATH_SSH_SYSTEM_RC);
                } else if (options.xauth_location != NULL) {
                        /* Add authority data to .Xauthority if appropriate. */
                        if (auth_proto != NULL && auth_data != NULL) {
This page took 0.22368 seconds and 4 git commands to generate.