diff --git a/bin/CryptoBoxRootActions b/bin/CryptoBoxRootActions index 4f63b04..9061fa2 100755 --- a/bin/CryptoBoxRootActions +++ b/bin/CryptoBoxRootActions @@ -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 diff --git a/changelog b/changelog index 559785c..c675953 100644 --- a/changelog +++ b/changelog @@ -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) diff --git a/debian/changelog b/debian/changelog index bb7eda8..0afd03d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 8 Feb 2007 01:53:00 +0100 + +cryptobox (0.3.2-1) unstable; urgency=low * new upstream release diff --git a/debian/control b/debian/control index af9e76c..c3f65e1 100644 --- a/debian/control +++ b/debian/control @@ -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} diff --git a/src/cryptobox/__init__.py b/src/cryptobox/__init__.py index 6bcfac4..f3fe337 100644 --- a/src/cryptobox/__init__.py +++ b/src/cryptobox/__init__.py @@ -10,5 +10,5 @@ __all__ = ['core', 'web', 'plugins', 'tests'] __revision__ = "$Id$" -__version__ = "0.3.2.1" +__version__ = "0.3.3"