+2008-01-28 Thorsten Kukuk <kukuk@suse.de>
+
+ * modules/pam_unix/passverify.c: Fix compiling without SELinux
+ support.
+
2008-01-24 Tomas Mraz <t8m@centrum.cz>
* modules/pam_unix/bigcrypt.c (bigcrypt): Use crypt_r() when
macros. Add prototype for create_password_hash().
* modules/pam_unix/unix_update.8.xml: New file.
* modules/pam_unix/unix_chkpwd.8.xml: Likewise.
-
+
* modules/pam_unix/Makefile.am: Add unix_update helper.
* modules/pam_unix/pam_unix_passwd.c: Move functions i64c(),
crypt_md5_wrapper(), save_old_password(), _update_passwd() and
retval = PAM_AUTH_ERR;
}
}
-
+
if (pp)
_pam_delete(pp);
D(("done [%d].", retval));
retval = get_account_info(name, pwd, &spwdent);
#else
retval = get_account_info(pamh, name, pwd, &spwdent);
-#endif
+#endif
if (retval != PAM_SUCCESS) {
return retval;
}
/* <where> must point to a buffer of at least <length>+1 length */
static void
crypt_make_salt(char *where, int length)
-{
+{
struct timeval tv;
MD5_CTX ctx;
unsigned char tmp[16];
memset(sp, '\0', strlen(sp));
return crypt_md5_wrapper(password);
}
-
+
return x_strdup(sp);
}
confined = 0;
return confined;
}
-
+
/* let's try opening shadow read only */
if ((fd=open("/etc/shadow", O_RDONLY)) != -1) {
close(fd);
confined = 1;
return confined;
}
-
- /* shadow opening failed because of other reasons let's try
+
+ /* shadow opening failed because of other reasons let's try
creating a file in /etc */
if ((fd=mkstemp(tempfile)) != -1) {
unlink(tempfile);
confined = 0;
return confined;
}
-
+
confined = 1;
return confined;
}
int found = 0;
struct passwd *pwd = NULL;
struct stat st;
+#ifdef WITH_SELINUX
security_context_t prev_context=NULL;
+#endif
if (howmany < 0) {
return PAM_SUCCESS;
FILE *pwfile, *opwfile;
int err = 1;
int oldmask;
+#ifdef WITH_SELINUX
security_context_t prev_context=NULL;
+#endif
oldmask = umask(077);
#ifdef WITH_SELINUX
#ifdef HELPER_COMPILE
helper_log_err(
#else
- pam_syslog(pamh,
+ pam_syslog(pamh,
#endif
LOG_NOTICE, "password changed for %s", forwho);
else
FILE *pwfile, *opwfile;
int err = 1;
int oldmask;
+#ifdef WITH_SELINUX
security_context_t prev_context=NULL;
+#endif
spwdent = getspnam(forwho);
if (spwdent == NULL) {
#ifdef HELPER_COMPILE
helper_log_err(
#else
- pam_syslog(pamh,
+ pam_syslog(pamh,
#endif
LOG_NOTICE, "password changed for %s", forwho);
else
}
}
offset += rbytes;
- }
+ }
/* clear up */
if (offset > 0 && npass > 0) {