|
Boost : |
Subject: Re: [boost] [filesystem]Setting permissions/chmod
From: Jorge Lodos Vigil (lodos_at_[hidden])
Date: 2008-10-13 09:26:01
Hi
Beman Dawes wrote:
> He asked about providing a function (or functions) that could
> be adapted to various operating systems. Perhaps something like:
>
> void set_permissions( const path & p, const permissions
> & perms );
> void set_ownership( const path & p, const ownership & owners );
>
> Where permissions and ownership are implementation-defined.
>
I believe security is so important that it can not be fully left to the implementator.
There are several other libraries that could benefit from a well defined security model, such as asio and interprocess.
On the other hand a portable definition is very hard to obtain. Portability issues include not only platforms but file systems as well, as is the case with other file attributes.
Perhaps a minimal set of constructors should be specified for security objects covering the most common cases and allowing for more implementation defined constructors.
IMHO security deserves its own library, defining concepts such as users, groups, acls, execution context, etc. Unfortunately I currently don't have the time to come up with a serious proposal :-(
Best regards
Jorge
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk