removed check for uid!=0

removed obsolete [Locations][LangDir] setting
This commit is contained in:
lars 2006-11-30 14:41:09 +00:00
parent 76e5366619
commit 2ee30de3b7
5 changed files with 133 additions and 10 deletions

View File

@ -1,4 +1,24 @@
#!/usr/bin/env python2.4
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
"""module for executing the programs, that need root privileges
@ -360,9 +380,9 @@ if __name__ == "__main__":
args = sys.argv[1:]
# do not allow to use root permissions (real uid may not be zero)
if os.getuid() == 0:
sys.stderr.write("the uid of the caller is zero (root) - this is not allowed\n")
sys.exit(100)
#if os.getuid() == 0:
# sys.stderr.write("the uid of the caller is zero (root) - this is not allowed\n")
# sys.exit(100)
# check if there were arguments
if (len(args) == 0):

View File

@ -4,6 +4,26 @@
#
# run the script with "--help" to see all possible paramters
#
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import os, sys
import cryptobox.web.sites

View File

@ -0,0 +1,87 @@
[Main]
# comma separated list of possible prefixes for accesible devices
# beware: .e.g "/dev/hd" grants access to _all_ harddisks
AllowedDevices = /dev/loop, /dev/ubdb
# use separate config partition? (1=yes / 0=no)
UseConfigPartition = 1
# the default name prefix of not unnamed containers
DefaultVolumePrefix = "Disk "
# which cipher should cryptsetup-luks use?
#TODO: uml does not support this module - DefaultCipher = aes-cbc-essiv:sha256
DefaultCipher = aes-plain
# label of the configuration partition (you should never change this)
ConfigVolumeLabel = cbox_config
# which plugins should be disabled? (comma seperated list)
#DisabledPlugins = network, shutdown, partition
[Locations]
# where should we mount volumes?
# this directory must be writeable by the cryptobox user (see above)
#MountParentDir = /var/cache/cryptobox/mnt
MountParentDir = ../ttt/mnt
# settings directory: contains name database and plugin configuration
#SettingsDir = /var/cache/cryptobox/settings
SettingsDir = ../ttt/settings
# where are the clearsilver templates?
#TemplateDir = /usr/share/cryptobox/templates
TemplateDir = ../templates
# path to documentation files
#DocDir = /usr/share/doc/cryptobox/www-data
DocDir = ../doc/html
# path to the plugin directory
#PluginDir = /usr/share/cryptobox/plugins
PluginDir = ../plugins
# path to the hook directory (e.g. containing some scripts)
#HookDir = /etc/cryptobox/hooks.d
EventDir = ../event-scripts
[Log]
# possible values are "debug", "info", "warn" and "error" or numbers from
# 0 (debug) to 7 (error)
Level = debug
# where to write the log messages to?
# possible values are: file
# syslog support will be added later
Destination = file
# depending on the choosen destination (see above) you may select
# details. Possible values for the different destinations are:
# file: $FILENAME
# syslog: $LOG_FACILITY
#Details = /var/log/cryptobox.log
Details = ./cryptobox.log
[WebSettings]
# URL of default stylesheet
Stylesheet = /cryptobox-misc/cryptobox.css
# default language
Languages = en, de, sl, fr
[Programs]
cryptsetup = /sbin/cryptsetup
mkfs-data = /sbin/mkfs.ext3
blkid = /sbin/blkid
blockdev = /sbin/blockdev
mount = /bin/mount
umount = /bin/umount
super = /usr/bin/super
# this is the "program" name as defined in /etc/super.tab
CryptoBoxRootActions = CryptoBoxRootActions

View File

@ -35,15 +35,11 @@ SettingsDir = ../ttt/settings
#TemplateDir = /usr/share/cryptobox/templates
TemplateDir = ../templates
# path to language files
#LangDir = /usr/share/cryptobox/lang
LangDir = ../lang
# path to documentation files
#DocDir = /usr/share/doc/cryptobox/www-data
DocDir = ../doc/html
# path to the plugin directory
# plugin directories - you may specify more than one directory (comma seperated)
#PluginDir = /usr/share/cryptobox/plugins
PluginDir = ../plugins
@ -75,7 +71,7 @@ Details = ./cryptobox.log
Stylesheet = /cryptobox-misc/cryptobox.css
# default language
Languages = de, en
Languages = en, de, sl, fr
[Programs]

View File

@ -8,7 +8,7 @@ BASE_DIR=$(cd "$(dirname $0)/.."; pwd)
export PYTHONPATH=$BASE_DIR/src
# check if /dev/loop1 is available - otherwise some tests will fail!
if /sbin/losetup /dev/loop1 &>/dev/null
if /sbin/losetup /dev/loop1 &>/dev/null || test -e /dev/ubdb
then true
else echo "misconfiguration detected: sorry - you need /dev/loop1 for the tests" >&2
echo "just do the following:" >&2