Bug 16849
| Summary: | If root's umask is 077 then only root can read the created /etc/minirc.dfl | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Jarno Huuskonen <jarno.huuskonen> |
| Component: | minicom | Assignee: | Crutcher Dunnavant <crutcher> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 6.2 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2000-08-24 23:32:45 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Summary says it all. Here's an ugly (very briefly tested!!) patch: -Jarno --- src/config.c-old Thu Aug 24 12:18:55 2000 +++ src/config.c Thu Aug 24 12:19:51 2000 @@ -1221,13 +1221,17 @@ /* Root saves new configuration */ if (real_uid == 0) { - if ((fp = fopen(parfile, "w")) == (FILE *)NULL) { + /* Jarno if umask is 077 then only root can read the config*/ + if ((fp = fopen(parfile, "w")) == (FILE *)NULL) { werror(_("Cannot write to %s"), parfile); return(-1); } writepars(fp, 1); - fclose(fp); - werror(_("Configuration saved")); + fclose(fp); + /* Try to chmod the file */ + chmod( parfile, (mode_t) 0644 ); + + werror(_("Configuration saved")); } else { /* Mortals save their own configuration */ if ((fp = sfopen(pparfile, "w")) == (FILE *)NULL) {