About this list Date view Thread view Subject view Author view Attachment view

From: Alex Lyashkov (shadow_at_psoft.net)
Date: Tue 24 Jun 2003 - 19:56:58 BST


On Tuesday 24 June 2003 21:17, Chris Murton wrote:
> vserver-1:/# hostname host-28
> hostname: you must be root to change the host name
> vserver-1:/# whoami
> root
>
> Any thoughts? ;)
>
Any original vserver have this bug.
I fix it in snapshot rh-vserver-1052304359.diff.gz (7 may).
For fix you must change one lines in kernel/sys.c.
From
asmlinkage long sys_sethostname(char *name, int len)
{
        int errno;
        char *nodename;

        if( (!capable(CAP_SYS_ADMIN)))
                return -EPERM;
To
asmlinkage long sys_sethostname(char *name, int len)
{
        int errno;
        char *nodename;

        if( (!capable(CAP_SYS_ADMIN)) && ! is_vps_admin())
                return -EPERM;

Also need fix sys_setdomainname.

-- 
With best regards,
Alex


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 24 Jun 2003 - 20:20:30 BST by hypermail 2.1.3