Page MenuHomeFreeBSD

Allow comma in login.conf capabilities
ClosedPublic

Authored by sef on Jun 20 2020, 12:22 AM.
Tags
None
Referenced Files
F82006251: D25368.id115130.diff
Wed, Apr 24, 10:38 AM
Unknown Object (File)
Tue, Apr 23, 1:57 PM
Unknown Object (File)
Thu, Apr 4, 7:27 PM
Unknown Object (File)
Feb 21 2024, 4:44 AM
Unknown Object (File)
Feb 13 2024, 1:12 PM
Unknown Object (File)
Jan 14 2024, 3:35 AM
Unknown Object (File)
Dec 25 2023, 11:54 AM
Unknown Object (File)
Dec 22 2023, 7:28 PM

Details

Summary

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236204 doesn't allow a comma-separated list to be used in the login class capabilities; in particular, for setenv, a comma-separated list of domains was given, and broken up inappropriately.

This is an admittedly-simplistic attempt to fix that; it doesn't depend on the documented escaping methods, but instead, treats a string (as defined by single and double quotes) as already-escaped, and simply looks for the end of the quoted part before doing any further processing.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sef requested review of this revision.Jun 20 2020, 12:22 AM
michaelo added a subscriber: michaelo.

Guys, was written on the Bugzilla issue. I have verified this to work. I am still sufferting from this with py-requests. What can I do to move this forward to be included in 12.4?

This revision is now accepted and ready to land.Sep 30 2022, 9:43 AM

I tested this patch now on 13-STABLE. It just works for me:

root@deblndw013x1v:~
# uname -a
FreeBSD deblndw013x1v.ad001.siemens.net 13.1-STABLE FreeBSD 13.1-STABLE #5 2c88fb783: Tue Jan  3 12:38:25 CET 2023     root@deblndw013x1v.ad001.siemens.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
root@deblndw013x1v:~
# env | grep PROXY
NO_PROXY=localhost,.siemens.net,.siemens.com .siemens.de
FTP_PROXY=http://de.coia.siemens.net:9400
HTTPS_PROXY=http://de.coia.siemens.net:9400
HTTP_PROXY=http://de.coia.siemens.net:9400
lib/libutil/login_cap.c
97

This comment became detached from the function it is describing

107

the comment needs updating to match the prototype (the quoted indirect pointer)

116

quote and quoted are very similar, and tripped me up once while reading the code, maybe we want to call the local variable quote_char or something?

Changes based on Allan's comments:

  • Moved a comment around
  • Changed the name of a variable to have its purpose clearer
  • Updated a comment to reflect the current prototype
This revision now requires review to proceed.Jan 14 2023, 2:40 PM
This revision is now accepted and ready to land.Jan 14 2023, 4:18 PM

What is this patch waiting on?