1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

r18241: If replacing the krb5.conf, ensure it's readable.

Jeremy.
This commit is contained in:
Jeremy Allison 2006-09-08 01:16:01 +00:00 committed by Gerald (Jerry) Carter
parent 04fe034f4a
commit dfd93a3031

View File

@ -580,6 +580,16 @@ BOOL create_local_private_krb5_conf_for_domain(const char *realm, const char *do
tmpname, strerror(errno) ));
}
if (fchmod(fd, 0644)==-1) {
DEBUG(0,("create_local_private_krb5_conf_for_domain: fchmod failed for %s."
" Errno %s\n",
tmpname, strerror(errno) ));
unlink(tmpname);
close(fd);
TALLOC_FREE(dname);
return False;
}
ret = write(fd, file_contents, flen);
if (flen != ret) {
DEBUG(0,("create_local_private_krb5_conf_for_domain: write failed,"