[openssh] - used upstream version of the biguid patch

Jan F. Chadima jfch2222 at fedoraproject.org
Mon Nov 15 13:01:27 UTC 2010


commit 7c53d7e5af571223f4af51b2428fb4db1818345c
Author: Jan F <jfch at hagar.bobr>
Date:   Mon Nov 15 14:01:18 2010 +0100

    - used upstream version of the biguid patch

 openssh-5.6p1-biguid.patch |   97 +++++++++++++++++++++++++++++++++++++++++--
 openssh.spec               |    5 ++-
 2 files changed, 96 insertions(+), 6 deletions(-)
---
diff --git a/openssh-5.6p1-biguid.patch b/openssh-5.6p1-biguid.patch
index c613dcc..5892008 100644
--- a/openssh-5.6p1-biguid.patch
+++ b/openssh-5.6p1-biguid.patch
@@ -1,12 +1,99 @@
-diff -up openssh-5.6p1/loginrec.c.orig openssh-5.6p1/loginrec.c
---- openssh-5.6p1/loginrec.c.orig	2010-09-13 11:32:57.000000000 +0200
-+++ openssh-5.6p1/loginrec.c	2010-09-13 12:48:25.000000000 +0200
-@@ -1548,7 +1548,7 @@ lastlog_openseek(struct logininfo *li, i
+diff -up openssh-5.6p1/loginrec.c.biguid openssh-5.6p1/loginrec.c
+--- openssh-5.6p1/loginrec.c.biguid	2010-11-15 13:19:35.000000000 +0100
++++ openssh-5.6p1/loginrec.c	2010-11-15 13:19:38.000000000 +0100
+@@ -273,7 +273,7 @@ login_logout(struct logininfo *li)
+  *                try to retrieve lastlog information from wtmp/wtmpx.
+  */
+ unsigned int
+-login_get_lastlog_time(const int uid)
++login_get_lastlog_time(const uid_t uid)
+ {
+ 	struct logininfo li;
+ 
+@@ -297,7 +297,7 @@ login_get_lastlog_time(const int uid)
+  *  0  on failure (will use OpenSSH's logging facilities for diagnostics)
+  */
+ struct logininfo *
+-login_get_lastlog(struct logininfo *li, const int uid)
++login_get_lastlog(struct logininfo *li, const uid_t uid)
+ {
+ 	struct passwd *pw;
+ 
+@@ -311,7 +311,8 @@ login_get_lastlog(struct logininfo *li, 
+ 	 */
+ 	pw = getpwuid(uid);
+ 	if (pw == NULL)
+-		fatal("%s: Cannot find account for uid %i", __func__, uid);
++		fatal("%s: Cannot find account for uid %ld", __func__,
++		    (long)uid);
+ 
+ 	/* No MIN_SIZEOF here - we absolutely *must not* truncate the
+ 	 * username (XXX - so check for trunc!) */
+@@ -335,7 +336,7 @@ login_get_lastlog(struct logininfo *li, 
+  * allocation fails, the program halts.
+  */
+ struct
+-logininfo *login_alloc_entry(int pid, const char *username,
++logininfo *login_alloc_entry(pid_t pid, const char *username,
+     const char *hostname, const char *line)
+ {
+ 	struct logininfo *newli;
+@@ -363,7 +364,7 @@ login_free_entry(struct logininfo *li)
+  * Returns: 1
+  */
+ int
+-login_init_entry(struct logininfo *li, int pid, const char *username,
++login_init_entry(struct logininfo *li, pid_t pid, const char *username,
+     const char *hostname, const char *line)
+ {
+ 	struct passwd *pw;
+@@ -1496,7 +1497,7 @@ lastlog_openseek(struct logininfo *li, i
  
  	if (S_ISREG(st.st_mode)) {
  		/* find this uid's offset in the lastlog file */
 -		offset = (off_t) ((long)li->uid * sizeof(struct lastlog));
-+		offset = (off_t) ((long)(unsigned)li->uid * sizeof(struct lastlog));
++		offset = (off_t) ((u_long)li->uid * sizeof(struct lastlog));
  
  		if (lseek(*fd, offset, SEEK_SET) != offset) {
  			logit("%s: %s->lseek(): %s", __func__,
+diff -up openssh-5.6p1/loginrec.h.biguid openssh-5.6p1/loginrec.h
+--- openssh-5.6p1/loginrec.h.biguid	2010-06-22 07:02:39.000000000 +0200
++++ openssh-5.6p1/loginrec.h	2010-11-15 13:19:38.000000000 +0100
+@@ -63,8 +63,8 @@ struct logininfo {
+ 	char       progname[LINFO_PROGSIZE];     /* name of program (for PAM) */
+ 	int        progname_null;
+ 	short int  type;                         /* type of login (LTYPE_*) */
+-	int        pid;                          /* PID of login process */
+-	int        uid;                          /* UID of this user */
++	pid_t      pid;                          /* PID of login process */
++	uid_t      uid;                          /* UID of this user */
+ 	char       line[LINFO_LINESIZE];         /* tty/pty name */
+ 	char       username[LINFO_NAMESIZE];     /* login username */
+ 	char       hostname[LINFO_HOSTSIZE];     /* remote hostname */
+@@ -86,12 +86,12 @@ struct logininfo {
+ /** 'public' functions */
+ 
+ /* construct a new login entry */
+-struct logininfo *login_alloc_entry(int pid, const char *username,
++struct logininfo *login_alloc_entry(pid_t pid, const char *username,
+ 				    const char *hostname, const char *line);
+ /* free a structure */
+ void login_free_entry(struct logininfo *li);
+ /* fill out a pre-allocated structure with useful information */
+-int login_init_entry(struct logininfo *li, int pid, const char *username,
++int login_init_entry(struct logininfo *li, pid_t pid, const char *username,
+ 		     const char *hostname, const char *line);
+ /* place the current time in a logininfo struct */
+ void login_set_current_time(struct logininfo *li);
+@@ -117,9 +117,9 @@ void login_set_addr(struct logininfo *li
+  * lastlog retrieval functions
+  */
+ /* lastlog *entry* functions fill out a logininfo */
+-struct logininfo *login_get_lastlog(struct logininfo *li, const int uid);
++struct logininfo *login_get_lastlog(struct logininfo *li, const uid_t uid);
+ /* lastlog *time* functions return time_t equivalent (uint) */
+-unsigned int login_get_lastlog_time(const int uid);
++unsigned int login_get_lastlog_time(const uid_t uid);
+ 
+ /* produce various forms of the line filename */
+ char *line_fullname(char *dst, const char *src, u_int dstsize);
diff --git a/openssh.spec b/openssh.spec
index cd386cf..b5da65f 100644
--- a/openssh.spec
+++ b/openssh.spec
@@ -71,7 +71,7 @@
 
 # Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1
 %define openssh_ver 5.6p1
-%define openssh_rel 17
+%define openssh_rel 18
 %define pam_ssh_agent_ver 0.9.2
 %define pam_ssh_agent_rel 27
 
@@ -589,6 +589,9 @@ fi
 %endif
 
 %changelog
+* Mon Nov 15 2010 Jan F. Chadima <jchadima at redhat.com> - 5.6p1-18 + 0.9.2-27
+- used upstream version of the biguid patch
+
 * Mon Nov 15 2010 Jan F. Chadima <jchadima at redhat.com> - 5.6p1-17 + 0.9.2-27
 - improoved kuserok patch
 


More information about the scm-commits mailing list