Project

General

Profile

Actions

Bug #13936

closed

ksetpw typo to strtok_r() prevents space delimited -e enctype_list

Added by C Fraire 3 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

ksetpw.c calls strtok_r() first with `",\t,"` and then in the loop with `",\t "`. This discrepancy prevents using space as a delimiter for -e enctype_list. This typo does not appear in the Wayback-mediated archive of http://opensolaris.org/os/project/winchester/files/adjoin-s10u5.tar.gz, which appears to be an earlier, draft version of what is in illumos-gate.

Current behavior:

$ /usr/lib/krb5/ksetpw -n -v 2 -k /tmp/krb5keytab.199qgb -e "aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96" host/host1.example.com@EXAMPLE.COM
/usr/lib/krb5/ksetpw: Invalid argument Unknown or unsupported enctype aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96


Related issues

Related to illumos gate - Bug #13935: ksetpw passes integers to %s format specifierClosedC Fraire

Actions
Related to illumos gate - Bug #13942: ksetpw salt may be used uninitializedClosedC Fraire

Actions
Actions #1

Updated by C Fraire 3 months ago

With the fix:

$ /usr/lib/krb5/ksetpw -n -v 2 -k /tmp/krb5keytab.382ame -e "aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96" host/host1.example.com@EXAMPLE.COM
Enter new password: 

Actions #2

Updated by Electric Monk 3 months ago

  • Gerrit CR set to 1597
Actions #3

Updated by Yuri Pankov 2 months ago

  • Subject changed from ksetpw typo to strtok_r() prevents space delmited -e enctype_list to ksetpw typo to strtok_r() prevents space delimited -e enctype_list
Actions #4

Updated by Dan McDonald about 2 months ago

  • Related to Bug #13935: ksetpw passes integers to %s format specifier added
Actions #5

Updated by Dan McDonald about 2 months ago

  • Related to Bug #13942: ksetpw salt may be used uninitialized added
Actions #6

Updated by Electric Monk about 2 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 298aa1575e761a7d02bc7c65fa603ffd0266fcb7

commit  298aa1575e761a7d02bc7c65fa603ffd0266fcb7
Author: Chris Fraire <cfraire@me.com>
Date:   2021-08-10T17:08:28.000Z

    13935 ksetpw passes integers to %s format specifier
    13936 ksetpw typo to strtok_r() prevents space delimited -e enctype_list
    13942 ksetpw salt may be used uninitialized
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF