diff options
-rw-r--r-- | Makefile.in | 3 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | hostfile.c | 10 |
3 files changed, 8 insertions, 13 deletions
diff --git a/Makefile.in b/Makefile.in index 99dfdceda..30a7fff2d 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -49,7 +49,6 @@ PICFLAG=@PICFLAG@ | |||
49 | LIBS=@LIBS@ | 49 | LIBS=@LIBS@ |
50 | K5LIBS=@K5LIBS@ | 50 | K5LIBS=@K5LIBS@ |
51 | GSSLIBS=@GSSLIBS@ | 51 | GSSLIBS=@GSSLIBS@ |
52 | SSHLIBS=@SSHLIBS@ | ||
53 | SSHDLIBS=@SSHDLIBS@ | 52 | SSHDLIBS=@SSHDLIBS@ |
54 | LIBEDIT=@LIBEDIT@ | 53 | LIBEDIT=@LIBEDIT@ |
55 | LIBFIDO2=@LIBFIDO2@ | 54 | LIBFIDO2=@LIBFIDO2@ |
@@ -206,7 +205,7 @@ libssh.a: $(LIBSSH_OBJS) | |||
206 | $(RANLIB) $@ | 205 | $(RANLIB) $@ |
207 | 206 | ||
208 | ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS) | 207 | ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS) |
209 | $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHLIBS) $(LIBS) $(GSSLIBS) | 208 | $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(GSSLIBS) |
210 | 209 | ||
211 | sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS) | 210 | sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS) |
212 | $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) | 211 | $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) |
diff --git a/configure.ac b/configure.ac index 0ea85bed0..d6edb24f2 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -4516,13 +4516,10 @@ AC_ARG_WITH([selinux], | |||
4516 | LIBS="$LIBS -lselinux" | 4516 | LIBS="$LIBS -lselinux" |
4517 | ], | 4517 | ], |
4518 | AC_MSG_ERROR([SELinux support requires libselinux library])) | 4518 | AC_MSG_ERROR([SELinux support requires libselinux library])) |
4519 | SSHLIBS="$SSHLIBS $LIBSELINUX" | ||
4520 | SSHDLIBS="$SSHDLIBS $LIBSELINUX" | ||
4521 | AC_CHECK_FUNCS([getseuserbyname get_default_context_with_level]) | 4519 | AC_CHECK_FUNCS([getseuserbyname get_default_context_with_level]) |
4522 | LIBS="$save_LIBS" | 4520 | LIBS="$save_LIBS $LIBSELINUX" |
4523 | fi ] | 4521 | fi ] |
4524 | ) | 4522 | ) |
4525 | AC_SUBST([SSHLIBS]) | ||
4526 | AC_SUBST([SSHDLIBS]) | 4523 | AC_SUBST([SSHDLIBS]) |
4527 | 4524 | ||
4528 | # Check whether user wants Kerberos 5 support | 4525 | # Check whether user wants Kerberos 5 support |
@@ -5483,9 +5480,6 @@ echo " Libraries: ${LIBS}" | |||
5483 | if test ! -z "${SSHDLIBS}"; then | 5480 | if test ! -z "${SSHDLIBS}"; then |
5484 | echo " +for sshd: ${SSHDLIBS}" | 5481 | echo " +for sshd: ${SSHDLIBS}" |
5485 | fi | 5482 | fi |
5486 | if test ! -z "${SSHLIBS}"; then | ||
5487 | echo " +for ssh: ${SSHLIBS}" | ||
5488 | fi | ||
5489 | 5483 | ||
5490 | echo "" | 5484 | echo "" |
5491 | 5485 | ||
diff --git a/hostfile.c b/hostfile.c index 1cc4dba92..936d8c9be 100644 --- a/hostfile.c +++ b/hostfile.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: hostfile.c,v 1.81 2020/06/26 05:02:03 dtucker Exp $ */ | 1 | /* $OpenBSD: hostfile.c,v 1.82 2020/06/26 05:42:16 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -465,9 +465,10 @@ hostfile_create_user_ssh_dir(const char *filename, int notify) | |||
465 | return; | 465 | return; |
466 | len = p - filename; | 466 | len = p - filename; |
467 | dotsshdir = tilde_expand_filename("~/" _PATH_SSH_USER_DIR, getuid()); | 467 | dotsshdir = tilde_expand_filename("~/" _PATH_SSH_USER_DIR, getuid()); |
468 | if ((strlen(dotsshdir) > len || strncmp(filename, dotsshdir, len) != 0 | 468 | if (strlen(dotsshdir) > len || strncmp(filename, dotsshdir, len) != 0) |
469 | || stat(dotsshdir, &st)) == 0) | 469 | goto out; /* not ~/.ssh prefixed */ |
470 | ; /* do nothing, path not in ~/.ssh or dir already exists */ | 470 | if (stat(dotsshdir, &st) == 0) |
471 | goto out; /* dir already exists */ | ||
471 | else if (errno != ENOENT) | 472 | else if (errno != ENOENT) |
472 | error("Could not stat %s: %s", dotsshdir, strerror(errno)); | 473 | error("Could not stat %s: %s", dotsshdir, strerror(errno)); |
473 | else { | 474 | else { |
@@ -483,6 +484,7 @@ hostfile_create_user_ssh_dir(const char *filename, int notify) | |||
483 | ssh_selinux_setfscreatecon(NULL); | 484 | ssh_selinux_setfscreatecon(NULL); |
484 | #endif | 485 | #endif |
485 | } | 486 | } |
487 | out: | ||
486 | free(dotsshdir); | 488 | free(dotsshdir); |
487 | } | 489 | } |
488 | 490 | ||