Bug 3059 - Typos and copy-paste errors in the code (openbsd-compat/bsd-misc.c)
Summary: Typos and copy-paste errors in the code (openbsd-compat/bsd-misc.c)
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: 8.0p1
Hardware: Other All
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_8_1
  Show dependency treegraph
 
Reported: 2019-08-23 20:13 AEST by Samuel
Modified: 2021-04-23 15:09 AEST (History)
2 users (show)

See Also:


Attachments
Fix errors in openbsd-compat/bsd-misc.c (692 bytes, patch)
2019-08-23 20:13 AEST, Samuel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel 2019-08-23 20:13:46 AEST
Created attachment 3311 [details]
Fix errors in openbsd-compat/bsd-misc.c

In the new code for 8.0 in openbsd-compat/bsd-misc.c in the functions "fchownat" and "fchmodat" there are a number of errors:

In fchownat at line 178:

    # ifndef HAVE_FCHOWN
        return chown(pathname, owner, group);
    # else

There is no parameter called "pathname", it should simply be "path"

Same goes for the function "fchmodat" at line 209:

    # ifndef HAVE_FCHOWN
        return chown(pathname, owner, group);
    # else

The parameter should be "path", and judging by the function name and the ifndef, the call should probably be chmod instead:

    # ifndef HAVE_FCHMOD
        return chmod(path, mode);
    # else

Attached my patch.
Comment 1 Darren Tucker 2019-08-24 15:14:27 AEST
Applied, thanks.
Comment 2 Damien Miller 2021-04-23 15:09:42 AEST
closing resolved bugs as of 8.6p1 release