$OpenBSD: patch-gpsd_c,v 1.3 2007/02/08 23:03:38 ckuethe Exp $
--- gpsd.c.orig	Thu Dec 14 16:43:39 2006
+++ gpsd.c	Wed Jan 10 19:12:30 2007
@@ -66,7 +66,7 @@
  * The name of a tty device from which to pick up whatever the local
  * owning group for tty devices is.  Used when we drop privileges.
  */
-#define PROTO_TTY "/dev/ttyS0"
+#define PROTO_TTY "/dev/tty00"
 
 #define sub_index(s) (s - subscribers)
 
@@ -1374,7 +1374,7 @@ int main(int argc, char *argv[])
 		(void)chmod(argv[i], stb.st_mode|S_IRGRP|S_IWGRP);
 	/*
 	 * Drop privileges.  Up to now we've been running as root.  Instead,
-	 * set the user ID to 'nobody' and the group ID to the owning group 
+	 * set the user ID to '_gpsd' and the group ID to the owning group 
 	 * of a prototypical TTY device.  This limits the scope of any
 	 * compromises in the code.  It requires that all GPS devices have
 	 * their group read/write permissions set.
@@ -1384,7 +1384,7 @@ int main(int argc, char *argv[])
 	    if (setgid(stb.st_gid) != 0)
 		gpsd_report(LOG_ERROR, "setgid() failed, errno %s\n", strerror(errno));
 	}
-	pw = getpwnam("nobody");
+	pw = getpwnam("_gpsd");
 	if (pw)
 	    (void)seteuid(pw->pw_uid);
     }
