]> ruderich.org/simon Gitweb - ptyas/ptyas.git/blobdiff - ptyas.c
Makefile: use additional hardening flags from Debian
[ptyas/ptyas.git] / ptyas.c
diff --git a/ptyas.c b/ptyas.c
index e6ecd558405be523fe971a2f747bac905c1d00a9..4b7b208856e88f53a43abc833ea4dde6a7c5bcdb 100644 (file)
--- a/ptyas.c
+++ b/ptyas.c
@@ -2,7 +2,7 @@
  * Run the login shell or command as the given user in a new pty to prevent
  * terminal injection attacks.
  *
- * Copyright (C) 2016-2017  Simon Ruderich
+ * Copyright (C) 2016-2018  Simon Ruderich
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -82,9 +82,11 @@ static void open_pty_or_die(int *pty_master, int *pty_slave, uid_t uid) {
     if (*pty_slave == -1) {
         die("open slave tty");
     }
-    /* The user must be able to write to the new TTY. Normally grantpt() would
+    /*
+     * The user must be able to write to the new TTY. Normally grantpt() would
      * do this for us, but we don't trust the user and thus don't want to pass
-     * the pty_master to a process running under that uid. */
+     * the pty_master to a process running under that uid.
+     */
     if (chown(slave_path, uid, (gid_t)-1) != 0) {
         die("chown slave tty");
     }