summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2001-12-25 04:32:58 +0000
committerKevin Steves <stevesk@pobox.com>2001-12-25 04:32:58 +0000
commit9443508b96e2d2682a221bc17110e87a38503dc5 (patch)
tree10cf068f7bcf2ad79243bd659a9109e6d307b77d
parentb063f01dd5410f30f075c2a6e84d68fc09b7755c (diff)
- (stevesk) [Makefile.in ssh-rand-helper.c]
portable lib and __progname support for ssh-rand-helper; ok djm@
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in6
-rw-r--r--ssh-rand-helper.c9
3 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index ad7d46573..736ace97a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120011225
2 - (stevesk) [Makefile.in ssh-rand-helper.c]
3 portable lib and __progname support for ssh-rand-helper; ok djm@
4
120011223 520011223
2 - (bal) Removed contrib/chroot.diff and noted in contrib/README that it 6 - (bal) Removed contrib/chroot.diff and noted in contrib/README that it
3 was not being maintained. 7 was not being maintained.
@@ -7100,4 +7104,4 @@
7100 - Wrote replacements for strlcpy and mkdtemp 7104 - Wrote replacements for strlcpy and mkdtemp
7101 - Released 1.0pre1 7105 - Released 1.0pre1
7102 7106
7103$Id: ChangeLog,v 1.1707 2001/12/24 02:59:19 mouring Exp $ 7107$Id: ChangeLog,v 1.1708 2001/12/25 04:32:58 stevesk Exp $
diff --git a/Makefile.in b/Makefile.in
index 7a722b456..287b5ab1b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.191 2001/12/23 14:41:48 djm Exp $ 1# $Id: Makefile.in,v 1.192 2001/12/25 04:32:58 stevesk Exp $
2 2
3prefix=@prefix@ 3prefix=@prefix@
4exec_prefix=@exec_prefix@ 4exec_prefix=@exec_prefix@
@@ -122,8 +122,8 @@ sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o
122sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-int.o sftp-common.o sftp-glob.o 122sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-int.o sftp-common.o sftp-glob.o
123 $(LD) -o $@ sftp.o sftp-client.o sftp-common.o sftp-int.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 123 $(LD) -o $@ sftp.o sftp-client.o sftp-common.o sftp-int.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
124 124
125ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) ssh-rand-helper.o 125ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o
126 $(LD) -o $@ ssh-rand-helper.o atomicio.o log.o xmalloc.o $(LDFLAGS) -lopenbsd-compat $(LIBS) 126 $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
127 127
128# test driver for the loginrec code - not built by default 128# test driver for the loginrec code - not built by default
129logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o 129logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 5b7a9fc61..380fee46d 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -39,7 +39,13 @@
39#include "pathnames.h" 39#include "pathnames.h"
40#include "log.h" 40#include "log.h"
41 41
42RCSID("$Id: ssh-rand-helper.c,v 1.1 2001/12/23 14:41:48 djm Exp $"); 42#ifdef HAVE___PROGNAME
43extern char *__progname;
44#else
45char *__progname;
46#endif
47
48RCSID("$Id: ssh-rand-helper.c,v 1.2 2001/12/25 04:32:58 stevesk Exp $");
43 49
44#define RANDOM_SEED_SIZE 48 50#define RANDOM_SEED_SIZE 48
45 51
@@ -786,6 +792,7 @@ main(int argc, char **argv)
786 unsigned char buf[48]; 792 unsigned char buf[48];
787 int ret; 793 int ret;
788 794
795 __progname = get_progname(argv[0]);
789 /* XXX: need some debugging mode */ 796 /* XXX: need some debugging mode */
790 log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); 797 log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
791 798