Patch to improve afs support

Booker C. Bense bbense at networking.stanford.edu
Tue Oct 9 04:52:05 EST 2001


- The following patch moves the chdir(pw->pw_dir) section to
after the afs login attempt section in session.c. This
allows paranoid people that don't want to give

	system:anyuser l

access to their home dir to login.

diff -r1.1.1.1 session.c
1346,1354d1345
<       /* Change current directory to the user\'s home directory. */
<       if (chdir(pw->pw_dir) < 0) {
<               fprintf(stderr, "Could not chdir to home directory %s:
%s\n",
<                       pw->pw_dir, strerror(errno));
< #ifdef HAVE_LOGIN_CAP
<               if (login_getcapbool(lc, "requirehome", 0))
<                       exit(1);
< #endif
<       }
1372a1364,1374
>
>       /* Change current directory to the user\'s home directory. */
>       if (chdir(pw->pw_dir) < 0) {
>               fprintf(stderr, "Could not chdir to home directory %s:
%s\n",
>                       pw->pw_dir, strerror(errno));
> #ifdef HAVE_LOGIN_CAP
>               if (login_getcapbool(lc, "requirehome", 0))
>                       exit(1);
> #endif
>       }
>





More information about the openssh-unix-dev mailing list