Mailinglist Archive: yast-devel (48 mails)

< Previous Next >
Re: [yast-devel] Gloves: Permissions Overview
On Thu, 29 Mar 2012 11:59:47 +0200
"Michal Filka" <michal.filka@xxxxxxx> wrote:

There should be always some restriction. All /etc/sysconfig is just
sysconfigs, but permission to this files can be really various.

My idea is that inside of add/edit action you have something ( you
have ruby, so various nice ways ) that map file to lense. And then
you just pass map to augeas with given lense.

So in code of directory agent can be something like

lense = case file
when /ifcfg-.*/ then "sysconfig.lense"
when /scrips/ then "bash.lense"
else raise "unsuported File"

I haven't so much experience with ruby, so I thought about C++ like
approach ;-)

class SysconfigAgent < ConfigAgentService::FileService

as a generic ancestor of agents accessing sysconfig files (so not
binded to particular file)

It can use already implemented API.


to describe current state and plans it is slightly different.
We have FileAgent. There should be ( I hope in near future) augeas

so then it should look like

Krb5Conf < ConfigAgentService::FileService
include AugeasParser # detect that agent use augeas for
augeas_lense = "something.lns" #and define which lense use
end #and in common case this should be everything for file agent

So it is slightly different and more abstract. Of course you can create
class that brings togethere these three lines and name is then enough.


Josef Reidinger
Software Engineer Appliance Department

SUSE LINUX, s. r. o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >