summaryrefslogtreecommitdiff
path: root/misc/orville-write/files/patch-wrt_me.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/orville-write/files/patch-wrt_me.c')
-rw-r--r--misc/orville-write/files/patch-wrt_me.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/misc/orville-write/files/patch-wrt_me.c b/misc/orville-write/files/patch-wrt_me.c
new file mode 100644
index 000000000000..00f9c921a881
--- /dev/null
+++ b/misc/orville-write/files/patch-wrt_me.c
@@ -0,0 +1,34 @@
+--- wrt_me.c.orig 2010-02-02 22:31:42.972816673 -0800
++++ wrt_me.c 2010-02-02 22:33:09.915329757 -0800
+@@ -14,19 +14,19 @@
+
+ void find_me()
+ {
+-struct utmp *ut;
++struct utmpx *ut;
+ struct passwd *pw;
+ int myuid;
+
+ /* Search utmp for myself */
+
+- if ((ut= find_utmp(mytty)) == NULL || ut->ut_name[0] == '\0')
++ if ((ut= find_utmp(mytty)) == NULL || ut->ut_user[0] == '\0')
+ {
+ printf("%s: Panic - Unable to find your tty (%s) in "_PATH_UTMP"\n",
+ progname, mytty);
+ done(1);
+ }
+- strncpy(myname, ut->ut_name, UT_NAMESIZE);
++ strncpy(myname, ut->ut_user, UT_NAMESIZE);
+
+ /* Check if this is our real identity */
+ #ifndef SLOWPASSWD
+@@ -48,7 +48,7 @@
+
+ /* Find my wrt_tmp entry */
+
+- find_wrttmp(mytty, ut->ut_time, &mywrt, &mypos);
++ find_wrttmp(mytty, ut->ut_tv.tv_sec, &mywrt, &mypos);
+ }
+
+