You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Bryan Call (JIRA)" <ji...@apache.org> on 2014/11/05 00:42:34 UTC

[jira] [Comment Edited] (TS-1448) ATS fails to set user id on (k)FreeBSD

    [ https://issues.apache.org/jira/browse/TS-1448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14197130#comment-14197130 ] 

Bryan Call edited comment on TS-1448 at 11/4/14 11:41 PM:
----------------------------------------------------------

It looks like the username is being truncated at 8 characters.

Looking at FreeBSD 10, it looks like it uses MAXLOGNAME and the default is 33 characters.


was (Author: bcall):
It looks like the username is being truncated at 8 characters

> 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
>          Components: Configuration
>    Affects Versions: 3.2.0, 3.0.5
>            Reporter: Arno Toell
>             Fix For: 5.2.0
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)