Editing
0204.html
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<div class="links"> '''Re: [Vserver] issuing /sbin/reboot within a vserver reboots the host system...:'''<br /> Β <span class="small">vserver development mailing list</span>Β <br /> [<nowiki/>[[../|Next/Previous Months]]] [<nowiki/>[http://www.solucorp.qc.ca/miscprj/s_context.hc Main vserver Project Homepage]] [<nowiki/>[http://www.solucorp.qc.ca/mlist/index.hc?list=vserver Howto Subscribe/Unsubscribe]] [<nowiki/>[http://www.paul.sladen.org/vserver/ Paul Sladen's vserver stuff]] </div> <div align="center"> {| class="wikitable" border="2" width="100%" |- ! [[../|About this list]] ! [[date.html|Date view]] ! [[index.html|Thread view]] ! [[subject.html|Subject view]] ! [[author.html|Author view]] ! [[attachment.html|Attachment view]] |} </div> '''From:''' Herbert Poetzl ([mailto:herbert_at_13thfloor.at?Subject=Re:%20%5BVserver%5D%20issuing%20/sbin/reboot%20within%20a%20vserver%20reboots%20the%20host%20system... ''herbert_at_13thfloor.at''])<br /> '''Date:''' Thu 27 Jan 2005 - 20:25:52 GMT * '''Previous message:''' [[0203.html|Torsten Kurbad: "Re: [Vserver] issuing /sbin/reboot within a vserver reboots the host system..."]] * '''In reply to:''' [[0203.html|Torsten Kurbad: "Re: [Vserver] issuing /sbin/reboot within a vserver reboots the host system..."]] * '''Next in thread:''' [[0206.html|Torsten Kurbad: "Re: [Vserver] issuing /sbin/reboot within a vserver reboots the host system..."]] * '''Reply:''' [[0206.html|Torsten Kurbad: "Re: [Vserver] issuing /sbin/reboot within a vserver reboots the host system..."]] ----- On Thu, Jan 27, 2005 at 09:05:50PM +0100, Torsten Kurbad wrote:<br /> ''> Herbert Poetzl:''<br /> ''> > but you should never us it inside a vserver, as devfs gives''<br /> ''> > you access to _all_ devices present on your system, which''<br /> ''> > basically allows any vserver root user to do whatever he''<br /> ''> > likes with your harddisks (and more) ...''<br /> ''>''<br /> ''> I stopped it and created the device nodes you suggested. The vserver''<br /> ''> still comes up fine.''<br /> ''>''<br /> ''> > vshelper (and the alpha util-vserver tools) take care of''<br /> ''> > that now, reboot (or reboot -f) inside the vserver is''<br /> ''> > redirected to the helper which in turn cycles the vserver''<br /> ''> >''<br /> ''> > if a vserver manages to reboot your host, then you have''<br /> ''> > some connection to the host init present (like /dev/initctl)''<br /> ''> > or an ancient kernel running (which doesn't know about the''<br /> ''> > helper)''<br /> ''>''<br /> ''> And that's exactly what still doesn't work.''<br /> ''>''<br /> ''> On the root system:''<br /> ''>''<br /> ''> olymp ~ # cat /etc/sysctl.conf | grep vshelper''<br /> ''> kernel.vshelper=/usr/lib/util-vserver/vshelper''<br /> ''>''<br /> ''> olymp ~ # stat /usr/lib/util-vserver/vshelper''<br /> ''> File: `/usr/lib/util-vserver/vshelper'''<br /> ''> Size: 5534 Blocks: 16 IO Block: 4096 regular file''<br /> ''> Device: 805h/2053d Inode: 10739715 Links: 1''<br /> ''> Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)''<br /> ''> Access: 2005-01-25 10:55:35.000000000 +0100''<br /> ''> Modify: 2005-01-25 10:55:35.000000000 +0100''<br /> ''> Change: 2005-01-25 10:55:35.000000000 +0100''<br /> ''>''<br /> ''> olymp ~ # uname -r''<br /> ''> 2.4.29-vs1.2.10''<br /> ''>''<br /> ''> I wouldn't call that kernel exactly ancient (2.6.10-vs1.9.3 gave me''<br /> ''> Oopses during console login on the root server, so I downgraded to this''<br /> ''> - obviously more stable - version...)''<br /> ''>''<br /> ''> Within the vserver:''<br /> ''>''<br /> ''> zope3 ~ # reboot''<br /> ''>''<br /> ''> Broadcast message from root (pts/2) (Thu Jan 27 20:58:04 2005):''<br /> ''>''<br /> ''> The system is going down for reboot NOW!''<br /> ''> shutdown: /dev/initctl: No such file or directory''<br /> ''> init: /dev/initctl: No such file or directory''<br /> I guess the 'reboots the host' issue is gone now, right?<br /> next step is to use 'reboot -f' instead of reboot, if<br /> you do not have some kind of init (inside the vserver)<br /> handling the reboot syscall for you ...<br /> reboot/shutdown/poweroff and friends just send a message<br /> to init (which usually does the reboot), but the -f option<br /> makes those tools (actually copies of init) do the syscall<br /> directly ...<br /> given that your vserver has the required CAPs (which<br /> should be fine by default) it will call to the vshelper<br /> which in turn will restart the vserver ...<br /> HTH,<br /> Herbert<br /> ''> So, how do I now prevent reboot from accessing /dev/initctl. Or, more''<br /> ''> precisely, why isn't the reboot event handled by vshelper, which works''<br /> ''> perfectly fine from "outside" the vserver?''<br /> ''>''<br /> ''> Regards,''<br /> ''> Torsten''<br /> ''> _______________________________________________''<br /> ''> Vserver mailing list''<br /> ''> [mailto:Vserver_at_list.linux-vserver.org?Subject=Re:%20%5BVserver%5D%20issuing%20/sbin/reboot%20within%20a%20vserver%20reboots%20the%20host%20system... Vserver_at_list.linux-vserver.org]''<br /> ''> http://list.linux-vserver.org/mailman/listinfo/vserver''<br /> _______________________________________________<br /> Vserver mailing list<br /> [mailto:Vserver_at_list.linux-vserver.org?Subject=Re:%20%5BVserver%5D%20issuing%20/sbin/reboot%20within%20a%20vserver%20reboots%20the%20host%20system... Vserver_at_list.linux-vserver.org]<br /> http://list.linux-vserver.org/mailman/listinfo/vserver<br /> ----- * '''Previous message:''' [[0203.html|Torsten Kurbad: "Re: [Vserver] issuing /sbin/reboot within a vserver reboots the host system..."]] * '''In reply to:''' [[0203.html|Torsten Kurbad: "Re: [Vserver] issuing /sbin/reboot within a vserver reboots the host system..."]] * '''Next in thread:''' [[0206.html|Torsten Kurbad: "Re: [Vserver] issuing /sbin/reboot within a vserver reboots the host system..."]] * '''Reply:''' [[0206.html|Torsten Kurbad: "Re: [Vserver] issuing /sbin/reboot within a vserver reboots the host system..."]] <div align="center"> {| class="wikitable" border="2" width="100%" |- ! [[../|About this list]] ! [[date.html|Date view]] ! [[index.html|Thread view]] ! [[subject.html|Subject view]] ! [[author.html|Author view]] ! [[attachment.html|Attachment view]] |} </div> <div align="center"> [<nowiki/>[[../|Next/Previous Months]]] [<nowiki/>[http://www.solucorp.qc.ca/miscprj/s_context.hc Main vserver Project Homepage]] [<nowiki/>[http://www.solucorp.qc.ca/mlist/index.hc?list=vserver Howto Subscribe/Unsubscribe]] [<nowiki/>[http://www.paul.sladen.org/vserver/ Paul Sladen's vserver stuff]]<br /> <span class="small">Generated on Thu 27 Jan 2005 - 20:26:07 GMT by [http://www.hypermail.org/ hypermail 2.1.3]</span> </div>
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information