Bug 2828 - Extension for BSD style advisory file locking operations
Summary: Extension for BSD style advisory file locking operations
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sftp-server (show other bugs)
Version: 7.6p1
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-31 23:54 AEDT by github
Modified: 2021-04-23 15:04 AEST (History)
1 user (show)

See Also:


Attachments
Suggested patch 1 (3.85 KB, patch)
2018-01-31 23:54 AEDT, github
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description github 2018-01-31 23:54:36 AEDT
Created attachment 3117 [details]
Suggested patch 1

sshfs does not currently support forwarding flock(2) operations to the remote host.

This report is about implementing the necessary parts in the sftp-server program. The sshfs side has its own pull request at https://github.com/libfuse/sshfs/pull/55

The suggested patch is uploaded to

https://github.com/openssh/openssh-portable/pull/66

and also attached to this bug report.

The patch adds support for file locking operations LOCK_EX|LOCK_NB and LOCK_SH|LOCK_NB to sftp-server. Allocate a new extension string for the flock operations.
Comment 1 github 2018-02-10 21:37:36 AEDT
Closing as WONTFIX, quoting Damien Miller from the pull request:

Sorry, but we have no desire to add file locking to sftp/sftp-server. In fact, addition of file locking feature to the sftp protocol was why we never implemented versions of the protocol after 3.
Comment 2 Elvis Stansvik 2019-10-18 01:51:45 AEDT
We're using these patches at work, running software on top of sshfs which uses file locking, and they've been working great (we've battle tested them quite a lot).

Is the decision to reject them 100% definitive? The patches look non-intrusive to me, and bring very useful functionality. Carrying patches is obviously not ideal, and we would be very happy if it they could be reconsidered upstream.
Comment 3 Damien Miller 2021-04-23 15:04:32 AEST
closing resolved bugs as of 8.6p1 release