moved "adduser" from "Depends" to "Pre-Depends"

updated changelog
increased version number to 0.3.3
CryptoBoxRootActions: allow mount points to be non-writeable if they are owned by the cryptobox user
This commit is contained in:
lars 2007-02-08 02:24:11 +00:00
parent 5019afd334
commit 1bce8e6b4d
5 changed files with 30 additions and 12 deletions

View file

@ -147,28 +147,32 @@ def call_event(args):
return proc.returncode == 0
def isWriteable(device, force_dev_type=None):
def isWriteable(path, force_dev_type=None):
"""check if the calling user (not root!) has write access to the device/file
the real (not the effective) user id is used for the check
additionally the permissions of the default groups of the real uid are checked
it is sufficient, if the device/dir is owned by us
this check works nicely together with "super", as it changes (by default) only
the effective uid (not the real uid)
"""
# first check, if the device/file exists
if not os.path.exists(device):
if not os.path.exists(path):
return False
# check the type of the device - if necessary
if not force_dev_type is None:
dev_type = os.stat(device).st_mode % 65536 / 4096
if dev_type != force_dev_type: return False
# check the type of the path - if necessary
if (not force_dev_type is None) and \
(force_dev_type != os.stat(path).st_mode % 65536 / 4096):
return False
## is the path owned by us?
if os.stat(path)[4] == os.getuid():
return True
# retrieve the information for the real user id
(trustUserName, trustUID, groupsOfTrustUser) = getUserInfo(os.getuid())
# set the default groups of the caller for the check (restore them later)
savedGroups = os.getgroups()
os.setgroups(groupsOfTrustUser)
# check permissions
result = os.access(device, os.W_OK) and os.access(device, os.R_OK)
result = os.access(path, os.W_OK) and os.access(path, os.R_OK)
# reset the groups of this process
os.setgroups(savedGroups)
return result

View file

@ -2,11 +2,18 @@ Version 0.3.3 - 01/26/02007
* fixed bug in reinitializing of plugins (Closes: #111)
* fixed broken group membership changing of webserver (Closes: #114)
* fixed glitch that delayed the effect of changes made by the plugin_manager
* ignore devices without read and write permissions
* completed Slovenian translation
* improved German translation
* completed German translation
* added: restore network settings during startup
* added: new plugin provides an encrypted (https) connection to the webinterface
* added: support for netmask and gateway setting to 'network' plugin
* added: download of complete log file possible
* added: show/hide help texts
* usablity: ignore devices without read and write permissions
* interface: provide low-quality 'gif' icons instead of default 'png' icons for
IE 5.5/6.0 users due to its lack of support for transparency
* interface: unified layout of plugins
* requires python module 'm2crypto' for (optional) certificate generation
Version 0.3.2 - 01/08/02007
* fixed bug causing ignorance towards group permissions (Closes: #114)

8
debian/changelog vendored
View file

@ -1,4 +1,10 @@
cryptobox (0.3.2.1-1) unstable; urgency=low
cryptobox (0.3.3-1) unstable; urgency=low
* new upstream release
-- Lars Kruse <devel@sumpfralle.de> Thu, 8 Feb 2007 01:53:00 +0100
cryptobox (0.3.2-1) unstable; urgency=low
* new upstream release

3
debian/control vendored
View file

@ -8,7 +8,8 @@ Standards-Version: 3.7.2
Package: cryptobox-server
Architecture: any
Depends: python-central (>= 0.5.6), cryptsetup (>=20050111), e2fsprogs (>= 1.27), adduser, python (>=2.4), python-clearsilver, super, dosfstools, python-cherrypy, python-configobj, python-m2crypto
Pre-Depends: adduser
Depends: python-central (>= 0.5.6), cryptsetup (>=20050111), e2fsprogs (>= 1.27), python (>=2.4), python-clearsilver, super, dosfstools, python-cherrypy, python-configobj, python-m2crypto
Suggests: samba, apache2, stunnel
Replaces: cryptobox
XB-Python-Version: ${python:Versions}

View file

@ -10,5 +10,5 @@ __all__ = ['core', 'web', 'plugins', 'tests']
__revision__ = "$Id$"
__version__ = "0.3.2.1"
__version__ = "0.3.3"