All of lore.kernel.org
 help / color / mirror / Atom feed
From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Pushd and Propd issue in filesystem
Date: Tue, 6 Aug 2013 16:35:29 +0200	[thread overview]
Message-ID: <20130806143529.GA3007@debian.debian> (raw)
In-Reply-To: <CAK25hWMZedbsgDoKQGezziV9h7T_ZeFMJ6L0LRUKacmfOpAbgA@mail.gmail.com>

On Tue, Aug 06, 2013 at 12:06:52PM +0530, Saket Sinha wrote:
> I have to support pushd and popd from userspace in a filesystem that I have
> designed.
> 
> In my filesystem driver, to implement it I have done the following
> 
> for popd - the driver implementation is
> https://github.com/disdi/hepunion/blob/master/fs/hepunion/hepunion.h#L386
> #define pop_root() \
> current->fsuid = context->uid; \
> current->fsgid = context->gid; \
> recursive_mutex_unlock(&context->id_lock)

What you're seeing there are *not* implementations of the pushd/popd
bash commands; these just use chdir, as you can find out by running bash
under strace.

> 
> for pushd - the driver implementation is
> https://github.com/disdi/hepunion/blob/master/fs/hepunion/hepunion.h#L393
> #define push_root() \
> recursive_mutex_lock(&context->id_lock); \
> context->uid = current->fsuid; \
> context->gid = current->fsgid; \
> current->fsuid = 0; \
> current->fsgid = 0
> 
> 
> But this implementation is failing at run time.

How is it failing?



Thanks,
Jonathan Neusch?fer

      reply	other threads:[~2013-08-06 14:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06  6:36 Pushd and Propd issue in filesystem Saket Sinha
2013-08-06 14:35 ` Jonathan Neuschäfer [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=20130806143529.GA3007@debian.debian \
    --to=j.neuschaefer@gmx.net \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.