[2277] in Kerberos_V5_Development
Re: krb5-appl/167: krshd requires home directory
daemon@ATHENA.MIT.EDU (Sam Hartman)
Thu Feb 27 21:48:53 1997
Date: Thu, 27 Feb 1997 21:48:07 -0500 (EST)
From: Sam Hartman <hartmans@MIT.EDU>
To: Sam Hartman <hartmans@MIT.EDU>, tlyu@MIT.EDU
Cc: krbdev@MIT.EDU
`Sam Hartman' changed the state to `closed'.
State-Changed-From-To: open-closed
State-Changed-By: hartmans
State-Changed-When: Thu Feb 27 21:45:10 1997
State-Changed-Why:
Fixed; the fix should be included in the 1.0 patch release as Athena needs it.
I do not like this particular fix as it doesn't warn the user
that / has been used as a home directory. However, there is no good
way to easily do this from the parent process without violating
abstraction barriers. You can print a fatal message to the client,
but not really a warning. That, or I misread the code.
Index: appl/bsd/ChangeLog
===================================================================
RCS file: /mit/krbdev/.cvsroot/src/appl/bsd/ChangeLog,v
retrieving revision 5.235
diff -u -r5.235 ChangeLog
--- ChangeLog 1997/02/22 19:44:44 5.235
+++ ChangeLog 1997/02/27 15:58:37
@@ -1,3 +1,8 @@
+Thu Feb 27 10:58:07 1997 Sam Hartman <hartmans@luminous.MIT.EDU>
+
+ * krshd.c: Allow user to login with / as home directory if homedir
+ not found. [167]
+
Sat Feb 22 00:54:06 1997 Sam Hartman <hartmans@luminous.MIT.EDU>
* krlogin.c (mode): Clean up Posix terminal handling for NetBSD.
Index: appl/bsd/krshd.c
===================================================================
RCS file: /mit/krbdev/.cvsroot/src/appl/bsd/krshd.c,v
retrieving revision 5.68
diff -u -r5.68 krshd.c
--- krshd.c 1997/02/19 01:35:26 5.68
+++ krshd.c 1997/02/28 02:23:10
@@ -1012,11 +1012,11 @@
#endif /*CRAY*/
if (chdir(pwd->pw_dir) < 0) {
- syslog(LOG_ERR ,
- "Principal %s (%s@%s) for local user %s has no home directory.\n",
- kremuser, remuser, hostname, locuser);
- error("No remote directory.\n");
+ if(chdir("/") < 0) {
+ error("No remote directory.\n");
goto signout_please;
+ }
+ pwd->pw_dir = "/";
}
#ifdef KERBEROS