diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index 3d52d0f8b91..32d11610d71 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -475,6 +475,7 @@ write_root_xprofile(char *str) fp = fopen(*cp, "w"); if (fp) { fwrite(str, 1, len, fp); + fchmod(fileno(fp), 0755); fclose(fp); } } diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index 3d52d0f8b91..32d11610d71 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -475,6 +475,7 @@ write_root_xprofile(char *str) fp = fopen(*cp, "w"); if (fp) { fwrite(str, 1, len, fp); + fchmod(fileno(fp), 0755); fclose(fp); } } diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 3d52d0f8b91..32d11610d71 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -475,6 +475,7 @@ write_root_xprofile(char *str) fp = fopen(*cp, "w"); if (fp) { fwrite(str, 1, len, fp); + fchmod(fileno(fp), 0755); fclose(fp); } }