1. 21 9月, 2012 23 次提交
  2. 20 9月, 2012 1 次提交
  3. 18 9月, 2012 9 次提交
    • E
      userns: Convert quota · 1a06d420
      Eric W. Biederman 提交于
      Now that the type changes are done, here is the final set of
      changes to make the quota code work when user namespaces are enabled.
      
      Small cleanups and fixes to make the code build when user namespaces
      are enabled.
      
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      1a06d420
    • E
      userns: Convert quota netlink aka quota_send_warning · 431f1974
      Eric W. Biederman 提交于
      Modify quota_send_warning to take struct kqid instead a type and
      identifier pair.
      
      When sending netlink broadcasts always convert uids and quota
      identifiers into the intial user namespace.  There is as yet no way to
      send a netlink broadcast message with different contents to receivers
      in different namespaces, so for the time being just map all of the
      identifiers into the initial user namespace which preserves the
      current behavior.
      
      Change the callers of quota_send_warning in gfs2, xfs and dquot
      to generate a struct kqid to pass to quota send warning.  When
      all of the user namespaces convesions are complete a struct kqid
      values will be availbe without need for conversion, but a conversion
      is needed now to avoid needing to convert everything at once.
      
      Cc: Ben Myers <bpm@sgi.com>
      Cc: Alex Elder <elder@kernel.org>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      431f1974
    • E
      userns: Convert qutoactl · 74a8a103
      Eric W. Biederman 提交于
      Update the quotactl user space interface to successfull compile with
      user namespaces support enabled and to hand off quota identifiers to
      lower layers of the kernel in struct kqid instead of type and qid
      pairs.
      
      The quota on function is not converted because while it takes a quota
      type and an id.  The id is the on disk quota format to use, which
      is something completely different.
      
      The signature of two struct quotactl_ops methods were changed to take
      struct kqid argumetns get_dqblk and set_dqblk.
      
      The dquot, xfs, and ocfs2 implementations of get_dqblk and set_dqblk
      are minimally changed so that the code continues to work with
      the change in parameter type.
      
      This is the first in a series of changes to always store quota
      identifiers in the kernel in struct kqid and only use raw type and qid
      values when interacting with on disk structures or userspace.  Always
      using struct kqid internally makes it hard to miss places that need
      conversion to or from the kernel internal values.
      
      Cc: Jan Kara <jack@suse.cz>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Ben Myers <bpm@sgi.com>
      Cc: Alex Elder <elder@kernel.org>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      74a8a103
    • E
      userns: Convert configfs to use kuid and kgid where appropriate · 69552c0c
      Eric W. Biederman 提交于
      Cc: Joel Becker <jlbec@evilplan.org>
      Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      69552c0c
    • E
      userns: Convert extN to support kuids and kgids in posix acls · af84df93
      Eric W. Biederman 提交于
      Convert ext2, ext3, and ext4 to fully support the posix acl changes,
      using e_uid e_gid instead e_id.
      
      Enabled building with posix acls enabled, all filesystems supporting
      user namespaces, now also support posix acls when user namespaces are enabled.
      
      Cc: Theodore Tso <tytso@mit.edu>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andreas Dilger <adilger.kernel@dilger.ca>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      af84df93
    • E
      userns: Teach trace to use from_kuid · d20b92ab
      Eric W. Biederman 提交于
      - When tracing capture the kuid.
      - When displaying the data to user space convert the kuid into the
        user namespace of the process that opened the report file.
      
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      d20b92ab
    • E
      userns: Convert bsd process accounting to use kuid and kgid where appropriate · f8f3d4de
      Eric W. Biederman 提交于
      BSD process accounting conveniently passes the file the accounting
      records will be written into to do_acct_process.  The file credentials
      captured the user namespace of the opener of the file.  Use the file
      credentials to format the uid and the gid of the current process into
      the user namespace of the user that started the bsd process
      accounting.
      
      Cc: Pavel Emelyanov <xemul@openvz.org>
      Reviewed-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      f8f3d4de
    • E
      userns: Convert taskstats to handle the user and pid namespaces. · 4bd6e32a
      Eric W. Biederman 提交于
      - Explicitly limit exit task stat broadcast to the initial user and
        pid namespaces, as it is already limited to the initial network
        namespace.
      
      - For broadcast task stats explicitly generate all of the idenitiers
        in terms of the initial user namespace and the initial pid
        namespace.
      
      - For request stats report them in terms of the current user namespace
        and the current pid namespace.  Netlink messages are delivered
        syncrhonously to the kernel allowing us to get the user namespace
        and the pid namespace from the current task.
      
      - Pass the namespaces for representing pids and uids and gids
        into bacct_add_task.
      
      Cc: Balbir Singh <bsingharora@gmail.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      4bd6e32a
    • E
      userns: Convert audit to work with user namespaces enabled · cca080d9
      Eric W. Biederman 提交于
      - Explicitly format uids gids in audit messges in the initial user
        namespace. This is safe because auditd is restrected to be in
        the initial user namespace.
      
      - Convert audit_sig_uid into a kuid_t.
      
      - Enable building the audit code and user namespaces at the same time.
      
      The net result is that the audit subsystem now uses kuid_t and kgid_t whenever
      possible making it almost impossible to confuse a raw uid_t with a kuid_t
      preventing bugs.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      cca080d9
  4. 14 9月, 2012 3 次提交
  5. 07 9月, 2012 3 次提交
  6. 24 8月, 2012 1 次提交