--- window.c 2014-04-26 12:58:35.000000000 +0200
+++ window.c 2014-05-01 21:36:54.000000000 +0200
+ * All of the logic to maintain utmpx is now built into /usr/bin/login, so
+ * all we need to do is call it, and pass the shell command to it.
+run_login(const char *path, char *const argv[], char *const envp[])
+ const char *shargs[MAXARGS + 1 + 3];
+ if (access(path, X_OK) < 0)
+ shargs[1] = (*argv[0] == '-') ? "-pfq" : "-pflq";
+ fp = (const char **)argv + 1;
+ /* argv has already been check for length */
+ while ((*tp++ = *fp++) != NULL) {}
+ /* shouldn't return unless there was an error */
+ return (execve("/usr/bin/login", (char *const*)shargs, envp));
+/* replace the following occurrences of execve() with run_login() */
+#define execve run_login