Changeset 72

Show
Ignore:
Timestamp:
05/19/05 03:05:05 (4 years ago)
Author:
jtv
Message:

Moved swapfiles from /var/tmp (which is world-writable!) to /var/lib

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Makefile

    r71 r72  
    88 
    99install: all 
    10         install -d $(DESTDIR)/var/tmp 
    11         install -d -m700 $(DESTDIR)/var/tmp/swapspace 
     10        install -d $(DESTDIR)/var/lib 
     11        install -d -m700 $(DESTDIR)/var/lib/swapspace 
    1212        install -d $(DESTDIR)/usr/sbin $(DESTDIR)/etc $(DESTDIR)/etc/init.d 
    1313        install -d $(DESTDIR)/usr/share/man/man8 
     
    1818 
    1919uninstall: 
    20         $(RM) -r /var/tmp/swapspace 
     20        $(RM) -r /var/lib/swapspace 
    2121        $(RM) /usr/sbin/swapspace /etc/swapspace.conf /etc/init.d/swapspace 
    2222        $(RM) /usr/share/man/man8/swapspace.8 
  • TODO

    r61 r72  
    1 Configuration 
    2  - Create swapfiles directory in /var/lib, /var/tmp, or /var/run?  See FHS. 
    3  
    4 Packaging 
    5  - Debianize 
    6  
    71Policy 
    82 - Stabilize behaviour of that very first swapfile (allocate small "zero" file?) 
  • debian/dirs

    r67 r72  
    33etc/init.d 
    44usr/share/man/man8 
     5var/lib/swapspace 
  • debian/rules

    r71 r72  
    8484        dh_md5sums 
    8585        dh_builddeb 
    86         install -d -m700 /var/tmp/swapspace 
     86        install -d -m700 /var/lib/swapspace 
    8787 
    8888binary: binary-indep binary-arch 
  • doc/swapspace.8

    r59 r72  
    4949\fB\-p\fR [\fIfile\fR], \fB\-\-pidfile\fR[=\fIfile\fR] 
    5050Write process identifier to \fIfile\fR when starting (and delete \fIfile\fR when 
    51 shutting down); defaults to \fI/var/run/swapspace.pid\fR. 
     51shutting down); defaults to \fI/var/lib/swapspace.pid\fR. 
    5252.TP 
    5353\fB\-q\fR, \fB\-\-quiet\fR 
     
    5656\fB\-s\fR \fIdir\fR, \fB\-\-swappath\fR=\fIdir\fR 
    5757Create swapfiles in directory \fIdir\fR instead of default location 
    58 \fI/var/tmp/swapspace\fR.  This location must be accessible to \fIroot\fR only; 
     58\fI/var/lib/swapspace\fR.  This location must be accessible to \fIroot\fR only; 
    5959allowing anyone else to write or even read swapped data would be a \fUserious 
    6060security breach\fR. 
  • src/swaps.c

    r59 r72  
    5252#endif 
    5353 
    54 static char swappath[PATH_MAX] = "/var/tmp/swapspace"; 
     54static char swappath[PATH_MAX] = "/var/lib/swapspace"; 
    5555static size_t swappath_len; 
    5656 
  • swapspace.conf

    r59 r72  
    1818# Swap path: location where swapspace may create and delete swapfiles.  For 
    1919# security reasons this directory must be accessible to root and to root only. 
    20 swappath="/var/tmp/swapspace" 
     20swappath="/var/lib/swapspace" 
    2121 
    2222# Lower free-space threshold: if the percentage of free space drops below this