flog(LOG_ERR, "could not change to home directory for %s: %s", pwd->pw_name, strerror(errno));
exit(1);
}
flog(LOG_ERR, "could not change to home directory for %s: %s", pwd->pw_name, strerror(errno));
exit(1);
}
putenv(sprintf2("HOME=%s", pwd->pw_dir));
putenv(sprintf2("SHELL=%s", pwd->pw_shell));
putenv(sprintf2("USER=%s", pwd->pw_name));
putenv(sprintf2("HOME=%s", pwd->pw_dir));
putenv(sprintf2("SHELL=%s", pwd->pw_shell));
putenv(sprintf2("USER=%s", pwd->pw_name));
/* There's whole load of other stuff one could want to do here --
* getting Kerberos credentials, running PAM session modules, and
* who knows what. I'll add them along as I find them useful. */
/* There's whole load of other stuff one could want to do here --
* getting Kerberos credentials, running PAM session modules, and
* who knows what. I'll add them along as I find them useful. */
case 'm':
if((minuid = atoi(optarg)) < 1) {
fprintf(stderr, "userplex: argument to -m must be greater than 0\n");
case 'm':
if((minuid = atoi(optarg)) < 1) {
fprintf(stderr, "userplex: argument to -m must be greater than 0\n");