|
Bugzilla – Full Text Bug Listing |
| Summary: | patch behavior differs depending on where /tmp is located | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Andreas Gruenbacher <agruen> |
| Component: | Basesystem | Assignee: | Andreas Gruenbacher <agruen> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | Alpha 4 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
Found to be an obscure bug in my patch remember-backup-files.diff. |
Patch succeeds in patching a read-only file if /tmp is on the same file system as the patches file (case A), and fails if /tmp is on another file system (case B): Case A: rename("/tmp/poz7rGZg", "mm/filemap.c") = 0 stat("mm/filemap.c", {st_mode=S_IFREG|0644, st_size=65396, ...}) = 0 chmod("mm/filemap.c", 0100444) = 0 Case B: rename("/tmp/poIg66mc", "mm/filemap.c") = -1 EXDEV (Invalid cross-device link) mkdir("mm", 0777) = -1 EEXIST (File exists) open("/tmp/poIg66mc", O_RDONLY|O_LARGEFILE) = 4 open("mm/filemap.c", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0100644) = -1 EACCES (Permission denied) It should exhibit the same behavior in both cases; this could be achieved by first unlinking the destination file in case B, either after seeing -EACCES, or before trying the open that currently fails.