https://bugs.kde.org/show_bug.cgi?id=418499

--- Comment #2 from Harald Sitter <sit...@kde.org> ---
If the umask strips +x we really shouldn't put it back in, beyond that I'm
fairly unopinionated on the matter.
That being said, if we want to have +x preserved we kind of need a better
separation of desired permission outcomes:

- implicit permissions (the new default for boundary crossing copies): copyjob
passes in the existing permissions and the slave must "create" with these AND
must honor umask
- explicit permissions (the default for non-boundary crossing copies): copyjob
passes in permission and the slave must call chmod to ensure those permissions
are applied regardless of umask
- default permissions: same as implicit but the permissions are some default
value

implicit permission would then preserve the entire mode in so far as the umask
doesn't strip bits.

API changes I am thinking of:

```
Mode {
 Auto, /* boundary-crossing: Implicit; !boundary-crossing: Explicit */
 Implicit, /* honor umask */
 Explicit, /* override umask */
 Default /* 644 */ }
CopyJob::setPermissionMode(Mode)
deprecated CopyJob::setDefaultPermissions(bool b) { setPermissionMode(b ?
Default : Auto) }
```

On the protocol side I suppose we can simply add another value that carries the
mode and deprecate SlaveBase::copy(QUrl,int,JobFlags) in favor of
copy(QUrl,int,Mode,JobFlags) with the dispatch function taking care of
compatibility.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to