Wrong device permision

Michal Gust m.gust at sh.cvut.cz
Wed Dec 21 12:50:36 UTC 2005


Hi

Tzafrir Cohen wrote:

> Hi
> 
> On Tue, Dec 20, 2005 at 08:46:15PM +0100, Michal Gust wrote:
> 
>>Package: zaptel-source
>>Version: 1:1.2.1-1
> 
> 
> Bug reports are submited to submit at bugs.debian.org . Anyway, it would
> have ended up here anyway,

I considered it's minor problem and How-To advices send it to 
maintonly at bugs. To send it to pkg-voip-maintainers is just shortcut. 
Second reason is that BTS keep email addresses in format suitable for 
address harvesters and I receive enough SPAM already :-(

>>Dear team,
>>
>>Asterisk init script starts Asterisk under asterisk user. Devices under 
>>/dev/zap are created with 644 permission under user who compile the 
>>source code - usually root. 
> 
> 
> Asterisk is not the only user of zaptel . Thus those devices are created
> with permissions 660 root.comm  (This is done in the postinst script of 
> the package zaptel) and asterisk is added to the group comm (this is
> done in the postinst script of Asterisk)
 >
>>Therefore Asterisk started with default init 
>>script doesn't have permission to access to it. I think the right way to 
>>resolve problem is to change Makefile in zaptel-source package 
> 
> 
> Regardless of the changes you want to make, the right place for them is
> in the package zaptel . zaptel generates all the userspace tools and
> settings. zaptel-source allows generating a kernel-specific modules
> package (zaptel-modules-<kernel-version>, "zaptel-modules") that 
> includes only the modules themselves. You may have multiple
> zaptel-modules packages installed on your system, and only the one for
> the current kernel version does something useful. Thus it should not
> include any redundant userspace settings.

OK, but ...

I've deeper studied the scripts and problem is probably with simple user 
approach to compiling things (my too). Everything happens correctly if 
you use "make modules" and "make install-modules" commands or easiest 
way - with "module-assistant" help. But average user without good 
knowledge of Debian utilities installs debian-source package, unpacks 
tarball and uses "make" or "make modules" to compile it. Then if "make 
modules_install" what he is familiar with from vanilla kernel compiling 
doesn't work he probably uses simply "make install" command without 
searching for proper method. And "make install" calls device section of 
the Makefile what removes all devices under /dev/zap and creates them 
again with wrong privileges. In context what you wrote the best way is 
probably to remove redundant parts of Makefile and to change sections 
all and install that they will lead to sections modules and 
install-modules I think.

It’s just improvement for users who don’t use right Debian utilities not 
to be confused about rewritten privileges.

Michal Gust.



More information about the Pkg-voip-maintainers mailing list