public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Nick Garnett <nickg@ecoscentric.com>
To: "Vincent Catros" <Vincent.Catros@elios-informatique.fr>
Cc: <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] implementing fchown & fchmod
Date: Thu, 04 Dec 2003 11:31:00 -0000	[thread overview]
Message-ID: <m3r7zkvmxr.fsf@miso.calivar.com> (raw)
In-Reply-To: <002501c3ba47$79b1ddd0$7407a8c0@figuier>

"Vincent Catros" <Vincent.Catros@elios-informatique.fr> writes:

> Hello,
> 
> In order to provide some file access control I would like to set and
> retreave "uid", "gid" and "mode".
> 
> It seems that apropriate functions are :
> - fchown & fchmod to set those parameters.
> - fstat to reatreve those parameters.
> 
> Unfortunatly, fchown and fchmod are not implemented with eCos.

The first question is why do you want to do this? eCos does not have
any other forms of protection of security and any use of uid/gid etc
would be totally pointless. What exactly do you need this for? And
which filesystem are you using this on?

> 
> So, I plan to do it.
> 
> My question is :
> 
> How to change "uid", "gid" and "mode" at file system level?
> 
> AFAIK, I need setattr function to be exported by the file system (which
> is not the case for the moment).
> Is it true or is there an other way?

The getinfo() and setinfo() functions exist for adding these sorts of
operations. Just add the appropriate keys and data structures to
fileio.h and you're away.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

      reply	other threads:[~2003-12-04 11:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-04  9:14 Vincent Catros
2003-12-04 11:31 ` Nick Garnett [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3r7zkvmxr.fsf@miso.calivar.com \
    --to=nickg@ecoscentric.com \
    --cc=Vincent.Catros@elios-informatique.fr \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).