Fwd: RE: VFS Permission Management

Weltall <[email protected]>
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <CAAR4zyS+P-EB3peSEDTwuhtBdUykAqRieCXHJ5_r1_UR1UT6QQ@mail.gmail.com>
I'd say the Fs backend should be a separate plugin so the first part should
cover on res question.
---------- Forwarded message ----------
From: "Eunsoo Roh" <[email protected]>
Date: Jun 12, 2012 6:03 AM
Subject: RE: [Crystal-develop] VFS Permission Management
To: <[email protected]>

 My plan was to make it UNIX-based by default. That is, it indicates
whom r/w/x permissions are applied for (user/group/others).
I'm considering both string literals (e.g. "user", "group", "others") and
numeric constants (e.g. USER=1 GROUP=2 OTHERS=(3 or 4)) for unix presets,
since those methods only deal with current ownerships. Octal-style
parameters might come much more convenient in this case, so they could be
added as well.
If ACL is supported on the system (i.e. Windows), it might detect that on
./configure phase and unlock additional features. That field could be
used for user/group names or ACL security identifiers in such cases.
Still, default behavior is emulating unix permissions on plain Win32:
owner, group of owner, (others: possibly everyone?). That might not be
required on cygwin since it already emulates its own unix permissions.

Perhaps I'd need to provide an additional interface to deal with actual
ownerships (for supported filesystems).

P.S: I concluded that OS filesystem should not be pluggable seperately
from VFS plugin. I think it should stay in main VFS plugin: is this
correct?

------------------------------
Date: Mon, 11 Jun 2012 20:33:49 +0200
Subject: Fwd: [Crystal-develop] VFS Permission Management
From: [email protected]
To: [email protected]


Care to specify that point? what is user actually going to be used for?
ownership in unix style or whom is going to be given permission?

---------- Forwarded message ----------
From: *res* <[email protected]>
Date: 2012/6/11
Subject: Re: [Crystal-develop] VFS Permission Management
To: [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

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.