Bug 131323
Summary: | If smb.conf is deleted, program barfs on startup | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Gianni Tedesco <fcbugzilla> |
Component: | redhat-config-samba | Assignee: | Nils Philippsen <nphilipp> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 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: | 2004-10-09 23:33:21 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: |
Description
Gianni Tedesco
2004-08-30 23:58:47 UTC
Ah, now I see it's the case that the tool also won't create a working smb.conf if it has been deleted anyway, so this is a mode of operation that is not supported I guess. I guess it should just install a sane default smb.conf if it is missing, then work with that. Yeah, that'd be a ideal. All the tools should probably do likewise. Certainly they need to give the user a way out of a problem that is all too likely to occur. In fact it is possible for the tool to destroy or corrupt the smb.conf itself, look at line 196 in writeFile: fd = open(path, 'w') which does: open("/etc/samba/smb.conf", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666); We've truncated the old config without making sure that the new data is safe on the disk. If the system crashes, the disk fills, the power is cut or another process started writing here, then we have lost or corrupted the data. Ah, not to mention that the default mode needs fixing to prevent local root exploits if root (stupidly) decides to run without umask of 022 ;) At least system-config-network sets umask explicitly "Just to be safe". system-config-samba-1.2.20-1 (in Rawhide) should fix all three issues. Next time please open separate bg reports, thanks. |