mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r18241: If replacing the krb5.conf, ensure it's readable.
Jeremy. (This used to be commit dfd93a30311ff0e57ef23ae1f1cb58d4019a3eee)
This commit is contained in:
parent
01285feba1
commit
6cfe7be80e
@ -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,"
|
||||
|
Loading…
x
Reference in New Issue
Block a user