]> git.proxmox.com Git - mirror_lxcfs.git/log
mirror_lxcfs.git
9 years agoBetter detect the cgmanager version
Stéphane Graber [Mon, 26 Jan 2015 22:07:21 +0000 (17:07 -0500)]
Better detect the cgmanager version

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoRelease LXCFS 0.4 lxcfs-0.4
Stéphane Graber [Fri, 23 Jan 2015 18:45:52 +0000 (13:45 -0500)]
Release LXCFS 0.4

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoRemount / recursive ms-slave in our new mntns
Stéphane Graber [Fri, 23 Jan 2015 18:44:38 +0000 (13:44 -0500)]
Remount / recursive ms-slave in our new mntns

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoRevert "remount / ms-slave"
Stéphane Graber [Fri, 23 Jan 2015 18:44:12 +0000 (13:44 -0500)]
Revert "remount / ms-slave"

This will affect the hostns, let's go with my implementation instead :)

This reverts commit 1ff1e28c04267064c73c5b968d31f6e5f2e1f3fa.

9 years agoremount / ms-slave
Serge Hallyn [Fri, 23 Jan 2015 18:38:42 +0000 (12:38 -0600)]
remount / ms-slave

to avoid propagating proc mounts from get_pid1_time() back to host

Signed-ff-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoRelease LXCFS 0.3 lxcfs-0.3
Stéphane Graber [Wed, 21 Jan 2015 16:15:11 +0000 (11:15 -0500)]
Release LXCFS 0.3

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoFix LXC config install path
Stéphane Graber [Wed, 21 Jan 2015 06:14:40 +0000 (01:14 -0500)]
Fix LXC config install path

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoRelease LXCFS 0.2 lxcfs-0.2
Stéphane Graber [Tue, 20 Jan 2015 19:48:01 +0000 (14:48 -0500)]
Release LXCFS 0.2

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoUpdate the lxc hook and add a LXC config file
Stéphane Graber [Tue, 20 Jan 2015 18:07:06 +0000 (13:07 -0500)]
Update the lxc hook and add a LXC config file

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agotests: Fix return value
Stéphane Graber [Mon, 12 Jan 2015 18:16:19 +0000 (13:16 -0500)]
tests: Fix return value

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoRelease LXCFS 0.1 lxcfs-0.1
Stéphane Graber [Fri, 9 Jan 2015 23:59:34 +0000 (18:59 -0500)]
Release LXCFS 0.1

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoFix autotools
Stéphane Graber [Fri, 9 Jan 2015 23:58:15 +0000 (18:58 -0500)]
Fix autotools

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agotest: Introduce a basic cgroup tree test
Stéphane Graber [Fri, 9 Jan 2015 21:49:13 +0000 (16:49 -0500)]
test: Introduce a basic cgroup tree test

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agotest: Introduce a basic proc tree test
Stéphane Graber [Fri, 9 Jan 2015 21:29:22 +0000 (16:29 -0500)]
test: Introduce a basic proc tree test

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoupdate docs
Serge Hallyn [Thu, 8 Jan 2015 22:29:11 +0000 (16:29 -0600)]
update docs

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoadd lxcfs container hook and comment
Serge Hallyn [Thu, 8 Jan 2015 22:01:28 +0000 (16:01 -0600)]
add lxcfs container hook and comment

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agowrite: make sure to null terminate the buffer
Serge Hallyn [Thu, 8 Jan 2015 15:59:54 +0000 (09:59 -0600)]
write: make sure to null terminate the buffer

We are passed a size, respect it.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoAdd some more missing newlines
Stéphane Graber [Thu, 8 Jan 2015 15:45:39 +0000 (10:45 -0500)]
Add some more missing newlines

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agofix up pid conversion algorithm
Serge Hallyn [Wed, 7 Jan 2015 21:54:39 +0000 (15:54 -0600)]
fix up pid conversion algorithm

Mainly when the pid conversion task gets a ESRCH from sendmsg,
then it should send send the next message (with v='1' meaning
error) without first waiting for a ping from its peer, since
the peer already sent one and has gotten no response.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoUpdate README
Stéphane Graber [Sat, 27 Dec 2014 10:37:00 +0000 (11:37 +0100)]
Update README

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoAdd some more information to error messages
Stéphane Graber [Sat, 27 Dec 2014 10:27:27 +0000 (11:27 +0100)]
Add some more information to error messages

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoconvert pids at write to tasks and cgroup.procs files
Serge Hallyn [Sat, 27 Dec 2014 04:26:05 +0000 (22:26 -0600)]
convert pids at write to tasks and cgroup.procs files

we're not yet distinguishing between thread vs threadgroup moving.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge branch 'readtasks.pass.creds.2' into m.2
Serge Hallyn [Sat, 27 Dec 2014 03:09:14 +0000 (21:09 -0600)]
Merge branch 'readtasks.pass.creds.2' into m.2

9 years agoread: translate pids into the reader's pidns
Serge Hallyn [Fri, 26 Dec 2014 04:48:43 +0000 (22:48 -0600)]
read: translate pids into the reader's pidns

