dropbear 0.50 packaged for fedora

Lennert Buytenhek buytenh at wantstofly.org
Thu Jan 24 07:46:53 WST 2008


FYI, I've packaged dropbear 0.50 for Fedora:

	https://admin.fedoraproject.org/pkgdb/packages/name/dropbear

It is available in F8 updates, and will be part of the F9 release.

I needed the following patch to make it build on F8, or else the
compiler bombs out saying that there is an opportunity for open()
to be called with O_CREAT but without a third argument:


--- dropbear-0.50/loginrec.c.orig	2007-08-08 17:39:37.000000000 +0200
+++ dropbear-0.50/loginrec.c	2008-01-07 11:13:13.000000000 +0100
@@ -1313,7 +1313,7 @@
 
 /* open the file (using filemode) and seek to the login entry */
 static int
-lastlog_openseek(struct logininfo *li, int *fd, int filemode)
+lastlog_openseek(struct logininfo *li, int *fd, int flags, mode_t mode)
 {
 	off_t offset;
 	int type;
@@ -1334,7 +1334,7 @@
 			return 0;
 	}
 
-	*fd = open(lastlog_file, filemode);
+	*fd = open(lastlog_file, flags, mode);
 	if ( *fd < 0) {
 		dropbear_log(LOG_INFO, "lastlog_openseek: Couldn't open %s: %s",
 		    lastlog_file, strerror(errno));
@@ -1364,7 +1364,7 @@
 	/* create our struct lastlog */
 	lastlog_construct(li, &last);
 
-	if (!lastlog_openseek(li, &fd, O_RDWR|O_CREAT))
+	if (!lastlog_openseek(li, &fd, O_RDWR|O_CREAT, 0644))
 		return(0);
 
 	/* write the entry */



More information about the Dropbear mailing list