Re: VFS Permission Management
res <[email protected]>
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Message-ID | <[email protected]> |
On 11.06.2012 11:30, Weltall wrote: > Today the student working on VFSv2 (Eunsoo/touko) asked what to do if > his idea regarding a Set/GetPermission interface was ok. > I've discussed it a bit with jorrit and we wanted to see what others > thing about it. > Essentially touko suggested these signatures: > virtual bool GetPermission (const char *FileName, const char *User, > csFilePermission &oPerm) = 0; > virtual bool SetPermission (const char *FileName, const char *User, > const csFilePermission &iPerm) = 0; > > for the interface. > csFilePermission should have something similar to the unix style (so > r/w/x or octals) and user would be the "numeric constants on unix, and > security tokens (user/group) on windows". Would ‘User’ control the owner of the file? Or would it rather control to whom the given permissions apply (i.e. like an ACL)? > Probably the x flag will have > to be emulated in windows by doing something (as jorrit noticed) like > cygwin by checking the extension and setting the +x depending on that. FWIW, there could perhaps be a method (global constant?) that can be used to query whether the +x flag is emulated or not. (I tend towards an actual method – conceivably, there can be implementations that return that flag correctly on every platform, for example an archive-based file system.) > I'm not so sure about the user having a different behaviour depending on > the os, probably would be better to abstract it more considering also > that it would be missing the group field on unix systems. I guess if my first question is answered it will also provide part of an answer to this. -f.r. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Crystal-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crystal-develop
signature.asc
(application/pgp-signature, 262 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/WNPQACgkQNCTzcE/07ey0wgCfag563/bMaeBqxwOYnFIFWzBr qRUAnRaT/+arj+rf61xP5Uhi0Iq4p0jR =3Yib -----END PGP SIGNATURE-----