* open_slave.c (pty_open_slave): Check to ensure that the slave
name is not NULL or zero-length.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10310
dc483132-0cff-0310-8789-
dd5450dbe970
+Wed Dec 3 17:16:44 1997 Tom Yu <tlyu@mit.edu>
+
+ * pty_err.et: Add PTY_OPEN_SLAVE_TOOSHORT error code.
+
+ * open_slave.c (pty_open_slave): Check to ensure that the slave
+ name is not NULL or zero-length.
+
Tue Oct 28 13:28:54 1997 Ezra Peisach <epeisach@.mit.edu>
* pty-int.h: Do not prototype initialize_pty_error_table as
#endif
+ if (slave == NULL || *slave == '\0')
+ return PTY_OPEN_SLAVE_TOOSHORT;
if (chmod(slave, 0))
return PTY_OPEN_SLAVE_CHMODFAIL;
if ( chown(slave, 0, 0 ) == -1 )
error_table pty
- error_code PTY_GETPTY_STREAMS, "Failed to unlock or grant streams pty."
+error_code PTY_GETPTY_STREAMS, "Failed to unlock or grant streams pty."
error_code PTY_GETPTY_FSTAT, "fstat of master pty failed"
error_code PTY_OPEN_SLAVE_REVOKEFAIL, "Failed to revoke slave side of pty"
error_code PTY_UPDATE_UTMP_PROCTYPE_INVALID, "bad process type passed to pty_update_utmp"
+error_code PTY_OPEN_SLAVE_TOOSHORT, "Slave pty name is zero-length"