When reading a cgroupfs 'tasks' or 'cgroup.procs' file, we must translate
all pids from our namespace into the reader's.

TODO - convert writes

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoAdd missing line breaks
Stéphane Graber [Thu, 25 Dec 2014 21:13:45 +0000 (22:13 +0100)]
Add missing line breaks

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoimplement read of /proc/uptime
Serge Hallyn [Fri, 19 Dec 2014 03:48:30 +0000 (21:48 -0600)]
implement read of /proc/uptime

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoadd comment describing how we'll do uptime
Serge Hallyn [Thu, 18 Dec 2014 04:39:08 +0000 (22:39 -0600)]
add comment describing how we'll do uptime

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoimplement read for meminfo
Serge Hallyn [Thu, 18 Dec 2014 04:26:20 +0000 (22:26 -0600)]
implement read for meminfo

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoimplement read for /proc/stat
Serge Hallyn [Wed, 17 Dec 2014 21:04:17 +0000 (15:04 -0600)]
implement read for /proc/stat

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agomove comment about caching open results
Serge Hallyn [Wed, 17 Dec 2014 18:42:23 +0000 (12:42 -0600)]
move comment about caching open results

hoping to implement this soon

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoimplement cat of proc/cpuinfo
Serge Hallyn [Wed, 17 Dec 2014 18:22:15 +0000 (12:22 -0600)]
implement cat of proc/cpuinfo

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoadd boilerplate for the /proc file readdir+reads.
Serge Hallyn [Wed, 17 Dec 2014 06:34:45 +0000 (00:34 -0600)]
add boilerplate for the /proc file readdir+reads.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agocheck for permission at opendir
Serge Hallyn [Tue, 16 Dec 2014 20:30:33 +0000 (14:30 -0600)]
check for permission at opendir

So we don't surprise the caller at readdir

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agofix some error codes
Serge Hallyn [Tue, 16 Dec 2014 20:25:56 +0000 (14:25 -0600)]
fix some error codes

userspace is looking for EACCES not EPERM for common perm deny.
Also return einval for bad names, not eio.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agodon't try to build lxcfs.1 if help2man is not available
Serge Hallyn [Tue, 16 Dec 2014 19:58:19 +0000 (13:58 -0600)]
don't try to build lxcfs.1 if help2man is not available

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoremove stmt in lxcfs.c
Serge Hallyn [Tue, 16 Dec 2014 19:26:34 +0000 (13:26 -0600)]
remove stmt in lxcfs.c

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoHide cgroups not under caller's own cgroup
Serge Hallyn [Tue, 16 Dec 2014 17:20:17 +0000 (11:20 -0600)]
Hide cgroups not under caller's own cgroup

For a directory, we show an empty directory.  For any attempt to getattr
a file, we return -ENOENT.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoimplement chmod
Serge Hallyn [Tue, 16 Dec 2014 01:17:12 +0000 (19:17 -0600)]
implement chmod

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoremove some debug output
Serge Hallyn [Mon, 15 Dec 2014 23:55:53 +0000 (17:55 -0600)]
remove some debug output

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoimplement rmdir
Serge Hallyn [Mon, 15 Dec 2014 23:51:17 +0000 (17:51 -0600)]
implement rmdir

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoImplement chown
Serge Hallyn [Mon, 15 Dec 2014 23:23:55 +0000 (17:23 -0600)]
Implement chown

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoimplement write
Serge Hallyn [Mon, 15 Dec 2014 18:45:27 +0000 (12:45 -0600)]
implement write

Also fix the permission checking function.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoImplement mkdir
Serge Hallyn [Mon, 15 Dec 2014 02:21:03 +0000 (20:21 -0600)]
Implement mkdir

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoAdd support for file read
Serge Hallyn [Sat, 13 Dec 2014 04:27:20 +0000 (22:27 -0600)]
Add support for file read

To make 'cat /var/lib/lxcfs/cgroup/freezer/tasks' work, we also need for
getattr to actually give a file size.  So, do that.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agogetattr: fill in ownership of cgroup dirs.
Serge Hallyn [Fri, 12 Dec 2014 21:44:20 +0000 (15:44 -0600)]
getattr: fill in ownership of cgroup dirs.

Also check for privilege in uid namespaces over file uids.

And remove some extra debugging printfs.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #1 from hallyn/serge.2
Stéphane Graber [Fri, 12 Dec 2014 19:37:37 +0000 (21:37 +0200)]
Merge pull request #1 from hallyn/serge.2

Implement basic getattr/readdir

9 years agoAdd base lxcfs.c
Serge Hallyn [Fri, 12 Dec 2014 18:53:10 +0000 (12:53 -0600)]
Add base lxcfs.c

So far it just does getattr and readdir for /cgroup/*

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoadd autoconf boilerplate and cgmanager fns
Serge Hallyn [Fri, 12 Dec 2014 18:47:20 +0000 (12:47 -0600)]
add autoconf boilerplate and cgmanager fns

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoInitial commit
Stéphane Graber [Fri, 12 Dec 2014 12:44:09 +0000 (14:44 +0200)]
Initial commit

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>