Re: [patch 5/12] lsm stacking v0.2: actual stacker module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting James Morris ([email protected]):
> On Thu, 30 Jun 2005 [email protected] wrote:
> 
> > +/* list modules */
> > +static ssize_t listmodules_read (struct stacker_kobj *obj, char *buff)
> > +{
> > +	ssize_t len = 0;
> > +	struct module_entry *m;
> > +
> > +	rcu_read_lock();
> > +	stack_for_each_entry(m, &stacked_modules, lsm_list) {
> > +		len += snprintf(buff+len, PAGE_SIZE - len, "%s\n",
> > +			m->module_name);
> > +	}
> > +	rcu_read_unlock();
> > +
> > +	return len;
> > +}
> > +
> 
> As far as I'm aware, sysfs nodes are supposed to contain one entity per 
> file.  Not sure what the alternative here is, though.

Thanks James, good point.

Documentation/filesystems/sysfs.txt seems a little soft on the issue,
saying it's "preferable".  So just to make sure:

Greg, should stacker be using its own filesystem?  There are 4
files:

	stop_responding: takes one input ("1")
	unload: takes one string
	lockdown: takes one input ("1")
	list_modules: outputs a list of strings, ie
		selinux
		cap_stack
	under a patched fedora kernel.

thanks,
-serge
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux