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]
Date:	Fri, 15 Feb 2008 09:58:29 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Kohei KaiGai <kaigai@...jp.nec.com>
CC:	akpm@...l.org, "Serge E. Hallyn" <serue@...ibm.com>,
	"Andrew G. Morgan" <morgan@...nel.org>, jmorris@...ei.org,
	linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org, adobriyan@...il.com
Subject: Re: [PATCH] exporting capability code/name pairs (try #5)

Kohei KaiGai wrote:

<...snip...>

> +static int __init capability_export_names(void)
> +{
> +	/* make /sys/kernel/capability */
> +	capability_kobj = kobject_create_and_add("capability", kernel_kobj);
> +	if (!capability_kobj)
> +		goto error0;
> +
> +	/* make /sys/kernel/capability/names */
> +	if (sysfs_create_group(capability_kobj,
> +			       &capability_name_attr_group))
> +		goto error1;
> +
> +	/* make /sys/kernel/capability/codes */
> +	if (sysfs_create_group(capability_kobj,
> +			       &capability_code_attr_group))
> +		goto error2;
> +
> +	if (sysfs_create_file(capability_kobj,
> +			      &cap_version_attr.attr))
> +		goto error3;
> +
> +	return 0;
> +
> +error3:
> +	sysfs_remove_group(capability_kobj, &capability_code_attr_group);
> +error2:
> +	sysfs_remove_group(capability_kobj, &capability_name_attr_group);
> +error1:
> +	kobject_put(capability_kobj);
> +error0:
> +	printk(KERN_ERR "Unable to export capabilities\n");
> +
> +	return 0;

Should return -EFXXX ..

> +}
> +__initcall(capability_export_names);
> 

--
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