[Bug 2152] New: Simplify handling of sftp(1) command flags

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Sep 13 06:54:23 EST 2013


https://bugzilla.mindrot.org/show_bug.cgi?id=2152

            Bug ID: 2152
           Summary: Simplify handling of sftp(1) command flags
           Product: Portable OpenSSH
           Version: -current
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: sftp
          Assignee: unassigned-bugs at mindrot.org
          Reporter: imorgan at nas.nasa.gov

Created attachment 2332
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2332&action=edit
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.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list