DaemonForums  

Go Back   DaemonForums > Other Operating Systems > Other BSD and UNIX/UNIX-like

Other BSD and UNIX/UNIX-like Any other flavour of BSD or UNIX that does not have a section of its own.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 21st April 2016
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default /var/empty on Linux

Does anyone know what the equivalent of /var/empty is on Linux?

I wrote a program that chroots for security reasons. After initialisation it doesn't need to open any more files or devices, so chrooting to an empty directory would work just fine. On FreeBSD and OpenBSD I have the /var/empty directory for exactly this reason. IIRC it's even protected with the system immutable flag to prevent accidental writes.

On my CentOS 7 machine I have a /var/empty, but that has an (empty) sshd directory in it (?) On Ubuntu 15.04 I don't have a /var/empty at all.

Do I need to create a useless and empty /var/run/myprogram directory? Or is there some equivalent?
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
a strange package problem .. bash @name exists but plist empty daemonfowl OpenBSD Packages and Ports 25 11th April 2012 02:06 AM
Why does pkg_add sometimes report "packages is empty" ? sw2wolf OpenBSD Packages and Ports 2 22nd March 2012 12:51 AM
How do we verify if directory is empty? sharris FreeBSD General 8 4th January 2012 03:37 PM
Snapshot Packages Empty - part of commit? IronForge OpenBSD Packages and Ports 3 16th September 2011 10:32 PM
Other Another Linux Security Breach (this time at Linux Foundation) vermaden News 0 12th September 2011 07:00 AM


All times are GMT. The time now is 04:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick