Displaying 5 results from an estimated 5 matches for "linebuf_getline".
2001 Feb 05
3
getline
Some system have getline method.
Place rename 'getline' to  'Linebuf_getline' in ssh-keyscan.c !
2010 Mar 06
1
ssh-keyscan bug (not really exploitable)
...-{
-	fclose(lb->stream);
-	xfree(lb->buf);
-	xfree(lb);
-}
-
-#if 0
-static void
-Linebuf_restart(Linebuf * lb)
-{
-	clearerr(lb->stream);
-	rewind(lb->stream);
-	lb->lineno = 0;
-}
-
-static int
-Linebuf_lineno(Linebuf * lb)
-{
-	return (lb->lineno);
-}
-#endif
-
-static char *
-Linebuf_getline(Linebuf * lb)
-{
-	size_t n = 0;
-	void *p;
-
-	lb->lineno++;
-	for (;;) {
-		/* Read a line */
-		if (!fgets(&lb->buf[n], lb->size - n, lb->stream)) {
-			if (ferror(lb->stream) && lb->errfun)
-				(*lb->errfun)("%s: %s\n", lb->filename,
-				    strer...
2001 May 14
2
openssh-2.9p1
Hi,
1. I think you should apply the attached patch to openssh-2.9p1,
otherwise ssh-keyscan on linux boxes with glibc-2.1 will experience enormous
timeout delays.
2. Is there a program like ssh-keyscan for the Version2 (dsa and rsa) keys??
regards
Peter Breitenlohner <peb at mppmu.mpg.de>
-------------- next part --------------
diff -ur openssh-2.9p1.orig/ssh-keyscan.c
2001 Feb 01
1
linux and _GNU_SOURCE define
I find that adding -D_GNU_SOURCE is useful for linux.
This define enable more features from header files.
First) i found that define enable declaration/definition of following methods
- grantpt(...)
- unlockpt(...)
- ptsname(...)
for device "/dev/ptmx" ( support for ptys, preferred is method openpty (...) )
Second) _GNU_SOURCE enable use of utmpx and wtmpx ( support for login
2001 Jul 27
0
Updated ssh-keyscan patch for ssh2 support
...argc, char **argv)
 {
 	static Linebuf *lb;
+	char *fname, *tname;
 
 	for (;;) {
-		if (!lb) {
-			if (argno >= argc)
-				return (NULL);
-			if (argv[argno][0] != '-')
-				return (argv[argno++]);
-			if (!strcmp(argv[argno], "--")) {
+		if (lb) {
+			char *line;
+
+			line = Linebuf_getline(lb);
+			if (line)
+				return (line);
+			Linebuf_free(lb);
+			lb = NULL;
+		}
+		if (argno >= argc)
+			return (NULL);
+		if (argv[argno][0] != '-')
+			return (argv[argno++]);
+		while (*++(argv[argno])) {
+			switch (argv[argno][0]) {
+			case '-':
 				if (++argno >= arg...