lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110729204116.GA3207@stro.at>
Date:	Fri, 29 Jul 2011 22:41:16 +0200
From:	Maximilian Attems <max@...o.at>
To:	Mike Waychison <mikew@...gle.com>
Cc:	"Andrew G. Morgan" <agm@...gle.com>,
	Eric Northup <digitaleric@...gle.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	"H. Peter Anvin" <hpa@...or.com>,
	Eric Paris <eparis@...isplace.org>, klibc@...or.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/2] syscalls: Add capset and capget

On Tue, 19 Jul 2011, Mike Waychison wrote:

> Add the capset and capget system calls to klibc so that userland can
> invoke them.
> 
> Signed-off-by: Mike Waychison <mikew@...gle.com>
> ---
>  usr/include/sys/capability.h   |   10 ++++++++++
>  usr/klibc/SYSCALLS.def         |    6 ++++++
>  usr/klibc/syscalls/syscommon.h |    1 +
>  3 files changed, 17 insertions(+), 0 deletions(-)
>  create mode 100644 usr/include/sys/capability.h
> 
> diff --git a/usr/include/sys/capability.h b/usr/include/sys/capability.h
> new file mode 100644
> index 0000000..84ad419
> --- /dev/null
> +++ b/usr/include/sys/capability.h
> @@ -0,0 +1,10 @@
> +#ifndef _SYS_CAPABILITY_H
> +#define _SYS_CAPABILITY_H
> +
> +#include <klibc/extern.h>
> +#include <linux/capability.h>
> +
> +__extern int capget(cap_user_header_t hdrp, cap_user_data_t datap);
> +__extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
> +
> +#endif				/* _SYS_CAPABILITY_H */
> diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
> index d3279c7..ee3ffa9 100644
> --- a/usr/klibc/SYSCALLS.def
> +++ b/usr/klibc/SYSCALLS.def
> @@ -77,6 +77,12 @@ int setfsgid32,setfsgid::setfsgid(gid_t);
>  int setresuid32,setresuid::setresuid(int, uid_t, uid_t, uid_t);
>  
>  /*
> + * POSIX Capabilities
> + */
> +int capget(cap_user_header_t, cap_user_data_t);
> +int capset(cap_user_header_t, cap_user_data_t);
> +
> +/*
>   * Filesystem-related system calls
>   */
>  int mount(const char *, const char *, const char *, unsigned long, const void *);
> diff --git a/usr/klibc/syscalls/syscommon.h b/usr/klibc/syscalls/syscommon.h
> index 0acae12..78f8858 100644
> --- a/usr/klibc/syscalls/syscommon.h
> +++ b/usr/klibc/syscalls/syscommon.h
> @@ -12,6 +12,7 @@
>  
>  #include <poll.h>
>  #include <sched.h>
> +#include <sys/capability.h>
>  #include <sys/dirent.h>
>  #include <sys/klog.h>
>  #include <sys/mman.h>

this looks good to me.
thanks will add to klibc repo soonest.

-- 
maks
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