[ https://issues.apache.org/jira/browse/TS-1448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13613170#comment-13613170 ]
Leif Hedstrom commented on TS-1448: ----------------------------------- Arno, can you provide a patch for this? > ATS fails to set user id on (k)FreeBSD > -------------------------------------- > > Key: TS-1448 > URL: https://issues.apache.org/jira/browse/TS-1448 > Project: Traffic Server > Issue Type: Bug > Affects Versions: 3.2.0, 3.0.5 > Reporter: Arno Toell > Fix For: 3.3.4 > > > I've tried to start TrafficServer on my ATS kFreeBSD port (which is a FreeBSD > kernel, just for the records). There, I can't start the traffic_cop because > of the user it runs at (which is "trafficserver" - working fine on Linux with > that): > {code} > [Sep 9 13:06:09.511] Manager {1024} NOTE: [Alarms::signalAlarm] Server > Process born > FATAL: Can't find entry in password file for user: traffics > /usr/bin/traffic_server - STACK TRACE: > /usr/lib/trafficserver/libtsutil.so.3(ink_fatal_die+0x94)[0x800b30bd4] > /usr/bin/traffic_server(_Z14change_uid_gidPKc+0x1bf)[0x4c51cf] > /usr/bin/traffic_server(main+0x129b)[0x48bd8b] > /lib/x86_64-kfreebsd-gnu/libc.so.0.1(__libc_start_main+0xa9)[0x802f4e349] > /usr/bin/traffic_server[0x48fe60] > {code} > The code is in proxy/Main.cc, function _change_uid_gid(const char *user)_. > Chances are, the *user buffer is already cropped I weren't sure how to find > that out without recompiling the whole thing. Moreover, please note, this > code in said function looks suspicious as well: > {code} > #if defined(freebsd) // TODO: investigate sysconf(_SC_GETPW_R_SIZE_MAX)) > failure > long buflen = 1024; // or 4096? > #else > long buflen = sysconf(_SC_GETPW_R_SIZE_MAX); > #endif > if (buflen < 0) { > ink_fatal_die("sysconf() failed for _SC_GETPW_R_SIZE_MAX"); > } > {code} > On FreeBSD, you should use the the UT_NAMESIZE symbol defined in utmp.h. > P.S. You might want to mark 3.0.5 as released in JIRA ;) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira