Bug 2152

Summary: Simplify handling of sftp(1) command flags
Product: Portable OpenSSH Reporter: Iain Morgan <imorgan>
Component: sftpAssignee: Assigned to nobody <unassigned-bugs>
Status: NEW ---    
Severity: enhancement CC: djm
Priority: P5    
Version: -current   
Hardware: All   
OS: All   
Attachments:
Description Flags
Use a struct to pass command flags none

Description Iain Morgan 2013-09-13 06:54:23 AEST
Created attachment 2332 [details]
Use a struct to pass command flags

Currently, the flags used with various sftp(1) commands are handled as
separate integer variables. This, unfortunately, means that whenever a
new flag is needed there can be a lot of tedious work updating all of
the relevant function definitions, declarations and calls. Instead, it
would seem to be more flexible to pass a single structure which contains
the various individual flags.

The attached file is an attempt at such an overhaul of the sftp(1) code.
In a few cases, where only a single flag is needed, the appropriate
structure element is used in the function call in order to reduce the
amount of code changed. No changes in overall functionality are intended.

A possible enhancement to this patch would be to replace the use of the
printflag variable with an element in the structure.

The patch applies cleanly against -current and the regression tests all
pass. Preliminary manual testing has not uncovered any bugs, but it is
still early in the testing process.

Hopefully, this will ease the process of adding new features and flags
in the future.
Comment 1 Damien Miller 2014-02-06 10:17:44 AEDT
Retarget incomplete bugs / feature requests to 6.6 release
Comment 2 Damien Miller 2014-02-06 10:19:36 AEDT
Retarget incomplete bugs / feature requests to 6.6 release
Comment 3 Damien Miller 2014-04-12 14:49:02 AEST
Retarget to 6.7 release, since 6.6 was mostly bugfixing.
Comment 4 Damien Miller 2014-04-12 14:55:09 AEST
Remove from 6.6 tracking bug
Comment 5 Damien Miller 2014-08-30 04:37:46 AEST
Retarget incomplete bugs to 6.8 release.
Comment 6 Damien Miller 2014-08-30 04:40:00 AEST
These bugs are no longer targeted at the imminent 6.7 release
Comment 7 Damien Miller 2015-03-03 07:59:19 AEDT
OpenSSH 6.8 is approaching release and closed for major work. Retarget these bugs for the next release.
Comment 8 Damien Miller 2015-03-03 08:01:06 AEDT
Retarget to 6.9
Comment 9 Damien Miller 2015-06-05 14:18:39 AEST
this isn't going to make 6.9