From b0fb6872ed2efe3a116083e43dd4f5f47cd4882b Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2006 00:03:21 +1100 Subject: - deraadt@cvs.openbsd.org 2006/03/19 18:51:18 [atomicio.c auth-bsdauth.c auth-chall.c auth-krb5.c auth-options.c] [auth-pam.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c] [auth-shadow.c auth-skey.c auth.c auth1.c auth2-chall.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c] [auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c buffer.c] [canohost.c channels.c cipher-3des1.c cipher-acss.c cipher-aes.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c entropy.c fatal.c] [groupaccess.c hostfile.c includes.h kex.c kexdh.c kexdhc.c] [kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c loginrec.c] [loginrec.h logintest.c mac.c match.c md-sha256.c md5crypt.c misc.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c msg.c] [nchan.c packet.c progressmeter.c readconf.c readpass.c rsa.c] [scard.c scp.c servconf.c serverloop.c session.c sftp-client.c] [sftp-common.c sftp-glob.c sftp-server.c sftp.c ssh-add.c] [ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c] [ssh-rand-helper.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] [uidswap.c uuencode.c xmalloc.c openbsd-compat/bsd-arc4random.c] [openbsd-compat/bsd-closefrom.c openbsd-compat/bsd-cygwin_util.c] [openbsd-compat/bsd-getpeereid.c openbsd-compat/bsd-misc.c] [openbsd-compat/bsd-nextstep.c openbsd-compat/bsd-snprintf.c] [openbsd-compat/bsd-waitpid.c openbsd-compat/fake-rfc2553.c] RCSID() can die --- servconf.c | 1 - 1 file changed, 1 deletion(-) (limited to 'servconf.c') diff --git a/servconf.c b/servconf.c index 81953bb80..2ae93d4c3 100644 --- a/servconf.c +++ b/servconf.c @@ -10,7 +10,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.146 2005/12/08 18:34:11 reyk Exp $"); #include "ssh.h" #include "log.h" -- cgit v1.2.3 From 928b23684a1d94dc2bc1cecc75b0e596eb7a4cb9 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2006 13:53:32 +1100 Subject: - djm@cvs.openbsd.org 2006/03/19 02:24:05 [dh.c readconf.c servconf.c] potential NULL pointer dereferences detected by Coverity via elad AT netbsd.org; ok deraadt@ --- ChangeLog | 6 +++++- dh.c | 3 ++- readconf.c | 3 ++- servconf.c | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 1093f5453..19425d867 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,10 @@ [hostfile.c] FILE* leak detected by Coverity via elad AT netbsd.org; ok deraadt@ + - djm@cvs.openbsd.org 2006/03/19 02:24:05 + [dh.c readconf.c servconf.c] + potential NULL pointer dereferences detected by Coverity + via elad AT netbsd.org; ok deraadt@ 20060325 - OpenBSD CVS Sync @@ -4283,4 +4287,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4248 2006/03/26 02:52:20 djm Exp $ +$Id: ChangeLog,v 1.4249 2006/03/26 02:53:32 djm Exp $ diff --git a/dh.c b/dh.c index a30b704fb..e8ce3d1a9 100644 --- a/dh.c +++ b/dh.c @@ -45,7 +45,8 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg) char *strsize, *gen, *prime; cp = line; - arg = strdelim(&cp); + if ((arg = strdelim(&cp)) == NULL) + return 0; /* Ignore leading whitespace */ if (*arg == '\0') arg = strdelim(&cp); diff --git a/readconf.c b/readconf.c index 1112d0d86..e2e10d9d6 100644 --- a/readconf.c +++ b/readconf.c @@ -324,7 +324,8 @@ process_config_line(Options *options, const char *host, s = line; /* Get the keyword. (Each line is supposed to begin with a keyword). */ - keyword = strdelim(&s); + if ((keyword = strdelim(&s)) == NULL) + return 0; /* Ignore leading whitespace. */ if (*keyword == '\0') keyword = strdelim(&s); diff --git a/servconf.c b/servconf.c index 2ae93d4c3..7923f5df4 100644 --- a/servconf.c +++ b/servconf.c @@ -447,7 +447,8 @@ process_server_config_line(ServerOptions *options, char *line, u_int i; cp = line; - arg = strdelim(&cp); + if ((arg = strdelim(&cp)) != NULL) + return 0; /* Ignore leading whitespace */ if (*arg == '\0') arg = strdelim(&cp); -- cgit v1.2.3 From 78f16cb07bb0221caea416b5ea83f74dc196fd8a Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2006 13:54:37 +1100 Subject: - dtucker@cvs.openbsd.org 2006/03/19 11:51:52 [servconf.c] Correct strdelim null test; ok djm@ --- ChangeLog | 5 ++++- servconf.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 5a46102ec..6dbcbc3ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,9 @@ [sshconnect2.c] memory leaks detected by Coverity via elad AT netbsd.org; deraadt@ ok + - dtucker@cvs.openbsd.org 2006/03/19 11:51:52 + [servconf.c] + Correct strdelim null test; ok djm@ 20060325 - OpenBSD CVS Sync @@ -4291,4 +4294,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4250 2006/03/26 02:54:12 djm Exp $ +$Id: ChangeLog,v 1.4251 2006/03/26 02:54:37 djm Exp $ diff --git a/servconf.c b/servconf.c index 7923f5df4..1443e832e 100644 --- a/servconf.c +++ b/servconf.c @@ -447,7 +447,7 @@ process_server_config_line(ServerOptions *options, char *line, u_int i; cp = line; - if ((arg = strdelim(&cp)) != NULL) + if ((arg = strdelim(&cp)) == NULL) return 0; /* Ignore leading whitespace */ if (*arg == '\0') -- cgit v1.2.3 From 57c30117c1c97c069bc38af45b4a504a39866e74 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2006 14:24:48 +1100 Subject: - djm@cvs.openbsd.org 2006/03/25 13:17:03 [atomicio.c auth-bsdauth.c auth-chall.c auth-options.c auth-passwd.c] [auth-rh-rsa.c auth-rhosts.c auth-rsa.c auth-skey.c auth.c auth1.c] [auth2-chall.c auth2-hostbased.c auth2-kbdint.c auth2-none.c] [auth2-passwd.c auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c] [buffer.c canohost.c channels.c cipher-3des1.c cipher-bf1.c] [cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c compress.c] [deattack.c dh.c dispatch.c fatal.c groupaccess.c hostfile.c kex.c] [kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c] [mac.c match.c md-sha256.c misc.c monitor.c monitor_fdpass.c] [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c progressmeter.c] [readconf.c readpass.c rsa.c scard.c scp.c servconf.c serverloop.c] [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c] [sftp.c ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] [uidswap.c uuencode.c xmalloc.c] Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that Theo nuked - our scripts to sync -portable need them in the files --- ChangeLog | 6 +++++- atomicio.c | 1 + auth-bsdauth.c | 1 + auth-chall.c | 1 + auth-options.c | 1 + auth-passwd.c | 1 + auth-rh-rsa.c | 1 + auth-rhosts.c | 1 + auth-rsa.c | 1 + auth-skey.c | 1 + auth.c | 1 + auth1.c | 1 + auth2-chall.c | 1 + auth2-hostbased.c | 1 + auth2-kbdint.c | 1 + auth2-none.c | 1 + auth2-passwd.c | 1 + auth2-pubkey.c | 1 + auth2.c | 1 + authfd.c | 1 + authfile.c | 1 + bufaux.c | 1 + buffer.c | 1 + canohost.c | 1 + channels.c | 1 + cipher-3des1.c | 1 + cipher-bf1.c | 1 + cipher-ctr.c | 1 + cipher.c | 1 + cleanup.c | 1 + clientloop.c | 1 + compat.c | 1 + compress.c | 1 + deattack.c | 1 + dh.c | 1 + dispatch.c | 1 + fatal.c | 1 + groupaccess.c | 1 + hostfile.c | 1 + kex.c | 1 + kexdh.c | 1 + kexdhc.c | 1 + kexdhs.c | 1 + kexgex.c | 1 + kexgexc.c | 1 + kexgexs.c | 1 + key.c | 1 + log.c | 1 + mac.c | 1 + match.c | 1 + md-sha256.c | 1 + misc.c | 1 + monitor.c | 1 + monitor_fdpass.c | 1 + monitor_mm.c | 1 + monitor_wrap.c | 1 + msg.c | 1 + nchan.c | 1 + packet.c | 1 + progressmeter.c | 1 + readconf.c | 1 + readpass.c | 1 + rsa.c | 1 + scard.c | 1 + scp.c | 1 + servconf.c | 1 + serverloop.c | 1 + session.c | 1 + sftp-client.c | 1 + sftp-common.c | 1 + sftp-glob.c | 1 + sftp-server.c | 1 + sftp.c | 1 + ssh-add.c | 1 + ssh-agent.c | 1 + ssh-dss.c | 1 + ssh-keygen.c | 1 + ssh-keyscan.c | 1 + ssh-keysign.c | 1 + ssh-rsa.c | 1 + ssh.c | 1 + sshconnect.c | 1 + sshconnect1.c | 1 + sshconnect2.c | 1 + sshd.c | 1 + sshlogin.c | 1 + sshpty.c | 1 + sshtty.c | 1 + ttymodes.c | 1 + uidswap.c | 1 + uuencode.c | 1 + xmalloc.c | 1 + 92 files changed, 96 insertions(+), 1 deletion(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 62ffb4690..98b6cc356 100644 --- a/ChangeLog +++ b/ChangeLog @@ -131,6 +131,10 @@ - djm@cvs.openbsd.org 2006/03/25 01:30:23 [sftp.c] "abormally" is a perfectly cromulent word, but "abnormally" is better + - djm@cvs.openbsd.org 2006/03/25 13:17:03 + [atomicio.c auth-bsdauth.c auth-chall.c auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c auth-skey.c auth.c auth1.c auth2-chall.c auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c buffer.c canohost.c channels.c cipher-3des1.c cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c compress.c deattack.c dh.c dispatch.c fatal.c groupaccess.c hostfile.c kex.c kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c mac.c match.c md-sha256.c misc.c monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c progressmeter.c readconf.c readpass.c rsa.c scard.c scp.c servconf.c serverloop.c session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c uidswap.c uuencode.c xmalloc.c] + Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that + Theo nuked - our scripts to sync -portable need them in the files 20060325 - OpenBSD CVS Sync @@ -4388,4 +4392,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4275 2006/03/26 03:23:17 djm Exp $ +$Id: ChangeLog,v 1.4276 2006/03/26 03:24:48 djm Exp $ diff --git a/atomicio.c b/atomicio.c index afe306b1b..87fb9fe75 100644 --- a/atomicio.c +++ b/atomicio.c @@ -1,3 +1,4 @@ +/* $OpenBSD: atomicio.c,v 1.16 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. diff --git a/auth-bsdauth.c b/auth-bsdauth.c index 2ccbc9d43..c309e4a11 100644 --- a/auth-bsdauth.c +++ b/auth-bsdauth.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-bsdauth.c,v 1.9 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/auth-chall.c b/auth-chall.c index 7707023a4..023e7ee01 100644 --- a/auth-chall.c +++ b/auth-chall.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-chall.c,v 1.11 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/auth-options.c b/auth-options.c index 77488a49d..56d598412 100644 --- a/auth-options.c +++ b/auth-options.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-options.c,v 1.35 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-passwd.c b/auth-passwd.c index df202dde3..2ebcc5fc4 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-passwd.c,v 1.36 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c index f9c386dba..c8bdfa26c 100644 --- a/auth-rh-rsa.c +++ b/auth-rh-rsa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-rh-rsa.c,v 1.40 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-rhosts.c b/auth-rhosts.c index 098893563..ce72adb7d 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-rhosts.c,v 1.37 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-rsa.c b/auth-rsa.c index effff5d2a..a906eb2d6 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-rsa.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-skey.c b/auth-skey.c index 3e6a06db7..9c981ec83 100644 --- a/auth-skey.c +++ b/auth-skey.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-skey.c,v 1.23 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/auth.c b/auth.c index aa6d66075..bf2948a84 100644 --- a/auth.c +++ b/auth.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth1.c b/auth1.c index 2f8e13e05..6a6cff862 100644 --- a/auth1.c +++ b/auth1.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth1.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved diff --git a/auth2-chall.c b/auth2-chall.c index d54ee2856..09412aa4a 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-chall.c,v 1.27 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. diff --git a/auth2-hostbased.c b/auth2-hostbased.c index 251828496..8d5f38353 100644 --- a/auth2-hostbased.c +++ b/auth2-hostbased.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-hostbased.c,v 1.8 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2-kbdint.c b/auth2-kbdint.c index 1b902e4cb..796714eec 100644 --- a/auth2-kbdint.c +++ b/auth2-kbdint.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-kbdint.c,v 1.4 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2-none.c b/auth2-none.c index 19cc2b1b7..3fdf09a3a 100644 --- a/auth2-none.c +++ b/auth2-none.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-none.c,v 1.10 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2-passwd.c b/auth2-passwd.c index 41507af1d..a1e77c41c 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-passwd.c,v 1.7 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2-pubkey.c b/auth2-pubkey.c index a59c37993..8786014f2 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-pubkey.c,v 1.12 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2.c b/auth2.c index 9d3263e55..8f7ec0d6d 100644 --- a/auth2.c +++ b/auth2.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2.c,v 1.110 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/authfd.c b/authfd.c index fc322b983..935143765 100644 --- a/authfd.c +++ b/authfd.c @@ -1,3 +1,4 @@ +/* $OpenBSD: authfd.c,v 1.72 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/authfile.c b/authfile.c index 55c66d1e3..b95b9470b 100644 --- a/authfile.c +++ b/authfile.c @@ -1,3 +1,4 @@ +/* $OpenBSD: authfile.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/bufaux.c b/bufaux.c index 19f6708f0..b7c9f2ecd 100644 --- a/bufaux.c +++ b/bufaux.c @@ -1,3 +1,4 @@ +/* $OpenBSD: bufaux.c,v 1.39 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/buffer.c b/buffer.c index 1666f742e..de404e602 100644 --- a/buffer.c +++ b/buffer.c @@ -1,3 +1,4 @@ +/* $OpenBSD: buffer.c,v 1.26 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/canohost.c b/canohost.c index b1c35e99e..35ae9bede 100644 --- a/canohost.c +++ b/canohost.c @@ -1,3 +1,4 @@ +/* $OpenBSD: canohost.c,v 1.53 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/channels.c b/channels.c index 5706833a9..c838b8534 100644 --- a/channels.c +++ b/channels.c @@ -1,3 +1,4 @@ +/* $OpenBSD: channels.c,v 1.244 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/cipher-3des1.c b/cipher-3des1.c index 53b5a2958..c2c0bf811 100644 --- a/cipher-3des1.c +++ b/cipher-3des1.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cipher-3des1.c,v 1.4 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * diff --git a/cipher-bf1.c b/cipher-bf1.c index e7246650b..b6aa0152a 100644 --- a/cipher-bf1.c +++ b/cipher-bf1.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cipher-bf1.c,v 1.3 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * diff --git a/cipher-ctr.c b/cipher-ctr.c index 9615f5aa6..be82fd3a9 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cipher-ctr.c,v 1.8 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl * diff --git a/cipher.c b/cipher.c index 15397db03..c42963897 100644 --- a/cipher.c +++ b/cipher.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cipher.c,v 1.79 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/cleanup.c b/cleanup.c index 7b40ca781..dcf456830 100644 --- a/cleanup.c +++ b/cleanup.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cleanup.c,v 1.3 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl * diff --git a/clientloop.c b/clientloop.c index aa4ebb3aa..c136dae37 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,3 +1,4 @@ +/* $OpenBSD: clientloop.c,v 1.160 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/compat.c b/compat.c index 24d9a7f38..1573ed64e 100644 --- a/compat.c +++ b/compat.c @@ -1,3 +1,4 @@ +/* $OpenBSD: compat.c,v 1.73 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * diff --git a/compress.c b/compress.c index 6f8d6b775..8aba84efa 100644 --- a/compress.c +++ b/compress.c @@ -1,3 +1,4 @@ +/* $OpenBSD: compress.c,v 1.23 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/deattack.c b/deattack.c index ff9ca4dd5..2adf185e8 100644 --- a/deattack.c +++ b/deattack.c @@ -1,3 +1,4 @@ +/* $OpenBSD: deattack.c,v 1.26 2006/03/25 13:17:01 djm Exp $ */ /* * Cryptographic attack detector for ssh - source code * diff --git a/dh.c b/dh.c index e8ce3d1a9..4db3b0b2a 100644 --- a/dh.c +++ b/dh.c @@ -1,3 +1,4 @@ +/* $OpenBSD: dh.c,v 1.34 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * diff --git a/dispatch.c b/dispatch.c index 3f96c726b..eac07b1b3 100644 --- a/dispatch.c +++ b/dispatch.c @@ -1,3 +1,4 @@ +/* $OpenBSD: dispatch.c,v 1.18 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/fatal.c b/fatal.c index 78b51cd8b..7f58970fb 100644 --- a/fatal.c +++ b/fatal.c @@ -1,3 +1,4 @@ +/* $OpenBSD: fatal.c,v 1.5 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * diff --git a/groupaccess.c b/groupaccess.c index 2328bf453..83c573def 100644 --- a/groupaccess.c +++ b/groupaccess.c @@ -1,3 +1,4 @@ +/* $OpenBSD: groupaccess.c,v 1.8 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Kevin Steves. All rights reserved. * diff --git a/hostfile.c b/hostfile.c index c80578440..39ff197a7 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,3 +1,4 @@ +/* $OpenBSD: hostfile.c,v 1.40 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/kex.c b/kex.c index 030df6be0..6a5fd264b 100644 --- a/kex.c +++ b/kex.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kex.c,v 1.71 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * diff --git a/kexdh.c b/kexdh.c index f34214062..2d13127b8 100644 --- a/kexdh.c +++ b/kexdh.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexdh.c,v 1.22 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/kexdhc.c b/kexdhc.c index 23abeb50d..1f1c5ea4f 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexdhc.c,v 1.5 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/kexdhs.c b/kexdhs.c index be815e46b..d139f5c7b 100644 --- a/kexdhs.c +++ b/kexdhs.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexdhs.c,v 1.5 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/kexgex.c b/kexgex.c index b306821cc..5ab6745a3 100644 --- a/kexgex.c +++ b/kexgex.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexgex.c,v 1.26 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. diff --git a/kexgexc.c b/kexgexc.c index 50c5a32e5..f871f972e 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexgexc.c,v 1.5 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. diff --git a/kexgexs.c b/kexgexs.c index e3d0eacc5..0141c6d0f 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexgexs.c,v 1.4 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. diff --git a/key.c b/key.c index 0d29593b0..8e6ccc2bf 100644 --- a/key.c +++ b/key.c @@ -1,3 +1,4 @@ +/* $OpenBSD: key.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/log.c b/log.c index 58ba8591c..3a404918b 100644 --- a/log.c +++ b/log.c @@ -1,3 +1,4 @@ +/* $OpenBSD: log.c,v 1.31 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/mac.c b/mac.c index f03100ac9..c155dbd3f 100644 --- a/mac.c +++ b/mac.c @@ -1,3 +1,4 @@ +/* $OpenBSD: mac.c,v 1.9 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/match.c b/match.c index e08afdeb0..c0e5bf424 100644 --- a/match.c +++ b/match.c @@ -1,3 +1,4 @@ +/* $OpenBSD: match.c,v 1.24 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/md-sha256.c b/md-sha256.c index 8ea0ac433..33deb780a 100644 --- a/md-sha256.c +++ b/md-sha256.c @@ -1,3 +1,4 @@ +/* $OpenBSD: md-sha256.c,v 1.3 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2005 Damien Miller * diff --git a/misc.c b/misc.c index 96d90dec9..daeb86c82 100644 --- a/misc.c +++ b/misc.c @@ -1,3 +1,4 @@ +/* $OpenBSD: misc.c,v 1.51 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005 Damien Miller. All rights reserved. diff --git a/monitor.c b/monitor.c index 7409be32b..d672aeb72 100644 --- a/monitor.c +++ b/monitor.c @@ -1,3 +1,4 @@ +/* $OpenBSD: monitor.c,v 1.76 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl diff --git a/monitor_fdpass.c b/monitor_fdpass.c index dec90d18b..4ce9eae19 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -1,3 +1,4 @@ +/* $OpenBSD: monitor_fdpass.c,v 1.8 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 2001 Niels Provos * All rights reserved. diff --git a/monitor_mm.c b/monitor_mm.c index e8de71fea..222751628 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -1,3 +1,4 @@ +/* $OpenBSD: monitor_mm.c,v 1.11 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. diff --git a/monitor_wrap.c b/monitor_wrap.c index cd340360a..f2fbd99ee 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,3 +1,4 @@ +/* $OpenBSD: monitor_wrap.c,v 1.44 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl diff --git a/msg.c b/msg.c index 662db4cdb..2c0a67269 100644 --- a/msg.c +++ b/msg.c @@ -1,3 +1,4 @@ +/* $OpenBSD: msg.c,v 1.10 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * diff --git a/nchan.c b/nchan.c index ca9a56b59..1f4b39671 100644 --- a/nchan.c +++ b/nchan.c @@ -1,3 +1,4 @@ +/* $OpenBSD: nchan.c,v 1.53 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * diff --git a/packet.c b/packet.c index 40c6b1d2b..71da5454e 100644 --- a/packet.c +++ b/packet.c @@ -1,3 +1,4 @@ +/* $OpenBSD: packet.c,v 1.128 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/progressmeter.c b/progressmeter.c index ff99acf71..d145a724a 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,3 +1,4 @@ +/* $OpenBSD: progressmeter.c,v 1.29 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * diff --git a/readconf.c b/readconf.c index e2e10d9d6..87e41e0c4 100644 --- a/readconf.c +++ b/readconf.c @@ -1,3 +1,4 @@ +/* $OpenBSD: readconf.c,v 1.151 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/readpass.c b/readpass.c index 4236c43c7..c3d36a028 100644 --- a/readpass.c +++ b/readpass.c @@ -1,3 +1,4 @@ +/* $OpenBSD: readpass.c,v 1.37 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/rsa.c b/rsa.c index 507b73c9c..6ca05b3d2 100644 --- a/rsa.c +++ b/rsa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: rsa.c,v 1.26 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/scard.c b/scard.c index c0c22aa73..0a6ec816d 100644 --- a/scard.c +++ b/scard.c @@ -1,3 +1,4 @@ +/* $OpenBSD: scard.c,v 1.32 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/scp.c b/scp.c index 3068b8d32..2f89aa49e 100644 --- a/scp.c +++ b/scp.c @@ -1,3 +1,4 @@ +/* $OpenBSD: scp.c,v 1.139 2006/03/25 13:17:02 djm Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). diff --git a/servconf.c b/servconf.c index 1443e832e..43372e20f 100644 --- a/servconf.c +++ b/servconf.c @@ -1,3 +1,4 @@ +/* $OpenBSD: servconf.c,v 1.150 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved diff --git a/serverloop.c b/serverloop.c index 36c40ec59..97ad65b26 100644 --- a/serverloop.c +++ b/serverloop.c @@ -1,3 +1,4 @@ +/* $OpenBSD: serverloop.c,v 1.134 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/session.c b/session.c index f0a0bdd2f..8b837d07d 100644 --- a/session.c +++ b/session.c @@ -1,3 +1,4 @@ +/* $OpenBSD: session.c,v 1.202 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved diff --git a/sftp-client.c b/sftp-client.c index 8b4d67b58..5788aa6ad 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp-client.c,v 1.63 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * diff --git a/sftp-common.c b/sftp-common.c index 4222f58d6..2e680e9f3 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp-common.c,v 1.13 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Damien Miller. All rights reserved. diff --git a/sftp-glob.c b/sftp-glob.c index cee44fc4c..3d092d133 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp-glob.c,v 1.19 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * diff --git a/sftp-server.c b/sftp-server.c index 52b7323c2..e58aa59c8 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp-server.c,v 1.56 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * diff --git a/sftp.c b/sftp.c index 868794a76..f5212ed4f 100644 --- a/sftp.c +++ b/sftp.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp.c,v 1.79 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * diff --git a/ssh-add.c b/ssh-add.c index 2944cceeb..ff85af031 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-add.c,v 1.79 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/ssh-agent.c b/ssh-agent.c index 042b18f54..c169d226f 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-agent.c,v 1.134 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/ssh-dss.c b/ssh-dss.c index 8250266fa..d16f75e63 100644 --- a/ssh-dss.c +++ b/ssh-dss.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-dss.c,v 1.21 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/ssh-keygen.c b/ssh-keygen.c index e8a1d4b4b..84f13c42f 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-keygen.c,v 1.141 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 07b679442..dc47a9576 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-keyscan.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * diff --git a/ssh-keysign.c b/ssh-keysign.c index a96babfa5..1f78c7a05 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-keysign.c,v 1.22 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * diff --git a/ssh-rsa.c b/ssh-rsa.c index 55fb7ba59..4580c0644 100644 --- a/ssh-rsa.c +++ b/ssh-rsa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-rsa.c,v 1.37 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000, 2003 Markus Friedl * diff --git a/ssh.c b/ssh.c index f34be679c..00995e5dc 100644 --- a/ssh.c +++ b/ssh.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh.c,v 1.273 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshconnect.c b/sshconnect.c index 8d4928a82..5cf107794 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshconnect.c,v 1.180 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshconnect1.c b/sshconnect1.c index a39441120..9b86c7ce1 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshconnect1.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshconnect2.c b/sshconnect2.c index c3501c2a5..a826ad0f4 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshconnect2.c,v 1.151 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/sshd.c b/sshd.c index 28e8c1aa3..a206db245 100644 --- a/sshd.c +++ b/sshd.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshd.c,v 1.330 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshlogin.c b/sshlogin.c index 95b850acb..72c8252d1 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshlogin.c,v 1.16 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshpty.c b/sshpty.c index 9ac4903ef..a15df0414 100644 --- a/sshpty.c +++ b/sshpty.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshpty.c,v 1.19 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshtty.c b/sshtty.c index 528177b4b..7cb848d2c 100644 --- a/sshtty.c +++ b/sshtty.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshtty.c,v 1.10 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/ttymodes.c b/ttymodes.c index 40d536e2c..92fecb415 100644 --- a/ttymodes.c +++ b/ttymodes.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ttymodes.c,v 1.23 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/uidswap.c b/uidswap.c index 305895a44..6208be5bd 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,3 +1,4 @@ +/* $OpenBSD: uidswap.c,v 1.26 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/uuencode.c b/uuencode.c index feda6a016..7dde55967 100644 --- a/uuencode.c +++ b/uuencode.c @@ -1,3 +1,4 @@ +/* $OpenBSD: uuencode.c,v 1.20 2006/03/25 13:17:03 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/xmalloc.c b/xmalloc.c index d5d7b6bc5..9bfa9e6f8 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -1,3 +1,4 @@ +/* $OpenBSD: xmalloc.c,v 1.20 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland -- cgit v1.2.3 From 917f9b6b6eb560e205a787bd8f38d4b9741c9a9f Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 10 Jul 2006 20:36:47 +1000 Subject: - djm@cvs.openbsd.org 2006/07/06 10:47:05 [servconf.c servconf.h session.c sshd_config.5] support arguments to Subsystem commands; ok markus@ --- ChangeLog | 5 ++++- servconf.c | 14 +++++++++++++- servconf.h | 3 ++- session.c | 11 ++++++----- sshd_config.5 | 6 +++--- 5 files changed, 28 insertions(+), 11 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 70f96ef77..2e45ea652 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,9 @@ [serverloop.c sshconnect.c uuencode.c] move #include out of includes.h; ok deraadt@ (also ssh-rand-helper.c logintest.c loginrec.c) + - djm@cvs.openbsd.org 2006/07/06 10:47:05 + [servconf.c servconf.h session.c sshd_config.5] + support arguments to Subsystem commands; ok markus@ 20060706 - (dtucker) [configure.ac] Try AIX blibpath test in different order when @@ -4768,4 +4771,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4368 2006/07/10 10:35:38 djm Exp $ +$Id: ChangeLog,v 1.4369 2006/07/10 10:36:47 djm Exp $ diff --git a/servconf.c b/servconf.c index 43372e20f..af0ad1a35 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.150 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: servconf.c,v 1.151 2006/07/06 10:47:05 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -446,6 +446,7 @@ process_server_config_line(ServerOptions *options, char *line, ServerOpCodes opcode; u_short port; u_int i; + size_t len; cp = line; if ((arg = strdelim(&cp)) == NULL) @@ -901,6 +902,17 @@ parse_flag: fatal("%s line %d: Missing subsystem command.", filename, linenum); options->subsystem_command[options->num_subsystems] = xstrdup(arg); + + /* Collect arguments (separate to executable) */ + p = xstrdup(arg); + len = strlen(p) + 1; + while ((arg = strdelim(&cp)) != NULL && *arg != '\0') { + len += 1 + strlen(arg); + p = xrealloc(p, 1, len); + strlcat(p, " ", len); + strlcat(p, arg, len); + } + options->subsystem_args[options->num_subsystems] = p; options->num_subsystems++; break; diff --git a/servconf.h b/servconf.h index 73604a98e..671050e4c 100644 --- a/servconf.h +++ b/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.73 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: servconf.h,v 1.74 2006/07/06 10:47:05 djm Exp $ */ /* * Author: Tatu Ylonen @@ -111,6 +111,7 @@ typedef struct { u_int num_subsystems; char *subsystem_name[MAX_SUBSYSTEMS]; char *subsystem_command[MAX_SUBSYSTEMS]; + char *subsystem_args[MAX_SUBSYSTEMS]; u_int num_accept_env; char *accept_env[MAX_ACCEPT_ENV]; diff --git a/session.c b/session.c index cb0e8267c..899c3a16b 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.204 2006/07/02 22:45:59 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.205 2006/07/06 10:47:05 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -1841,7 +1841,7 @@ session_subsystem_req(Session *s) struct stat st; u_int len; int success = 0; - char *cmd, *subsys = packet_get_string(&len); + char *prog, *cmd, *subsys = packet_get_string(&len); u_int i; packet_check_eom(); @@ -1849,9 +1849,10 @@ session_subsystem_req(Session *s) for (i = 0; i < options.num_subsystems; i++) { if (strcmp(subsys, options.subsystem_name[i]) == 0) { - cmd = options.subsystem_command[i]; - if (stat(cmd, &st) < 0) { - error("subsystem: cannot stat %s: %s", cmd, + prog = options.subsystem_command[i]; + cmd = options.subsystem_args[i]; + if (stat(prog, &st) < 0) { + error("subsystem: cannot stat %s: %s", prog, strerror(errno)); break; } diff --git a/sshd_config.5 b/sshd_config.5 index 836add94f..3b639b17d 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.58 2006/07/02 17:12:58 stevesk Exp $ +.\" $OpenBSD: sshd_config.5,v 1.59 2006/07/06 10:47:05 djm Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -643,8 +643,8 @@ The default is .Dq yes . .It Cm Subsystem Configures an external subsystem (e.g. file transfer daemon). -Arguments should be a subsystem name and a command to execute upon subsystem -request. +Arguments should be a subsystem name and a command (with optional arguments) +to execute upon subsystem request. The command .Xr sftp-server 8 implements the -- cgit v1.2.3 From e3b60b524edcc55d71e7ccb0958fd69a0e525f30 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 10 Jul 2006 21:08:03 +1000 Subject: - stevesk@cvs.openbsd.org 2006/07/08 21:47:12 [authfd.c canohost.c clientloop.c dns.c dns.h includes.h] [monitor_fdpass.c nchan.c packet.c servconf.c sftp.c ssh-agent.c] [ssh-keyscan.c ssh.c sshconnect.h sshd.c sshlogin.h] move #include out of includes.h --- ChangeLog | 7 ++++++- authfd.c | 3 ++- canohost.c | 3 ++- clientloop.c | 3 ++- dns.c | 5 ++++- dns.h | 5 ++++- includes.h | 3 +-- monitor.c | 1 + monitor_fdpass.c | 4 +++- nchan.c | 5 ++++- packet.c | 3 ++- servconf.c | 5 ++++- session.c | 1 + sftp.c | 3 ++- ssh-agent.c | 4 +++- ssh-keygen.c | 1 + ssh-keyscan.c | 2 +- ssh.c | 3 ++- sshconnect.h | 3 ++- sshd.c | 3 ++- sshlogin.c | 2 +- sshlogin.h | 5 ++++- 22 files changed, 54 insertions(+), 20 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index c0b850342..162881faa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -56,6 +56,11 @@ - stevesk@cvs.openbsd.org 2006/07/06 17:36:37 [monitor_wrap.h] typo in comment + - stevesk@cvs.openbsd.org 2006/07/08 21:47:12 + [authfd.c canohost.c clientloop.c dns.c dns.h includes.h] + [monitor_fdpass.c nchan.c packet.c servconf.c sftp.c ssh-agent.c] + [ssh-keyscan.c ssh.c sshconnect.h sshd.c sshlogin.h] + move #include out of includes.h 20060706 - (dtucker) [configure.ac] Try AIX blibpath test in different order when @@ -4789,4 +4794,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4373 2006/07/10 10:53:45 djm Exp $ +$Id: ChangeLog,v 1.4374 2006/07/10 11:08:03 djm Exp $ diff --git a/authfd.c b/authfd.c index 0fa69bd2a..0d2b09ecc 100644 --- a/authfd.c +++ b/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.74 2006/03/30 09:58:15 djm Exp $ */ +/* $OpenBSD: authfd.c,v 1.75 2006/07/08 21:47:12 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -39,6 +39,7 @@ #include #include +#include #include diff --git a/canohost.c b/canohost.c index 787d338d4..538b141b1 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.54 2006/07/05 02:42:09 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.55 2006/07/08 21:47:12 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,6 +14,7 @@ #include "includes.h" +#include #include #include diff --git a/clientloop.c b/clientloop.c index fb66a6e40..c59d573c5 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.165 2006/07/02 23:01:55 stevesk Exp $ */ +/* $OpenBSD: clientloop.c,v 1.166 2006/07/08 21:47:12 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -65,6 +65,7 @@ #ifdef HAVE_SYS_STAT_H # include #endif +#include #include #include diff --git a/dns.c b/dns.c index 69084b57d..504b5d72e 100644 --- a/dns.c +++ b/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.19 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: dns.c,v 1.20 2006/07/08 21:47:12 stevesk Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -27,6 +27,9 @@ #include "includes.h" +#include +#include + #include #include "xmalloc.h" diff --git a/dns.h b/dns.h index 305ca07fb..818750384 100644 --- a/dns.h +++ b/dns.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.h,v 1.7 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: dns.h,v 1.8 2006/07/08 21:47:12 stevesk Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -27,6 +27,9 @@ #include "includes.h" +#include +#include + #ifndef DNS_H #define DNS_H diff --git a/includes.h b/includes.h index 55ca7bedd..417d7c01b 100644 --- a/includes.h +++ b/includes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.45 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: includes.h,v 1.46 2006/07/08 21:47:12 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -87,7 +87,6 @@ #endif #include -#include #ifdef HAVE_SYS_TIME_H # include /* For timersub */ #endif diff --git a/monitor.c b/monitor.c index 72176f9aa..4a295d312 100644 --- a/monitor.c +++ b/monitor.c @@ -28,6 +28,7 @@ #include "includes.h" #include +#include #include #ifdef HAVE_PATHS_H diff --git a/monitor_fdpass.c b/monitor_fdpass.c index 4ce9eae19..546f7010f 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_fdpass.c,v 1.8 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: monitor_fdpass.c,v 1.9 2006/07/08 21:47:12 stevesk Exp $ */ /* * Copyright 2001 Niels Provos * All rights reserved. @@ -26,6 +26,8 @@ #include "includes.h" +#include +#include #include #include "log.h" diff --git a/nchan.c b/nchan.c index 1f4b39671..58b0e98d5 100644 --- a/nchan.c +++ b/nchan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nchan.c,v 1.53 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: nchan.c,v 1.54 2006/07/08 21:47:12 stevesk Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -25,6 +25,9 @@ #include "includes.h" +#include +#include + #include "ssh1.h" #include "ssh2.h" #include "buffer.h" diff --git a/packet.c b/packet.c index ba2843786..f04d6fac9 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.132 2006/07/05 02:42:09 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.133 2006/07/08 21:47:12 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -39,6 +39,7 @@ #include "includes.h" +#include #include "openbsd-compat/sys-queue.h" #include diff --git a/servconf.c b/servconf.c index af0ad1a35..c5b933ab9 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.151 2006/07/06 10:47:05 djm Exp $ */ +/* $OpenBSD: servconf.c,v 1.152 2006/07/08 21:47:12 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -12,6 +12,9 @@ #include "includes.h" +#include +#include + #include "ssh.h" #include "log.h" #include "servconf.h" diff --git a/session.c b/session.c index 9115c5aa1..8b1a9ed94 100644 --- a/session.c +++ b/session.c @@ -39,6 +39,7 @@ #ifdef HAVE_SYS_STAT_H # include #endif +#include #include #include diff --git a/sftp.c b/sftp.c index 22fa6ad2a..a6c22aa67 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.82 2006/05/17 12:43:34 markus Exp $ */ +/* $OpenBSD: sftp.c,v 1.83 2006/07/08 21:47:12 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -22,6 +22,7 @@ # include #endif #include +#include #include #ifdef HAVE_PATHS_H diff --git a/ssh-agent.c b/ssh-agent.c index db3935ec7..87e94b0ea 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.140 2006/06/13 02:17:07 djm Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.141 2006/07/08 21:47:12 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -38,11 +38,13 @@ #include #include +#include #ifdef HAVE_SYS_UN_H # include #endif #include "openbsd-compat/sys-queue.h" #include + #ifdef HAVE_PATHS_H # include #endif diff --git a/ssh-keygen.c b/ssh-keygen.c index aa2030ea7..afa718a96 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -15,6 +15,7 @@ #include "includes.h" #include +#include #include #include diff --git a/ssh-keyscan.c b/ssh-keyscan.c index dc47a9576..85ee168e7 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.65 2006/07/08 21:47:12 stevesk Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * diff --git a/ssh.c b/ssh.c index d9837f162..ee4f92f92 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.279 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.280 2006/07/08 21:47:12 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -48,6 +48,7 @@ #endif #include #include +#include #include #include diff --git a/sshconnect.h b/sshconnect.h index c1b07390b..0b3896f9d 100644 --- a/sshconnect.h +++ b/sshconnect.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.h,v 1.21 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: sshconnect.h,v 1.22 2006/07/08 21:47:12 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -27,6 +27,7 @@ #define SSHCONNECT_H #include +#include #include diff --git a/sshd.c b/sshd.c index 790d27576..4131f1699 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.333 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.334 2006/07/08 21:47:12 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -49,6 +49,7 @@ # include #endif #include +#include #include #ifdef HAVE_PATHS_H diff --git a/sshlogin.c b/sshlogin.c index 4f65b5e91..a472b511c 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -119,7 +119,7 @@ record_login(pid_t pid, const char *tty, const char *user, uid_t uid, #ifdef LOGIN_NEEDS_UTMPX void record_utmp_only(pid_t pid, const char *ttyname, const char *user, - const char *host, struct sockaddr * addr, socklen_t addrlen) + const char *host, struct sockaddr *addr, socklen_t addrlen) { struct logininfo *li; diff --git a/sshlogin.h b/sshlogin.h index f840461cf..c0f9cd300 100644 --- a/sshlogin.h +++ b/sshlogin.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.h,v 1.6 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: sshlogin.h,v 1.7 2006/07/08 21:47:12 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -14,6 +14,9 @@ #ifndef SSHLOGIN_H #define SSHLOGIN_H +#include +#include + void record_login(pid_t, const char *, const char *, uid_t, const char *, struct sockaddr *, socklen_t); void record_logout(pid_t, const char *, const char *); -- cgit v1.2.3 From 4515047e47f26377a46f480ed5929e8ccfa18720 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 12 Jul 2006 22:34:17 +1000 Subject: - dtucker@cvs.openbsd.org 2006/07/12 11:34:58 [sshd.c servconf.h servconf.c sshd_config.5 auth.c] Add support for conditional directives to sshd_config via a "Match" keyword, which works similarly to the "Host" directive in ssh_config. Lines after a Match line override the default set in the main section if the condition on the Match line is true, eg AllowTcpForwarding yes Match User anoncvs AllowTcpForwarding no will allow port forwarding by all users except "anoncvs". Currently only a very small subset of directives are supported. ok djm@ --- ChangeLog | 14 ++- auth.c | 5 +- servconf.c | 356 ++++++++++++++++++++++++++++++++++++++++++---------------- servconf.h | 11 +- sshd.c | 17 ++- sshd_config.5 | 23 +++- 6 files changed, 314 insertions(+), 112 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 2710249f2..5d86e4451 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,6 +43,18 @@ - stevesk@cvs.openbsd.org 2006/07/11 20:27:56 [authfile.c ssh.c] need here also (it's also included in ) + - dtucker@cvs.openbsd.org 2006/07/12 11:34:58 + [sshd.c servconf.h servconf.c sshd_config.5 auth.c] + Add support for conditional directives to sshd_config via a "Match" + keyword, which works similarly to the "Host" directive in ssh_config. + Lines after a Match line override the default set in the main section + if the condition on the Match line is true, eg + AllowTcpForwarding yes + Match User anoncvs + AllowTcpForwarding no + will allow port forwarding by all users except "anoncvs". + Currently only a very small subset of directives are supported. + ok djm@ 20060711 - (dtucker) [configure.ac ssh-keygen.c openbsd-compat/bsd-openpty.c @@ -4892,4 +4904,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4399 2006/07/12 12:24:22 dtucker Exp $ +$Id: ChangeLog,v 1.4400 2006/07/12 12:34:17 dtucker Exp $ diff --git a/auth.c b/auth.c index e5ddc79da..3bca8dc21 100644 --- a/auth.c +++ b/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.70 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: auth.c,v 1.71 2006/07/12 11:34:58 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -467,6 +467,9 @@ getpwnamallow(const char *user) #endif struct passwd *pw; + parse_server_match_config(&options, user, + get_canonical_hostname(options.use_dns), get_remote_ipaddr()); + pw = getpwnam(user); if (pw == NULL) { logit("Invalid user %.100s from %.100s", diff --git a/servconf.c b/servconf.c index c5b933ab9..42ec340f3 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.152 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: servconf.c,v 1.153 2006/07/12 11:34:58 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -25,12 +25,14 @@ #include "cipher.h" #include "kex.h" #include "mac.h" +#include "match.h" static void add_listen_addr(ServerOptions *, char *, u_short); static void add_one_listen_addr(ServerOptions *, char *, u_short); /* Use of privilege separation or not */ extern int use_privsep; +extern Buffer cfg; /* Initializes the server options to their default values. */ @@ -105,9 +107,6 @@ initialize_server_options(ServerOptions *options) options->authorized_keys_file2 = NULL; options->num_accept_env = 0; options->permit_tun = -1; - - /* Needs to be accessable in many places */ - use_privsep = -1; } void @@ -277,110 +276,116 @@ typedef enum { sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, + sMatch, sUsePrivilegeSeparation, sDeprecated, sUnsupported } ServerOpCodes; +#define SSHCFG_GLOBAL 0x01 /* allowed in main section of sshd_config */ +#define SSHCFG_MATCH 0x02 /* allowed inside a Match section */ +#define SSHCFG_ALL (SSHCFG_GLOBAL|SSHCFG_MATCH) + /* Textual representation of the tokens. */ static struct { const char *name; ServerOpCodes opcode; + u_int flags; } keywords[] = { /* Portable-specific options */ #ifdef USE_PAM - { "usepam", sUsePAM }, + { "usepam", sUsePAM, SSHCFG_GLOBAL }, #else - { "usepam", sUnsupported }, + { "usepam", sUnsupported, SSHCFG_GLOBAL }, #endif - { "pamauthenticationviakbdint", sDeprecated }, + { "pamauthenticationviakbdint", sDeprecated, SSHCFG_GLOBAL }, /* Standard Options */ - { "port", sPort }, - { "hostkey", sHostKeyFile }, - { "hostdsakey", sHostKeyFile }, /* alias */ - { "pidfile", sPidFile }, - { "serverkeybits", sServerKeyBits }, - { "logingracetime", sLoginGraceTime }, - { "keyregenerationinterval", sKeyRegenerationTime }, - { "permitrootlogin", sPermitRootLogin }, - { "syslogfacility", sLogFacility }, - { "loglevel", sLogLevel }, - { "rhostsauthentication", sDeprecated }, - { "rhostsrsaauthentication", sRhostsRSAAuthentication }, - { "hostbasedauthentication", sHostbasedAuthentication }, - { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly }, - { "rsaauthentication", sRSAAuthentication }, - { "pubkeyauthentication", sPubkeyAuthentication }, - { "dsaauthentication", sPubkeyAuthentication }, /* alias */ + { "port", sPort, SSHCFG_GLOBAL }, + { "hostkey", sHostKeyFile, SSHCFG_GLOBAL }, + { "hostdsakey", sHostKeyFile, SSHCFG_GLOBAL }, /* alias */ + { "pidfile", sPidFile, SSHCFG_GLOBAL }, + { "serverkeybits", sServerKeyBits, SSHCFG_GLOBAL }, + { "logingracetime", sLoginGraceTime, SSHCFG_GLOBAL }, + { "keyregenerationinterval", sKeyRegenerationTime, SSHCFG_GLOBAL }, + { "permitrootlogin", sPermitRootLogin, SSHCFG_GLOBAL }, + { "syslogfacility", sLogFacility, SSHCFG_GLOBAL }, + { "loglevel", sLogLevel, SSHCFG_GLOBAL }, + { "rhostsauthentication", sDeprecated, SSHCFG_GLOBAL }, + { "rhostsrsaauthentication", sRhostsRSAAuthentication, SSHCFG_GLOBAL }, + { "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_GLOBAL }, + { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly, SSHCFG_GLOBAL }, + { "rsaauthentication", sRSAAuthentication, SSHCFG_GLOBAL }, + { "pubkeyauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, + { "dsaauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, /* alias */ #ifdef KRB5 - { "kerberosauthentication", sKerberosAuthentication }, - { "kerberosorlocalpasswd", sKerberosOrLocalPasswd }, - { "kerberosticketcleanup", sKerberosTicketCleanup }, + { "kerberosauthentication", sKerberosAuthentication, SSHCFG_GLOBAL }, + { "kerberosorlocalpasswd", sKerberosOrLocalPasswd, SSHCFG_GLOBAL }, + { "kerberosticketcleanup", sKerberosTicketCleanup, SSHCFG_GLOBAL }, #ifdef USE_AFS - { "kerberosgetafstoken", sKerberosGetAFSToken }, + { "kerberosgetafstoken", sKerberosGetAFSToken, SSHCFG_GLOBAL }, #else - { "kerberosgetafstoken", sUnsupported }, + { "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL }, #endif #else - { "kerberosauthentication", sUnsupported }, - { "kerberosorlocalpasswd", sUnsupported }, - { "kerberosticketcleanup", sUnsupported }, - { "kerberosgetafstoken", sUnsupported }, + { "kerberosauthentication", sUnsupported, SSHCFG_GLOBAL }, + { "kerberosorlocalpasswd", sUnsupported, SSHCFG_GLOBAL }, + { "kerberosticketcleanup", sUnsupported, SSHCFG_GLOBAL }, + { "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL }, #endif - { "kerberostgtpassing", sUnsupported }, - { "afstokenpassing", sUnsupported }, + { "kerberostgtpassing", sUnsupported, SSHCFG_GLOBAL }, + { "afstokenpassing", sUnsupported, SSHCFG_GLOBAL }, #ifdef GSSAPI - { "gssapiauthentication", sGssAuthentication }, - { "gssapicleanupcredentials", sGssCleanupCreds }, + { "gssapiauthentication", sGssAuthentication, SSHCFG_GLOBAL }, + { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, #else - { "gssapiauthentication", sUnsupported }, - { "gssapicleanupcredentials", sUnsupported }, + { "gssapiauthentication", sUnsupported, SSHCFG_GLOBAL }, + { "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL }, #endif - { "passwordauthentication", sPasswordAuthentication }, - { "kbdinteractiveauthentication", sKbdInteractiveAuthentication }, - { "challengeresponseauthentication", sChallengeResponseAuthentication }, - { "skeyauthentication", sChallengeResponseAuthentication }, /* alias */ - { "checkmail", sDeprecated }, - { "listenaddress", sListenAddress }, - { "addressfamily", sAddressFamily }, - { "printmotd", sPrintMotd }, - { "printlastlog", sPrintLastLog }, - { "ignorerhosts", sIgnoreRhosts }, - { "ignoreuserknownhosts", sIgnoreUserKnownHosts }, - { "x11forwarding", sX11Forwarding }, - { "x11displayoffset", sX11DisplayOffset }, - { "x11uselocalhost", sX11UseLocalhost }, - { "xauthlocation", sXAuthLocation }, - { "strictmodes", sStrictModes }, - { "permitemptypasswords", sEmptyPasswd }, - { "permituserenvironment", sPermitUserEnvironment }, - { "uselogin", sUseLogin }, - { "compression", sCompression }, - { "tcpkeepalive", sTCPKeepAlive }, - { "keepalive", sTCPKeepAlive }, /* obsolete alias */ - { "allowtcpforwarding", sAllowTcpForwarding }, - { "allowusers", sAllowUsers }, - { "denyusers", sDenyUsers }, - { "allowgroups", sAllowGroups }, - { "denygroups", sDenyGroups }, - { "ciphers", sCiphers }, - { "macs", sMacs }, - { "protocol", sProtocol }, - { "gatewayports", sGatewayPorts }, - { "subsystem", sSubsystem }, - { "maxstartups", sMaxStartups }, - { "maxauthtries", sMaxAuthTries }, - { "banner", sBanner }, - { "usedns", sUseDNS }, - { "verifyreversemapping", sDeprecated }, - { "reversemappingcheck", sDeprecated }, - { "clientaliveinterval", sClientAliveInterval }, - { "clientalivecountmax", sClientAliveCountMax }, - { "authorizedkeysfile", sAuthorizedKeysFile }, - { "authorizedkeysfile2", sAuthorizedKeysFile2 }, - { "useprivilegeseparation", sUsePrivilegeSeparation}, - { "acceptenv", sAcceptEnv }, - { "permittunnel", sPermitTunnel }, - { NULL, sBadOption } + { "passwordauthentication", sPasswordAuthentication, SSHCFG_GLOBAL }, + { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_GLOBAL }, + { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, + { "skeyauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, /* alias */ + { "checkmail", sDeprecated, SSHCFG_GLOBAL }, + { "listenaddress", sListenAddress, SSHCFG_GLOBAL }, + { "addressfamily", sAddressFamily, SSHCFG_GLOBAL }, + { "printmotd", sPrintMotd, SSHCFG_GLOBAL }, + { "printlastlog", sPrintLastLog, SSHCFG_GLOBAL }, + { "ignorerhosts", sIgnoreRhosts, SSHCFG_GLOBAL }, + { "ignoreuserknownhosts", sIgnoreUserKnownHosts, SSHCFG_GLOBAL }, + { "x11forwarding", sX11Forwarding, SSHCFG_GLOBAL }, + { "x11displayoffset", sX11DisplayOffset, SSHCFG_GLOBAL }, + { "x11uselocalhost", sX11UseLocalhost, SSHCFG_GLOBAL }, + { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL }, + { "strictmodes", sStrictModes, SSHCFG_GLOBAL }, + { "permitemptypasswords", sEmptyPasswd, SSHCFG_GLOBAL }, + { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL }, + { "uselogin", sUseLogin, SSHCFG_GLOBAL }, + { "compression", sCompression, SSHCFG_GLOBAL }, + { "tcpkeepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, + { "keepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, /* obsolete alias */ + { "allowtcpforwarding", sAllowTcpForwarding, SSHCFG_ALL }, + { "allowusers", sAllowUsers, SSHCFG_GLOBAL }, + { "denyusers", sDenyUsers, SSHCFG_GLOBAL }, + { "allowgroups", sAllowGroups, SSHCFG_GLOBAL }, + { "denygroups", sDenyGroups, SSHCFG_GLOBAL }, + { "ciphers", sCiphers, SSHCFG_GLOBAL }, + { "macs", sMacs, SSHCFG_GLOBAL }, + { "protocol", sProtocol, SSHCFG_GLOBAL }, + { "gatewayports", sGatewayPorts, SSHCFG_ALL }, + { "subsystem", sSubsystem, SSHCFG_GLOBAL }, + { "maxstartups", sMaxStartups, SSHCFG_GLOBAL }, + { "maxauthtries", sMaxAuthTries, SSHCFG_GLOBAL }, + { "banner", sBanner, SSHCFG_GLOBAL }, + { "usedns", sUseDNS, SSHCFG_GLOBAL }, + { "verifyreversemapping", sDeprecated, SSHCFG_GLOBAL }, + { "reversemappingcheck", sDeprecated, SSHCFG_GLOBAL }, + { "clientaliveinterval", sClientAliveInterval, SSHCFG_GLOBAL }, + { "clientalivecountmax", sClientAliveCountMax, SSHCFG_GLOBAL }, + { "authorizedkeysfile", sAuthorizedKeysFile, SSHCFG_GLOBAL }, + { "authorizedkeysfile2", sAuthorizedKeysFile2, SSHCFG_GLOBAL }, + { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL }, + { "acceptenv", sAcceptEnv, SSHCFG_GLOBAL }, + { "permittunnel", sPermitTunnel, SSHCFG_GLOBAL }, + { NULL, sBadOption, 0 } }; /* @@ -389,13 +394,15 @@ static struct { static ServerOpCodes parse_token(const char *cp, const char *filename, - int linenum) + int linenum, u_int *flags) { u_int i; for (i = 0; keywords[i].name; i++) - if (strcasecmp(cp, keywords[i].name) == 0) + if (strcasecmp(cp, keywords[i].name) == 0) { + *flags = keywords[i].flags; return keywords[i].opcode; + } error("%s: line %d: Bad configuration option: %s", filename, linenum, cp); @@ -440,15 +447,112 @@ add_one_listen_addr(ServerOptions *options, char *addr, u_short port) options->listen_addrs = aitop; } +/* + * The strategy for the Match blocks is that the config file is parsed twice. + * + * The first time is at startup. activep is initialized to 1 and the + * directives in the global context are processed and acted on. Hitting a + * Match directive unsets activep and the directives inside the block are + * checked for syntax only. + * + * The second time is after a connection has been established but before + * authentication. activep is initialized to 2 and global config directives + * are ignored since they have already been processed. If the criteria in a + * Match block is met, activep is set and the subsequent directives + * processed and actioned until EOF or another Match block unsets it. Any + * options set are copied into the main server config. + * + * Potential additions/improvements: + * - Add Match support for pre-kex directives, eg Protocol, Ciphers. + * + * - Add a Tag directive (idea from David Leonard) ala pf, eg: + * Match Address 192.168.0.* + * Tag trusted + * Match Group wheel + * Tag trusted + * Match Tag trusted + * AllowTcpForwarding yes + * GatewayPorts clientspecified + * [...] + * + * - Add a PermittedChannelRequests directive + * Match Group shell + * PermittedChannelRequests session,forwarded-tcpip + */ + +static int +match_cfg_line(char **condition, int line, const char *user, const char *host, + const char *address) +{ + int result = 1; + char *arg, *attrib, *cp = *condition; + size_t len; + + if (user == NULL) + debug3("checking syntax for 'Match %s'", cp); + else + debug3("checking match for '%s' user %s host %s addr %s", cp, + user ? user : "(null)", host ? host : "(null)", + address ? address : "(null)"); + + while ((attrib = strdelim(&cp)) && *attrib != '\0') { + if ((arg = strdelim(&cp)) == NULL || *arg == '\0') { + error("Missing Match criteria for %s", attrib); + return -1; + } + len = strlen(arg); + if (strcasecmp(attrib, "user") == 0) { + if (!user) { + result = 0; + continue; + } + if (match_pattern_list(user, arg, len, 0) != 1) + result = 0; + else + debug("user %.100s matched 'User %.100s' at " + "line %d", user, arg, line); + } else if (strcasecmp(attrib, "host") == 0) { + if (!host) { + result = 0; + continue; + } + if (match_hostname(host, arg, len) != 1) + result = 0; + else + debug("connection from %.100s matched 'Host " + "%.100s' at line %d", host, arg, line); + } else if (strcasecmp(attrib, "address") == 0) { + debug("address '%s' arg '%s'", address, arg); + if (!address) { + result = 0; + continue; + } + if (match_hostname(address, arg, len) != 1) + result = 0; + else + debug("connection from %.100s matched 'Address " + "%.100s' at line %d", address, arg, line); + } else { + error("Unsupported Match attribute %s", attrib); + return -1; + } + } + if (user != NULL) + debug3("match %sfound", result ? "" : "not "); + *condition = cp; + return result; +} + int process_server_config_line(ServerOptions *options, char *line, - const char *filename, int linenum) + const char *filename, int linenum, int *activep, const char *user, + const char *host, const char *address) { char *cp, **charptr, *arg, *p; - int *intptr, value, n; + int cmdline = 0, *intptr, value, n; ServerOpCodes opcode; u_short port; - u_int i; + u_int i, flags = 0; size_t len; cp = line; @@ -461,7 +565,25 @@ process_server_config_line(ServerOptions *options, char *line, return 0; intptr = NULL; charptr = NULL; - opcode = parse_token(arg, filename, linenum); + opcode = parse_token(arg, filename, linenum, &flags); + + if (activep == NULL) { /* We are processing a command line directive */ + cmdline = 1; + activep = &cmdline; + } + if (*activep && opcode != sMatch) + debug3("%s:%d setting %s %s", filename, linenum, arg, cp); + if (*activep == 0 && !(flags & SSHCFG_MATCH)) { + if (user == NULL) { + fatal("%s line %d: Directive '%s' is not allowed " + "within a Match block", filename, linenum, arg); + } else { /* this is a directive we have already processed */ + while (arg) + arg = strdelim(&cp); + return 0; + } + } + switch (opcode) { /* Portable-specific options */ case sUsePAM: @@ -499,7 +621,7 @@ parse_int: fatal("%s line %d: missing integer value.", filename, linenum); value = atoi(arg); - if (*intptr == -1) + if (*activep && *intptr == -1) *intptr = value; break; @@ -579,7 +701,7 @@ parse_filename: if (!arg || *arg == '\0') fatal("%s line %d: missing file name.", filename, linenum); - if (*charptr == NULL) { + if (*activep && *charptr == NULL) { *charptr = tilde_expand_filename(arg, getuid()); /* increase optional counter */ if (intptr != NULL) @@ -630,7 +752,7 @@ parse_flag: else fatal("%s line %d: Bad yes/no argument: %s", filename, linenum, arg); - if (*intptr == -1) + if (*activep && *intptr == -1) *intptr = value; break; @@ -895,6 +1017,10 @@ parse_flag: if (!arg || *arg == '\0') fatal("%s line %d: Missing subsystem name.", filename, linenum); + if (!*activep) { + arg = strdelim(&cp); + break; + } for (i = 0; i < options->num_subsystems; i++) if (strcmp(arg, options->subsystem_name[i]) == 0) fatal("%s line %d: Subsystem '%s' already defined.", @@ -977,6 +1103,8 @@ parse_flag: if (options->num_accept_env >= MAX_ACCEPT_ENV) fatal("%s line %d: too many allow env.", filename, linenum); + if (!*activep) + break; options->accept_env[options->num_accept_env++] = xstrdup(arg); } @@ -1004,6 +1132,17 @@ parse_flag: *intptr = value; break; + case sMatch: + if (cmdline) + fatal("Match directive not supported as a command-line " + "option"); + value = match_cfg_line(&cp, linenum, user, host, address); + if (value < 0) + fatal("%s line %d: Bad Match condition", filename, + linenum); + *activep = value; + break; + case sDeprecated: logit("%s line %d: Deprecated option %s", filename, linenum, arg); @@ -1060,18 +1199,41 @@ load_server_config(const char *filename, Buffer *conf) } void -parse_server_config(ServerOptions *options, const char *filename, Buffer *conf) +parse_server_match_config(ServerOptions *options, const char *user, + const char *host, const char *address) +{ + ServerOptions mo; + + initialize_server_options(&mo); + parse_server_config(&mo, "reprocess config", &cfg, user, host, address); + copy_set_server_options(options, &mo); +} + +/* Copy any (supported) values that are set */ +void +copy_set_server_options(ServerOptions *dst, ServerOptions *src) +{ + if (src->allow_tcp_forwarding != -1) + dst->allow_tcp_forwarding = src->allow_tcp_forwarding; + if (src->gateway_ports != -1) + dst->gateway_ports = src->gateway_ports; +} + +void +parse_server_config(ServerOptions *options, const char *filename, Buffer *conf, + const char *user, const char *host, const char *address) { - int linenum, bad_options = 0; + int active, linenum, bad_options = 0; char *cp, *obuf, *cbuf; debug2("%s: config %s len %d", __func__, filename, buffer_len(conf)); obuf = cbuf = xstrdup(buffer_ptr(conf)); + active = user ? 0 : 1; linenum = 1; while ((cp = strsep(&cbuf, "\n")) != NULL) { if (process_server_config_line(options, cp, filename, - linenum++) != 0) + linenum++, &active, user, host, address) != 0) bad_options++; } xfree(obuf); diff --git a/servconf.h b/servconf.h index 671050e4c..a74716e6f 100644 --- a/servconf.h +++ b/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.74 2006/07/06 10:47:05 djm Exp $ */ +/* $OpenBSD: servconf.h,v 1.75 2006/07/12 11:34:58 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -142,8 +142,13 @@ typedef struct { void initialize_server_options(ServerOptions *); void fill_default_server_options(ServerOptions *); -int process_server_config_line(ServerOptions *, char *, const char *, int); +int process_server_config_line(ServerOptions *, char *, const char *, int, + int *, const char *, const char *, const char *); void load_server_config(const char *, Buffer *); -void parse_server_config(ServerOptions *, const char *, Buffer *); +void parse_server_config(ServerOptions *, const char *, Buffer *, + const char *, const char *, const char *); +void parse_server_match_config(ServerOptions *, const char *, const char *, + const char *); +void copy_set_server_options(ServerOptions *, ServerOptions *); #endif /* SERVCONF_H */ diff --git a/sshd.c b/sshd.c index f3fe9d184..497525df8 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.336 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.337 2006/07/12 11:34:58 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -219,12 +219,15 @@ int *startup_pipes = NULL; int startup_pipe; /* in child */ /* variables used for privilege separation */ -int use_privsep; +int use_privsep = -1; struct monitor *pmonitor = NULL; /* global authentication context */ Authctxt *the_authctxt = NULL; +/* sshd_config buffer */ +Buffer cfg; + /* message to be displayed after login */ Buffer loginmsg; @@ -916,7 +919,6 @@ main(int ac, char **av) Key *key; Authctxt *authctxt; int ret, key_used = 0; - Buffer cfg; #ifdef HAVE_SECUREWARE (void)set_auth_parameters(ac, av); @@ -1036,7 +1038,7 @@ main(int ac, char **av) case 'o': line = xstrdup(optarg); if (process_server_config_line(&options, line, - "command-line", 0) != 0) + "command-line", 0, NULL, NULL, NULL, NULL) != 0) exit(1); xfree(line); break; @@ -1094,11 +1096,8 @@ main(int ac, char **av) else load_server_config(config_file_name, &cfg); - parse_server_config(&options, - rexeced_flag ? "rexec" : config_file_name, &cfg); - - if (!rexec_flag) - buffer_free(&cfg); + parse_server_config(&options, rexeced_flag ? "rexec" : config_file_name, + &cfg, NULL, NULL, NULL); seed_rng(); diff --git a/sshd_config.5 b/sshd_config.5 index 3b639b17d..0b2646027 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.59 2006/07/06 10:47:05 djm Exp $ +.\" $OpenBSD: sshd_config.5,v 1.60 2006/07/12 11:34:58 dtucker Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -463,6 +463,27 @@ for data integrity protection. Multiple algorithms must be comma-separated. The default is: .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . +.It Cm Match +Introduces a conditional block. Keywords on lines following a +.Cm Match +block are only applied if all of the criteria on the +.Cm Match +are satisfied. +The the arguments to +.Cm Match +block are one or more criteria-pattern pairs. +The available criteria are +.Cm User , +.Cm Host , +and +.Cm Address . +Only a subset of keywords may be used on the lines following a +.Cm Match +keyword. +Available keywords are +.Cm AllowTcpForwarding , +and +.Cm GatewayPorts . .It Cm MaxAuthTries Specifies the maximum number of authentication attempts permitted per connection. -- cgit v1.2.3 From be43ebf97579d13e108256c6440cb22a08f12ebc Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 13:51:51 +1000 Subject: - stevesk@cvs.openbsd.org 2006/07/12 22:28:52 [auth-options.c canohost.c channels.c includes.h readconf.c servconf.c ssh-keyscan.c ssh.c sshconnect.c sshd.c] move #include out of includes.h; ok djm@ --- ChangeLog | 5 ++++- auth-options.c | 5 ++++- canohost.c | 5 ++++- channels.c | 5 ++++- dns.c | 4 +++- includes.h | 5 +---- logintest.c | 4 +++- openbsd-compat/fake-rfc2553.h | 7 +++++-- openbsd-compat/port-aix.c | 3 +++ readconf.c | 5 ++++- servconf.c | 6 +++++- ssh-keygen.c | 3 +++ ssh-keyscan.c | 7 +++++-- ssh.c | 5 ++++- sshconnect.c | 5 ++++- sshd.c | 5 ++++- 16 files changed, 60 insertions(+), 19 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 4f75fe5b1..16c419c1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ - new sentence, new line - s/The the/The/ - kill a bad comma + - stevesk@cvs.openbsd.org 2006/07/12 22:28:52 + [auth-options.c canohost.c channels.c includes.h readconf.c servconf.c ssh-keyscan.c ssh.c sshconnect.c sshd.c] + move #include out of includes.h; ok djm@ 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -4923,4 +4926,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4408 2006/07/24 03:46:50 djm Exp $ +$Id: ChangeLog,v 1.4409 2006/07/24 03:51:51 djm Exp $ diff --git a/auth-options.c b/auth-options.c index 473fb8bf7..0b11151cf 100644 --- a/auth-options.c +++ b/auth-options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.36 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-options.c,v 1.37 2006/07/12 22:28:51 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,6 +14,9 @@ #include +#if defined(HAVE_NETDB_H) +# include +#endif #include #include "xmalloc.h" diff --git a/canohost.c b/canohost.c index 4566e2ab1..da5131de3 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.56 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.57 2006/07/12 22:28:51 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -21,6 +21,9 @@ #include #include +#if defined(HAVE_NETDB_H) +# include +#endif #include "packet.h" #include "xmalloc.h" diff --git a/channels.c b/channels.c index 555067255..2021bad53 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.254 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.255 2006/07/12 22:28:51 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -50,6 +50,9 @@ #include #include +#if defined(HAVE_NETDB_H) +# include +#endif #include #include "ssh.h" diff --git a/dns.c b/dns.c index 504b5d72e..16954a6a1 100644 --- a/dns.c +++ b/dns.c @@ -30,7 +30,9 @@ #include #include -#include +#if defined(HAVE_NETDB_H) +# include +#endif #include "xmalloc.h" #include "key.h" diff --git a/includes.h b/includes.h index 08d34486b..7a3396c16 100644 --- a/includes.h +++ b/includes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.49 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: includes.h,v 1.50 2006/07/12 22:28:51 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -123,9 +123,6 @@ #endif #include /* For typedefs */ -#if defined(HAVE_NETDB_H) -# include -#endif #ifdef HAVE_RPC_TYPES_H # include /* For INADDR_LOOPBACK */ #endif diff --git a/logintest.c b/logintest.c index 7e9fbbfbb..0de928bec 100644 --- a/logintest.c +++ b/logintest.c @@ -40,7 +40,9 @@ #include #include #include -#include +#if defined(HAVE_NETDB_H) +# include +#endif #ifdef HAVE_TIME_H #include #endif diff --git a/openbsd-compat/fake-rfc2553.h b/openbsd-compat/fake-rfc2553.h index cbcf7f727..5c2ce5b1b 100644 --- a/openbsd-compat/fake-rfc2553.h +++ b/openbsd-compat/fake-rfc2553.h @@ -1,4 +1,4 @@ -/* $Id: fake-rfc2553.h,v 1.12 2005/08/03 05:36:21 dtucker Exp $ */ +/* $Id: fake-rfc2553.h,v 1.13 2006/07/24 03:51:52 djm Exp $ */ /* * Copyright (C) 2000-2003 Damien Miller. All rights reserved. @@ -41,7 +41,10 @@ #define _FAKE_RFC2553_H #include "includes.h" -#include "sys/types.h" +#include +#if defined(HAVE_NETDB_H) +# include +#endif /* * First, socket and INET6 related definitions diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index 33be00c2b..6fd593aad 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c @@ -34,6 +34,9 @@ #ifdef _AIX #include +#if defined(HAVE_NETDB_H) +# include +#endif #include #include #include "port-aix.h" diff --git a/readconf.c b/readconf.c index d2e172303..4f790e246 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.154 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: readconf.c,v 1.155 2006/07/12 22:28:52 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -22,6 +22,9 @@ #include #include +#if defined(HAVE_NETDB_H) +# include +#endif #include "ssh.h" #include "xmalloc.h" diff --git a/servconf.c b/servconf.c index 42ec340f3..20e3f1a86 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.153 2006/07/12 11:34:58 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.154 2006/07/12 22:28:52 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -15,6 +15,10 @@ #include #include +#if defined(HAVE_NETDB_H) +# include +#endif + #include "ssh.h" #include "log.h" #include "servconf.h" diff --git a/ssh-keygen.c b/ssh-keygen.c index 1c506059c..b217c55e8 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -23,6 +23,9 @@ #include #include +#if defined(HAVE_NETDB_H) +# include +#endif #ifdef HAVE_PATHS_H # include #endif diff --git a/ssh-keyscan.c b/ssh-keyscan.c index a612dd1b9..38c37e579 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.66 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.67 2006/07/12 22:28:52 stevesk Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -11,12 +11,15 @@ #include "openbsd-compat/sys-queue.h" #include +#if defined(HAVE_NETDB_H) +# include +#endif #include #include +#include #include -#include #include "xmalloc.h" #include "ssh.h" #include "ssh1.h" diff --git a/ssh.c b/ssh.c index 9961baf6e..701c40543 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.285 2006/07/11 20:27:56 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.286 2006/07/12 22:28:52 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -54,6 +54,9 @@ #include #include #include +#if defined(HAVE_NETDB_H) +# include +#endif #ifdef HAVE_PATHS_H #include #endif diff --git a/sshconnect.c b/sshconnect.c index c9d6221d8..fe9b4842c 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.190 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.191 2006/07/12 22:28:52 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -24,6 +24,9 @@ #include #include +#if defined(HAVE_NETDB_H) +# include +#endif #ifdef HAVE_PATHS_H #include #endif diff --git a/sshd.c b/sshd.c index 497525df8..3da176da1 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.337 2006/07/12 11:34:58 dtucker Exp $ */ +/* $OpenBSD: sshd.c,v 1.338 2006/07/12 22:28:52 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -54,6 +54,9 @@ #include #include +#if defined(HAVE_NETDB_H) +# include +#endif #ifdef HAVE_PATHS_H #include #endif -- cgit v1.2.3 From e6b3b610ece508f565a114a60f6ce0edb70a5dd2 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:01:23 +1000 Subject: - stevesk@cvs.openbsd.org 2006/07/17 01:31:10 [authfd.c authfile.c channels.c cleanup.c clientloop.c groupaccess.c] [includes.h log.c misc.c msg.c packet.c progressmeter.c readconf.c] [readpass.c scp.c servconf.c sftp-client.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh.c] [sshconnect.c sshlogin.c sshpty.c uidswap.c] move #include out of includes.h --- ChangeLog | 9 ++++++++- authfd.c | 3 ++- authfile.c | 3 ++- channels.c | 3 ++- cleanup.c | 5 +++-- clientloop.c | 3 ++- groupaccess.c | 3 ++- includes.h | 3 +-- log.c | 3 ++- misc.c | 3 ++- msg.c | 5 ++++- packet.c | 3 ++- progressmeter.c | 4 +++- readconf.c | 3 ++- readpass.c | 3 ++- scp.c | 3 ++- servconf.c | 3 ++- sftp-client.c | 3 ++- sftp-server.c | 3 ++- sftp.c | 3 ++- ssh-add.c | 3 ++- ssh-agent.c | 3 ++- ssh-keygen.c | 3 ++- ssh-keyscan.c | 3 ++- ssh-keysign.c | 3 ++- ssh.c | 3 ++- sshconnect.c | 3 ++- sshlogin.c | 5 ++++- sshpty.c | 3 ++- uidswap.c | 3 ++- 30 files changed, 71 insertions(+), 32 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 12fa3c6e2..046cadc84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,13 @@ [monitor_wrap.h] don't need incompletely-typed 'struct passwd' now with #include ; ok markus@ + - stevesk@cvs.openbsd.org 2006/07/17 01:31:10 + [authfd.c authfile.c channels.c cleanup.c clientloop.c groupaccess.c] + [includes.h log.c misc.c msg.c packet.c progressmeter.c readconf.c] + [readpass.c scp.c servconf.c sftp-client.c sftp-server.c sftp.c] + [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh.c] + [sshconnect.c sshlogin.c sshpty.c uidswap.c] + move #include out of includes.h 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -4934,4 +4941,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4412 2006/07/24 03:55:56 djm Exp $ +$Id: ChangeLog,v 1.4413 2006/07/24 04:01:23 djm Exp $ diff --git a/authfd.c b/authfd.c index 5cec7a97c..f8b7ed71f 100644 --- a/authfd.c +++ b/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.76 2006/07/09 15:15:10 stevesk Exp $ */ +/* $OpenBSD: authfd.c,v 1.77 2006/07/17 01:31:09 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -44,6 +44,7 @@ #include #include +#include #include "ssh.h" #include "rsa.h" diff --git a/authfile.c b/authfile.c index cf3d3d9e1..53397ea53 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.69 2006/07/11 20:27:56 stevesk Exp $ */ +/* $OpenBSD: authfile.c,v 1.70 2006/07/17 01:31:09 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -47,6 +47,7 @@ #include #include +#include #include "cipher.h" #include "xmalloc.h" diff --git a/channels.c b/channels.c index 2021bad53..fbbae9ed7 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.255 2006/07/12 22:28:51 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.256 2006/07/17 01:31:09 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -54,6 +54,7 @@ # include #endif #include +#include #include "ssh.h" #include "ssh1.h" diff --git a/cleanup.c b/cleanup.c index dcf456830..4e6c79ce7 100644 --- a/cleanup.c +++ b/cleanup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cleanup.c,v 1.3 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: cleanup.c,v 1.4 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 2003 Markus Friedl * @@ -14,7 +14,8 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "includes.h" + +#include #include "log.h" diff --git a/clientloop.c b/clientloop.c index 978289b61..9398dc989 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.168 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: clientloop.c,v 1.169 2006/07/17 01:31:09 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -75,6 +75,7 @@ #endif #include #include +#include #include "ssh.h" #include "ssh1.h" diff --git a/groupaccess.c b/groupaccess.c index 2b7117b70..41f419740 100644 --- a/groupaccess.c +++ b/groupaccess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: groupaccess.c,v 1.9 2006/07/02 22:45:59 stevesk Exp $ */ +/* $OpenBSD: groupaccess.c,v 1.10 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 2001 Kevin Steves. All rights reserved. * @@ -28,6 +28,7 @@ #include #include +#include #include "groupaccess.h" #include "xmalloc.h" diff --git a/includes.h b/includes.h index fbd22e9a1..da89decdd 100644 --- a/includes.h +++ b/includes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.51 2006/07/12 22:42:32 stevesk Exp $ */ +/* $OpenBSD: includes.h,v 1.52 2006/07/17 01:31:09 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -56,7 +56,6 @@ #ifdef HAVE_PATHS # include #endif -#include /* For STDIN_FILENO, etc */ /* *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively diff --git a/log.c b/log.c index 8702c3e52..4ad7cfff7 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.33 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: log.c,v 1.34 2006/07/17 01:31:09 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -38,6 +38,7 @@ #include #include +#include #if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) # include #endif diff --git a/misc.c b/misc.c index fba085d9b..e9c5ddf8b 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.58 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.59 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -31,6 +31,7 @@ #include #include +#include #include #include diff --git a/msg.c b/msg.c index 4344a1312..5c535d1af 100644 --- a/msg.c +++ b/msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.c,v 1.12 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: msg.c,v 1.13 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -24,7 +24,10 @@ */ #include "includes.h" +#include + #include +#include #include "buffer.h" #include "log.h" diff --git a/packet.c b/packet.c index e153a7c1b..ce652cfd8 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.135 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.136 2006/07/17 01:31:09 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -49,6 +49,7 @@ #include #include +#include #include "xmalloc.h" #include "buffer.h" diff --git a/progressmeter.c b/progressmeter.c index 98a30e11b..cc5f664ab 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.30 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.31 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -25,10 +25,12 @@ #include "includes.h" +#include #include #include #include +#include #include "progressmeter.h" #include "atomicio.h" diff --git a/readconf.c b/readconf.c index 4f790e246..73271e84e 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.155 2006/07/12 22:28:52 stevesk Exp $ */ +/* $OpenBSD: readconf.c,v 1.156 2006/07/17 01:31:09 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -25,6 +25,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include "ssh.h" #include "xmalloc.h" diff --git a/readpass.c b/readpass.c index 63197c915..725ae5789 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.42 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: readpass.c,v 1.43 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -34,6 +34,7 @@ # include #endif #include +#include #include "xmalloc.h" #include "misc.h" diff --git a/scp.c b/scp.c index 5e3a93ed5..03f815fbe 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.147 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: scp.c,v 1.148 2006/07/17 01:31:09 stevesk Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -86,6 +86,7 @@ #include #include #include +#include #include "xmalloc.h" #include "atomicio.h" diff --git a/servconf.c b/servconf.c index 20e3f1a86..330e79143 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.154 2006/07/12 22:28:52 stevesk Exp $ */ +/* $OpenBSD: servconf.c,v 1.155 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -18,6 +18,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include "ssh.h" #include "log.h" diff --git a/sftp-client.c b/sftp-client.c index 8fe0c0fe5..5ba4f0a9f 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.67 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.68 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -30,6 +30,7 @@ #include #include #include +#include #include "openbsd-compat/sys-queue.h" diff --git a/sftp-server.c b/sftp-server.c index 29503246e..923cc8c19 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.62 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.63 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -23,6 +23,7 @@ #include #include #include +#include #include "buffer.h" #include "bufaux.h" diff --git a/sftp.c b/sftp.c index 649f08e5d..1a88f33f9 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.85 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: sftp.c,v 1.86 2006/07/17 01:31:09 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -36,6 +36,7 @@ typedef void EditLine; #endif #include +#include #include "xmalloc.h" #include "log.h" diff --git a/ssh-add.c b/ssh-add.c index 07de9246e..974a1629b 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.83 2006/07/09 15:27:59 stevesk Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.84 2006/07/17 01:31:09 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -44,6 +44,7 @@ #include #include +#include #include "ssh.h" #include "rsa.h" diff --git a/ssh-agent.c b/ssh-agent.c index 4421fa424..621b09771 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.143 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.144 2006/07/17 01:31:10 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -51,6 +51,7 @@ # include #endif #include +#include #include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index b217c55e8..56ad725d8 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.148 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.149 2006/07/17 01:31:10 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -30,6 +30,7 @@ # include #endif #include +#include #include "xmalloc.h" #include "key.h" diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 38c37e579..fd71f7224 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.67 2006/07/12 22:28:52 stevesk Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.68 2006/07/17 01:31:10 stevesk Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -17,6 +17,7 @@ #include #include #include +#include #include diff --git a/ssh-keysign.c b/ssh-keysign.c index 02c10e2e9..b558e54f7 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keysign.c,v 1.25 2006/07/09 15:15:11 stevesk Exp $ */ +/* $OpenBSD: ssh-keysign.c,v 1.26 2006/07/17 01:31:10 stevesk Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include #endif #include +#include #include #include diff --git a/ssh.c b/ssh.c index 461b39817..e482eb1b5 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.287 2006/07/12 22:42:32 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.288 2006/07/17 01:31:10 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -63,6 +63,7 @@ #include #include #include +#include #include #include diff --git a/sshconnect.c b/sshconnect.c index fe9b4842c..1c69044ea 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.191 2006/07/12 22:28:52 stevesk Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.192 2006/07/17 01:31:10 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -31,6 +31,7 @@ #include #endif #include +#include #include "ssh.h" #include "xmalloc.h" diff --git a/sshlogin.c b/sshlogin.c index 808ad605e..335069313 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.19 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.20 2006/07/17 01:31:10 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,8 +41,11 @@ #include "includes.h" +#include + #include #include +#include #include "loginrec.h" #include "log.h" diff --git a/sshpty.c b/sshpty.c index 10dae0328..931c91f47 100644 --- a/sshpty.c +++ b/sshpty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.c,v 1.23 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: sshpty.c,v 1.24 2006/07/17 01:31:10 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -30,6 +30,7 @@ #ifdef HAVE_UTIL_H # include #endif /* HAVE_UTIL_H */ +#include #include "sshpty.h" #include "log.h" diff --git a/uidswap.c b/uidswap.c index e97cd7059..2fe5feaed 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.c,v 1.31 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: uidswap.c,v 1.32 2006/07/17 01:31:10 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include -- cgit v1.2.3 From 9b439df18a9d56683584811ce38dcf72acd4cb20 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:04:00 +1000 Subject: - dtucker@cvs.openbsd.org 2006/07/17 12:06:00 [channels.c channels.h servconf.c sshd_config.5] Add PermitOpen directive to sshd_config which is equivalent to the "permitopen" key option. Allows server admin to allow TCP port forwarding only two specific host/port pairs. Useful when combined with Match. If permitopen is used in both sshd_config and a key option, both must allow a given connection before it will be permitted. Note that users can still use external forwarders such as netcat, so to be those must be controlled too for the limits to be effective. Feedback & ok djm@, man page corrections & ok jmc@. --- ChangeLog | 13 ++++++++++++- channels.c | 50 +++++++++++++++++++++++++++++++++++++++++++++----- channels.h | 4 +++- servconf.c | 29 +++++++++++++++++++++++++++-- sshd_config.5 | 36 +++++++++++++++++++++++++++++++++--- 5 files changed, 120 insertions(+), 12 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index c3069df12..2e28a43f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,17 @@ - dtucker@cvs.openbsd.org 2006/07/17 12:02:24 [auth-options.c] Use '\0' rather than 0 to terminates strings; ok djm@ + - dtucker@cvs.openbsd.org 2006/07/17 12:06:00 + [channels.c channels.h servconf.c sshd_config.5] + Add PermitOpen directive to sshd_config which is equivalent to the + "permitopen" key option. Allows server admin to allow TCP port + forwarding only two specific host/port pairs. Useful when combined + with Match. + If permitopen is used in both sshd_config and a key option, both + must allow a given connection before it will be permitted. + Note that users can still use external forwarders such as netcat, + so to be those must be controlled too for the limits to be effective. + Feedback & ok djm@, man page corrections & ok jmc@. 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -4944,4 +4955,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4414 2006/07/24 04:01:43 djm Exp $ +$Id: ChangeLog,v 1.4415 2006/07/24 04:04:00 djm Exp $ diff --git a/channels.c b/channels.c index fbbae9ed7..9aaf7e9d7 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.256 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.257 2006/07/17 12:06:00 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -106,11 +106,18 @@ typedef struct { u_short listen_port; /* Remote side should listen port number. */ } ForwardPermission; -/* List of all permitted host/port pairs to connect. */ +/* List of all permitted host/port pairs to connect by the user. */ static ForwardPermission permitted_opens[SSH_MAX_FORWARDS_PER_DIRECTION]; -/* Number of permitted host/port pairs in the array. */ +/* List of all permitted host/port pairs to connect by the admin. */ +static ForwardPermission permitted_adm_opens[SSH_MAX_FORWARDS_PER_DIRECTION]; + +/* Number of permitted host/port pairs in the array permitted by the user. */ static int num_permitted_opens = 0; + +/* Number of permitted host/port pair in the array permitted by the admin. */ +static int num_adm_permitted_opens = 0; + /* * If this is true, all opens are permitted. This is the case on the server * on which we have to trust the client anyway, and the user could do @@ -2646,6 +2653,19 @@ channel_add_permitted_opens(char *host, int port) all_opens_permitted = 0; } +void +channel_add_adm_permitted_opens(char *host, int port) +{ + if (num_adm_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION) + fatal("channel_add_adm_permitted_opens: too many forwards"); + debug("allow port forwarding to host %s port %d", host, port); + + permitted_adm_opens[num_adm_permitted_opens].host_to_connect + = xstrdup(host); + permitted_adm_opens[num_adm_permitted_opens].port_to_connect = port; + num_adm_permitted_opens++; +} + void channel_clear_permitted_opens(void) { @@ -2655,7 +2675,17 @@ channel_clear_permitted_opens(void) if (permitted_opens[i].host_to_connect != NULL) xfree(permitted_opens[i].host_to_connect); num_permitted_opens = 0; +} + +void +channel_clear_adm_permitted_opens(void) +{ + int i; + for (i = 0; i < num_adm_permitted_opens; i++) + if (permitted_adm_opens[i].host_to_connect != NULL) + xfree(permitted_adm_opens[i].host_to_connect); + num_adm_permitted_opens = 0; } /* return socket to remote host, port */ @@ -2734,7 +2764,7 @@ channel_connect_by_listen_address(u_short listen_port) int channel_connect_to(const char *host, u_short port) { - int i, permit; + int i, permit, permit_adm = 1; permit = all_opens_permitted; if (!permit) { @@ -2743,9 +2773,19 @@ channel_connect_to(const char *host, u_short port) permitted_opens[i].port_to_connect == port && strcmp(permitted_opens[i].host_to_connect, host) == 0) permit = 1; + } + if (num_adm_permitted_opens > 0) { + permit_adm = 0; + for (i = 0; i < num_adm_permitted_opens; i++) + if (permitted_adm_opens[i].host_to_connect != NULL && + permitted_adm_opens[i].port_to_connect == port && + strcmp(permitted_adm_opens[i].host_to_connect, host) + == 0) + permit_adm = 1; } - if (!permit) { + + if (!permit || !permit_adm) { logit("Received request to connect to host %.100s port %d, " "but the request was denied.", host, port); return -1; diff --git a/channels.h b/channels.h index d21319a2b..c473b730c 100644 --- a/channels.h +++ b/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.85 2006/07/11 18:50:47 markus Exp $ */ +/* $OpenBSD: channels.h,v 1.86 2006/07/17 12:06:00 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -207,7 +207,9 @@ int channel_find_open(void); void channel_set_af(int af); void channel_permit_all_opens(void); void channel_add_permitted_opens(char *, int); +void channel_add_adm_permitted_opens(char *, int); void channel_clear_permitted_opens(void); +void channel_clear_adm_permitted_opens(void); int channel_input_port_forward_request(int, int); int channel_connect_to(const char *, u_short); int channel_connect_by_listen_address(u_short); diff --git a/servconf.c b/servconf.c index 330e79143..4f5cb19db 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.155 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: servconf.c,v 1.156 2006/07/17 12:06:00 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -31,6 +31,7 @@ #include "kex.h" #include "mac.h" #include "match.h" +#include "channels.h" static void add_listen_addr(ServerOptions *, char *, u_short); static void add_one_listen_addr(ServerOptions *, char *, u_short); @@ -281,7 +282,7 @@ typedef enum { sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, - sMatch, + sMatch, sPermitOpen, sUsePrivilegeSeparation, sDeprecated, sUnsupported } ServerOpCodes; @@ -390,6 +391,8 @@ static struct { { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL }, { "acceptenv", sAcceptEnv, SSHCFG_GLOBAL }, { "permittunnel", sPermitTunnel, SSHCFG_GLOBAL }, + { "match", sMatch, SSHCFG_ALL }, + { "permitopen", sPermitOpen, SSHCFG_ALL }, { NULL, sBadOption, 0 } }; @@ -1148,6 +1151,28 @@ parse_flag: *activep = value; break; + case sPermitOpen: + arg = strdelim(&cp); + if (!arg || *arg == '\0') + fatal("%s line %d: missing PermitOpen specification", + filename, linenum); + if (strcmp(arg, "any") == 0) { + if (*activep) + channel_clear_adm_permitted_opens(); + break; + } + p = hpdelim(&arg); + if (p == NULL) + fatal("%s line %d: missing host in PermitOpen", + filename, linenum); + p = cleanhostname(p); + if (arg == NULL || (port = a2port(arg)) == 0) + fatal("%s line %d: bad port number in PermitOpen", + filename, linenum); + if (*activep) + channel_add_adm_permitted_opens(p, port); + break; + case sDeprecated: logit("%s line %d: Deprecated option %s", filename, linenum, arg); diff --git a/sshd_config.5 b/sshd_config.5 index 4db92814c..c9515234d 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.61 2006/07/12 13:39:55 jmc Exp $ +.\" $OpenBSD: sshd_config.5,v 1.62 2006/07/17 12:06:00 dtucker Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -482,9 +482,10 @@ Only a subset of keywords may be used on the lines following a .Cm Match keyword. Available keywords are -.Cm AllowTcpForwarding +.Cm AllowTcpForwarding , +.Cm GatewayPorts , and -.Cm GatewayPorts . +.Cm PermitOpen . .It Cm MaxAuthTries Specifies the maximum number of authentication attempts permitted per connection. @@ -524,6 +525,35 @@ When password authentication is allowed, it specifies whether the server allows login to accounts with empty password strings. The default is .Dq no . +.It Cm PermitOpen +Specifies the destinations to which TCP port forwarding is permitted. +The forwarding specification must be one of the following forms: +.Pp +.Bl -item -offset indent -compact +.It +.Cm PermitOpen +.Sm off +.Ar host : port +.Sm on +.It +.Cm PermitOpen +.Sm off +.Ar IPv4_addr : port +.Sm on +.It +.Cm PermitOpen +.Sm off +.Ar \&[ IPv6_addr \&] : port +.Sm on +.El +.Pp +Multiple instances of +.Cm PermitOpen +are permitted. +An argument of +.Dq any +can be used to remove all restrictions and permit any forwarding requests. +By default all port forward requests are permitted. .It Cm PermitRootLogin Specifies whether root can log in using .Xr ssh 1 . -- cgit v1.2.3 From d1de9950e5ae91584aa955a4f85c9c7579aa76af Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:05:48 +1000 Subject: - dtucker@cvs.openbsd.org 2006/07/19 08:56:41 [servconf.c sshd_config.5] Add support for X11Forwaring, X11DisplayOffset and X11UseLocalhost to Match. ok djm@ --- ChangeLog | 6 +++++- servconf.c | 14 ++++++++++---- sshd_config.5 | 7 +++++-- 3 files changed, 20 insertions(+), 7 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 11e218d4b..e42f8a786 100644 --- a/ChangeLog +++ b/ChangeLog @@ -52,6 +52,10 @@ - stevesk@cvs.openbsd.org 2006/07/18 22:27:55 [dh.c] remove unneeded includes; ok djm@ + - dtucker@cvs.openbsd.org 2006/07/19 08:56:41 + [servconf.c sshd_config.5] + Add support for X11Forwaring, X11DisplayOffset and X11UseLocalhost to + Match. ok djm@ 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -4970,4 +4974,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4420 2006/07/24 04:05:24 djm Exp $ +$Id: ChangeLog,v 1.4421 2006/07/24 04:05:48 djm Exp $ diff --git a/servconf.c b/servconf.c index 4f5cb19db..bc457eebe 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.156 2006/07/17 12:06:00 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.157 2006/07/19 08:56:41 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -357,9 +357,9 @@ static struct { { "printlastlog", sPrintLastLog, SSHCFG_GLOBAL }, { "ignorerhosts", sIgnoreRhosts, SSHCFG_GLOBAL }, { "ignoreuserknownhosts", sIgnoreUserKnownHosts, SSHCFG_GLOBAL }, - { "x11forwarding", sX11Forwarding, SSHCFG_GLOBAL }, - { "x11displayoffset", sX11DisplayOffset, SSHCFG_GLOBAL }, - { "x11uselocalhost", sX11UseLocalhost, SSHCFG_GLOBAL }, + { "x11forwarding", sX11Forwarding, SSHCFG_ALL }, + { "x11displayoffset", sX11DisplayOffset, SSHCFG_ALL }, + { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL }, { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL }, { "strictmodes", sStrictModes, SSHCFG_GLOBAL }, { "permitemptypasswords", sEmptyPasswd, SSHCFG_GLOBAL }, @@ -1247,6 +1247,12 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src) dst->allow_tcp_forwarding = src->allow_tcp_forwarding; if (src->gateway_ports != -1) dst->gateway_ports = src->gateway_ports; + if (src->x11_display_offset != -1) + dst->x11_display_offset = src->x11_display_offset; + if (src->x11_forwarding != -1) + dst->x11_forwarding = src->x11_forwarding; + if (src->x11_use_localhost != -1) + dst->x11_use_localhost = src->x11_use_localhost; } void diff --git a/sshd_config.5 b/sshd_config.5 index 02996a2ed..9196b761e 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.65 2006/07/18 08:22:23 dtucker Exp $ +.\" $OpenBSD: sshd_config.5,v 1.66 2006/07/19 08:56:41 dtucker Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -485,8 +485,11 @@ keyword. Available keywords are .Cm AllowTcpForwarding , .Cm GatewayPorts , +.Cm PermitOpen , +.Cm X11DisplayOffset , +.Cm X11Forwarding , and -.Cm PermitOpen . +.Cm X11UseLocalHost . .It Cm MaxAuthTries Specifies the maximum number of authentication attempts permitted per connection. -- cgit v1.2.3 From e275443f66aab6d46356d6940b8a8b291cab4f9e Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:06:47 +1000 Subject: - dtucker@cvs.openbsd.org 2006/07/19 13:07:10 [servconf.c servconf.h session.c sshd.8 sshd_config sshd_config.5] Add ForceCommand keyword to sshd_config, equivalent to the "command=" key option, man page entry and example in sshd_config. Feedback & ok djm@, man page corrections & ok jmc@ --- ChangeLog | 7 ++++++- servconf.c | 22 ++++++++++++++++++++-- servconf.h | 4 +++- session.c | 10 +++++++--- sshd.8 | 5 ++++- sshd_config | 8 +++++++- sshd_config.5 | 15 ++++++++++++++- 7 files changed, 61 insertions(+), 10 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index e42f8a786..0ae5d3f6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -56,6 +56,11 @@ [servconf.c sshd_config.5] Add support for X11Forwaring, X11DisplayOffset and X11UseLocalhost to Match. ok djm@ + - dtucker@cvs.openbsd.org 2006/07/19 13:07:10 + [servconf.c servconf.h session.c sshd.8 sshd_config sshd_config.5] + Add ForceCommand keyword to sshd_config, equivalent to the "command=" + key option, man page entry and example in sshd_config. + Feedback & ok djm@, man page corrections & ok jmc@ 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -4974,4 +4979,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4421 2006/07/24 04:05:48 djm Exp $ +$Id: ChangeLog,v 1.4422 2006/07/24 04:06:47 djm Exp $ diff --git a/servconf.c b/servconf.c index bc457eebe..e2c1d4458 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.157 2006/07/19 08:56:41 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.158 2006/07/19 13:07:10 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -113,6 +113,7 @@ initialize_server_options(ServerOptions *options) options->authorized_keys_file2 = NULL; options->num_accept_env = 0; options->permit_tun = -1; + options->adm_forced_command = NULL; } void @@ -282,7 +283,7 @@ typedef enum { sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, - sMatch, sPermitOpen, + sMatch, sPermitOpen, sForceCommand, sUsePrivilegeSeparation, sDeprecated, sUnsupported } ServerOpCodes; @@ -393,6 +394,7 @@ static struct { { "permittunnel", sPermitTunnel, SSHCFG_GLOBAL }, { "match", sMatch, SSHCFG_ALL }, { "permitopen", sPermitOpen, SSHCFG_ALL }, + { "forcecommand", sForceCommand, SSHCFG_ALL }, { NULL, sBadOption, 0 } }; @@ -551,6 +553,8 @@ match_cfg_line(char **condition, int line, const char *user, const char *host, return result; } +#define WHITESPACE " \t\r\n" + int process_server_config_line(ServerOptions *options, char *line, const char *filename, int linenum, int *activep, const char *user, @@ -1173,6 +1177,15 @@ parse_flag: channel_add_adm_permitted_opens(p, port); break; + case sForceCommand: + if (cp == NULL) + fatal("%.200s line %d: Missing argument.", filename, + linenum); + len = strspn(cp, WHITESPACE); + if (*activep && options->adm_forced_command == NULL) + options->adm_forced_command = xstrdup(cp + len); + return 0; + case sDeprecated: logit("%s line %d: Deprecated option %s", filename, linenum, arg); @@ -1247,6 +1260,11 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src) dst->allow_tcp_forwarding = src->allow_tcp_forwarding; if (src->gateway_ports != -1) dst->gateway_ports = src->gateway_ports; + if (src->adm_forced_command != NULL) { + if (dst->adm_forced_command != NULL) + xfree(dst->adm_forced_command); + dst->adm_forced_command = src->adm_forced_command; + } if (src->x11_display_offset != -1) dst->x11_display_offset = src->x11_display_offset; if (src->x11_forwarding != -1) diff --git a/servconf.h b/servconf.h index a74716e6f..41dce7686 100644 --- a/servconf.h +++ b/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.75 2006/07/12 11:34:58 dtucker Exp $ */ +/* $OpenBSD: servconf.h,v 1.76 2006/07/19 13:07:10 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -135,6 +135,8 @@ typedef struct { char *authorized_keys_file; /* File containing public keys */ char *authorized_keys_file2; + char *adm_forced_command; + int use_pam; /* Enable auth via PAM */ int permit_tun; diff --git a/session.c b/session.c index 5441a4762..e189acdf2 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.209 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.210 2006/07/19 13:07:10 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -672,10 +672,14 @@ do_pre_login(Session *s) void do_exec(Session *s, const char *command) { - if (forced_command) { + if (options.adm_forced_command) { + original_command = command; + command = options.adm_forced_command; + debug("Forced command (config) '%.900s'", command); + } else if (forced_command) { original_command = command; command = forced_command; - debug("Forced command '%.900s'", command); + debug("Forced command (key option) '%.900s'", command); } #ifdef SSH_AUDIT_EVENTS diff --git a/sshd.8 b/sshd.8 index 48be5a760..778ea906b 100644 --- a/sshd.8 +++ b/sshd.8 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd.8,v 1.232 2006/07/10 16:04:21 jmc Exp $ +.\" $OpenBSD: sshd.8,v 1.233 2006/07/19 13:07:10 dtucker Exp $ .Dd September 25, 1999 .Dt SSHD 8 .Os @@ -481,6 +481,9 @@ to restrict certain public keys to perform just a specific operation. An example might be a key that permits remote backups but nothing else. Note that the client may specify TCP and/or X11 forwarding unless they are explicitly prohibited. +The command originally supplied by the client is available in the +.Ev SSH_ORIGINAL_COMMAND +environment variable. Note that this option applies to shell, command or subsystem execution. .It Cm environment="NAME=value" Specifies that the string is to be added to the environment when diff --git a/sshd_config b/sshd_config index 57f9a17bb..6a3cad886 100644 --- a/sshd_config +++ b/sshd_config @@ -1,4 +1,4 @@ -# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $ +# $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -104,3 +104,9 @@ # override default of no subsystems Subsystem sftp /usr/libexec/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# ForceCommand cvs server diff --git a/sshd_config.5 b/sshd_config.5 index 9196b761e..26c895f7a 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.66 2006/07/19 08:56:41 dtucker Exp $ +.\" $OpenBSD: sshd_config.5,v 1.67 2006/07/19 13:07:10 dtucker Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -283,6 +283,18 @@ See in .Xr ssh_config 5 for more information on patterns. +.It Cm ForceCommand +Forces the execution of the command specified by +.Cm ForceCommand , +ignoring any command supplied by the client. +The command is invoked by using the user's login shell with the -c option. +This applies to shell, command, or subsystem execution. +It is most useful inside a +.Cm Match +block. +The command originally supplied by the client is available in the +.Ev SSH_ORIGINAL_COMMAND +environment variable. .It Cm GatewayPorts Specifies whether remote hosts are allowed to connect to ports forwarded for the client. @@ -484,6 +496,7 @@ Only a subset of keywords may be used on the lines following a keyword. Available keywords are .Cm AllowTcpForwarding , +.Cm ForceCommand , .Cm GatewayPorts , .Cm PermitOpen , .Cm X11DisplayOffset , -- cgit v1.2.3 From a765cf4b66ba116626c317204ac317607fe0c848 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:08:13 +1000 Subject: - dtucker@cvs.openbsd.org 2006/07/21 12:43:36 [channels.c channels.h servconf.c servconf.h sshd_config.5] Make PermitOpen take a list of permitted ports and act more like most other keywords (ie the first match is the effective setting). This also makes it easier to override a previously set PermitOpen. ok djm@ --- ChangeLog | 7 ++++++- channels.c | 8 ++++---- channels.h | 4 ++-- servconf.c | 32 ++++++++++++++++++++------------ servconf.h | 4 +++- sshd_config.5 | 6 ++---- 6 files changed, 37 insertions(+), 24 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 50937e3b3..04fa8c25a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -65,6 +65,11 @@ [auth1.c serverloop.c session.c sshconnect2.c] missed some needed #include when KERBEROS5=no; issue from massimo@cedoc.mo.it + - dtucker@cvs.openbsd.org 2006/07/21 12:43:36 + [channels.c channels.h servconf.c servconf.h sshd_config.5] + Make PermitOpen take a list of permitted ports and act more like most + other keywords (ie the first match is the effective setting). This + also makes it easier to override a previously set PermitOpen. ok djm@ 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -4983,4 +4988,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4423 2006/07/24 04:07:35 djm Exp $ +$Id: ChangeLog,v 1.4424 2006/07/24 04:08:13 djm Exp $ diff --git a/channels.c b/channels.c index 9aaf7e9d7..c6c5c8899 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.257 2006/07/17 12:06:00 dtucker Exp $ */ +/* $OpenBSD: channels.c,v 1.258 2006/07/21 12:43:36 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -2653,17 +2653,17 @@ channel_add_permitted_opens(char *host, int port) all_opens_permitted = 0; } -void +int channel_add_adm_permitted_opens(char *host, int port) { if (num_adm_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION) fatal("channel_add_adm_permitted_opens: too many forwards"); - debug("allow port forwarding to host %s port %d", host, port); + debug("config allows port forwarding to host %s port %d", host, port); permitted_adm_opens[num_adm_permitted_opens].host_to_connect = xstrdup(host); permitted_adm_opens[num_adm_permitted_opens].port_to_connect = port; - num_adm_permitted_opens++; + return ++num_adm_permitted_opens; } void diff --git a/channels.h b/channels.h index c473b730c..ed719f724 100644 --- a/channels.h +++ b/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.86 2006/07/17 12:06:00 dtucker Exp $ */ +/* $OpenBSD: channels.h,v 1.87 2006/07/21 12:43:36 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -207,7 +207,7 @@ int channel_find_open(void); void channel_set_af(int af); void channel_permit_all_opens(void); void channel_add_permitted_opens(char *, int); -void channel_add_adm_permitted_opens(char *, int); +int channel_add_adm_permitted_opens(char *, int); void channel_clear_permitted_opens(void); void channel_clear_adm_permitted_opens(void); int channel_input_port_forward_request(int, int); diff --git a/servconf.c b/servconf.c index e2c1d4458..46558b690 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.158 2006/07/19 13:07:10 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.159 2006/07/21 12:43:36 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -113,6 +113,7 @@ initialize_server_options(ServerOptions *options) options->authorized_keys_file2 = NULL; options->num_accept_env = 0; options->permit_tun = -1; + options->num_permitted_opens = -1; options->adm_forced_command = NULL; } @@ -1161,20 +1162,27 @@ parse_flag: fatal("%s line %d: missing PermitOpen specification", filename, linenum); if (strcmp(arg, "any") == 0) { - if (*activep) + if (*activep) { channel_clear_adm_permitted_opens(); + options->num_permitted_opens = 0; + } break; } - p = hpdelim(&arg); - if (p == NULL) - fatal("%s line %d: missing host in PermitOpen", - filename, linenum); - p = cleanhostname(p); - if (arg == NULL || (port = a2port(arg)) == 0) - fatal("%s line %d: bad port number in PermitOpen", - filename, linenum); - if (*activep) - channel_add_adm_permitted_opens(p, port); + for (; arg != NULL && *arg != '\0'; arg = strdelim(&cp)) { + p = hpdelim(&arg); + if (p == NULL) + fatal("%s line %d: missing host in PermitOpen", + filename, linenum); + p = cleanhostname(p); + if (arg == NULL || (port = a2port(arg)) == 0) + fatal("%s line %d: bad port number in " + "PermitOpen", filename, linenum); + if (*activep && options->num_permitted_opens == -1) { + channel_clear_adm_permitted_opens(); + options->num_permitted_opens = + channel_add_adm_permitted_opens(p, port); + } + } break; case sForceCommand: diff --git a/servconf.h b/servconf.h index 41dce7686..0add6518d 100644 --- a/servconf.h +++ b/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.76 2006/07/19 13:07:10 dtucker Exp $ */ +/* $OpenBSD: servconf.h,v 1.77 2006/07/21 12:43:36 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -140,6 +140,8 @@ typedef struct { int use_pam; /* Enable auth via PAM */ int permit_tun; + + int num_permitted_opens; } ServerOptions; void initialize_server_options(ServerOptions *); diff --git a/sshd_config.5 b/sshd_config.5 index 26c895f7a..ff5457dff 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.67 2006/07/19 13:07:10 dtucker Exp $ +.\" $OpenBSD: sshd_config.5,v 1.68 2006/07/21 12:43:36 dtucker Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -564,9 +564,7 @@ The forwarding specification must be one of the following forms: .Sm on .El .Pp -Multiple instances of -.Cm PermitOpen -are permitted. +Multiple forwards may be specified by separating them with whitespace. An argument of .Dq any can be used to remove all restrictions and permit any forwarding requests. -- cgit v1.2.3 From e3476ed03bf9beca3ad0e5447dc9422a546d19ec Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:13:33 +1000 Subject: - stevesk@cvs.openbsd.org 2006/07/22 20:48:23 [atomicio.c auth-options.c auth-passwd.c auth-rhosts.c auth-rsa.c] [auth.c auth1.c auth2-chall.c auth2-hostbased.c auth2-passwd.c auth2.c] [authfd.c authfile.c bufaux.c bufbn.c buffer.c canohost.c channels.c] [cipher-3des1.c cipher-bf1.c cipher-ctr.c cipher.c clientloop.c] [compat.c deattack.c dh.c dns.c gss-genr.c gss-serv.c hostfile.c] [includes.h kex.c kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c log.c] [mac.c match.c md-sha256.c misc.c moduli.c monitor.c monitor_fdpass.c] [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c rsa.c] [progressmeter.c readconf.c readpass.c scp.c servconf.c serverloop.c] [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c sshconnect2.c] [sshd.c sshlogin.c sshpty.c ttymodes.c uidswap.c xmalloc.c] move #include out of includes.h --- ChangeLog | 17 ++++++++++++++++- atomicio.c | 3 ++- auth-options.c | 3 ++- auth-passwd.c | 3 ++- auth-rhosts.c | 3 ++- auth-rsa.c | 3 ++- auth.c | 3 ++- auth1.c | 3 ++- auth2-chall.c | 4 +++- auth2-hostbased.c | 3 ++- auth2-passwd.c | 4 +++- auth2.c | 3 ++- authfd.c | 3 ++- authfile.c | 3 ++- bufaux.c | 5 ++++- bufbn.c | 5 ++++- buffer.c | 4 +++- canohost.c | 3 ++- channels.c | 3 ++- cipher-3des1.c | 5 ++++- cipher-bf1.c | 5 ++++- cipher-ctr.c | 4 +++- cipher.c | 8 +++++--- clientloop.c | 3 ++- compat.c | 4 +++- deattack.c | 4 +++- dh.c | 4 +++- dns.c | 3 ++- gss-genr.c | 4 +++- gss-serv.c | 4 +++- hostfile.c | 3 ++- includes.h | 3 +-- kex.c | 4 +++- kexdhc.c | 4 +++- kexdhs.c | 4 +++- kexgexc.c | 4 +++- kexgexs.c | 4 +++- key.c | 4 +++- log.c | 3 ++- mac.c | 4 +++- match.c | 3 ++- md-sha256.c | 2 +- misc.c | 3 ++- moduli.c | 3 ++- monitor.c | 3 ++- monitor_fdpass.c | 3 ++- monitor_mm.c | 3 ++- monitor_wrap.c | 3 ++- msg.c | 3 ++- nchan.c | 3 ++- packet.c | 3 ++- progressmeter.c | 3 ++- readconf.c | 3 ++- readpass.c | 3 ++- rsa.c | 4 +++- scp.c | 3 ++- servconf.c | 3 ++- serverloop.c | 3 ++- session.c | 3 ++- sftp-client.c | 3 ++- sftp-common.c | 3 ++- sftp-glob.c | 5 +++-- sftp-server.c | 5 +++-- sftp.c | 3 ++- ssh-add.c | 3 ++- ssh-agent.c | 9 +++++---- ssh-dss.c | 4 +++- ssh-keygen.c | 3 ++- ssh-keyscan.c | 8 +++++--- ssh-keysign.c | 3 ++- ssh-rsa.c | 4 +++- ssh.c | 3 ++- sshconnect.c | 3 ++- sshconnect1.c | 4 +++- sshconnect2.c | 3 ++- sshd.c | 3 ++- sshlogin.c | 3 ++- sshpty.c | 3 ++- ttymodes.c | 3 ++- uidswap.c | 3 ++- xmalloc.c | 3 ++- 81 files changed, 213 insertions(+), 91 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 636d309b9..000c57828 100644 --- a/ChangeLog +++ b/ChangeLog @@ -80,6 +80,21 @@ [includes.h moduli.c progressmeter.c scp.c sftp-common.c] [sftp-server.c ssh-agent.c sshlogin.c] move #include out of includes.h + - stevesk@cvs.openbsd.org 2006/07/22 20:48:23 + [atomicio.c auth-options.c auth-passwd.c auth-rhosts.c auth-rsa.c] + [auth.c auth1.c auth2-chall.c auth2-hostbased.c auth2-passwd.c auth2.c] + [authfd.c authfile.c bufaux.c bufbn.c buffer.c canohost.c channels.c] + [cipher-3des1.c cipher-bf1.c cipher-ctr.c cipher.c clientloop.c] + [compat.c deattack.c dh.c dns.c gss-genr.c gss-serv.c hostfile.c] + [includes.h kex.c kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c log.c] + [mac.c match.c md-sha256.c misc.c moduli.c monitor.c monitor_fdpass.c] + [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c rsa.c] + [progressmeter.c readconf.c readpass.c scp.c servconf.c serverloop.c] + [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c sftp.c] + [ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] + [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c sshconnect2.c] + [sshd.c sshlogin.c sshpty.c ttymodes.c uidswap.c xmalloc.c] + move #include out of includes.h 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -4998,4 +5013,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4427 2006/07/24 04:09:40 djm Exp $ +$Id: ChangeLog,v 1.4428 2006/07/24 04:13:33 djm Exp $ diff --git a/atomicio.c b/atomicio.c index bf1c0fd18..009ce1d11 100644 --- a/atomicio.c +++ b/atomicio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atomicio.c,v 1.20 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: atomicio.c,v 1.21 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2006 Damien Miller. All rights reserved. * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. @@ -29,6 +29,7 @@ #include "includes.h" #include +#include #include "atomicio.h" diff --git a/auth-options.c b/auth-options.c index 7e6bfeb40..33c62641b 100644 --- a/auth-options.c +++ b/auth-options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.38 2006/07/17 12:02:24 dtucker Exp $ */ +/* $OpenBSD: auth-options.c,v 1.39 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ # include #endif #include +#include #include "xmalloc.h" #include "match.h" diff --git a/auth-passwd.c b/auth-passwd.c index 3cf86dcbd..e5edc9336 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-passwd.c,v 1.37 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-passwd.c,v 1.38 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,6 +41,7 @@ #include #include +#include #include "packet.h" #include "buffer.h" diff --git a/auth-rhosts.c b/auth-rhosts.c index d50ea3a01..c14604dc4 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rhosts.c,v 1.38 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-rhosts.c,v 1.39 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ # include #endif #include +#include #include "packet.h" #include "uidswap.h" diff --git a/auth-rsa.c b/auth-rsa.c index 867597642..65c77805f 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rsa.c,v 1.68 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-rsa.c,v 1.69 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ #include #include +#include #include "rsa.h" #include "packet.h" diff --git a/auth.c b/auth.c index 3bca8dc21..0f1d530e7 100644 --- a/auth.c +++ b/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.71 2006/07/12 11:34:58 dtucker Exp $ */ +/* $OpenBSD: auth.c,v 1.72 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -43,6 +43,7 @@ #include #endif #include +#include #include "xmalloc.h" #include "match.h" diff --git a/auth1.c b/auth1.c index 089291882..034010fda 100644 --- a/auth1.c +++ b/auth1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth1.c,v 1.67 2006/07/20 15:26:14 stevesk Exp $ */ +/* $OpenBSD: auth1.c,v 1.68 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -14,6 +14,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/auth2-chall.c b/auth2-chall.c index 09412aa4a..ad6b7233f 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.27 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.28 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -25,6 +25,8 @@ */ #include "includes.h" +#include + #include "ssh2.h" #include "auth.h" #include "buffer.h" diff --git a/auth2-hostbased.c b/auth2-hostbased.c index 56bf0be13..5cb617e1c 100644 --- a/auth2-hostbased.c +++ b/auth2-hostbased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-hostbased.c,v 1.9 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth2-hostbased.c,v 1.10 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -28,6 +28,7 @@ #include #include +#include #include "ssh2.h" #include "xmalloc.h" diff --git a/auth2-passwd.c b/auth2-passwd.c index a1e77c41c..a1b65da50 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-passwd.c,v 1.7 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth2-passwd.c,v 1.8 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "packet.h" #include "log.h" diff --git a/auth2.c b/auth2.c index ad57c64e6..83d5224c9 100644 --- a/auth2.c +++ b/auth2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2.c,v 1.111 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth2.c,v 1.112 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -28,6 +28,7 @@ #include #include +#include #include "ssh2.h" #include "xmalloc.h" diff --git a/authfd.c b/authfd.c index f8b7ed71f..52766bcd2 100644 --- a/authfd.c +++ b/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.77 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: authfd.c,v 1.78 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -44,6 +44,7 @@ #include #include +#include #include #include "ssh.h" diff --git a/authfile.c b/authfile.c index 53397ea53..8421665b8 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.70 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: authfile.c,v 1.71 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -47,6 +47,7 @@ #include #include +#include #include #include "cipher.h" diff --git a/bufaux.c b/bufaux.c index 4c9cb662c..a384cc685 100644 --- a/bufaux.c +++ b/bufaux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bufaux.c,v 1.42 2006/04/18 10:44:28 dtucker Exp $ */ +/* $OpenBSD: bufaux.c,v 1.43 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -40,6 +40,9 @@ #include "includes.h" #include + +#include + #include "bufaux.h" #include "xmalloc.h" #include "log.h" diff --git a/bufbn.c b/bufbn.c index 56f4f6d5b..aa42ea62b 100644 --- a/bufbn.c +++ b/bufbn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bufbn.c,v 1.1 2006/04/18 10:44:28 dtucker Exp $*/ +/* $OpenBSD: bufbn.c,v 1.2 2006/07/22 20:48:22 stevesk Exp $*/ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -40,6 +40,9 @@ #include "includes.h" #include + +#include + #include "bufaux.h" #include "xmalloc.h" #include "log.h" diff --git a/buffer.c b/buffer.c index ba718daf2..8c9f534f8 100644 --- a/buffer.c +++ b/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.27 2006/04/16 00:48:52 djm Exp $ */ +/* $OpenBSD: buffer.c,v 1.28 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,6 +14,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "buffer.h" #include "log.h" diff --git a/canohost.c b/canohost.c index da5131de3..97b5a78f9 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.57 2006/07/12 22:28:51 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.58 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -24,6 +24,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include "packet.h" #include "xmalloc.h" diff --git a/channels.c b/channels.c index e44a2ab4f..8cf4242fe 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.259 2006/07/21 21:13:30 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.260 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -53,6 +53,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include #include diff --git a/cipher-3des1.c b/cipher-3des1.c index c2c0bf811..2e8735d54 100644 --- a/cipher-3des1.c +++ b/cipher-3des1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-3des1.c,v 1.4 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: cipher-3des1.c,v 1.5 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -26,6 +26,9 @@ #include "includes.h" #include + +#include + #include "xmalloc.h" #include "log.h" diff --git a/cipher-bf1.c b/cipher-bf1.c index b6aa0152a..95b4e5e93 100644 --- a/cipher-bf1.c +++ b/cipher-bf1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-bf1.c,v 1.3 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: cipher-bf1.c,v 1.4 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -26,6 +26,9 @@ #include "includes.h" #include + +#include + #include "xmalloc.h" #include "log.h" diff --git a/cipher-ctr.c b/cipher-ctr.c index be82fd3a9..105d0bd5b 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-ctr.c,v 1.8 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: cipher-ctr.c,v 1.9 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2003 Markus Friedl * @@ -16,6 +16,8 @@ */ #include "includes.h" +#include + #include #include "log.h" diff --git a/cipher.c b/cipher.c index c42963897..20fa59c6a 100644 --- a/cipher.c +++ b/cipher.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher.c,v 1.79 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: cipher.c,v 1.80 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,12 +37,14 @@ #include "includes.h" +#include + +#include + #include "xmalloc.h" #include "log.h" #include "cipher.h" -#include - /* compatibility with old or broken OpenSSL versions */ #include "openbsd-compat/openssl-compat.h" diff --git a/clientloop.c b/clientloop.c index 9398dc989..0c700dbd4 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.169 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: clientloop.c,v 1.170 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -74,6 +74,7 @@ #include #endif #include +#include #include #include diff --git a/compat.c b/compat.c index 1573ed64e..35e429a5f 100644 --- a/compat.c +++ b/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.73 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: compat.c,v 1.74 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include "buffer.h" #include "packet.h" #include "xmalloc.h" diff --git a/deattack.c b/deattack.c index fa397e6e8..57a747da5 100644 --- a/deattack.c +++ b/deattack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: deattack.c,v 1.27 2006/03/30 09:58:15 djm Exp $ */ +/* $OpenBSD: deattack.c,v 1.28 2006/07/22 20:48:23 stevesk Exp $ */ /* * Cryptographic attack detector for ssh - source code * @@ -20,6 +20,8 @@ #include "includes.h" +#include + #include "deattack.h" #include "log.h" #include "crc32.h" diff --git a/dh.c b/dh.c index ff31ca991..b37195f41 100644 --- a/dh.c +++ b/dh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.37 2006/07/18 22:27:55 stevesk Exp $ */ +/* $OpenBSD: dh.c,v 1.38 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * @@ -28,6 +28,8 @@ #include #include +#include + #include "dh.h" #include "pathnames.h" #include "log.h" diff --git a/dns.c b/dns.c index 16954a6a1..5f123a2ee 100644 --- a/dns.c +++ b/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.20 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: dns.c,v 1.21 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -33,6 +33,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include "xmalloc.h" #include "key.h" diff --git a/gss-genr.c b/gss-genr.c index 3d630ab82..0497657c0 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-genr.c,v 1.10 2006/04/03 07:10:38 djm Exp $ */ +/* $OpenBSD: gss-genr.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -28,6 +28,8 @@ #ifdef GSSAPI +#include + #include "xmalloc.h" #include "bufaux.h" #include "log.h" diff --git a/gss-serv.c b/gss-serv.c index 4ce536d99..c033aad4f 100644 --- a/gss-serv.c +++ b/gss-serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-serv.c,v 1.18 2006/07/02 18:36:47 stevesk Exp $ */ +/* $OpenBSD: gss-serv.c,v 1.19 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -28,6 +28,8 @@ #ifdef GSSAPI +#include + #include "bufaux.h" #include "auth.h" #include "log.h" diff --git a/hostfile.c b/hostfile.c index a6714b6e1..c067f5e11 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.41 2006/07/05 02:42:09 stevesk Exp $ */ +/* $OpenBSD: hostfile.c,v 1.42 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -43,6 +43,7 @@ #include #include +#include #include #include diff --git a/includes.h b/includes.h index da526bc72..7a7bd8176 100644 --- a/includes.h +++ b/includes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.53 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: includes.h,v 1.54 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -22,7 +22,6 @@ #include #include -#include #ifdef HAVE_LIMITS_H # include /* For PATH_MAX */ diff --git a/kex.c b/kex.c index 6a5fd264b..007173388 100644 --- a/kex.c +++ b/kex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.71 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kex.c,v 1.72 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -27,6 +27,8 @@ #include +#include + #include "ssh2.h" #include "xmalloc.h" #include "buffer.h" diff --git a/kexdhc.c b/kexdhc.c index f5f01196f..dbbd9bbd0 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhc.c,v 1.6 2006/05/18 21:27:25 miod Exp $ */ +/* $OpenBSD: kexdhc.c,v 1.7 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "key.h" #include "kex.h" diff --git a/kexdhs.c b/kexdhs.c index d139f5c7b..c64cd77cb 100644 --- a/kexdhs.c +++ b/kexdhs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhs.c,v 1.5 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kexdhs.c,v 1.6 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "key.h" #include "kex.h" diff --git a/kexgexc.c b/kexgexc.c index 9da184488..fb2049ea7 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexc.c,v 1.6 2006/05/18 21:27:25 miod Exp $ */ +/* $OpenBSD: kexgexc.c,v 1.7 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,6 +26,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "key.h" #include "kex.h" diff --git a/kexgexs.c b/kexgexs.c index 0141c6d0f..72b66230f 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexs.c,v 1.4 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kexgexs.c,v 1.5 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,6 +26,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "key.h" #include "kex.h" diff --git a/key.c b/key.c index 8e6ccc2bf..e6868de6d 100644 --- a/key.c +++ b/key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: key.c,v 1.65 2006/07/22 20:48:23 stevesk Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -36,6 +36,8 @@ #include +#include + #include "xmalloc.h" #include "key.h" #include "rsa.h" diff --git a/log.c b/log.c index 4ad7cfff7..8a308c2f8 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.34 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: log.c,v 1.35 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,6 +37,7 @@ #include "includes.h" #include +#include #include #include #if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) diff --git a/mac.c b/mac.c index 02bcc31ed..a59e7edf1 100644 --- a/mac.c +++ b/mac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mac.c,v 1.10 2006/03/30 09:58:15 djm Exp $ */ +/* $OpenBSD: mac.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -27,6 +27,8 @@ #include +#include + #include "xmalloc.h" #include "log.h" #include "cipher.h" diff --git a/match.c b/match.c index c0e5bf424..8f12ef539 100644 --- a/match.c +++ b/match.c @@ -1,4 +1,4 @@ -/* $OpenBSD: match.c,v 1.24 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: match.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -38,6 +38,7 @@ #include "includes.h" #include +#include #include "match.h" #include "xmalloc.h" diff --git a/md-sha256.c b/md-sha256.c index 33deb780a..063a1014f 100644 --- a/md-sha256.c +++ b/md-sha256.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md-sha256.c,v 1.3 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: md-sha256.c,v 1.4 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2005 Damien Miller * diff --git a/misc.c b/misc.c index e9c5ddf8b..4c202db2a 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.59 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.60 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -31,6 +31,7 @@ #include #include +#include #include #include diff --git a/moduli.c b/moduli.c index 9d4aedd5b..4d5576a1f 100644 --- a/moduli.c +++ b/moduli.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.14 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: moduli.c,v 1.15 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -43,6 +43,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/monitor.c b/monitor.c index a5263d746..3799d8862 100644 --- a/monitor.c +++ b/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.81 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: monitor.c,v 1.82 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -38,6 +38,7 @@ #endif #include #include +#include #ifdef SKEY #include diff --git a/monitor_fdpass.c b/monitor_fdpass.c index 9d319ac1a..d3e65cbaa 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_fdpass.c,v 1.10 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: monitor_fdpass.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 2001 Niels Provos * All rights reserved. @@ -31,6 +31,7 @@ #include #include +#include #include "log.h" #include "monitor_fdpass.h" diff --git a/monitor_mm.c b/monitor_mm.c index dc0dbda76..b6da6927f 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_mm.c,v 1.12 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: monitor_mm.c,v 1.13 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. @@ -27,6 +27,7 @@ #include "includes.h" #include +#include #ifdef HAVE_SYS_MMAN_H #include diff --git a/monitor_wrap.c b/monitor_wrap.c index 9ec60b6af..3728e5f55 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.47 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.48 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -34,6 +34,7 @@ #include #include +#include #include "ssh.h" #include "dh.h" diff --git a/msg.c b/msg.c index 5c535d1af..322472668 100644 --- a/msg.c +++ b/msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.c,v 1.13 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: msg.c,v 1.14 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -27,6 +27,7 @@ #include #include +#include #include #include "buffer.h" diff --git a/nchan.c b/nchan.c index 43816a65b..78908c3c6 100644 --- a/nchan.c +++ b/nchan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nchan.c,v 1.55 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: nchan.c,v 1.56 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include #include +#include #include "ssh1.h" #include "ssh2.h" diff --git a/packet.c b/packet.c index ce652cfd8..8250b3bc8 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.136 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.137 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -49,6 +49,7 @@ #include #include +#include #include #include "xmalloc.h" diff --git a/progressmeter.c b/progressmeter.c index c70e9939a..19dc917c9 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.33 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.34 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/readconf.c b/readconf.c index 73271e84e..432b80ed0 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.156 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: readconf.c,v 1.157 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -25,6 +25,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include #include "ssh.h" diff --git a/readpass.c b/readpass.c index 725ae5789..1982fb6c5 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.43 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: readpass.c,v 1.44 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -34,6 +34,7 @@ # include #endif #include +#include #include #include "xmalloc.h" diff --git a/rsa.c b/rsa.c index 6ca05b3d2..c656291ed 100644 --- a/rsa.c +++ b/rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.c,v 1.26 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: rsa.c,v 1.27 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -62,6 +62,8 @@ #include "includes.h" +#include + #include "rsa.h" #include "log.h" #include "xmalloc.h" diff --git a/scp.c b/scp.c index 72c4ee430..5ff6cac9a 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.149 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: scp.c,v 1.150 2006/07/22 20:48:23 stevesk Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -86,6 +86,7 @@ #include #include #include +#include #include #include diff --git a/servconf.c b/servconf.c index 46558b690..ce44b5f60 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.159 2006/07/21 12:43:36 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.160 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -18,6 +18,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include #include "ssh.h" diff --git a/serverloop.c b/serverloop.c index 1ca3e673f..ba1e0dad7 100644 --- a/serverloop.c +++ b/serverloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.c,v 1.140 2006/07/20 15:26:15 stevesk Exp $ */ +/* $OpenBSD: serverloop.c,v 1.141 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -47,6 +47,7 @@ #include #include #include +#include #include #include diff --git a/session.c b/session.c index be65086ae..c2730a425 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.211 2006/07/20 15:26:15 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.212 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -52,6 +52,7 @@ #endif #include #include +#include #include #include "ssh.h" diff --git a/sftp-client.c b/sftp-client.c index 5ba4f0a9f..84dae58d2 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.68 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.69 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "openbsd-compat/sys-queue.h" diff --git a/sftp-common.c b/sftp-common.c index 6fd0d76b6..2f3a90971 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.c,v 1.16 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: sftp-common.c,v 1.17 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Damien Miller. All rights reserved. @@ -31,6 +31,7 @@ #include #include +#include #include #include "buffer.h" diff --git a/sftp-glob.c b/sftp-glob.c index 0342de47d..f8549ea76 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-glob.c,v 1.20 2006/07/10 16:01:57 stevesk Exp $ */ +/* $OpenBSD: sftp-glob.c,v 1.21 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -21,8 +21,9 @@ #ifdef HAVE_SYS_STAT_H # include #endif - + #include +#include #include "xmalloc.h" diff --git a/sftp-server.c b/sftp-server.c index 3c254e332..6067f0203 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.64 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.65 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -23,8 +23,9 @@ #include #include #include -#include +#include #include +#include #include "buffer.h" #include "bufaux.h" diff --git a/sftp.c b/sftp.c index 1a88f33f9..2da6c722f 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.86 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: sftp.c,v 1.87 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -36,6 +36,7 @@ typedef void EditLine; #endif #include +#include #include #include "xmalloc.h" diff --git a/ssh-add.c b/ssh-add.c index 974a1629b..f79ffb915 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.84 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.85 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -44,6 +44,7 @@ #include #include +#include #include #include "ssh.h" diff --git a/ssh-agent.c b/ssh-agent.c index a0713b238..5bf4dbc18 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.145 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.146 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,6 +45,9 @@ #include "openbsd-compat/sys-queue.h" #include +#include +#include + #include #include #ifdef HAVE_PATHS_H @@ -52,11 +55,9 @@ #endif #include #include +#include #include -#include -#include - #include "ssh.h" #include "rsa.h" #include "buffer.h" diff --git a/ssh-dss.c b/ssh-dss.c index d16f75e63..a8d45a2b4 100644 --- a/ssh-dss.c +++ b/ssh-dss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-dss.c,v 1.21 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: ssh-dss.c,v 1.22 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -28,6 +28,8 @@ #include #include +#include + #include "xmalloc.h" #include "buffer.h" #include "bufaux.h" diff --git a/ssh-keygen.c b/ssh-keygen.c index 56ad725d8..f2d37129b 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.149 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.150 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -30,6 +30,7 @@ # include #endif #include +#include #include #include "xmalloc.h" diff --git a/ssh-keyscan.c b/ssh-keyscan.c index fd71f7224..30df75166 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.68 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.69 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -11,16 +11,18 @@ #include "openbsd-compat/sys-queue.h" #include + +#include + #if defined(HAVE_NETDB_H) # include #endif #include #include #include +#include #include -#include - #include "xmalloc.h" #include "ssh.h" #include "ssh1.h" diff --git a/ssh-keysign.c b/ssh-keysign.c index b558e54f7..435b839fa 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keysign.c,v 1.26 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: ssh-keysign.c,v 1.27 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include #endif #include +#include #include #include diff --git a/ssh-rsa.c b/ssh-rsa.c index 4580c0644..236f77aac 100644 --- a/ssh-rsa.c +++ b/ssh-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-rsa.c,v 1.37 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: ssh-rsa.c,v 1.38 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000, 2003 Markus Friedl * @@ -19,6 +19,8 @@ #include #include +#include + #include "xmalloc.h" #include "log.h" #include "buffer.h" diff --git a/ssh.c b/ssh.c index e482eb1b5..d0d9457c2 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.288 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.289 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -63,6 +63,7 @@ #include #include #include +#include #include #include diff --git a/sshconnect.c b/sshconnect.c index 1c69044ea..f33cf52b1 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.192 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.193 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -31,6 +31,7 @@ #include #endif #include +#include #include #include "ssh.h" diff --git a/sshconnect1.c b/sshconnect1.c index 5467f04bf..ab5216214 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect1.c,v 1.65 2006/04/25 08:02:27 dtucker Exp $ */ +/* $OpenBSD: sshconnect1.c,v 1.66 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,8 @@ #include #include +#include + #include "ssh.h" #include "ssh1.h" #include "xmalloc.h" diff --git a/sshconnect2.c b/sshconnect2.c index f55002bdf..41be0b91c 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.157 2006/07/20 15:26:15 stevesk Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.158 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include "openbsd-compat/sys-queue.h" diff --git a/sshd.c b/sshd.c index 3da176da1..6428f42a0 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.338 2006/07/12 22:28:52 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.339 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -63,6 +63,7 @@ #include #include #include +#include #include #include diff --git a/sshlogin.c b/sshlogin.c index ea313e800..8d811facd 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.21 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.22 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,6 +45,7 @@ #include #include +#include #include #include diff --git a/sshpty.c b/sshpty.c index 931c91f47..719a79303 100644 --- a/sshpty.c +++ b/sshpty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.c,v 1.24 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: sshpty.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -26,6 +26,7 @@ # include #endif #include +#include #include #ifdef HAVE_UTIL_H # include diff --git a/ttymodes.c b/ttymodes.c index b46305430..680909b22 100644 --- a/ttymodes.c +++ b/ttymodes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttymodes.c,v 1.24 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: ttymodes.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -46,6 +46,7 @@ #include "includes.h" #include +#include #include #include "packet.h" diff --git a/uidswap.c b/uidswap.c index 2fe5feaed..255f9142c 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.c,v 1.32 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: uidswap.c,v 1.33 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/xmalloc.c b/xmalloc.c index 8f9c3e12e..e7a14866b 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.22 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.23 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -16,6 +16,7 @@ #include "includes.h" #include +#include #include "xmalloc.h" #include "log.h" -- cgit v1.2.3 From b8fe89c4d97ea9a5d7efb2c60108b8a7644f6a49 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:51:00 +1000 Subject: - (djm) [acss.c auth-krb5.c auth-options.c auth-pam.c auth-shadow.c] [canohost.c channels.c cipher-acss.c defines.h dns.c gss-genr.c] [gss-serv-krb5.c gss-serv.c log.h loginrec.c logintest.c readconf.c] [servconf.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c] [ssh.c sshconnect.c sshd.c openbsd-compat/bindresvport.c] [openbsd-compat/bsd-arc4random.c openbsd-compat/bsd-misc.c] [openbsd-compat/getrrsetbyname.c openbsd-compat/glob.c] [openbsd-compat/mktemp.c openbsd-compat/port-linux.c] [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c] [openbsd-compat/setproctitle.c openbsd-compat/xmmap.c] make the portable tree compile again - sprinkle unistd.h and string.h back in. Don't redefine __unused, as it turned out to be used in headers on Linux, and replace its use in auth-pam.c with ARGSUSED --- ChangeLog | 15 ++++++++++++++- acss.c | 5 ++++- auth-krb5.c | 2 ++ auth-options.c | 4 +--- auth-pam.c | 11 ++++++++--- auth-shadow.c | 1 + canohost.c | 4 +--- channels.c | 4 +--- cipher-acss.c | 3 +++ defines.h | 7 +------ dns.c | 4 +--- gss-genr.c | 1 + gss-serv-krb5.c | 2 ++ gss-serv.c | 1 + log.h | 2 ++ loginrec.c | 2 ++ logintest.c | 4 +--- openbsd-compat/bindresvport.c | 1 + openbsd-compat/bsd-arc4random.c | 4 ++++ openbsd-compat/bsd-misc.c | 1 + openbsd-compat/getrrsetbyname.c | 2 ++ openbsd-compat/glob.c | 2 ++ openbsd-compat/mktemp.c | 1 + openbsd-compat/port-linux.c | 5 ++++- openbsd-compat/port-tun.c | 2 ++ openbsd-compat/readpassphrase.c | 2 ++ openbsd-compat/setproctitle.c | 1 + openbsd-compat/xmmap.c | 4 +++- readconf.c | 4 +--- servconf.c | 4 +--- ssh-keygen.c | 4 +--- ssh-keyscan.c | 4 +--- ssh-keysign.c | 2 +- ssh-rand-helper.c | 2 ++ ssh.c | 4 +--- sshconnect.c | 4 +--- sshd.c | 4 +--- 37 files changed, 79 insertions(+), 50 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 7f7679402..d2cd9b597 100644 --- a/ChangeLog +++ b/ChangeLog @@ -99,6 +99,19 @@ [auth.h dispatch.c kex.h sftp-client.c] #include for sig_atomic_t; need this prior to move + - (djm) [acss.c auth-krb5.c auth-options.c auth-pam.c auth-shadow.c] + [canohost.c channels.c cipher-acss.c defines.h dns.c gss-genr.c] + [gss-serv-krb5.c gss-serv.c log.h loginrec.c logintest.c readconf.c] + [servconf.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c] + [ssh.c sshconnect.c sshd.c openbsd-compat/bindresvport.c] + [openbsd-compat/bsd-arc4random.c openbsd-compat/bsd-misc.c] + [openbsd-compat/getrrsetbyname.c openbsd-compat/glob.c] + [openbsd-compat/mktemp.c openbsd-compat/port-linux.c] + [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c] + [openbsd-compat/setproctitle.c openbsd-compat/xmmap.c] + make the portable tree compile again - sprinkle unistd.h and string.h + back in. Don't redefine __unused, as it turned out to be used in + headers on Linux, and replace its use in auth-pam.c with ARGSUSED 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -5017,4 +5030,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4429 2006/07/24 04:14:19 djm Exp $ +$Id: ChangeLog,v 1.4430 2006/07/24 04:51:00 djm Exp $ diff --git a/acss.c b/acss.c index 99efde071..86e2c01a8 100644 --- a/acss.c +++ b/acss.c @@ -1,4 +1,4 @@ -/* $Id: acss.c,v 1.3 2005/07/17 07:04:47 djm Exp $ */ +/* $Id: acss.c,v 1.4 2006/07/24 04:51:01 djm Exp $ */ /* * Copyright (c) 2004 The OpenBSD project * @@ -16,6 +16,9 @@ */ #include "includes.h" + +#include + #include #if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00906000L) diff --git a/auth-krb5.c b/auth-krb5.c index 8beacc0d4..676b8ab1f 100644 --- a/auth-krb5.c +++ b/auth-krb5.c @@ -41,6 +41,8 @@ #ifdef KRB5 #include +#include +#include #include extern ServerOptions options; diff --git a/auth-options.c b/auth-options.c index 33c62641b..cd904967a 100644 --- a/auth-options.c +++ b/auth-options.c @@ -14,9 +14,7 @@ #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include diff --git a/auth-pam.c b/auth-pam.c index cb8754ec7..6ce9db12b 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -54,6 +54,8 @@ #include #include +#include +#include #ifdef USE_PAM #if defined(HAVE_SECURITY_PAM_APPL_H) @@ -152,14 +154,16 @@ sshpam_sigchld_handler(int sig) fatal("PAM: authentication thread exited uncleanly"); } +/* ARGSUSED */ static void -pthread_exit(void *value __unused) +pthread_exit(void *value) { _exit(0); } +/* ARGSUSED */ static int -pthread_create(sp_pthread_t *thread, const void *attr __unused, +pthread_create(sp_pthread_t *thread, const void *attr, void *(*thread_start)(void *), void *arg) { pid_t pid; @@ -191,8 +195,9 @@ pthread_cancel(sp_pthread_t thread) return (kill(thread, SIGTERM)); } +/* ARGSUSED */ static int -pthread_join(sp_pthread_t thread, void **value __unused) +pthread_join(sp_pthread_t thread, void **value) { int status; diff --git a/auth-shadow.c b/auth-shadow.c index c8d5dd3c1..7cd69c21f 100644 --- a/auth-shadow.c +++ b/auth-shadow.c @@ -26,6 +26,7 @@ #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) #include +#include #include "auth.h" #include "buffer.h" diff --git a/canohost.c b/canohost.c index 97b5a78f9..b40cbf603 100644 --- a/canohost.c +++ b/canohost.c @@ -21,9 +21,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include "packet.h" diff --git a/channels.c b/channels.c index 8cf4242fe..895c43f6a 100644 --- a/channels.c +++ b/channels.c @@ -50,9 +50,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include #include diff --git a/cipher-acss.c b/cipher-acss.c index 90b51a4d1..cb0bf736c 100644 --- a/cipher-acss.c +++ b/cipher-acss.c @@ -15,8 +15,11 @@ */ #include "includes.h" + #include +#include + #if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) #include "acss.h" diff --git a/defines.h b/defines.h index 4dccc9172..7b0a302a5 100644 --- a/defines.h +++ b/defines.h @@ -25,7 +25,7 @@ #ifndef _DEFINES_H #define _DEFINES_H -/* $Id: defines.h,v 1.133 2006/07/12 04:14:31 dtucker Exp $ */ +/* $Id: defines.h,v 1.134 2006/07/24 04:51:01 djm Exp $ */ /* Constants */ @@ -143,16 +143,11 @@ including rpc/rpc.h breaks Solaris 6 #define INADDR_LOOPBACK ((u_long)0x7f000001) #endif -#ifndef __unused -#define __unused -#endif - /* Types */ /* If sys/types.h does not supply intXX_t, supply them ourselves */ /* (or die trying) */ - #ifndef HAVE_U_INT typedef unsigned int u_int; #endif diff --git a/dns.c b/dns.c index 5f123a2ee..c9368b96b 100644 --- a/dns.c +++ b/dns.c @@ -30,9 +30,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include "xmalloc.h" diff --git a/gss-genr.c b/gss-genr.c index 0497657c0..522fedab3 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -29,6 +29,7 @@ #ifdef GSSAPI #include +#include #include "xmalloc.h" #include "bufaux.h" diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c index eae29b2ae..7b78cfe0a 100644 --- a/gss-serv-krb5.c +++ b/gss-serv-krb5.c @@ -29,6 +29,8 @@ #ifdef GSSAPI #ifdef KRB5 +#include + #include "auth.h" #include "xmalloc.h" #include "log.h" diff --git a/gss-serv.c b/gss-serv.c index c033aad4f..b5c5538fe 100644 --- a/gss-serv.c +++ b/gss-serv.c @@ -29,6 +29,7 @@ #ifdef GSSAPI #include +#include #include "bufaux.h" #include "auth.h" diff --git a/log.h b/log.h index 9e1a2fcdb..15ebc93b5 100644 --- a/log.h +++ b/log.h @@ -15,6 +15,8 @@ #ifndef SSH_LOG_H #define SSH_LOG_H +#include "includes.h" + #include #include /* Needed for LOG_AUTHPRIV (if present) */ diff --git a/loginrec.c b/loginrec.c index 8299b79e4..955d42e8f 100644 --- a/loginrec.c +++ b/loginrec.c @@ -156,6 +156,8 @@ #include #include #include +#include +#include #include "ssh.h" #include "xmalloc.h" diff --git a/logintest.c b/logintest.c index 0de928bec..7e9fbbfbb 100644 --- a/logintest.c +++ b/logintest.c @@ -40,9 +40,7 @@ #include #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_TIME_H #include #endif diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c index 2c16233c9..ef0eff3b6 100644 --- a/openbsd-compat/bindresvport.c +++ b/openbsd-compat/bindresvport.c @@ -37,6 +37,7 @@ #include "includes.h" #include +#include #define STARTPORT 600 #define ENDPORT (IPPORT_RESERVED - 1) diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c index 46e0a020f..c1aecfe99 100644 --- a/openbsd-compat/bsd-arc4random.c +++ b/openbsd-compat/bsd-arc4random.c @@ -15,6 +15,10 @@ */ #include "includes.h" + +#include +#include + #include "log.h" #ifndef HAVE_ARC4RANDOM diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index d2d9ad771..e6128f9a7 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -17,6 +17,7 @@ #include "includes.h" +#include #include #include "xmalloc.h" diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c index a855ad6d5..70ef1850d 100644 --- a/openbsd-compat/getrrsetbyname.c +++ b/openbsd-compat/getrrsetbyname.c @@ -49,6 +49,8 @@ #ifndef HAVE_GETRRSETBYNAME +#include + #include "getrrsetbyname.h" #if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index bba4c0976..b4873932a 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -41,6 +41,8 @@ #include #include #include +#include +#include static long get_arg_max(void) diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index b8b0793a6..2285c84df 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -41,6 +41,7 @@ #include #include #include +#include #if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index 54ec2910e..5e2e878dc 100644 --- a/openbsd-compat/port-linux.c +++ b/openbsd-compat/port-linux.c @@ -1,4 +1,4 @@ -/* $Id: port-linux.c,v 1.1 2006/04/22 11:26:08 djm Exp $ */ +/* $Id: port-linux.c,v 1.2 2006/07/24 04:51:01 djm Exp $ */ /* * Copyright (c) 2005 Daniel Walsh @@ -23,6 +23,9 @@ #include "includes.h" +#include +#include + #ifdef WITH_SELINUX #include "log.h" #include "port-linux.h" diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c index 9806eec7d..f6a6aa9e1 100644 --- a/openbsd-compat/port-tun.c +++ b/openbsd-compat/port-tun.c @@ -23,6 +23,8 @@ #include #include +#include +#include #include "log.h" #include "misc.h" diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c index fd9731ac6..11bd8f646 100644 --- a/openbsd-compat/readpassphrase.c +++ b/openbsd-compat/readpassphrase.c @@ -32,6 +32,8 @@ #include #include #include +#include +#include #ifdef TCSASOFT # define _T_FLUSH (TCSAFLUSH|TCSASOFT) diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c index 32e987deb..7fec73f89 100644 --- a/openbsd-compat/setproctitle.c +++ b/openbsd-compat/setproctitle.c @@ -40,6 +40,7 @@ #ifdef HAVE_SYS_PSTAT_H #include #endif +#include #define SPT_NONE 0 /* don't use it at all */ #define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */ diff --git a/openbsd-compat/xmmap.c b/openbsd-compat/xmmap.c index 7d5cc812c..1293dcab0 100644 --- a/openbsd-compat/xmmap.c +++ b/openbsd-compat/xmmap.c @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: xmmap.c,v 1.8 2006/07/12 12:35:52 dtucker Exp $ */ +/* $Id: xmmap.c,v 1.9 2006/07/24 04:51:01 djm Exp $ */ #include "includes.h" @@ -34,6 +34,8 @@ #include #include +#include +#include #include "log.h" diff --git a/readconf.c b/readconf.c index 432b80ed0..6fe372796 100644 --- a/readconf.c +++ b/readconf.c @@ -22,9 +22,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include diff --git a/servconf.c b/servconf.c index ce44b5f60..dca9508ab 100644 --- a/servconf.c +++ b/servconf.c @@ -15,9 +15,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index f2d37129b..17236a55a 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -23,9 +23,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H # include #endif diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 30df75166..6b706f0af 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -14,9 +14,7 @@ #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include #include diff --git a/ssh-keysign.c b/ssh-keysign.c index 435b839fa..89b8e4342 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -148,7 +148,7 @@ main(int argc, char **argv) { Buffer b; Options options; - Key *keys[2], *key; + Key *keys[2], *key = NULL; struct passwd *pw; int key_fd[2], i, found, version = 2, fd; u_char *signature, *data; diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c index fb6fc2814..121fa52fa 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include #include diff --git a/ssh.c b/ssh.c index d0d9457c2..df787e45f 100644 --- a/ssh.c +++ b/ssh.c @@ -54,9 +54,7 @@ #include #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H #include #endif diff --git a/sshconnect.c b/sshconnect.c index f33cf52b1..21c5203c6 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -24,9 +24,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H #include #endif diff --git a/sshd.c b/sshd.c index 6428f42a0..cc1ebd8d9 100644 --- a/sshd.c +++ b/sshd.c @@ -54,9 +54,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H #include #endif -- cgit v1.2.3 From e7a1e5cf630d635b253f0c0bada8c8886436297f Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 5 Aug 2006 11:34:19 +1000 Subject: - stevesk@cvs.openbsd.org 2006/07/26 13:57:17 [authfd.c authfile.c dh.c canohost.c channels.c clientloop.c compat.c] [hostfile.c kex.c log.c misc.c moduli.c monitor.c packet.c readpass.c] [scp.c servconf.c session.c sftp-server.c sftp.c ssh-add.c ssh-agent.c] [ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh.c sshconnect.c] [sshconnect1.c sshd.c xmalloc.c] move #include out of includes.h --- ChangeLog | 9 ++++++++- authfd.c | 3 ++- authfile.c | 3 ++- canohost.c | 3 ++- channels.c | 3 ++- clientloop.c | 3 ++- compat.c | 3 ++- dh.c | 3 ++- hostfile.c | 9 +++++---- includes.h | 1 - kex.c | 3 ++- log.c | 3 ++- misc.c | 3 ++- moduli.c | 3 ++- monitor.c | 3 ++- packet.c | 3 ++- readpass.c | 3 ++- scp.c | 3 ++- servconf.c | 3 ++- session.c | 3 ++- sftp-server.c | 3 ++- sftp.c | 3 ++- ssh-add.c | 3 ++- ssh-agent.c | 3 ++- ssh-keygen.c | 3 ++- ssh-keyscan.c | 5 +++-- ssh-keysign.c | 3 ++- ssh.c | 3 ++- sshconnect.c | 3 ++- sshconnect1.c | 3 ++- sshd.c | 3 ++- xmalloc.c | 3 ++- 32 files changed, 72 insertions(+), 36 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 9d02af420..b9a3ca2fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,13 @@ [sftp-server.c sftp.c ssh-add.c ssh-agent.c ssh-keygen.c sshlogin.c] [uidswap.c xmalloc.c] move #include out of includes.h + - stevesk@cvs.openbsd.org 2006/07/26 13:57:17 + [authfd.c authfile.c dh.c canohost.c channels.c clientloop.c compat.c] + [hostfile.c kex.c log.c misc.c moduli.c monitor.c packet.c readpass.c] + [scp.c servconf.c session.c sftp-server.c sftp.c ssh-add.c ssh-agent.c] + [ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh.c sshconnect.c] + [sshconnect1.c sshd.c xmalloc.c] + move #include out of includes.h 20060804 - (dtucker) [configure.ac] The "crippled AES" test does not work on recent @@ -5088,4 +5095,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4445 2006/08/05 01:02:17 djm Exp $ +$Id: ChangeLog,v 1.4446 2006/08/05 01:34:19 djm Exp $ diff --git a/authfd.c b/authfd.c index 52766bcd2..f8ee8051d 100644 --- a/authfd.c +++ b/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.78 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: authfd.c,v 1.79 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -44,6 +44,7 @@ #include #include +#include #include #include diff --git a/authfile.c b/authfile.c index e01a08aac..7231be55f 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.72 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: authfile.c,v 1.73 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -48,6 +48,7 @@ #include #include +#include #include #include diff --git a/canohost.c b/canohost.c index b40cbf603..681139cdf 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.58 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.59 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "packet.h" diff --git a/channels.c b/channels.c index f59afe01b..b8c4e7e74 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.261 2006/07/25 02:59:21 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.262 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -54,6 +54,7 @@ #include #include +#include #include #include #include diff --git a/clientloop.c b/clientloop.c index ca7b9060a..46f52e1a2 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.172 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: clientloop.c,v 1.173 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -78,6 +78,7 @@ #include #endif #include +#include #include #include #include diff --git a/compat.c b/compat.c index 35e429a5f..e1a8b2bfd 100644 --- a/compat.c +++ b/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.74 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: compat.c,v 1.75 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -25,6 +25,7 @@ #include "includes.h" +#include #include #include "buffer.h" diff --git a/dh.c b/dh.c index bad0a3480..1ebd3f48e 100644 --- a/dh.c +++ b/dh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.39 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: dh.c,v 1.40 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include "dh.h" diff --git a/hostfile.c b/hostfile.c index c067f5e11..33516a64c 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.42 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: hostfile.c,v 1.43 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -42,12 +42,13 @@ #include -#include -#include - #include #include +#include +#include +#include + #include "match.h" #include "key.h" #include "hostfile.h" diff --git a/includes.h b/includes.h index 9dc284a69..215c00879 100644 --- a/includes.h +++ b/includes.h @@ -22,7 +22,6 @@ #include #include -#include #ifdef HAVE_LIMITS_H # include /* For PATH_MAX */ diff --git a/kex.c b/kex.c index 5c1be6ede..4b1dda814 100644 --- a/kex.c +++ b/kex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.73 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: kex.c,v 1.74 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include +#include #include #include "ssh2.h" diff --git a/log.c b/log.c index 8a308c2f8..68cbfc7d9 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.35 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: log.c,v 1.36 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,6 +37,7 @@ #include "includes.h" #include +#include #include #include #include diff --git a/misc.c b/misc.c index fc3fcca44..c251139f0 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.61 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.62 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/moduli.c b/moduli.c index 4d5576a1f..7b6a7b89f 100644 --- a/moduli.c +++ b/moduli.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.15 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: moduli.c,v 1.16 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -43,6 +43,7 @@ #include +#include #include #include diff --git a/monitor.c b/monitor.c index ab716bdf0..325179854 100644 --- a/monitor.c +++ b/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.83 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: monitor.c,v 1.84 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -39,6 +39,7 @@ #endif #include #include +#include #include #ifdef SKEY diff --git a/packet.c b/packet.c index 875f9eb32..2c980d25e 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.139 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.140 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -53,6 +53,7 @@ #include #include +#include #include #include diff --git a/readpass.c b/readpass.c index 1982fb6c5..78b136f33 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.44 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: readpass.c,v 1.45 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -34,6 +34,7 @@ # include #endif #include +#include #include #include diff --git a/scp.c b/scp.c index fa481d67b..a807338bf 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.152 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: scp.c,v 1.153 2006/07/26 13:57:17 stevesk Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -90,6 +90,7 @@ #include #include #include +#include #include #include #include diff --git a/servconf.c b/servconf.c index dca9508ab..05f47355c 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.160 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: servconf.c,v 1.161 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -16,6 +16,7 @@ #include #include +#include #include #include diff --git a/session.c b/session.c index 11620f855..2ddc5bd27 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.213 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.214 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -53,6 +53,7 @@ #endif #include #include +#include #include #include diff --git a/sftp-server.c b/sftp-server.c index 02c897c11..abc9539e4 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.67 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.68 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/sftp.c b/sftp.c index 761091ec3..ca91bc50b 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.88 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: sftp.c,v 1.89 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -37,6 +37,7 @@ typedef void EditLine; #endif #include +#include #include #include diff --git a/ssh-add.c b/ssh-add.c index 520f23ca5..eccc8ce45 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.86 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.87 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,6 +45,7 @@ #include #include +#include #include #include diff --git a/ssh-agent.c b/ssh-agent.c index ed48c56d4..478f8d1ee 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.148 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.149 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -58,6 +58,7 @@ # include #endif #include +#include #include #include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index 8b48fbda0..6383d7479 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.151 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.152 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -29,6 +29,7 @@ # include #endif #include +#include #include #include diff --git a/ssh-keyscan.c b/ssh-keyscan.c index e47460a8a..3d8cc7e4a 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.70 2006/07/25 02:59:21 stevesk Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.71 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -19,8 +19,9 @@ #include #include -#include #include +#include +#include #include #include diff --git a/ssh-keysign.c b/ssh-keysign.c index 89b8e4342..89fdbda36 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keysign.c,v 1.27 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: ssh-keysign.c,v 1.28 2006/07/26 13:57:17 stevesk Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include #endif #include +#include #include #include diff --git a/ssh.c b/ssh.c index df787e45f..e08239c61 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.289 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.290 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -61,6 +61,7 @@ #include #include #include +#include #include #include diff --git a/sshconnect.c b/sshconnect.c index 4301fb20f..d70410a8e 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.195 2006/07/25 02:59:21 stevesk Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.196 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -32,6 +32,7 @@ #include #endif #include +#include #include #include diff --git a/sshconnect1.c b/sshconnect1.c index ab5216214..37024e750 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect1.c,v 1.66 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: sshconnect1.c,v 1.67 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include #include "ssh.h" diff --git a/sshd.c b/sshd.c index 82a37ef46..9fa179933 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.340 2006/07/25 02:59:21 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.341 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -64,6 +64,7 @@ #include #include #include +#include #include #include diff --git a/xmalloc.c b/xmalloc.c index 511a9e12a..77e2d27c7 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.24 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.25 2006/07/26 13:57:17 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include #include "xmalloc.h" -- cgit v1.2.3 From a7a73ee35d030c817b3eea5c6c3a75c765ca8e69 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 5 Aug 2006 11:37:59 +1000 Subject: - stevesk@cvs.openbsd.org 2006/08/01 23:22:48 [auth-passwd.c auth-rhosts.c auth-rsa.c auth.c auth.h auth1.c] [auth2-chall.c auth2-pubkey.c authfile.c buffer.c canohost.c] [channels.c clientloop.c dh.c dns.c dns.h hostfile.c kex.c kexdhc.c] [kexgexc.c kexgexs.c key.c key.h log.c misc.c misc.h moduli.c] [monitor_wrap.c packet.c progressmeter.c readconf.c readpass.c scp.c] [servconf.c session.c sftp-client.c sftp-common.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh.c sshconnect.c] [sshconnect1.c sshconnect2.c sshd.c sshlogin.c sshtty.c uuencode.c] [uuencode.h xmalloc.c] move #include out of includes.h --- ChangeLog | 13 ++++++++++++- auth-passwd.c | 3 ++- auth-rhosts.c | 3 ++- auth-rsa.c | 3 ++- auth.c | 3 ++- auth.h | 3 ++- auth1.c | 3 ++- auth2-chall.c | 3 ++- auth2-pubkey.c | 3 ++- authfile.c | 3 ++- buffer.c | 3 ++- canohost.c | 3 ++- channels.c | 3 ++- clientloop.c | 3 ++- dh.c | 3 ++- dns.c | 3 ++- dns.h | 4 +++- hostfile.c | 3 ++- includes.h | 1 - kex.c | 3 ++- kexdhc.c | 3 ++- kexgexc.c | 3 ++- kexgexs.c | 3 ++- key.c | 3 ++- key.h | 4 +++- log.c | 3 ++- misc.c | 3 ++- misc.h | 3 ++- moduli.c | 3 ++- monitor_wrap.c | 3 ++- packet.c | 3 ++- progressmeter.c | 3 ++- readconf.c | 3 ++- readpass.c | 3 ++- scp.c | 3 ++- servconf.c | 3 ++- session.c | 3 ++- sftp-client.c | 3 ++- sftp-common.c | 3 ++- sftp-server.c | 3 ++- sftp.c | 3 ++- ssh-add.c | 3 ++- ssh-agent.c | 3 ++- ssh-keygen.c | 3 ++- ssh-keyscan.c | 3 ++- ssh.c | 3 ++- sshconnect.c | 3 ++- sshconnect1.c | 3 ++- sshconnect2.c | 3 ++- sshd.c | 3 ++- sshlogin.c | 3 ++- sshtty.c | 3 ++- uuencode.c | 3 ++- uuencode.h | 5 ++++- xmalloc.c | 3 ++- 55 files changed, 122 insertions(+), 55 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index a97e77aaf..de401547e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,17 @@ Allow fallback to known_hosts entries without port qualifiers for non-standard ports too, so that all existing known_hosts entries will be recognised. Requested by, feedback and ok markus@ + - stevesk@cvs.openbsd.org 2006/08/01 23:22:48 + [auth-passwd.c auth-rhosts.c auth-rsa.c auth.c auth.h auth1.c] + [auth2-chall.c auth2-pubkey.c authfile.c buffer.c canohost.c] + [channels.c clientloop.c dh.c dns.c dns.h hostfile.c kex.c kexdhc.c] + [kexgexc.c kexgexs.c key.c key.h log.c misc.c misc.h moduli.c] + [monitor_wrap.c packet.c progressmeter.c readconf.c readpass.c scp.c] + [servconf.c session.c sftp-client.c sftp-common.c sftp-server.c sftp.c] + [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh.c sshconnect.c] + [sshconnect1.c sshconnect2.c sshd.c sshlogin.c sshtty.c uuencode.c] + [uuencode.h xmalloc.c] + move #include out of includes.h 20060804 - (dtucker) [configure.ac] The "crippled AES" test does not work on recent @@ -5110,4 +5121,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4449 2006/08/05 01:35:45 djm Exp $ +$Id: ChangeLog,v 1.4450 2006/08/05 01:37:59 djm Exp $ diff --git a/auth-passwd.c b/auth-passwd.c index e5edc9336..f8df17e6a 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-passwd.c,v 1.38 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth-passwd.c,v 1.39 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,6 +41,7 @@ #include #include +#include #include #include "packet.h" diff --git a/auth-rhosts.c b/auth-rhosts.c index c14604dc4..8dc4ede05 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rhosts.c,v 1.39 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth-rhosts.c,v 1.40 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ # include #endif #include +#include #include #include "packet.h" diff --git a/auth-rsa.c b/auth-rsa.c index 65c77805f..f3e27e9fa 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rsa.c,v 1.69 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth-rsa.c,v 1.70 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ #include #include +#include #include #include "rsa.h" diff --git a/auth.c b/auth.c index 0089a1dd9..88a8e22ef 100644 --- a/auth.c +++ b/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.73 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: auth.c,v 1.74 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -44,6 +44,7 @@ #include #endif #include +#include #include #include "xmalloc.h" diff --git a/auth.h b/auth.h index 65250138f..2c7499573 100644 --- a/auth.h +++ b/auth.h @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.h,v 1.55 2006/07/23 01:11:05 stevesk Exp $ */ +/* $OpenBSD: auth.h,v 1.56 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -33,6 +33,7 @@ #include #include #include +#include #include "buffer.h" #include diff --git a/auth1.c b/auth1.c index 034010fda..2c5585768 100644 --- a/auth1.c +++ b/auth1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth1.c,v 1.68 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth1.c,v 1.69 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -14,6 +14,7 @@ #include +#include #include #include diff --git a/auth2-chall.c b/auth2-chall.c index ad6b7233f..89b261e61 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.28 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.29 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -25,6 +25,7 @@ */ #include "includes.h" +#include #include #include "ssh2.h" diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 7962dcef2..41763f763 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-pubkey.c,v 1.13 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth2-pubkey.c,v 1.14 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include #include +#include #include "ssh.h" #include "ssh2.h" diff --git a/authfile.c b/authfile.c index 7231be55f..f1d47b00b 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.73 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: authfile.c,v 1.74 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -48,6 +48,7 @@ #include #include +#include #include #include #include diff --git a/buffer.c b/buffer.c index c6e8a8d48..25868b94d 100644 --- a/buffer.c +++ b/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.29 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: buffer.c,v 1.30 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -16,6 +16,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/canohost.c b/canohost.c index 681139cdf..c236617d7 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.59 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.60 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/channels.c b/channels.c index b8c4e7e74..80cb32461 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.262 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.263 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -54,6 +54,7 @@ #include #include +#include #include #include #include diff --git a/clientloop.c b/clientloop.c index 46f52e1a2..f9ffa2bb7 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.173 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: clientloop.c,v 1.174 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -78,6 +78,7 @@ #include #endif #include +#include #include #include #include diff --git a/dh.c b/dh.c index 1ebd3f48e..4ca949138 100644 --- a/dh.c +++ b/dh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.40 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: dh.c,v 1.41 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/dns.c b/dns.c index c9368b96b..008fc596f 100644 --- a/dns.c +++ b/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.21 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: dns.c,v 1.22 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -31,6 +31,7 @@ #include #include +#include #include #include "xmalloc.h" diff --git a/dns.h b/dns.h index 818750384..8f9601824 100644 --- a/dns.h +++ b/dns.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.h,v 1.8 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: dns.h,v 1.9 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -30,6 +30,8 @@ #include #include +#include + #ifndef DNS_H #define DNS_H diff --git a/hostfile.c b/hostfile.c index 33516a64c..7ac69e776 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.43 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: hostfile.c,v 1.44 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -46,6 +46,7 @@ #include #include +#include #include #include diff --git a/includes.h b/includes.h index 215c00879..9b6a63fb3 100644 --- a/includes.h +++ b/includes.h @@ -21,7 +21,6 @@ #define _GNU_SOURCE /* activate extra prototypes for glibc */ #include -#include #ifdef HAVE_LIMITS_H # include /* For PATH_MAX */ diff --git a/kex.c b/kex.c index 4b1dda814..3525307c3 100644 --- a/kex.c +++ b/kex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.74 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: kex.c,v 1.75 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include +#include #include #include diff --git a/kexdhc.c b/kexdhc.c index dbbd9bbd0..9d123e748 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhc.c,v 1.7 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: kexdhc.c,v 1.8 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,6 +25,7 @@ #include "includes.h" +#include #include #include "xmalloc.h" diff --git a/kexgexc.c b/kexgexc.c index fb2049ea7..9c618ec6c 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexc.c,v 1.7 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: kexgexc.c,v 1.8 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,6 +26,7 @@ #include "includes.h" +#include #include #include "xmalloc.h" diff --git a/kexgexs.c b/kexgexs.c index 2bd7ee948..0b01ed800 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexs.c,v 1.6 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: kexgexs.c,v 1.7 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -28,6 +28,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/key.c b/key.c index e6868de6d..745c474f9 100644 --- a/key.c +++ b/key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.65 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: key.c,v 1.66 2006/08/01 23:22:47 stevesk Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -36,6 +36,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/key.h b/key.h index ee78d48d5..57af279b8 100644 --- a/key.h +++ b/key.h @@ -1,4 +1,4 @@ -/* $OpenBSD: key.h,v 1.24 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: key.h,v 1.25 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -29,6 +29,8 @@ #include #include +#include + typedef struct Key Key; enum types { KEY_RSA1, diff --git a/log.c b/log.c index 68cbfc7d9..871bc2c42 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.36 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: log.c,v 1.37 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,6 +37,7 @@ #include "includes.h" #include +#include #include #include #include diff --git a/misc.c b/misc.c index c251139f0..ef2014f61 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.62 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.63 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -32,6 +32,7 @@ #include #include +#include #include #include #include diff --git a/misc.h b/misc.h index 139a62e05..1dded7215 100644 --- a/misc.h +++ b/misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.33 2006/07/10 12:46:51 dtucker Exp $ */ +/* $OpenBSD: misc.h,v 1.34 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -18,6 +18,7 @@ #include #include +#include /* misc.c */ diff --git a/moduli.c b/moduli.c index 7b6a7b89f..a164b4f5d 100644 --- a/moduli.c +++ b/moduli.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.16 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: moduli.c,v 1.17 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -43,6 +43,7 @@ #include +#include #include #include #include diff --git a/monitor_wrap.c b/monitor_wrap.c index 3728e5f55..27e2fc7c3 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.48 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.49 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -34,6 +34,7 @@ #include #include +#include #include #include "ssh.h" diff --git a/packet.c b/packet.c index 2c980d25e..acf72f77e 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.140 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.141 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -53,6 +53,7 @@ #include #include +#include #include #include #include diff --git a/progressmeter.c b/progressmeter.c index 19dc917c9..cbbb34023 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.34 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.35 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include #include diff --git a/readconf.c b/readconf.c index 6fe372796..9975c9d32 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.157 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: readconf.c,v 1.158 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/readpass.c b/readpass.c index 78b136f33..8af5d444d 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.45 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: readpass.c,v 1.46 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -34,6 +34,7 @@ # include #endif #include +#include #include #include #include diff --git a/scp.c b/scp.c index a807338bf..8d9de0135 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.153 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: scp.c,v 1.154 2006/08/01 23:22:47 stevesk Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -90,6 +90,7 @@ #include #include #include +#include #include #include #include diff --git a/servconf.c b/servconf.c index 05f47355c..4edc80efe 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.161 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: servconf.c,v 1.162 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/session.c b/session.c index 2ddc5bd27..a6d5ad257 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.214 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.215 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -53,6 +53,7 @@ #endif #include #include +#include #include #include #include diff --git a/sftp-client.c b/sftp-client.c index 4416afa4c..b7b126d21 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.72 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.73 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -34,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/sftp-common.c b/sftp-common.c index da907ff01..3faed373e 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.c,v 1.18 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: sftp-common.c,v 1.19 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Damien Miller. All rights reserved. @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/sftp-server.c b/sftp-server.c index abc9539e4..c0839782d 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.68 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.69 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/sftp.c b/sftp.c index ca91bc50b..82ef58019 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.89 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: sftp.c,v 1.90 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -38,6 +38,7 @@ typedef void EditLine; #endif #include #include +#include #include #include diff --git a/ssh-add.c b/ssh-add.c index eccc8ce45..a8d98fd1f 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.87 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.88 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,6 +45,7 @@ #include #include +#include #include #include #include diff --git a/ssh-agent.c b/ssh-agent.c index 478f8d1ee..54c2b9c47 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.149 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.150 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -58,6 +58,7 @@ # include #endif #include +#include #include #include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index 6383d7479..d8b793e81 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.152 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.153 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -29,6 +29,7 @@ # include #endif #include +#include #include #include #include diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 3d8cc7e4a..701540841 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.71 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.72 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/ssh.c b/ssh.c index e08239c61..8dc987214 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.290 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.291 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include diff --git a/sshconnect.c b/sshconnect.c index 54e664830..af75bba8d 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.197 2006/08/01 11:34:36 dtucker Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.198 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -32,6 +32,7 @@ #include #endif #include +#include #include #include #include diff --git a/sshconnect1.c b/sshconnect1.c index 37024e750..f0eee3bdf 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect1.c,v 1.67 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: sshconnect1.c,v 1.68 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/sshconnect2.c b/sshconnect2.c index 41be0b91c..27e5442e9 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.158 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.159 2006/08/01 23:22:48 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/sshd.c b/sshd.c index 9fa179933..5cefd1024 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.341 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.342 2006/08/01 23:22:48 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -64,6 +64,7 @@ #include #include #include +#include #include #include diff --git a/sshlogin.c b/sshlogin.c index 4b2808206..b01fde091 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.23 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.24 2006/08/01 23:22:48 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -46,6 +46,7 @@ #include #include +#include #include #include #include diff --git a/sshtty.c b/sshtty.c index 7cb848d2c..70668afde 100644 --- a/sshtty.c +++ b/sshtty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshtty.c,v 1.10 2006/03/25 13:17:03 djm Exp $ */ +/* $OpenBSD: sshtty.c,v 1.11 2006/08/01 23:22:48 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,6 +37,7 @@ #include "includes.h" +#include #include #include "sshpty.h" diff --git a/uuencode.c b/uuencode.c index 3128309cc..8a6742e95 100644 --- a/uuencode.c +++ b/uuencode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uuencode.c,v 1.22 2006/07/05 02:42:09 stevesk Exp $ */ +/* $OpenBSD: uuencode.c,v 1.23 2006/08/01 23:22:48 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include "xmalloc.h" #include "uuencode.h" diff --git a/uuencode.h b/uuencode.h index bb98bf8d6..df09eb59b 100644 --- a/uuencode.h +++ b/uuencode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uuencode.h,v 1.11 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: uuencode.h,v 1.12 2006/08/01 23:22:48 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -26,6 +26,9 @@ #ifndef UUENCODE_H #define UUENCODE_H + +#include + int uuencode(const u_char *, u_int, char *, size_t); int uudecode(const char *, u_char *, size_t); void dump_base64(FILE *, u_char *, u_int); diff --git a/xmalloc.c b/xmalloc.c index 77e2d27c7..6aea495ef 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.25 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.26 2006/08/01 23:22:48 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include #include -- cgit v1.2.3 From 4dec5d75daab22c31f6f67d9e83594076ae3eda7 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 5 Aug 2006 11:38:40 +1000 Subject: - stevesk@cvs.openbsd.org 2006/08/01 23:36:12 [authfile.c channels.c progressmeter.c scard.c servconf.c ssh.c] clean extra spaces --- ChangeLog | 5 ++++- authfile.c | 4 ++-- channels.c | 4 ++-- progressmeter.c | 4 ++-- scard.c | 10 +++++----- servconf.c | 6 +++--- ssh.c | 4 ++-- 7 files changed, 20 insertions(+), 17 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index de401547e..b955ea8a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,6 +51,9 @@ [sshconnect1.c sshconnect2.c sshd.c sshlogin.c sshtty.c uuencode.c] [uuencode.h xmalloc.c] move #include out of includes.h + - stevesk@cvs.openbsd.org 2006/08/01 23:36:12 + [authfile.c channels.c progressmeter.c scard.c servconf.c ssh.c] + clean extra spaces 20060804 - (dtucker) [configure.ac] The "crippled AES" test does not work on recent @@ -5121,4 +5124,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4450 2006/08/05 01:37:59 djm Exp $ +$Id: ChangeLog,v 1.4451 2006/08/05 01:38:40 djm Exp $ diff --git a/authfile.c b/authfile.c index f1d47b00b..400e60b39 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.74 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: authfile.c,v 1.75 2006/08/01 23:36:11 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -195,7 +195,7 @@ key_save_private_pem(Key *key, const char *filename, const char *_passphrase, return 0; } fp = fdopen(fd, "w"); - if (fp == NULL ) { + if (fp == NULL) { error("fdopen %s failed: %s.", filename, strerror(errno)); close(fd); return 0; diff --git a/channels.c b/channels.c index 80cb32461..fb4d287d6 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.263 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.264 2006/08/01 23:36:11 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1052,7 +1052,7 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset) return 0; /* look for method: "NO AUTHENTICATION REQUIRED" */ for (found = 0, i = 2 ; i < nmethods + 2; i++) { - if (p[i] == SSH_SOCKS5_NOAUTH ) { + if (p[i] == SSH_SOCKS5_NOAUTH) { found = 1; break; } diff --git a/progressmeter.c b/progressmeter.c index cbbb34023..e8534fa2f 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.35 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.36 2006/08/01 23:36:12 stevesk Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -164,7 +164,7 @@ refresh_progress_meter(void) len = 0; if (len >= file_len + 1) len = file_len; - for (i = len; i < file_len; i++ ) + for (i = len; i < file_len; i++) buf[i] = ' '; buf[file_len] = '\0'; } diff --git a/scard.c b/scard.c index 237a4e438..e22da596f 100644 --- a/scard.c +++ b/scard.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scard.c,v 1.33 2006/07/25 02:01:34 stevesk Exp $ */ +/* $OpenBSD: scard.c,v 1.34 2006/08/01 23:36:12 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -127,7 +127,7 @@ sc_init(void) if (status == SCARD_ERROR_NOCARD) { return SCARD_ERROR_NOCARD; } - if (status < 0 ) { + if (status < 0) { error("sc_open failed"); return status; } @@ -217,7 +217,7 @@ sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa, olen = len = sw = 0; if (sc_fd < 0) { status = sc_init(); - if (status < 0 ) + if (status < 0) goto err; } if (padding != RSA_PKCS1_PADDING) @@ -257,7 +257,7 @@ sc_private_encrypt(int flen, u_char *from, u_char *to, RSA *rsa, len = sw = 0; if (sc_fd < 0) { status = sc_init(); - if (status < 0 ) + if (status < 0) goto err; } if (padding != RSA_PKCS1_PADDING) @@ -380,7 +380,7 @@ sc_get_keys(const char *id, const char *pin) key_free(k); return NULL; } - if (status < 0 ) { + if (status < 0) { error("sc_read_pubkey failed"); key_free(k); return NULL; diff --git a/servconf.c b/servconf.c index 4edc80efe..b1fc45c50 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.162 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: servconf.c,v 1.163 2006/08/01 23:36:12 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -961,7 +961,7 @@ parse_flag: case sDenyUsers: while ((arg = strdelim(&cp)) && *arg != '\0') { if (options->num_deny_users >= MAX_DENY_USERS) - fatal( "%s line %d: too many deny users.", + fatal("%s line %d: too many deny users.", filename, linenum); options->deny_users[options->num_deny_users++] = xstrdup(arg); @@ -1096,7 +1096,7 @@ parse_flag: */ case sAuthorizedKeysFile: case sAuthorizedKeysFile2: - charptr = (opcode == sAuthorizedKeysFile ) ? + charptr = (opcode == sAuthorizedKeysFile) ? &options->authorized_keys_file : &options->authorized_keys_file2; goto parse_filename; diff --git a/ssh.c b/ssh.c index 8dc987214..10dd8777a 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.291 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.292 2006/08/01 23:36:12 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1229,7 +1229,7 @@ load_public_identity_files(void) if (options.smartcard_device != NULL && options.num_identity_files < SSH_MAX_IDENTITY_FILES && - (keys = sc_get_keys(options.smartcard_device, NULL)) != NULL ) { + (keys = sc_get_keys(options.smartcard_device, NULL)) != NULL) { int count = 0; for (i = 0; keys[i] != NULL; i++) { count++; -- cgit v1.2.3 From d783435315d8e604998925d5e47b663a500ed252 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 5 Aug 2006 12:39:39 +1000 Subject: - deraadt@cvs.openbsd.org 2006/08/03 03:34:42 [OVERVIEW atomicio.c atomicio.h auth-bsdauth.c auth-chall.c auth-krb5.c] [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c auth-rhosts.c] [auth-rsa.c auth-skey.c auth.c auth.h auth1.c auth2-chall.c auth2-gss.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c ] [auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufbn.c] [buffer.c buffer.h canohost.c channels.c channels.h cipher-3des1.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c dns.h fatal.c groupaccess.c] [groupaccess.h gss-genr.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] [kex.h kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c] [key.h log.c log.h mac.c match.c md-sha256.c misc.c misc.h moduli.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_mm.h monitor_wrap.c] [monitor_wrap.h msg.c nchan.c packet.c progressmeter.c readconf.c] [readconf.h readpass.c rsa.c scard.c scard.h scp.c servconf.c servconf.h] [serverloop.c session.c session.h sftp-client.c sftp-common.c] [sftp-common.h sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c] [ssh-dss.c ssh-gss.h ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c] [ssh.c ssh.h sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c] [sshd.c sshlogin.c sshlogin.h sshpty.c sshpty.h sshtty.c ttymodes.c] [uidswap.c uidswap.h uuencode.c uuencode.h xmalloc.c xmalloc.h] [loginrec.c loginrec.h openbsd-compat/port-aix.c openbsd-compat/port-tun.h] almost entirely get rid of the culture of ".h files that include .h files" ok djm, sort of ok stevesk makes the pain stop in one easy step NB. portable commit contains everything *except* removing includes.h, as that will take a fair bit more work as we move headers that are required for portability workarounds to defines.h. (also, this step wasn't "easy") --- ChangeLog | 30 +++++++++++++++++++++++++++++- OVERVIEW | 3 +-- atomicio.c | 3 ++- atomicio.h | 7 +------ auth-bsdauth.c | 11 ++++++++++- auth-chall.c | 8 ++++++-- auth-krb5.c | 11 +++++++++-- auth-options.c | 12 ++++++++++-- auth-options.h | 6 +----- auth-passwd.c | 5 ++++- auth-rh-rsa.c | 8 ++++++-- auth-rhosts.c | 6 +++++- auth-rsa.c | 11 ++++++++--- auth-skey.c | 5 ++++- auth.c | 10 +++++++--- auth.h | 11 +---------- auth1.c | 8 +++++++- auth2-chall.c | 9 +++++++-- auth2-gss.c | 14 +++++++------- auth2-hostbased.c | 12 ++++++++---- auth2-kbdint.c | 9 +++++++-- auth2-none.c | 10 ++++++++-- auth2-passwd.c | 11 ++++++++++- auth2-pubkey.c | 12 ++++++++---- auth2.c | 10 +++++++--- authfd.c | 7 ++++--- authfd.h | 4 +--- authfile.c | 6 +++--- bufaux.c | 7 +++++-- bufbn.c | 7 +++++-- buffer.c | 3 ++- buffer.h | 38 +++++++++++++++++++++++++++++++++++++- canohost.c | 5 +++-- channels.c | 9 +++++---- channels.h | 4 +--- cipher-3des1.c | 4 +++- cipher-bf1.c | 4 +++- cipher-ctr.c | 6 ++++-- cipher.c | 5 ++++- cleanup.c | 5 ++++- clientloop.c | 8 ++++---- compat.c | 7 +++++-- compress.c | 6 +++++- deattack.c | 8 ++++++-- dh.c | 2 +- dispatch.c | 6 +++++- dns.c | 2 +- dns.h | 9 +-------- fatal.c | 4 +++- groupaccess.c | 5 +++-- groupaccess.h | 4 +--- gss-genr.c | 6 ++++-- gss-serv-krb5.c | 9 +++++++-- gss-serv.c | 10 +++++++--- hostfile.c | 4 ++-- includes.h | 3 --- kex.c | 12 ++++++------ kex.h | 8 +------- kexdh.c | 9 +++++++-- kexdhc.c | 7 ++++++- kexdhs.c | 9 ++++++++- kexgex.c | 8 ++++++-- kexgexc.c | 7 ++++++- kexgexs.c | 8 +++++++- key.c | 6 ++++-- key.h | 4 +--- log.c | 6 ++++-- log.h | 8 +------- loginrec.c | 4 +++- loginrec.h | 4 ---- mac.c | 7 ++++++- match.c | 6 ++++-- md-sha256.c | 4 +++- misc.c | 6 +++--- misc.h | 7 +------ moduli.c | 3 ++- monitor.c | 15 ++++++++++----- monitor_fdpass.c | 3 ++- monitor_mm.c | 7 +++++-- monitor_mm.h | 3 +-- monitor_wrap.c | 25 +++++++++++++------------ monitor_wrap.h | 10 +--------- msg.c | 6 +++++- nchan.c | 3 ++- openbsd-compat/port-aix.c | 7 +++++-- openbsd-compat/port-tun.h | 2 -- packet.c | 8 +++----- progressmeter.c | 3 ++- readconf.c | 7 +++++-- readconf.h | 4 +--- readpass.c | 2 +- rsa.c | 6 ++++-- scard.c | 8 +++++--- scard.h | 4 +--- scp.c | 3 ++- servconf.c | 8 ++++++-- servconf.h | 4 +--- serverloop.c | 8 ++++++-- session.c | 15 ++++++++------- session.h | 6 +----- sftp-client.c | 12 ++++++------ sftp-common.c | 6 +++--- sftp-common.h | 7 +------ sftp-glob.c | 4 ++-- sftp-server.c | 12 +++++++----- sftp.c | 6 ++++-- ssh-add.c | 5 +++-- ssh-agent.c | 5 ++--- ssh-dss.c | 5 +++-- ssh-gss.h | 4 +--- ssh-keygen.c | 3 +-- ssh-keyscan.c | 7 ++++--- ssh-keysign.c | 6 +++--- ssh-rsa.c | 6 ++++-- ssh.c | 7 +++---- ssh.h | 16 +--------------- sshconnect.c | 6 ++++-- sshconnect.h | 11 +---------- sshconnect1.c | 14 ++++++++++---- sshconnect2.c | 9 ++++++--- sshd.c | 18 +++++++++++------- sshlogin.c | 4 +++- sshlogin.h | 9 +-------- sshpty.c | 7 ++++--- sshpty.h | 10 +--------- sshtty.c | 4 +++- ttymodes.c | 6 ++++-- uidswap.c | 5 ++--- uidswap.h | 11 +---------- uuencode.c | 4 +--- uuencode.h | 8 +------- xmalloc.c | 3 +-- xmalloc.h | 7 +------ 133 files changed, 584 insertions(+), 412 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index b955ea8a4..7f48d236e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,6 +54,34 @@ - stevesk@cvs.openbsd.org 2006/08/01 23:36:12 [authfile.c channels.c progressmeter.c scard.c servconf.c ssh.c] clean extra spaces + - deraadt@cvs.openbsd.org 2006/08/03 03:34:42 + [OVERVIEW atomicio.c atomicio.h auth-bsdauth.c auth-chall.c auth-krb5.c] + [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c auth-rhosts.c] + [auth-rsa.c auth-skey.c auth.c auth.h auth1.c auth2-chall.c auth2-gss.c] + [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c ] + [auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufbn.c] + [buffer.c buffer.h canohost.c channels.c channels.h cipher-3des1.c] + [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] + [compress.c deattack.c dh.c dispatch.c dns.c dns.h fatal.c groupaccess.c] + [groupaccess.h gss-genr.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] + [kex.h kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c] + [key.h log.c log.h mac.c match.c md-sha256.c misc.c misc.h moduli.c] + [monitor.c monitor_fdpass.c monitor_mm.c monitor_mm.h monitor_wrap.c] + [monitor_wrap.h msg.c nchan.c packet.c progressmeter.c readconf.c] + [readconf.h readpass.c rsa.c scard.c scard.h scp.c servconf.c servconf.h] + [serverloop.c session.c session.h sftp-client.c sftp-common.c] + [sftp-common.h sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c] + [ssh-dss.c ssh-gss.h ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c] + [ssh.c ssh.h sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c] + [sshd.c sshlogin.c sshlogin.h sshpty.c sshpty.h sshtty.c ttymodes.c] + [uidswap.c uidswap.h uuencode.c uuencode.h xmalloc.c xmalloc.h] + [loginrec.c loginrec.h openbsd-compat/port-aix.c openbsd-compat/port-tun.h] + almost entirely get rid of the culture of ".h files that include .h files" + ok djm, sort of ok stevesk + makes the pain stop in one easy step + NB. portable commit contains everything *except* removing includes.h, as + that will take a fair bit more work as we move headers that are required + for portability workarounds to defines.h. (also, this step wasn't "easy") 20060804 - (dtucker) [configure.ac] The "crippled AES" test does not work on recent @@ -5124,4 +5152,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4451 2006/08/05 01:38:40 djm Exp $ +$Id: ChangeLog,v 1.4452 2006/08/05 02:39:39 djm Exp $ diff --git a/OVERVIEW b/OVERVIEW index 64b6f75fa..2e1cc0ba3 100644 --- a/OVERVIEW +++ b/OVERVIEW @@ -162,8 +162,7 @@ these programs. - There are several other files in the distribution that contain various auxiliary routines: ssh.h the main header file for ssh (various definitions) - includes.h includes most system headers. Lots of #ifdefs. uidswap.c uid-swapping xmalloc.c "safe" malloc routines -$OpenBSD: OVERVIEW,v 1.10 2006/04/01 05:37:46 djm Exp $ +$OpenBSD: OVERVIEW,v 1.11 2006/08/03 03:34:41 deraadt Exp $ diff --git a/atomicio.c b/atomicio.c index 4ff990fd3..f651a292c 100644 --- a/atomicio.c +++ b/atomicio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atomicio.c,v 1.22 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: atomicio.c,v 1.23 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2006 Damien Miller. All rights reserved. * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. @@ -29,6 +29,7 @@ #include "includes.h" #include +#include #include #include diff --git a/atomicio.h b/atomicio.h index 05b97ab8b..2fcd25d43 100644 --- a/atomicio.h +++ b/atomicio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atomicio.h,v 1.9 2006/07/30 20:15:19 stevesk Exp $ */ +/* $OpenBSD: atomicio.h,v 1.10 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2006 Damien Miller. All rights reserved. @@ -29,11 +29,6 @@ #ifndef _ATOMICIO_H #define _ATOMICIO_H -#include -#include - -#include - /* * Ensure all of data on socket comes through. f==read || f==vwrite */ diff --git a/auth-bsdauth.c b/auth-bsdauth.c index c309e4a11..f718e5d38 100644 --- a/auth-bsdauth.c +++ b/auth-bsdauth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-bsdauth.c,v 1.9 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth-bsdauth.c,v 1.10 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -22,12 +22,21 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" +#include + #ifdef BSD_AUTH #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "log.h" +#include "buffer.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" static void * diff --git a/auth-chall.c b/auth-chall.c index 023e7ee01..9c1079a17 100644 --- a/auth-chall.c +++ b/auth-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-chall.c,v 1.11 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth-chall.c,v 1.12 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,9 +25,13 @@ #include "includes.h" +#include + +#include "xmalloc.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "log.h" -#include "xmalloc.h" #include "servconf.h" /* limited protocol v1 interface to kbd-interactive authentication */ diff --git a/auth-krb5.c b/auth-krb5.c index 676b8ab1f..868288126 100644 --- a/auth-krb5.c +++ b/auth-krb5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-krb5.c,v 1.18 2006/05/06 08:35:40 dtucker Exp $ */ +/* $OpenBSD: auth-krb5.c,v 1.19 2006/08/03 03:34:41 deraadt Exp $ */ /* * Kerberos v5 authentication and ticket-passing routines. * @@ -30,13 +30,20 @@ #include "includes.h" +#include +#include +#include + +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "packet.h" -#include "xmalloc.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "uidswap.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #ifdef KRB5 diff --git a/auth-options.c b/auth-options.c index cd904967a..ca5e1c931 100644 --- a/auth-options.c +++ b/auth-options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.39 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth-options.c,v 1.40 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -17,17 +17,25 @@ #include #include #include +#include +#include #include "xmalloc.h" #include "match.h" #include "log.h" #include "canohost.h" +#include "buffer.h" #include "channels.h" #include "auth-options.h" #include "servconf.h" #include "misc.h" -#include "monitor_wrap.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif +#include "monitor_wrap.h" /* Flags set authorized_keys flags */ int no_port_forwarding_flag = 0; diff --git a/auth-options.h b/auth-options.h index cd2b030cd..853f8b517 100644 --- a/auth-options.h +++ b/auth-options.h @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.h,v 1.15 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-options.h,v 1.16 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -15,10 +15,6 @@ #ifndef AUTH_OPTIONS_H #define AUTH_OPTIONS_H -#include - -#include - /* Linked list of custom environment strings */ struct envstring { struct envstring *next; diff --git a/auth-passwd.c b/auth-passwd.c index f8df17e6a..be6283796 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-passwd.c,v 1.39 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth-passwd.c,v 1.40 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -43,11 +43,14 @@ #include #include #include +#include #include "packet.h" #include "buffer.h" #include "log.h" #include "servconf.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "auth-options.h" diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c index 8fa21e12c..eca750275 100644 --- a/auth-rh-rsa.c +++ b/auth-rh-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rh-rsa.c,v 1.41 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-rh-rsa.c,v 1.42 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,17 +18,21 @@ #include #include +#include #include "packet.h" #include "uidswap.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "key.h" #include "hostfile.h" #include "pathnames.h" #include "auth.h" #include "canohost.h" - +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" /* import */ diff --git a/auth-rhosts.c b/auth-rhosts.c index 8dc4ede05..cd0a7967a 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rhosts.c,v 1.40 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth-rhosts.c,v 1.41 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -25,13 +25,17 @@ #include #include #include +#include #include "packet.h" +#include "buffer.h" #include "uidswap.h" #include "pathnames.h" #include "log.h" #include "servconf.h" #include "canohost.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" /* import */ diff --git a/auth-rsa.c b/auth-rsa.c index f3e27e9fa..1c66b86a4 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rsa.c,v 1.70 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth-rsa.c,v 1.71 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -26,18 +26,23 @@ #include #include +#include "xmalloc.h" #include "rsa.h" #include "packet.h" -#include "xmalloc.h" #include "ssh1.h" #include "uidswap.h" #include "match.h" +#include "buffer.h" #include "auth-options.h" #include "pathnames.h" #include "log.h" #include "servconf.h" -#include "auth.h" +#include "key.h" #include "hostfile.h" +#include "auth.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "ssh.h" #include "misc.h" diff --git a/auth-skey.c b/auth-skey.c index 9c981ec83..d49e59b75 100644 --- a/auth-skey.c +++ b/auth-skey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-skey.c,v 1.23 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth-skey.c,v 1.24 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -22,10 +22,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" #ifdef SKEY +#include + #include #include "xmalloc.h" diff --git a/auth.c b/auth.c index 88a8e22ef..fba32eb96 100644 --- a/auth.c +++ b/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.74 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth.c,v 1.75 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -51,17 +51,21 @@ #include "match.h" #include "groupaccess.h" #include "log.h" +#include "buffer.h" #include "servconf.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "auth-options.h" #include "canohost.h" -#include "buffer.h" -#include "bufaux.h" #include "uidswap.h" #include "misc.h" #include "bufaux.h" #include "packet.h" #include "loginrec.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" /* import */ diff --git a/auth.h b/auth.h index 2c7499573..26158b9dd 100644 --- a/auth.h +++ b/auth.h @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.h,v 1.56 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth.h,v 1.57 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -28,14 +28,8 @@ #ifndef AUTH_H #define AUTH_H -#include - -#include -#include #include -#include -#include "buffer.h" #include #ifdef HAVE_LOGIN_CAP @@ -48,9 +42,6 @@ #include #endif -#include "key.h" -#include "hostfile.h" - typedef struct Authctxt Authctxt; typedef struct Authmethod Authmethod; typedef struct KbdintDevice KbdintDevice; diff --git a/auth1.c b/auth1.c index 2c5585768..34dcf6266 100644 --- a/auth1.c +++ b/auth1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth1.c,v 1.69 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth1.c,v 1.70 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -17,6 +17,7 @@ #include #include #include +#include #include "xmalloc.h" #include "rsa.h" @@ -26,10 +27,15 @@ #include "log.h" #include "servconf.h" #include "compat.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "channels.h" #include "session.h" #include "uidswap.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "buffer.h" diff --git a/auth2-chall.c b/auth2-chall.c index 89b261e61..8358140b9 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.29 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.30 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -23,16 +23,21 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" +#include + #include #include +#include "xmalloc.h" #include "ssh2.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "buffer.h" #include "packet.h" -#include "xmalloc.h" #include "dispatch.h" #include "log.h" #include "servconf.h" diff --git a/auth2-gss.c b/auth2-gss.c index 03210673b..67144e495 100644 --- a/auth2-gss.c +++ b/auth2-gss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-gss.c,v 1.14 2006/03/25 22:22:42 djm Exp $ */ +/* $OpenBSD: auth2-gss.c,v 1.15 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -26,18 +26,20 @@ #include "includes.h" -#ifdef GSSAPI +#include +#include "xmalloc.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "ssh2.h" -#include "xmalloc.h" #include "log.h" #include "dispatch.h" +#include "buffer.h" #include "servconf.h" #include "packet.h" -#include "monitor_wrap.h" - #include "ssh-gss.h" +#include "monitor_wrap.h" extern ServerOptions options; @@ -291,5 +293,3 @@ Authmethod method_gssapi = { userauth_gssapi, &options.gss_authentication }; - -#endif /* GSSAPI */ diff --git a/auth2-hostbased.c b/auth2-hostbased.c index 5cb617e1c..663dec5d9 100644 --- a/auth2-hostbased.c +++ b/auth2-hostbased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-hostbased.c,v 1.10 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth2-hostbased.c,v 1.11 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -29,18 +29,22 @@ #include #include +#include -#include "ssh2.h" #include "xmalloc.h" +#include "ssh2.h" #include "packet.h" #include "buffer.h" #include "log.h" #include "servconf.h" #include "compat.h" -#include "bufaux.h" -#include "auth.h" #include "key.h" +#include "hostfile.h" +#include "auth.h" #include "canohost.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "pathnames.h" diff --git a/auth2-kbdint.c b/auth2-kbdint.c index 796714eec..901596484 100644 --- a/auth2-kbdint.c +++ b/auth2-kbdint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-kbdint.c,v 1.4 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth2-kbdint.c,v 1.5 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -25,11 +25,16 @@ #include "includes.h" +#include + +#include "xmalloc.h" #include "packet.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "log.h" +#include "buffer.h" #include "servconf.h" -#include "xmalloc.h" /* import */ extern ServerOptions options; diff --git a/auth2-none.c b/auth2-none.c index d6738175f..1e4afa0e7 100644 --- a/auth2-none.c +++ b/auth2-none.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-none.c,v 1.11 2006/07/09 15:15:10 stevesk Exp $ */ +/* $OpenBSD: auth2-none.c,v 1.12 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,14 +30,20 @@ #include -#include "auth.h" #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" +#include "auth.h" #include "packet.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "atomicio.h" #include "compat.h" #include "ssh2.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" /* import */ diff --git a/auth2-passwd.c b/auth2-passwd.c index a1b65da50..421c5c25d 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-passwd.c,v 1.8 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth2-passwd.c,v 1.9 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -25,12 +25,21 @@ #include "includes.h" +#include + #include +#include #include "xmalloc.h" #include "packet.h" #include "log.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" +#include "buffer.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "servconf.h" diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 41763f763..9863cd9e6 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-pubkey.c,v 1.14 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth2-pubkey.c,v 1.15 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,22 +30,26 @@ #include #include +#include +#include "xmalloc.h" #include "ssh.h" #include "ssh2.h" -#include "xmalloc.h" #include "packet.h" #include "buffer.h" #include "log.h" #include "servconf.h" #include "compat.h" -#include "bufaux.h" -#include "auth.h" #include "key.h" +#include "hostfile.h" +#include "auth.h" #include "pathnames.h" #include "uidswap.h" #include "auth-options.h" #include "canohost.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "misc.h" diff --git a/auth2.c b/auth2.c index 83d5224c9..2d880b57c 100644 --- a/auth2.c +++ b/auth2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2.c,v 1.112 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth2.c,v 1.113 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -28,23 +28,27 @@ #include #include +#include #include -#include "ssh2.h" #include "xmalloc.h" +#include "ssh2.h" #include "packet.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "compat.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "dispatch.h" #include "pathnames.h" -#include "monitor_wrap.h" #include "buffer.h" #ifdef GSSAPI #include "ssh-gss.h" #endif +#include "monitor_wrap.h" /* import */ extern ServerOptions options; diff --git a/authfd.c b/authfd.c index f8ee8051d..5c910df13 100644 --- a/authfd.c +++ b/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.79 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: authfd.c,v 1.80 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -43,16 +43,17 @@ #include +#include #include #include +#include #include #include +#include "xmalloc.h" #include "ssh.h" #include "rsa.h" #include "buffer.h" -#include "bufaux.h" -#include "xmalloc.h" #include "key.h" #include "authfd.h" #include "cipher.h" diff --git a/authfd.h b/authfd.h index 8ad8f2e71..3da256112 100644 --- a/authfd.h +++ b/authfd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.h,v 1.35 2006/03/25 22:22:42 djm Exp $ */ +/* $OpenBSD: authfd.h,v 1.36 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -16,8 +16,6 @@ #ifndef AUTHFD_H #define AUTHFD_H -#include "buffer.h" - /* Messages for the authentication agent connection. */ #define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1 #define SSH_AGENT_RSA_IDENTITIES_ANSWER 2 diff --git a/authfile.c b/authfile.c index 400e60b39..675085646 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.75 2006/08/01 23:36:11 stevesk Exp $ */ +/* $OpenBSD: authfile.c,v 1.76 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -53,10 +54,9 @@ #include #include -#include "cipher.h" #include "xmalloc.h" +#include "cipher.h" #include "buffer.h" -#include "bufaux.h" #include "key.h" #include "ssh.h" #include "log.h" diff --git a/bufaux.c b/bufaux.c index a384cc685..cbdc22c64 100644 --- a/bufaux.c +++ b/bufaux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bufaux.c,v 1.43 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: bufaux.c,v 1.44 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -39,12 +39,15 @@ #include "includes.h" +#include + #include #include +#include -#include "bufaux.h" #include "xmalloc.h" +#include "buffer.h" #include "log.h" #include "misc.h" diff --git a/bufbn.c b/bufbn.c index aa42ea62b..6cf65d372 100644 --- a/bufbn.c +++ b/bufbn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bufbn.c,v 1.2 2006/07/22 20:48:22 stevesk Exp $*/ +/* $OpenBSD: bufbn.c,v 1.3 2006/08/03 03:34:41 deraadt Exp $*/ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -39,12 +39,15 @@ #include "includes.h" +#include + #include #include +#include -#include "bufaux.h" #include "xmalloc.h" +#include "buffer.h" #include "log.h" #include "misc.h" diff --git a/buffer.c b/buffer.c index 25868b94d..e02e1e35c 100644 --- a/buffer.c +++ b/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.30 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: buffer.c,v 1.31 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include "xmalloc.h" #include "buffer.h" diff --git a/buffer.h b/buffer.h index 43414ae99..ecc4aea83 100644 --- a/buffer.h +++ b/buffer.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.h,v 1.15 2006/04/16 00:48:52 djm Exp $ */ +/* $OpenBSD: buffer.h,v 1.16 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -46,4 +46,40 @@ int buffer_get_ret(Buffer *, void *, u_int); int buffer_consume_ret(Buffer *, u_int); int buffer_consume_end_ret(Buffer *, u_int); +#include + +void buffer_put_bignum(Buffer *, const BIGNUM *); +void buffer_put_bignum2(Buffer *, const BIGNUM *); +void buffer_get_bignum(Buffer *, BIGNUM *); +void buffer_get_bignum2(Buffer *, BIGNUM *); + +u_short buffer_get_short(Buffer *); +void buffer_put_short(Buffer *, u_short); + +u_int buffer_get_int(Buffer *); +void buffer_put_int(Buffer *, u_int); + +u_int64_t buffer_get_int64(Buffer *); +void buffer_put_int64(Buffer *, u_int64_t); + +int buffer_get_char(Buffer *); +void buffer_put_char(Buffer *, int); + +void *buffer_get_string(Buffer *, u_int *); +void buffer_put_string(Buffer *, const void *, u_int); +void buffer_put_cstring(Buffer *, const char *); + +#define buffer_skip_string(b) \ + do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while (0) + +int buffer_put_bignum_ret(Buffer *, const BIGNUM *); +int buffer_get_bignum_ret(Buffer *, BIGNUM *); +int buffer_put_bignum2_ret(Buffer *, const BIGNUM *); +int buffer_get_bignum2_ret(Buffer *, BIGNUM *); +int buffer_get_short_ret(u_short *, Buffer *); +int buffer_get_int_ret(u_int *, Buffer *); +int buffer_get_int64_ret(u_int64_t *, Buffer *); +void *buffer_get_string_ret(Buffer *, u_int *); +int buffer_get_char_ret(char *, Buffer *); + #endif /* BUFFER_H */ diff --git a/canohost.c b/canohost.c index c236617d7..dd3972e8d 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.60 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.61 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -25,9 +25,10 @@ #include #include #include +#include -#include "packet.h" #include "xmalloc.h" +#include "packet.h" #include "log.h" #include "canohost.h" diff --git a/channels.c b/channels.c index fb4d287d6..dfa1e591b 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.264 2006/08/01 23:36:11 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.265 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,8 +41,8 @@ #include "includes.h" -#include #include +#include #include #include #ifdef HAVE_SYS_TIME_H @@ -59,21 +59,22 @@ #include #include #include +#include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" #include "packet.h" -#include "xmalloc.h" #include "log.h" #include "misc.h" +#include "buffer.h" #include "channels.h" #include "compat.h" #include "canohost.h" #include "key.h" #include "authfd.h" #include "pathnames.h" -#include "bufaux.h" /* -- channel core */ diff --git a/channels.h b/channels.h index ed719f724..2674f096e 100644 --- a/channels.h +++ b/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.87 2006/07/21 12:43:36 dtucker Exp $ */ +/* $OpenBSD: channels.h,v 1.88 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -38,8 +38,6 @@ #ifndef CHANNEL_H #define CHANNEL_H -#include "buffer.h" - /* Definitions for channel types. */ #define SSH_CHANNEL_X11_LISTENER 1 /* Listening for inet X11 conn. */ #define SSH_CHANNEL_PORT_LISTENER 2 /* Listening on a port. */ diff --git a/cipher-3des1.c b/cipher-3des1.c index 2e8735d54..61798bfde 100644 --- a/cipher-3des1.c +++ b/cipher-3des1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-3des1.c,v 1.5 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: cipher-3des1.c,v 1.6 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include #include diff --git a/cipher-bf1.c b/cipher-bf1.c index 95b4e5e93..eb4c04777 100644 --- a/cipher-bf1.c +++ b/cipher-bf1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-bf1.c,v 1.4 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: cipher-bf1.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include #include diff --git a/cipher-ctr.c b/cipher-ctr.c index 105d0bd5b..9733b7d56 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-ctr.c,v 1.9 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: cipher-ctr.c,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Markus Friedl * @@ -16,12 +16,14 @@ */ #include "includes.h" +#include + #include #include -#include "log.h" #include "xmalloc.h" +#include "log.h" /* compatibility with old or broken OpenSSL versions */ #include "openbsd-compat/openssl-compat.h" diff --git a/cipher.c b/cipher.c index 20fa59c6a..b264063c4 100644 --- a/cipher.c +++ b/cipher.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher.c,v 1.80 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: cipher.c,v 1.81 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,9 +37,12 @@ #include "includes.h" +#include + #include #include +#include #include "xmalloc.h" #include "log.h" diff --git a/cleanup.c b/cleanup.c index 0d9f2a6d2..c41ef1c6a 100644 --- a/cleanup.c +++ b/cleanup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cleanup.c,v 1.4 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: cleanup.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Markus Friedl * @@ -17,7 +17,10 @@ #include "config.h" +#include + #include +#include #include "log.h" diff --git a/clientloop.c b/clientloop.c index f9ffa2bb7..132d75a44 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.174 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: clientloop.c,v 1.175 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -82,20 +82,20 @@ #include #include #include +#include #include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" -#include "xmalloc.h" #include "packet.h" #include "buffer.h" #include "compat.h" #include "channels.h" #include "dispatch.h" -#include "buffer.h" -#include "bufaux.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "readconf.h" diff --git a/compat.c b/compat.c index e1a8b2bfd..da67f9410 100644 --- a/compat.c +++ b/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.75 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: compat.c,v 1.76 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -25,12 +25,15 @@ #include "includes.h" +#include + #include #include +#include +#include "xmalloc.h" #include "buffer.h" #include "packet.h" -#include "xmalloc.h" #include "compat.h" #include "log.h" #include "match.h" diff --git a/compress.c b/compress.c index 8aba84efa..f5d30b8a6 100644 --- a/compress.c +++ b/compress.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compress.c,v 1.23 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: compress.c,v 1.24 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,6 +14,10 @@ #include "includes.h" +#include + +#include + #include "log.h" #include "buffer.h" #include "zlib.h" diff --git a/deattack.c b/deattack.c index 57a747da5..b4fed7f85 100644 --- a/deattack.c +++ b/deattack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: deattack.c,v 1.28 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: deattack.c,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */ /* * Cryptographic attack detector for ssh - source code * @@ -20,12 +20,16 @@ #include "includes.h" +#include + #include +#include +#include +#include "xmalloc.h" #include "deattack.h" #include "log.h" #include "crc32.h" -#include "xmalloc.h" #include "misc.h" /* SSH Constants */ diff --git a/dh.c b/dh.c index 4ca949138..925eedddf 100644 --- a/dh.c +++ b/dh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.41 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: dh.c,v 1.42 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * diff --git a/dispatch.c b/dispatch.c index c1d98a78e..d6b63be4b 100644 --- a/dispatch.c +++ b/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.20 2006/07/23 01:11:05 stevesk Exp $ */ +/* $OpenBSD: dispatch.c,v 1.21 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -22,9 +22,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" +#include + #include +#include #include "ssh1.h" #include "ssh2.h" diff --git a/dns.c b/dns.c index 008fc596f..229210835 100644 --- a/dns.c +++ b/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.22 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: dns.c,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. diff --git a/dns.h b/dns.h index 8f9601824..b2633a1fe 100644 --- a/dns.h +++ b/dns.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.h,v 1.9 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: dns.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -25,13 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "includes.h" - -#include -#include - -#include - #ifndef DNS_H #define DNS_H diff --git a/fatal.c b/fatal.c index 1f2cd0bc8..5e5aa3fe1 100644 --- a/fatal.c +++ b/fatal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fatal.c,v 1.6 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: fatal.c,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include #include "log.h" diff --git a/groupaccess.c b/groupaccess.c index 3431691b9..e73f62b22 100644 --- a/groupaccess.c +++ b/groupaccess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: groupaccess.c,v 1.11 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: groupaccess.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Kevin Steves. All rights reserved. * @@ -30,9 +30,10 @@ #include #include +#include -#include "groupaccess.h" #include "xmalloc.h" +#include "groupaccess.h" #include "match.h" #include "log.h" diff --git a/groupaccess.h b/groupaccess.h index b0baccfbf..04b449894 100644 --- a/groupaccess.h +++ b/groupaccess.h @@ -1,4 +1,4 @@ -/* $OpenBSD: groupaccess.h,v 1.6 2006/07/02 22:45:59 stevesk Exp $ */ +/* $OpenBSD: groupaccess.h,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Kevin Steves. All rights reserved. @@ -27,8 +27,6 @@ #ifndef GROUPACCESS_H #define GROUPACCESS_H -#include - int ga_init(const char *, gid_t); int ga_match(char * const *, int); void ga_free(void); diff --git a/gss-genr.c b/gss-genr.c index 93dbeeebb..da39479e1 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-genr.c,v 1.12 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: gss-genr.c,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -28,13 +28,15 @@ #ifdef GSSAPI +#include #include +#include #include #include #include "xmalloc.h" -#include "bufaux.h" +#include "buffer.h" #include "log.h" #include "ssh2.h" diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c index 7b78cfe0a..006bedad9 100644 --- a/gss-serv-krb5.c +++ b/gss-serv-krb5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-serv-krb5.c,v 1.6 2006/07/02 18:36:47 stevesk Exp $ */ +/* $OpenBSD: gss-serv-krb5.c,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -29,13 +29,18 @@ #ifdef GSSAPI #ifdef KRB5 +#include + #include -#include "auth.h" #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" +#include "auth.h" #include "log.h" #include "servconf.h" +#include "buffer.h" #include "ssh-gss.h" extern ServerOptions options; diff --git a/gss-serv.c b/gss-serv.c index b5c5538fe..296f63a89 100644 --- a/gss-serv.c +++ b/gss-serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-serv.c,v 1.19 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: gss-serv.c,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -28,15 +28,19 @@ #ifdef GSSAPI +#include + #include #include -#include "bufaux.h" +#include "xmalloc.h" +#include "buffer.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "log.h" #include "channels.h" #include "session.h" -#include "xmalloc.h" #include "misc.h" #include "ssh-gss.h" diff --git a/hostfile.c b/hostfile.c index 7ac69e776..08ba44264 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.44 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: hostfile.c,v 1.45 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -50,11 +50,11 @@ #include #include +#include "xmalloc.h" #include "match.h" #include "key.h" #include "hostfile.h" #include "log.h" -#include "xmalloc.h" static int extract_salt(const char *s, u_int l, char *salt, size_t salt_len) diff --git a/includes.h b/includes.h index 9b6a63fb3..8e600567d 100644 --- a/includes.h +++ b/includes.h @@ -25,9 +25,6 @@ #ifdef HAVE_LIMITS_H # include /* For PATH_MAX */ #endif -#ifdef HAVE_GETOPT_H -# include -#endif #ifdef HAVE_BSTRING_H # include #endif diff --git a/kex.c b/kex.c index 3525307c3..0c36519a1 100644 --- a/kex.c +++ b/kex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.75 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: kex.c,v 1.76 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -27,21 +27,21 @@ #include -#include - +#include #include #include #include -#include "ssh2.h" +#include + #include "xmalloc.h" +#include "ssh2.h" #include "buffer.h" -#include "bufaux.h" #include "packet.h" #include "compat.h" #include "cipher.h" -#include "kex.h" #include "key.h" +#include "kex.h" #include "log.h" #include "mac.h" #include "match.h" diff --git a/kex.h b/kex.h index a48c5c885..b1b20f500 100644 --- a/kex.h +++ b/kex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.h,v 1.43 2006/07/23 01:11:05 stevesk Exp $ */ +/* $OpenBSD: kex.h,v 1.44 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -29,12 +29,6 @@ #include #include -#include - -#include "buffer.h" -#include "cipher.h" -#include "key.h" - #define KEX_DH1 "diffie-hellman-group1-sha1" #define KEX_DH14 "diffie-hellman-group14-sha1" #define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1" diff --git a/kexdh.c b/kexdh.c index 2d13127b8..56e22f5bc 100644 --- a/kexdh.c +++ b/kexdh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdh.c,v 1.22 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kexdh.c,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,11 +25,16 @@ #include "includes.h" +#include + +#include + #include #include "buffer.h" -#include "bufaux.h" #include "ssh2.h" +#include "key.h" +#include "cipher.h" #include "kex.h" void diff --git a/kexdhc.c b/kexdhc.c index 9d123e748..bf875ae07 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhc.c,v 1.8 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: kexdhc.c,v 1.9 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,11 +25,16 @@ #include "includes.h" +#include + #include #include +#include #include "xmalloc.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "packet.h" diff --git a/kexdhs.c b/kexdhs.c index c64cd77cb..7d2c21eed 100644 --- a/kexdhs.c +++ b/kexdhs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhs.c,v 1.6 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: kexdhs.c,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,15 +25,22 @@ #include "includes.h" +#include #include +#include #include "xmalloc.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "packet.h" #include "dh.h" #include "ssh2.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" void diff --git a/kexgex.c b/kexgex.c index 5ab6745a3..b60ab5c53 100644 --- a/kexgex.c +++ b/kexgex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgex.c,v 1.26 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kexgex.c,v 1.27 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,10 +26,14 @@ #include "includes.h" +#include + #include +#include #include "buffer.h" -#include "bufaux.h" +#include "key.h" +#include "cipher.h" #include "kex.h" #include "ssh2.h" diff --git a/kexgexc.c b/kexgexc.c index 9c618ec6c..fc48880d4 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexc.c,v 1.8 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: kexgexc.c,v 1.9 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,11 +26,16 @@ #include "includes.h" +#include + #include #include +#include #include "xmalloc.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "packet.h" diff --git a/kexgexs.c b/kexgexs.c index 0b01ed800..7599f2af4 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexs.c,v 1.7 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: kexgexs.c,v 1.8 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -30,15 +30,21 @@ #include #include +#include #include "xmalloc.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "packet.h" #include "dh.h" #include "ssh2.h" #include "compat.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" void diff --git a/key.c b/key.c index 745c474f9..40aab20ea 100644 --- a/key.c +++ b/key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.66 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: key.c,v 1.67 2006/08/03 03:34:42 deraadt Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -32,8 +32,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" +#include + #include #include @@ -44,7 +47,6 @@ #include "rsa.h" #include "uuencode.h" #include "buffer.h" -#include "bufaux.h" #include "log.h" Key * diff --git a/key.h b/key.h index 57af279b8..6873dd793 100644 --- a/key.h +++ b/key.h @@ -1,4 +1,4 @@ -/* $OpenBSD: key.h,v 1.25 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: key.h,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -29,8 +29,6 @@ #include #include -#include - typedef struct Key Key; enum types { KEY_RSA1, diff --git a/log.c b/log.c index 871bc2c42..6eac73743 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.37 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: log.c,v 1.38 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -36,6 +36,8 @@ #include "includes.h" +#include + #include #include #include @@ -46,8 +48,8 @@ # include #endif -#include "log.h" #include "xmalloc.h" +#include "log.h" static LogLevel log_level = SYSLOG_LEVEL_INFO; static int log_on_stderr = 1; diff --git a/log.h b/log.h index 15ebc93b5..a8e788a2d 100644 --- a/log.h +++ b/log.h @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.13 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: log.h,v 1.14 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -15,12 +15,6 @@ #ifndef SSH_LOG_H #define SSH_LOG_H -#include "includes.h" - -#include - -#include /* Needed for LOG_AUTHPRIV (if present) */ - /* Supported syslog facilities and levels. */ typedef enum { SYSLOG_FACILITY_DAEMON, diff --git a/loginrec.c b/loginrec.c index 955d42e8f..7850312b6 100644 --- a/loginrec.c +++ b/loginrec.c @@ -159,8 +159,10 @@ #include #include -#include "ssh.h" #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" +#include "ssh.h" #include "loginrec.h" #include "log.h" #include "atomicio.h" diff --git a/loginrec.h b/loginrec.h index 4fe24ac2a..859e1a630 100644 --- a/loginrec.h +++ b/loginrec.h @@ -31,10 +31,6 @@ #include "includes.h" -#include -#include -#include - /** ** you should use the login_* calls to work around platform dependencies **/ diff --git a/mac.c b/mac.c index a59e7edf1..edf9b69bd 100644 --- a/mac.c +++ b/mac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mac.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: mac.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,13 +25,18 @@ #include "includes.h" +#include + #include #include +#include #include "xmalloc.h" #include "log.h" #include "cipher.h" +#include "buffer.h" +#include "key.h" #include "kex.h" #include "mac.h" #include "misc.h" diff --git a/match.c b/match.c index 8f12ef539..e3c993073 100644 --- a/match.c +++ b/match.c @@ -1,4 +1,4 @@ -/* $OpenBSD: match.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: match.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,11 +37,13 @@ #include "includes.h" +#include + #include #include -#include "match.h" #include "xmalloc.h" +#include "match.h" /* * Returns true if the given string matches the pattern (which may contain ? diff --git a/md-sha256.c b/md-sha256.c index 063a1014f..8c1b3b92d 100644 --- a/md-sha256.c +++ b/md-sha256.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md-sha256.c,v 1.4 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: md-sha256.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2005 Damien Miller * @@ -18,6 +18,8 @@ /* EVP wrapper for SHA256 */ #include "includes.h" + +#include #include #if !defined(HAVE_EVP_SHA256) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) diff --git a/misc.c b/misc.c index ef2014f61..78bca2fae 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.63 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.64 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -26,8 +26,8 @@ #include "includes.h" -#include #include +#include #include #include @@ -50,9 +50,9 @@ #include #endif +#include "xmalloc.h" #include "misc.h" #include "log.h" -#include "xmalloc.h" #include "ssh.h" /* remove newline at end of string */ diff --git a/misc.h b/misc.h index 1dded7215..072470bad 100644 --- a/misc.h +++ b/misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.34 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: misc.h,v 1.35 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -15,11 +15,6 @@ #ifndef _MISC_H #define _MISC_H -#include - -#include -#include - /* misc.c */ char *chop(char *); diff --git a/moduli.c b/moduli.c index a164b4f5d..e18929bad 100644 --- a/moduli.c +++ b/moduli.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.17 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: moduli.c,v 1.18 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -46,6 +46,7 @@ #include #include #include +#include #include #include "xmalloc.h" diff --git a/monitor.c b/monitor.c index 325179854..595aae1a8 100644 --- a/monitor.c +++ b/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.84 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: monitor.c,v 1.85 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -30,6 +30,7 @@ #include #include #include +#include "openbsd-compat/sys-tree.h" #include #include @@ -48,8 +49,13 @@ #include +#include "xmalloc.h" #include "ssh.h" +#include "key.h" +#include "buffer.h" +#include "hostfile.h" #include "auth.h" +#include "cipher.h" #include "kex.h" #include "dh.h" #ifdef TARGET_OS_MAC /* XXX Broken krb5 headers on Mac */ @@ -70,17 +76,16 @@ #include "servconf.h" #include "monitor.h" #include "monitor_mm.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "monitor_fdpass.h" -#include "xmalloc.h" #include "misc.h" -#include "buffer.h" -#include "bufaux.h" #include "compat.h" #include "ssh2.h" #ifdef GSSAPI -#include "ssh-gss.h" static Gssctxt *gsscontext = NULL; #endif diff --git a/monitor_fdpass.c b/monitor_fdpass.c index d3e65cbaa..c5fc4c397 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_fdpass.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: monitor_fdpass.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2001 Niels Provos * All rights reserved. @@ -32,6 +32,7 @@ #include #include +#include #include "log.h" #include "monitor_fdpass.h" diff --git a/monitor_mm.c b/monitor_mm.c index 89a8c9b49..dab747532 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_mm.c,v 1.14 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: monitor_mm.c,v 1.15 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. @@ -26,16 +26,19 @@ #include "includes.h" +#include #ifdef HAVE_SYS_MMAN_H #include #endif #include +#include "openbsd-compat/sys-tree.h" #include +#include #include -#include "ssh.h" #include "xmalloc.h" +#include "ssh.h" #include "log.h" #include "monitor_mm.h" diff --git a/monitor_mm.h b/monitor_mm.h index 3499c7521..36a07a06d 100644 --- a/monitor_mm.h +++ b/monitor_mm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_mm.h,v 1.3 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: monitor_mm.h,v 1.4 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos @@ -27,7 +27,6 @@ #ifndef _MM_H_ #define _MM_H_ -#include "openbsd-compat/sys-tree.h" struct mm_share { RB_ENTRY(mm_share) next; diff --git a/monitor_wrap.c b/monitor_wrap.c index 27e2fc7c3..52ea17592 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.49 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.50 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -29,21 +29,25 @@ #include -#include -#include - #include #include +#include #include #include +#include +#include + +#include "xmalloc.h" #include "ssh.h" #include "dh.h" +#include "buffer.h" +#include "key.h" +#include "cipher.h" #include "kex.h" +#include "hostfile.h" #include "auth.h" #include "auth-options.h" -#include "buffer.h" -#include "bufaux.h" #include "packet.h" #include "mac.h" #include "log.h" @@ -55,21 +59,18 @@ #include "zlib.h" #endif #include "monitor.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" -#include "xmalloc.h" #include "atomicio.h" #include "monitor_fdpass.h" #include "misc.h" #include "servconf.h" -#include "auth.h" #include "channels.h" #include "session.h" -#ifdef GSSAPI -#include "ssh-gss.h" -#endif - /* Imports */ extern int compat20; extern Newkeys *newkeys[]; diff --git a/monitor_wrap.h b/monitor_wrap.h index fd5cccd08..329189c2a 100644 --- a/monitor_wrap.h +++ b/monitor_wrap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.h,v 1.19 2006/07/14 01:15:28 stevesk Exp $ */ +/* $OpenBSD: monitor_wrap.h,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos @@ -28,13 +28,6 @@ #ifndef _MM_WRAP_H_ #define _MM_WRAP_H_ -#include - -#include - -#include "key.h" -#include "buffer.h" - extern int use_privsep; #define PRIVSEP(x) (use_privsep ? mm_##x : x) @@ -61,7 +54,6 @@ int mm_auth_rsa_verify_response(Key *, BIGNUM *, u_char *); BIGNUM *mm_auth_rsa_generate_challenge(Key *); #ifdef GSSAPI -#include "ssh-gss.h" OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID); OM_uint32 mm_ssh_gssapi_accept_ctx(Gssctxt *, gss_buffer_desc *, gss_buffer_desc *, OM_uint32 *); diff --git a/msg.c b/msg.c index 322472668..cd5f98c4f 100644 --- a/msg.c +++ b/msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.c,v 1.14 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: msg.c,v 1.15 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -22,13 +22,17 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" #include +#include #include +#include #include #include +#include #include "buffer.h" #include "log.h" diff --git a/nchan.c b/nchan.c index 78908c3c6..ad461f4af 100644 --- a/nchan.c +++ b/nchan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nchan.c,v 1.56 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: nchan.c,v 1.57 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include "ssh1.h" #include "ssh2.h" diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index 2d56e7e4a..a7ced57e9 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c @@ -25,11 +25,14 @@ * */ #include "includes.h" + +#include "xmalloc.h" +#include "buffer.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "ssh.h" #include "log.h" -#include "xmalloc.h" -#include "buffer.h" #ifdef _AIX diff --git a/openbsd-compat/port-tun.h b/openbsd-compat/port-tun.h index 86d9272b4..9f7a98614 100644 --- a/openbsd-compat/port-tun.h +++ b/openbsd-compat/port-tun.h @@ -17,8 +17,6 @@ #ifndef _PORT_TUN_H #define _PORT_TUN_H -#include "channels.h" - #if defined(SSH_TUN_LINUX) || defined(SSH_TUN_FREEBSD) # define CUSTOM_SYS_TUN_OPEN int sys_tun_open(int, int); diff --git a/packet.c b/packet.c index acf72f77e..f2e03f800 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.141 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.142 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -57,22 +57,20 @@ #include #include #include +#include #include "xmalloc.h" #include "buffer.h" #include "packet.h" -#include "bufaux.h" #include "crc32.h" - #include "compress.h" #include "deattack.h" #include "channels.h" - #include "compat.h" #include "ssh1.h" #include "ssh2.h" - #include "cipher.h" +#include "key.h" #include "kex.h" #include "mac.h" #include "log.h" diff --git a/progressmeter.c b/progressmeter.c index e8534fa2f..0f95222d2 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.36 2006/08/01 23:36:12 stevesk Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.37 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/readconf.c b/readconf.c index 9975c9d32..c57ea0c82 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.158 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: readconf.c,v 1.159 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,19 +23,22 @@ #include #include #include +#include #include #include #include -#include "ssh.h" #include "xmalloc.h" +#include "ssh.h" #include "compat.h" #include "cipher.h" #include "pathnames.h" #include "log.h" +#include "key.h" #include "readconf.h" #include "match.h" #include "misc.h" +#include "buffer.h" #include "kex.h" #include "mac.h" diff --git a/readconf.h b/readconf.h index e99b1ff25..d484f258e 100644 --- a/readconf.h +++ b/readconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.h,v 1.70 2006/07/11 18:50:48 markus Exp $ */ +/* $OpenBSD: readconf.h,v 1.71 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -16,8 +16,6 @@ #ifndef READCONF_H #define READCONF_H -#include "key.h" - /* Data structure for representing a forwarding request. */ typedef struct { diff --git a/readpass.c b/readpass.c index 8af5d444d..bd144c2e3 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.46 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: readpass.c,v 1.47 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/rsa.c b/rsa.c index c656291ed..875b486c4 100644 --- a/rsa.c +++ b/rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.c,v 1.27 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: rsa.c,v 1.28 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -62,11 +62,13 @@ #include "includes.h" +#include + #include +#include "xmalloc.h" #include "rsa.h" #include "log.h" -#include "xmalloc.h" void rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *key) diff --git a/scard.c b/scard.c index e22da596f..a2d28cba1 100644 --- a/scard.c +++ b/scard.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scard.c,v 1.34 2006/08/01 23:36:12 stevesk Exp $ */ +/* $OpenBSD: scard.c,v 1.35 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -26,14 +26,16 @@ #include "includes.h" #if defined(SMARTCARD) && defined(USE_SECTOK) -#include +#include #include #include +#include + +#include "xmalloc.h" #include "key.h" #include "log.h" -#include "xmalloc.h" #include "misc.h" #include "scard.h" diff --git a/scard.h b/scard.h index 146182261..82efe4839 100644 --- a/scard.h +++ b/scard.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scard.h,v 1.13 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: scard.h,v 1.14 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -27,8 +27,6 @@ #ifndef SCARD_H #define SCARD_H -#include "key.h" - #define SCARD_ERROR_FAIL -1 #define SCARD_ERROR_NOCARD -2 #define SCARD_ERROR_APPLET -3 diff --git a/scp.c b/scp.c index 8d9de0135..56a3e79ff 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.154 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: scp.c,v 1.155 2006/08/03 03:34:42 deraadt Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -82,6 +82,7 @@ # include #endif #include +#include #include #include diff --git a/servconf.c b/servconf.c index b1fc45c50..5884b95be 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.163 2006/08/01 23:36:12 stevesk Exp $ */ +/* $OpenBSD: servconf.c,v 1.164 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -19,16 +19,20 @@ #include #include #include +#include #include +#include +#include "xmalloc.h" #include "ssh.h" #include "log.h" +#include "buffer.h" #include "servconf.h" -#include "xmalloc.h" #include "compat.h" #include "pathnames.h" #include "misc.h" #include "cipher.h" +#include "key.h" #include "kex.h" #include "mac.h" #include "match.h" diff --git a/servconf.h b/servconf.h index 0add6518d..2593b1cd1 100644 --- a/servconf.h +++ b/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.77 2006/07/21 12:43:36 dtucker Exp $ */ +/* $OpenBSD: servconf.h,v 1.78 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -16,8 +16,6 @@ #ifndef SERVCONF_H #define SERVCONF_H -#include "buffer.h" - #define MAX_PORTS 256 /* Max # ports. */ #define MAX_ALLOW_USERS 256 /* Max # users on allow list. */ diff --git a/serverloop.c b/serverloop.c index 77c4a5a27..6e5fdc2d8 100644 --- a/serverloop.c +++ b/serverloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.c,v 1.143 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: serverloop.c,v 1.144 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -54,6 +54,7 @@ #include #include #include +#include #include "xmalloc.h" #include "packet.h" @@ -66,13 +67,16 @@ #include "compat.h" #include "ssh1.h" #include "ssh2.h" +#include "key.h" +#include "cipher.h" +#include "kex.h" +#include "hostfile.h" #include "auth.h" #include "session.h" #include "dispatch.h" #include "auth-options.h" #include "serverloop.h" #include "misc.h" -#include "kex.h" extern ServerOptions options; diff --git a/session.c b/session.c index a6d5ad257..1d63f9f50 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.215 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.216 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -58,10 +58,10 @@ #include #include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" -#include "xmalloc.h" #include "sshpty.h" #include "packet.h" #include "buffer.h" @@ -69,7 +69,12 @@ #include "uidswap.h" #include "compat.h" #include "channels.h" -#include "bufaux.h" +#include "key.h" +#include "cipher.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif +#include "hostfile.h" #include "auth.h" #include "auth-options.h" #include "pathnames.h" @@ -86,10 +91,6 @@ #include #endif -#ifdef GSSAPI -#include "ssh-gss.h" -#endif - /* func */ Session *session_new(void); diff --git a/session.h b/session.h index c3a12821f..ee9338e4f 100644 --- a/session.h +++ b/session.h @@ -1,4 +1,4 @@ -/* $OpenBSD: session.h,v 1.28 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: session.h,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -26,10 +26,6 @@ #ifndef SESSION_H #define SESSION_H -#include - -#include - #define TTYSZ 64 typedef struct Session Session; struct Session { diff --git a/sftp-client.c b/sftp-client.c index b7b126d21..e31b2cfaf 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.73 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.74 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -24,25 +24,25 @@ #include #include +#include "openbsd-compat/sys-queue.h" #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_SYS_TIME_H # include #endif +#include #include #include #include +#include #include #include #include -#include "openbsd-compat/sys-queue.h" - -#include "buffer.h" -#include "bufaux.h" #include "xmalloc.h" +#include "buffer.h" #include "log.h" #include "atomicio.h" #include "progressmeter.h" @@ -82,7 +82,7 @@ send_msg(int fd, Buffer *m) iov[0].iov_len = sizeof(mlen); iov[1].iov_base = buffer_ptr(m); iov[1].iov_len = buffer_len(m); - + if (atomiciov(writev, fd, iov, 2) != buffer_len(m) + sizeof(mlen)) fatal("Couldn't send packet: %s", strerror(errno)); diff --git a/sftp-common.c b/sftp-common.c index 3faed373e..7ebadcc53 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.c,v 1.19 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sftp-common.c,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Damien Miller. All rights reserved. @@ -35,11 +35,11 @@ #include #include #include +#include +#include "xmalloc.h" #include "buffer.h" -#include "bufaux.h" #include "log.h" -#include "xmalloc.h" #include "sftp.h" #include "sftp-common.h" diff --git a/sftp-common.h b/sftp-common.h index 9a64dc522..9b5848462 100644 --- a/sftp-common.h +++ b/sftp-common.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.h,v 1.9 2006/07/10 16:01:57 stevesk Exp $ */ +/* $OpenBSD: sftp-common.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -25,11 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#include - -#include "buffer.h" - /* Maximum packet that we are willing to send/accept */ #define SFTP_MAX_MSG_LENGTH (256 * 1024) diff --git a/sftp-glob.c b/sftp-glob.c index f8549ea76..cdc270827 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-glob.c,v 1.21 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: sftp-glob.c,v 1.22 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -26,8 +26,8 @@ #include #include "xmalloc.h" - #include "sftp.h" +#include "buffer.h" #include "sftp-common.h" #include "sftp-client.h" diff --git a/sftp-server.c b/sftp-server.c index c0839782d..c57958b0f 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.69 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.70 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -14,6 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + #include "includes.h" #include @@ -30,13 +31,14 @@ #include #include #include +#include #include #include +#include +#include "xmalloc.h" #include "buffer.h" -#include "bufaux.h" #include "log.h" -#include "xmalloc.h" #include "misc.h" #include "uidswap.h" @@ -135,7 +137,7 @@ string_from_portable(int pflags) #define PAPPEND(str) { \ if (*ret != '\0') \ strlcat(ret, ",", sizeof(ret)); \ - strlcat(ret, str, sizeof(ret)); \ + strlcat(ret, str, sizeof(ret)); \ } if (pflags & SSH2_FXF_READ) @@ -1225,7 +1227,7 @@ main(int argc, char **argv) case 'c': /* * Ignore all arguments if we are invoked as a - * shell using "sftp-server -c command" + * shell using "sftp-server -c command" */ skipargs = 1; break; diff --git a/sftp.c b/sftp.c index 82ef58019..cf3dea048 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.90 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sftp.c,v 1.91 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -18,10 +18,10 @@ #include "includes.h" #include +#include #ifdef HAVE_SYS_STAT_H # include #endif -#include #include #include #include @@ -41,6 +41,7 @@ typedef void EditLine; #include #include #include +#include #include "xmalloc.h" #include "log.h" @@ -48,6 +49,7 @@ typedef void EditLine; #include "misc.h" #include "sftp.h" +#include "buffer.h" #include "sftp-common.h" #include "sftp-client.h" diff --git a/ssh-add.c b/ssh-add.c index a8d98fd1f..518f47066 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.88 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.89 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -50,11 +50,12 @@ #include #include +#include "xmalloc.h" #include "ssh.h" #include "rsa.h" #include "log.h" -#include "xmalloc.h" #include "key.h" +#include "buffer.h" #include "authfd.h" #include "authfile.h" #include "pathnames.h" diff --git a/ssh-agent.c b/ssh-agent.c index 54c2b9c47..e43faae42 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.150 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.151 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -64,11 +64,10 @@ #include #include +#include "xmalloc.h" #include "ssh.h" #include "rsa.h" #include "buffer.h" -#include "bufaux.h" -#include "xmalloc.h" #include "key.h" #include "authfd.h" #include "compat.h" diff --git a/ssh-dss.c b/ssh-dss.c index a8d45a2b4..448f704f6 100644 --- a/ssh-dss.c +++ b/ssh-dss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-dss.c,v 1.22 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: ssh-dss.c,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include #include @@ -32,7 +34,6 @@ #include "xmalloc.h" #include "buffer.h" -#include "bufaux.h" #include "compat.h" #include "log.h" #include "key.h" diff --git a/ssh-gss.h b/ssh-gss.h index d3fd79bf2..0837c9b76 100644 --- a/ssh-gss.h +++ b/ssh-gss.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-gss.h,v 1.6 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: ssh-gss.h,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. * @@ -28,8 +28,6 @@ #ifdef GSSAPI -#include "buffer.h" - #ifdef HAVE_GSSAPI_H #include #elif defined(HAVE_GSSAPI_GSSAPI_H) diff --git a/ssh-keygen.c b/ssh-keygen.c index d8b793e81..c607e257e 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.153 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.154 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -40,7 +40,6 @@ #include "authfile.h" #include "uuencode.h" #include "buffer.h" -#include "bufaux.h" #include "pathnames.h" #include "log.h" #include "misc.h" diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 701540841..64d4d0870 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.72 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.73 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -23,20 +23,21 @@ #include #include #include +#include #include #include #include "xmalloc.h" #include "ssh.h" #include "ssh1.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "compat.h" #include "myproposal.h" #include "packet.h" #include "dispatch.h" -#include "buffer.h" -#include "bufaux.h" #include "log.h" #include "atomicio.h" #include "misc.h" diff --git a/ssh-keysign.c b/ssh-keysign.c index 89fdbda36..1ddb2a058 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keysign.c,v 1.28 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-keysign.c,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -22,6 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" #include @@ -37,14 +38,13 @@ #include #include +#include "xmalloc.h" #include "log.h" #include "key.h" #include "ssh.h" #include "ssh2.h" #include "misc.h" -#include "xmalloc.h" #include "buffer.h" -#include "bufaux.h" #include "authfile.h" #include "msg.h" #include "canohost.h" diff --git a/ssh-rsa.c b/ssh-rsa.c index 236f77aac..28444c1f9 100644 --- a/ssh-rsa.c +++ b/ssh-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-rsa.c,v 1.38 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: ssh-rsa.c,v 1.39 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2003 Markus Friedl * @@ -14,8 +14,11 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + #include "includes.h" +#include + #include #include @@ -24,7 +27,6 @@ #include "xmalloc.h" #include "log.h" #include "buffer.h" -#include "bufaux.h" #include "key.h" #include "compat.h" #include "ssh.h" diff --git a/ssh.c b/ssh.c index 10dd8777a..07a4ca3c8 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.292 2006/08/01 23:36:12 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.293 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -69,15 +69,14 @@ #include #include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" #include "compat.h" #include "cipher.h" -#include "xmalloc.h" #include "packet.h" #include "buffer.h" -#include "bufaux.h" #include "channels.h" #include "key.h" #include "authfd.h" @@ -1256,7 +1255,7 @@ load_public_identity_files(void) cp = tilde_expand_filename(options.identity_files[i], original_real_uid); filename = percent_expand(cp, "d", pw->pw_dir, - "u", pw->pw_name, "l", thishost, "h", host, + "u", pw->pw_name, "l", thishost, "h", host, "r", options.user, (char *)NULL); xfree(cp); public = key_load_public(filename, NULL); diff --git a/ssh.h b/ssh.h index ed5fb9aaa..186cfff96 100644 --- a/ssh.h +++ b/ssh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.h,v 1.77 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: ssh.h,v 1.78 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -12,18 +12,6 @@ * called by a name other than "ssh" or "Secure Shell". */ -#ifndef SSH_H -#define SSH_H - -#include /* For struct sockaddr_in */ -#include /* For struct pw */ -#include /* For va_list */ -#include /* For LOG_AUTH and friends */ -#include /* For struct sockaddr_storage */ -#ifdef HAVE_SYS_SELECT_H -# include -#endif - /* Cipher used for encrypting authentication files. */ #define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES @@ -112,5 +100,3 @@ /* Listen backlog for sshd, ssh-agent and forwarding sockets */ #define SSH_LISTEN_BACKLOG 128 - -#endif /* SSH_H */ diff --git a/sshconnect.c b/sshconnect.c index af75bba8d..71ca4ec52 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.198 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.199 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,8 +37,10 @@ #include #include -#include "ssh.h" #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" +#include "ssh.h" #include "rsa.h" #include "buffer.h" #include "packet.h" diff --git a/sshconnect.h b/sshconnect.h index 0b3896f9d..4e66bbffc 100644 --- a/sshconnect.h +++ b/sshconnect.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.h,v 1.22 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: sshconnect.h,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -23,13 +23,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SSHCONNECT_H -#define SSHCONNECT_H - -#include -#include - -#include typedef struct Sensitive Sensitive; struct Sensitive { @@ -74,5 +67,3 @@ int ssh_local_cmd(const char *); strerror(errno)); \ errno = save_errno; \ } while (0) - -#endif diff --git a/sshconnect1.c b/sshconnect1.c index f0eee3bdf..51f1f8088 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect1.c,v 1.68 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sshconnect1.c,v 1.69 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -15,30 +15,36 @@ #include "includes.h" +#include +#include + #include #include #include #include #include +#include +#include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" -#include "xmalloc.h" #include "rsa.h" #include "buffer.h" #include "packet.h" +#include "key.h" +#include "cipher.h" #include "kex.h" #include "uidswap.h" #include "log.h" #include "readconf.h" -#include "key.h" #include "authfd.h" #include "sshconnect.h" #include "authfile.h" #include "misc.h" -#include "cipher.h" #include "canohost.h" +#include "hostfile.h" #include "auth.h" /* Session id for the current session. */ diff --git a/sshconnect2.c b/sshconnect2.c index 27e5442e9..e58d078c4 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.159 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.160 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -26,24 +26,27 @@ #include "includes.h" #include +#include #include #include #include +#include +#include #include #include #include #include "openbsd-compat/sys-queue.h" +#include "xmalloc.h" #include "ssh.h" #include "ssh2.h" -#include "xmalloc.h" #include "buffer.h" #include "packet.h" #include "compat.h" -#include "bufaux.h" #include "cipher.h" +#include "key.h" #include "kex.h" #include "myproposal.h" #include "sshconnect.h" diff --git a/sshd.c b/sshd.c index 5cefd1024..52c21e500 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.342 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.343 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,14 +45,15 @@ #include "includes.h" #include +#include +#include #ifdef HAVE_SYS_STAT_H # include #endif -#include -#include #ifdef HAVE_SYS_TIME_H # include #endif +#include "openbsd-compat/sys-tree.h" #include #include @@ -77,28 +78,28 @@ #include #endif +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" -#include "xmalloc.h" #include "rsa.h" #include "sshpty.h" #include "packet.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "uidswap.h" #include "compat.h" -#include "buffer.h" -#include "bufaux.h" #include "cipher.h" -#include "kex.h" #include "key.h" +#include "kex.h" #include "dh.h" #include "myproposal.h" #include "authfile.h" #include "pathnames.h" #include "atomicio.h" #include "canohost.h" +#include "hostfile.h" #include "auth.h" #include "misc.h" #include "msg.h" @@ -107,6 +108,9 @@ #include "session.h" #include "monitor_mm.h" #include "monitor.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "monitor_fdpass.h" #include "version.h" diff --git a/sshlogin.c b/sshlogin.c index b01fde091..fba8a4d24 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.24 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.25 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -43,9 +43,11 @@ #include #include +#include #include #include +#include #include #include #include diff --git a/sshlogin.h b/sshlogin.h index c0f9cd300..500d3fefd 100644 --- a/sshlogin.h +++ b/sshlogin.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.h,v 1.7 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: sshlogin.h,v 1.8 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -11,11 +11,6 @@ * incompatible with the protocol description in the RFC file, it must be * called by a name other than "ssh" or "Secure Shell". */ -#ifndef SSHLOGIN_H -#define SSHLOGIN_H - -#include -#include void record_login(pid_t, const char *, const char *, uid_t, const char *, struct sockaddr *, socklen_t); @@ -26,5 +21,3 @@ time_t get_last_login_time(uid_t, const char *, char *, u_int); void record_utmp_only(pid_t, const char *, const char *, const char *, struct sockaddr *, socklen_t); #endif - -#endif diff --git a/sshpty.c b/sshpty.c index 719a79303..79c62ee9c 100644 --- a/sshpty.c +++ b/sshpty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: sshpty.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,8 +14,8 @@ #include "includes.h" -#include #include +#include #include #include @@ -26,11 +26,12 @@ # include #endif #include +#include #include #include #ifdef HAVE_UTIL_H # include -#endif /* HAVE_UTIL_H */ +#endif #include #include "sshpty.h" diff --git a/sshpty.h b/sshpty.h index a7b337474..7fac622d9 100644 --- a/sshpty.h +++ b/sshpty.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.h,v 1.9 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: sshpty.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -14,12 +14,6 @@ * called by a name other than "ssh" or "Secure Shell". */ -#ifndef SSHPTY_H -#define SSHPTY_H - -#include - -#include #include struct termios get_saved_tio(void); @@ -31,5 +25,3 @@ void pty_release(const char *); void pty_make_controlling_tty(int *, const char *); void pty_change_window_size(int, u_int, u_int, u_int, u_int); void pty_setowner(struct passwd *, const char *); - -#endif /* SSHPTY_H */ diff --git a/sshtty.c b/sshtty.c index 70668afde..04567669b 100644 --- a/sshtty.c +++ b/sshtty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshtty.c,v 1.11 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: sshtty.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,8 +37,10 @@ #include "includes.h" +#include #include #include +#include #include "sshpty.h" diff --git a/ttymodes.c b/ttymodes.c index 680909b22..d8e2c553a 100644 --- a/ttymodes.c +++ b/ttymodes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttymodes.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: ttymodes.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,16 +45,18 @@ #include "includes.h" +#include + #include #include #include +#include #include "packet.h" #include "log.h" #include "ssh1.h" #include "compat.h" #include "buffer.h" -#include "bufaux.h" #define TTY_OP_END 0 /* diff --git a/uidswap.c b/uidswap.c index 878258704..91d878c30 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.c,v 1.34 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: uidswap.c,v 1.35 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,13 +14,12 @@ #include "includes.h" -#include #include - #include #include #include #include +#include #include diff --git a/uidswap.h b/uidswap.h index 436c10f75..1c1163d75 100644 --- a/uidswap.h +++ b/uidswap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.h,v 1.12 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: uidswap.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -12,16 +12,7 @@ * called by a name other than "ssh" or "Secure Shell". */ -#ifndef UIDSWAP_H -#define UIDSWAP_H - -#include - -#include - void temporarily_use_uid(struct passwd *); void restore_uid(void); void permanently_set_uid(struct passwd *); void permanently_drop_suid(uid_t); - -#endif /* UIDSWAP_H */ diff --git a/uuencode.c b/uuencode.c index 8a6742e95..a13949585 100644 --- a/uuencode.c +++ b/uuencode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uuencode.c,v 1.23 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: uuencode.c,v 1.24 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -26,9 +26,7 @@ #include "includes.h" #include - #include - #include #include diff --git a/uuencode.h b/uuencode.h index df09eb59b..fec55b491 100644 --- a/uuencode.h +++ b/uuencode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uuencode.h,v 1.12 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: uuencode.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -24,12 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef UUENCODE_H -#define UUENCODE_H - -#include - int uuencode(const u_char *, u_int, char *, size_t); int uudecode(const char *, u_char *, size_t); void dump_base64(FILE *, u_char *, u_int); -#endif diff --git a/xmalloc.c b/xmalloc.c index 6aea495ef..9985b4cc2 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.26 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.27 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -16,7 +16,6 @@ #include "includes.h" #include - #include #include #include diff --git a/xmalloc.h b/xmalloc.h index 27f25d584..fb217a45c 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.h,v 1.12 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: xmalloc.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -16,9 +16,6 @@ * called by a name other than "ssh" or "Secure Shell". */ -#ifndef XMALLOC_H -#define XMALLOC_H - void *xmalloc(size_t); void *xcalloc(size_t, size_t); void *xrealloc(void *, size_t, size_t); @@ -27,5 +24,3 @@ char *xstrdup(const char *); int xasprintf(char **, const char *, ...) __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2))); - -#endif /* XMALLOC_H */ -- cgit v1.2.3 From 565ca3f60058f22d083572930833aaff2292ac20 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 19 Aug 2006 00:23:15 +1000 Subject: - dtucker@cvs.openbsd.org 2006/08/14 12:40:25 [servconf.c servconf.h sshd_config.5] Add ability to match groups to Match keyword in sshd_config. Feedback djm@, stevesk@, ok stevesk@. --- ChangeLog | 6 +++++- servconf.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- servconf.h | 3 ++- sshd_config.5 | 3 ++- 4 files changed, 64 insertions(+), 4 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 674d2b9e3..328f0c116 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,10 @@ Revert previous include file ordering change, for ssh to compile under gcc2 (or until openssl include files are cleaned of parameter names in function prototypes) + - dtucker@cvs.openbsd.org 2006/08/14 12:40:25 + [servconf.c servconf.h sshd_config.5] + Add ability to match groups to Match keyword in sshd_config. Feedback + djm@, stevesk@, ok stevesk@. 20060817 - (dtucker) [openbsd-compat/fake-rfc2553.c openbsd-compat/setproctitle.c] @@ -5235,4 +5239,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4488 2006/08/18 14:22:40 djm Exp $ +$Id: ChangeLog,v 1.4489 2006/08/18 14:23:15 djm Exp $ diff --git a/servconf.c b/servconf.c index 5884b95be..1f80de22d 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.164 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: servconf.c,v 1.165 2006/08/14 12:40:25 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -37,6 +38,7 @@ #include "mac.h" #include "match.h" #include "channels.h" +#include "groupaccess.h" static void add_listen_addr(ServerOptions *, char *, u_short); static void add_one_listen_addr(ServerOptions *, char *, u_short); @@ -496,6 +498,51 @@ add_one_listen_addr(ServerOptions *options, char *addr, u_short port) * PermittedChannelRequests session,forwarded-tcpip */ +static int +match_cfg_line_group(const char *grps, int line, const char *user) +{ + int result = 0; + u_int ngrps = 0; + char *arg, *p, *cp, *grplist[MAX_MATCH_GROUPS]; + struct passwd *pw; + + /* + * Even if we do not have a user yet, we still need to check for + * valid syntax. + */ + arg = cp = xstrdup(grps); + while ((p = strsep(&cp, ",")) != NULL && *p != '\0') { + if (ngrps >= MAX_MATCH_GROUPS) { + error("line %d: too many groups in Match Group", line); + result = -1; + goto out; + } + grplist[ngrps++] = p; + } + + if (user == NULL) + goto out; + + if ((pw = getpwnam(user)) == NULL) { + debug("Can't match group at line %d because user %.100s does " + "not exist", line, user); + } else if (ga_init(pw->pw_name, pw->pw_gid) == 0) { + debug("Can't Match group because user %.100s not in any group " + "at line %d", user, line); + } else if (ga_match(grplist, ngrps) != 1) { + debug("user %.100s does not match group %.100s at line %d", + user, arg, line); + } else { + debug("user %.100s matched group %.100s at line %d", user, + arg, line); + result = 1; + } +out: + ga_free(); + xfree(arg); + return result; +} + static int match_cfg_line(char **condition, int line, const char *user, const char *host, const char *address) @@ -527,6 +574,13 @@ match_cfg_line(char **condition, int line, const char *user, const char *host, else debug("user %.100s matched 'User %.100s' at " "line %d", user, arg, line); + } else if (strcasecmp(attrib, "group") == 0) { + switch (match_cfg_line_group(arg, line, user)) { + case -1: + return -1; + case 0: + result = 0; + } } else if (strcasecmp(attrib, "host") == 0) { if (!host) { result = 0; diff --git a/servconf.h b/servconf.h index 2593b1cd1..ad496f64b 100644 --- a/servconf.h +++ b/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.78 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: servconf.h,v 1.79 2006/08/14 12:40:25 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -25,6 +25,7 @@ #define MAX_SUBSYSTEMS 256 /* Max # subsystems. */ #define MAX_HOSTKEYS 256 /* Max # hostkeys. */ #define MAX_ACCEPT_ENV 256 /* Max # of env vars. */ +#define MAX_MATCH_GROUPS 256 /* Max # of groups for Match. */ /* permit_root_login */ #define PERMIT_NOT_SET -1 diff --git a/sshd_config.5 b/sshd_config.5 index ff5457dff..3c20c1faa 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.68 2006/07/21 12:43:36 dtucker Exp $ +.\" $OpenBSD: sshd_config.5,v 1.69 2006/08/14 12:40:25 dtucker Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -488,6 +488,7 @@ The arguments to are one or more criteria-pattern pairs. The available criteria are .Cm User , +.Cm Group , .Cm Host , and .Cm Address . -- cgit v1.2.3 From a29b95ec3a0294e62edd7ed26c515bb1a9dc6d6a Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 5 Jan 2007 16:28:36 +1100 Subject: - dtucker@cvs.openbsd.org 2006/12/13 08:34:39 [servconf.c] Make PermitOpen work with multiple values like the man pages says. bz #1267 with details from peter at dmtz.com, with & ok djm@ --- ChangeLog | 6 +++++- servconf.c | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index a149b0a54..9a0d97319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,10 @@ them an address for cases where they are not explicitly specified (wildcard or localhost bind). reported by daveroth AT acm.org; ok dtucker@ deraadt@ + - dtucker@cvs.openbsd.org 2006/12/13 08:34:39 + [servconf.c] + Make PermitOpen work with multiple values like the man pages says. + bz #1267 with details from peter at dmtz.com, with & ok djm@ 20061205 - (djm) [auth.c] Fix NULL pointer dereference in fakepw(). Crash would @@ -2637,4 +2641,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4595 2007/01/05 05:26:45 djm Exp $ +$Id: ChangeLog,v 1.4596 2007/01/05 05:28:36 djm Exp $ diff --git a/servconf.c b/servconf.c index 1f80de22d..83b634976 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.165 2006/08/14 12:40:25 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.166 2006/12/13 08:34:39 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -1227,6 +1227,9 @@ parse_flag: } break; } + n = options->num_permitted_opens; /* modified later */ + if (*activep && n == -1) + channel_clear_adm_permitted_opens(); for (; arg != NULL && *arg != '\0'; arg = strdelim(&cp)) { p = hpdelim(&arg); if (p == NULL) @@ -1236,11 +1239,9 @@ parse_flag: if (arg == NULL || (port = a2port(arg)) == 0) fatal("%s line %d: bad port number in " "PermitOpen", filename, linenum); - if (*activep && options->num_permitted_opens == -1) { - channel_clear_adm_permitted_opens(); + if (*activep && n == -1) options->num_permitted_opens = channel_add_adm_permitted_opens(p, port); - } } break; -- cgit v1.2.3 From 9fc6a56204d6a1245e79346ed5e714f70c6dc9cc Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 5 Jan 2007 16:29:02 +1100 Subject: - dtucker@cvs.openbsd.org 2006/12/14 10:01:14 [servconf.c] Make "PermitOpen all" first-match within a block to match the way other options work. ok markus@ djm@ --- ChangeLog | 6 +++++- servconf.c | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 9a0d97319..1c893a1d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,10 @@ [servconf.c] Make PermitOpen work with multiple values like the man pages says. bz #1267 with details from peter at dmtz.com, with & ok djm@ + - dtucker@cvs.openbsd.org 2006/12/14 10:01:14 + [servconf.c] + Make "PermitOpen all" first-match within a block to match the way other + options work. ok markus@ djm@ 20061205 - (djm) [auth.c] Fix NULL pointer dereference in fakepw(). Crash would @@ -2641,4 +2645,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4596 2007/01/05 05:28:36 djm Exp $ +$Id: ChangeLog,v 1.4597 2007/01/05 05:29:02 djm Exp $ diff --git a/servconf.c b/servconf.c index 83b634976..872ff4a87 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.166 2006/12/13 08:34:39 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.167 2006/12/14 10:01:14 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -1220,14 +1220,14 @@ parse_flag: if (!arg || *arg == '\0') fatal("%s line %d: missing PermitOpen specification", filename, linenum); + n = options->num_permitted_opens; /* modified later */ if (strcmp(arg, "any") == 0) { - if (*activep) { + if (*activep && n == -1) { channel_clear_adm_permitted_opens(); options->num_permitted_opens = 0; } break; } - n = options->num_permitted_opens; /* modified later */ if (*activep && n == -1) channel_clear_adm_permitted_opens(); for (; arg != NULL && *arg != '\0'; arg = strdelim(&cp)) { -- cgit v1.2.3 From 1629c07c0725fd5cc533c9664b8e8add27a81c69 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 19 Feb 2007 22:25:37 +1100 Subject: - dtucker@cvs.openbsd.org 2007/02/19 10:45:58 [monitor_wrap.c servconf.c servconf.h monitor.c sshd_config.5] Teach Match how handle config directives that are used before authentication. This allows configurations such as permitting password authentication from the local net only while requiring pubkey from offsite. ok djm@, man page bits ok jmc@ --- ChangeLog | 8 +++++- monitor.c | 5 +++- monitor_wrap.c | 20 ++++++++++--- servconf.c | 88 +++++++++++++++++++++++++++++++++++++--------------------- servconf.h | 4 +-- sshd_config.5 | 10 ++++++- 6 files changed, 95 insertions(+), 40 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index c2a22bd1a..ec16391eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,12 @@ - stevesk@cvs.openbsd.org 2007/02/14 14:32:00 [bufbn.c] typos in comments; ok jmc@ + - dtucker@cvs.openbsd.org 2007/02/19 10:45:58 + [monitor_wrap.c servconf.c servconf.h monitor.c sshd_config.5] + Teach Match how handle config directives that are used before + authentication. This allows configurations such as permitting password + authentication from the local net only while requiring pubkey from + offsite. ok djm@, man page bits ok jmc@ 20070128 - (djm) [channels.c serverloop.c] Fix so-called "hang on exit" (bz #52) @@ -2730,4 +2736,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4616 2007/02/19 11:17:28 dtucker Exp $ +$Id: ChangeLog,v 1.4617 2007/02/19 11:25:37 dtucker Exp $ diff --git a/monitor.c b/monitor.c index 48ae46ccc..02f2dc869 100644 --- a/monitor.c +++ b/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.89 2006/11/07 10:31:31 markus Exp $ */ +/* $OpenBSD: monitor.c,v 1.90 2007/02/19 10:45:58 dtucker Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -642,6 +642,9 @@ mm_answer_pwnamallow(int sock, Buffer *m) #endif buffer_put_cstring(m, pwent->pw_dir); buffer_put_cstring(m, pwent->pw_shell); + buffer_put_string(m, &options, sizeof(options)); + if (options.banner != NULL) + buffer_put_cstring(m, options.banner); out: debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed); diff --git a/monitor_wrap.c b/monitor_wrap.c index 3865539df..27cc1c5f1 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.54 2006/08/12 20:46:46 miod Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.55 2007/02/19 10:45:58 dtucker Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -73,6 +73,7 @@ #include "channels.h" #include "session.h" +#include "servconf.h" /* Imports */ extern int compat20; @@ -207,7 +208,8 @@ mm_getpwnamallow(const char *username) { Buffer m; struct passwd *pw; - u_int pwlen; + u_int len; + ServerOptions *newopts; debug3("%s entering", __func__); @@ -223,8 +225,8 @@ mm_getpwnamallow(const char *username) buffer_free(&m); return (NULL); } - pw = buffer_get_string(&m, &pwlen); - if (pwlen != sizeof(struct passwd)) + pw = buffer_get_string(&m, &len); + if (len != sizeof(struct passwd)) fatal("%s: struct passwd size mismatch", __func__); pw->pw_name = buffer_get_string(&m, NULL); pw->pw_passwd = buffer_get_string(&m, NULL); @@ -234,6 +236,16 @@ mm_getpwnamallow(const char *username) #endif pw->pw_dir = buffer_get_string(&m, NULL); pw->pw_shell = buffer_get_string(&m, NULL); + + /* copy options block as a Match directive may have changed some */ + newopts = buffer_get_string(&m, &len); + if (len != sizeof(*newopts)) + fatal("%s: option block size mismatch", __func__); + if (newopts->banner != NULL) + newopts->banner = buffer_get_string(&m, NULL); + copy_set_server_options(&options, newopts, 1); + xfree(newopts); + buffer_free(&m); return (pw); diff --git a/servconf.c b/servconf.c index 872ff4a87..86949c33f 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.167 2006/12/14 10:01:14 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.168 2007/02/19 10:45:58 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -325,14 +325,14 @@ static struct { { "syslogfacility", sLogFacility, SSHCFG_GLOBAL }, { "loglevel", sLogLevel, SSHCFG_GLOBAL }, { "rhostsauthentication", sDeprecated, SSHCFG_GLOBAL }, - { "rhostsrsaauthentication", sRhostsRSAAuthentication, SSHCFG_GLOBAL }, - { "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_GLOBAL }, + { "rhostsrsaauthentication", sRhostsRSAAuthentication, SSHCFG_ALL }, + { "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_ALL }, { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly, SSHCFG_GLOBAL }, - { "rsaauthentication", sRSAAuthentication, SSHCFG_GLOBAL }, - { "pubkeyauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, + { "rsaauthentication", sRSAAuthentication, SSHCFG_ALL }, + { "pubkeyauthentication", sPubkeyAuthentication, SSHCFG_ALL }, { "dsaauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, /* alias */ #ifdef KRB5 - { "kerberosauthentication", sKerberosAuthentication, SSHCFG_GLOBAL }, + { "kerberosauthentication", sKerberosAuthentication, SSHCFG_ALL }, { "kerberosorlocalpasswd", sKerberosOrLocalPasswd, SSHCFG_GLOBAL }, { "kerberosticketcleanup", sKerberosTicketCleanup, SSHCFG_GLOBAL }, #ifdef USE_AFS @@ -341,7 +341,7 @@ static struct { { "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL }, #endif #else - { "kerberosauthentication", sUnsupported, SSHCFG_GLOBAL }, + { "kerberosauthentication", sUnsupported, SSHCFG_ALL }, { "kerberosorlocalpasswd", sUnsupported, SSHCFG_GLOBAL }, { "kerberosticketcleanup", sUnsupported, SSHCFG_GLOBAL }, { "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL }, @@ -349,15 +349,15 @@ static struct { { "kerberostgtpassing", sUnsupported, SSHCFG_GLOBAL }, { "afstokenpassing", sUnsupported, SSHCFG_GLOBAL }, #ifdef GSSAPI - { "gssapiauthentication", sGssAuthentication, SSHCFG_GLOBAL }, + { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, #else - { "gssapiauthentication", sUnsupported, SSHCFG_GLOBAL }, + { "gssapiauthentication", sUnsupported, SSHCFG_ALL }, { "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL }, #endif - { "passwordauthentication", sPasswordAuthentication, SSHCFG_GLOBAL }, - { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_GLOBAL }, - { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, + { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL }, + { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL }, + { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_ALL }, { "skeyauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, /* alias */ { "checkmail", sDeprecated, SSHCFG_GLOBAL }, { "listenaddress", sListenAddress, SSHCFG_GLOBAL }, @@ -389,7 +389,7 @@ static struct { { "subsystem", sSubsystem, SSHCFG_GLOBAL }, { "maxstartups", sMaxStartups, SSHCFG_GLOBAL }, { "maxauthtries", sMaxAuthTries, SSHCFG_GLOBAL }, - { "banner", sBanner, SSHCFG_GLOBAL }, + { "banner", sBanner, SSHCFG_ALL }, { "usedns", sUseDNS, SSHCFG_GLOBAL }, { "verifyreversemapping", sDeprecated, SSHCFG_GLOBAL }, { "reversemappingcheck", sDeprecated, SSHCFG_GLOBAL }, @@ -1317,30 +1317,56 @@ parse_server_match_config(ServerOptions *options, const char *user, initialize_server_options(&mo); parse_server_config(&mo, "reprocess config", &cfg, user, host, address); - copy_set_server_options(options, &mo); + copy_set_server_options(options, &mo, 0); } -/* Copy any (supported) values that are set */ +/* Helper macros */ +#define M_CP_INTOPT(n) do {\ + if (src->n != -1) \ + dst->n = src->n; \ +} while (0) +#define M_CP_STROPT(n) do {\ + if (src->n != NULL) { \ + if (dst->n != NULL) \ + xfree(dst->n); \ + dst->n = src->n; \ + } \ +} while(0) + +/* + * Copy any supported values that are set. + * + * If the preauth flag is set, we do not bother copying the the string or + * array values that are not used pre-authentication, because any that we + * do use must be explictly sent in mm_getpwnamallow(). + */ void -copy_set_server_options(ServerOptions *dst, ServerOptions *src) +copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth) { - if (src->allow_tcp_forwarding != -1) - dst->allow_tcp_forwarding = src->allow_tcp_forwarding; - if (src->gateway_ports != -1) - dst->gateway_ports = src->gateway_ports; - if (src->adm_forced_command != NULL) { - if (dst->adm_forced_command != NULL) - xfree(dst->adm_forced_command); - dst->adm_forced_command = src->adm_forced_command; - } - if (src->x11_display_offset != -1) - dst->x11_display_offset = src->x11_display_offset; - if (src->x11_forwarding != -1) - dst->x11_forwarding = src->x11_forwarding; - if (src->x11_use_localhost != -1) - dst->x11_use_localhost = src->x11_use_localhost; + M_CP_INTOPT(password_authentication); + M_CP_INTOPT(gss_authentication); + M_CP_INTOPT(rsa_authentication); + M_CP_INTOPT(pubkey_authentication); + M_CP_INTOPT(kerberos_authentication); + M_CP_INTOPT(hostbased_authentication); + M_CP_INTOPT(kbd_interactive_authentication); + M_CP_INTOPT(challenge_response_authentication); + + M_CP_INTOPT(allow_tcp_forwarding); + M_CP_INTOPT(gateway_ports); + M_CP_INTOPT(x11_display_offset); + M_CP_INTOPT(x11_forwarding); + M_CP_INTOPT(x11_use_localhost); + + M_CP_STROPT(banner); + if (preauth) + return; + M_CP_STROPT(adm_forced_command); } +#undef M_CP_INTOPT +#undef M_CP_STROPT + void parse_server_config(ServerOptions *options, const char *filename, Buffer *conf, const char *user, const char *host, const char *address) diff --git a/servconf.h b/servconf.h index ad496f64b..8a5b950ea 100644 --- a/servconf.h +++ b/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.79 2006/08/14 12:40:25 dtucker Exp $ */ +/* $OpenBSD: servconf.h,v 1.80 2007/02/19 10:45:58 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -152,6 +152,6 @@ void parse_server_config(ServerOptions *, const char *, Buffer *, const char *, const char *, const char *); void parse_server_match_config(ServerOptions *, const char *, const char *, const char *); -void copy_set_server_options(ServerOptions *, ServerOptions *); +void copy_set_server_options(ServerOptions *, ServerOptions *, int); #endif /* SERVCONF_H */ diff --git a/sshd_config.5 b/sshd_config.5 index 53207fd84..54231d562 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.71 2007/01/02 09:57:25 jmc Exp $ +.\" $OpenBSD: sshd_config.5,v 1.72 2007/02/19 10:45:58 dtucker Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -512,9 +512,17 @@ Only a subset of keywords may be used on the lines following a keyword. Available keywords are .Cm AllowTcpForwarding , +.Cm Banner , +.Cm ChallengeResponseAuthentication , .Cm ForceCommand , .Cm GatewayPorts , +.Cm GSSApiAuthentication , +.Cm KerberosAuthentication , +.Cm KeyboardInteractiveAuthentication , +.Cm PasswordAuthentication , .Cm PermitOpen , +.Cm RhostsRSAAuthentication , +.Cm RSAAuthentication , .Cm X11DisplayOffset , .Cm X11Forwarding , and -- cgit v1.2.3 From 82347a8fd67d294537b0a95e8ea5b7b7912ced11 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 25 Feb 2007 20:37:52 +1100 Subject: - dtucker@cvs.openbsd.org 2007/02/22 12:58:40 [servconf.c] Check activep so Match and GatewayPorts work together; ok markus@ --- ChangeLog | 5 ++++- servconf.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 693cb9616..36528ad71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,9 @@ newly exec'ed sshd will get the SIGALRM and not have a handler for it, and the default action will terminate the listening sshd. Analysis and patch from andrew at gaul.org. + - dtucker@cvs.openbsd.org 2007/02/22 12:58:40 + [servconf.c] + Check activep so Match and GatewayPorts work together; ok markus@ 20070219 - (dtucker) OpenBSD CVS Sync @@ -2756,4 +2759,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4621 2007/02/25 09:37:21 dtucker Exp $ +$Id: ChangeLog,v 1.4622 2007/02/25 09:37:52 dtucker Exp $ diff --git a/servconf.c b/servconf.c index 86949c33f..c6a8043de 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.168 2007/02/19 10:45:58 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.169 2007/02/22 12:58:40 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -968,7 +968,7 @@ parse_flag: else fatal("%s line %d: Bad yes/no/clientspecified " "argument: %s", filename, linenum, arg); - if (*intptr == -1) + if (*activep && *intptr == -1) *intptr = value; break; -- cgit v1.2.3 From 1d75f22c5d99ce1a4c7a87c7ae042a33fbeefefb Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 1 Mar 2007 21:31:28 +1100 Subject: - dtucker@cvs.openbsd.org 2007/03/01 10:28:02 [auth2.c sshd_config.5 servconf.c] Remove ChallengeResponseAuthentication support inside a Match block as its interaction with KbdInteractive makes it difficult to support. Also, relocate the CR/kbdint option special-case code into servconf. "please commit" djm@, ok markus@ for the relocation. --- ChangeLog | 11 ++++++++++- auth2.c | 6 +----- servconf.c | 9 ++++++--- sshd_config.5 | 5 ++--- 4 files changed, 19 insertions(+), 12 deletions(-) (limited to 'servconf.c') diff --git a/ChangeLog b/ChangeLog index 79658c520..feee3ff98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +20070301 + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2007/03/01 10:28:02 + [auth2.c sshd_config.5 servconf.c] + Remove ChallengeResponseAuthentication support inside a Match + block as its interaction with KbdInteractive makes it difficult to + support. Also, relocate the CR/kbdint option special-case code into + servconf. "please commit" djm@, ok markus@ for the relocation. + 20070228 - (dtucker) OpenBSD CVS Sync - dtucker@cvs.openbsd.org 2007/02/28 00:55:30 @@ -2773,4 +2782,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4624 2007/02/28 10:19:58 dtucker Exp $ +$Id: ChangeLog,v 1.4625 2007/03/01 10:31:28 dtucker Exp $ diff --git a/auth2.c b/auth2.c index 2d880b57c..b1a4e3635 100644 --- a/auth2.c +++ b/auth2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2.c,v 1.113 2006/08/03 03:34:41 deraadt Exp $ */ +/* $OpenBSD: auth2.c,v 1.114 2007/03/01 10:28:02 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -96,10 +96,6 @@ int user_key_allowed(struct passwd *, Key *); void do_authentication2(Authctxt *authctxt) { - /* challenge-response is implemented via keyboard interactive */ - if (options.challenge_response_authentication) - options.kbd_interactive_authentication = 1; - dispatch_init(&dispatch_protocol_error); dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request); dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt); diff --git a/servconf.c b/servconf.c index c6a8043de..1e3c213a5 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.169 2007/02/22 12:58:40 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.170 2007/03/01 10:28:02 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -357,7 +357,7 @@ static struct { #endif { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL }, { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL }, - { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_ALL }, + { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, { "skeyauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, /* alias */ { "checkmail", sDeprecated, SSHCFG_GLOBAL }, { "listenaddress", sListenAddress, SSHCFG_GLOBAL }, @@ -1350,7 +1350,6 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth) M_CP_INTOPT(kerberos_authentication); M_CP_INTOPT(hostbased_authentication); M_CP_INTOPT(kbd_interactive_authentication); - M_CP_INTOPT(challenge_response_authentication); M_CP_INTOPT(allow_tcp_forwarding); M_CP_INTOPT(gateway_ports); @@ -1388,4 +1387,8 @@ parse_server_config(ServerOptions *options, const char *filename, Buffer *conf, if (bad_options > 0) fatal("%s: terminating, %d bad configuration options", filename, bad_options); + + /* challenge-response is implemented via keyboard interactive */ + if (options->challenge_response_authentication == 1) + options->kbd_interactive_authentication = 1; } diff --git a/sshd_config.5 b/sshd_config.5 index 54231d562..bcd0435e8 100644 --- a/sshd_config.5 +++ b/sshd_config.5 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.72 2007/02/19 10:45:58 dtucker Exp $ +.\" $OpenBSD: sshd_config.5,v 1.73 2007/03/01 10:28:02 dtucker Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -513,12 +513,11 @@ keyword. Available keywords are .Cm AllowTcpForwarding , .Cm Banner , -.Cm ChallengeResponseAuthentication , .Cm ForceCommand , .Cm GatewayPorts , .Cm GSSApiAuthentication , .Cm KerberosAuthentication , -.Cm KeyboardInteractiveAuthentication , +.Cm KbdInteractiveAuthentication , .Cm PasswordAuthentication , .Cm PermitOpen , .Cm RhostsRSAAuthentication , -- cgit v1.2.3