mirror of
https://github.com/nginx/nginx.git
synced 2024-12-02 20:09:01 +08:00
Userid: using stub for AF_UNIX addresses.
Previously, AF_UNIX addresses misbehaved as AF_INET, which typically resulted in $uid_set composed from the middle of sun_path.
This commit is contained in:
parent
2a11bf0f77
commit
499bb2655e
@ -545,6 +545,13 @@ ngx_http_userid_create_uid(ngx_http_request_t *r, ngx_http_userid_ctx_t *ctx,
|
||||
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if (NGX_HAVE_UNIX_DOMAIN)
|
||||
case AF_UNIX:
|
||||
ctx->uid_set[0] = 0;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default: /* AF_INET */
|
||||
sin = (struct sockaddr_in *) c->local_sockaddr;
|
||||
ctx->uid_set[0] = sin->sin_addr.s_addr;
|
||||
|
Loading…
Reference in New Issue
Block a user