Skip to content

Commit

Permalink
Removed protection as this is currently implemented in the WOPI logic…
Browse files Browse the repository at this point in the history
… itself, not by the storage layers
  • Loading branch information
glpatcern committed Mar 21, 2022
1 parent 5af560c commit 02f7072
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions src/core/localiface.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ def refreshlock(endpoint, filepath, _userid, appname, value):
log.warning('msg="Failed to refreshlock" filepath="%s" appname="%s" reason="%s"' %
(filepath, appname, 'File is not locked'))
raise IOError('File was not locked')
if l['app_name'] != appname and l['app_name'] != 'wopi':
log.warning('msg="Failed to refreshlock" filepath="%s" appname="%s" reason="%s"' %
(filepath, appname, 'File is locked by %s' % l['app_name']))
raise IOError('File is locked by %s' % l['app_name'])
log.debug('msg="Invoked refreshlock" filepath="%s" value="%s"' % (filepath, value))
# this is non-atomic, but the lock was already held
setxattr(endpoint, filepath, '0:0', common.LOCKKEY, common.genrevalock(appname, value), None)
Expand Down
8 changes: 0 additions & 8 deletions src/core/xrootiface.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,6 @@ def refreshlock(endpoint, filepath, userid, appname, value):
log.warning('msg="Failed to refreshlock" filepath="%s" appname="%s" reason="%s"' %
(filepath, appname, 'File is not locked'))
raise IOError('File was not locked')
if l['app_name'] != appname and l['app_name'] != 'wopi':
log.warning('msg="Failed to refreshlock" filepath="%s" appname="%s" reason="%s"' %
(filepath, appname, 'File is locked by %s' % l['app_name']))
raise IOError('File is locked by %s' % l['app_name'])
log.debug('msg="Invoked refreshlock" filepath="%s" value="%s"' % (filepath, value))
# this is non-atomic, but the lock was already held
setxattr(endpoint, filepath, userid, common.LOCKKEY, common.genrevalock(appname, value), None)
Expand All @@ -303,10 +299,6 @@ def unlock(endpoint, filepath, userid, appname, value):
log.warning('msg="Failed to unlock" filepath="%s" appname="%s" reason="%s"' %
(filepath, appname, 'File is not locked'))
raise IOError('File was not locked')
if l['app_name'] != appname and l['app_name'] != 'wopi':
log.warning('msg="Failed to unlock" filepath="%s" appname="%s" reason="%s"' %
(filepath, appname, 'File is locked by %s' % l['app_name']))
raise IOError('File is locked by %s' % l['app_name'])
log.debug('msg="Invoked unlock" filepath="%s" value="%s' % (filepath, value))
rmxattr(endpoint, filepath, userid, common.LOCKKEY, None)

Expand Down

0 comments on commit 02f7072

Please sign in to comment.