[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201204162008.GGI81741.VHFtOLFJSMOQFO@I-love.SAKURA.ne.jp>
Date: Mon, 16 Apr 2012 20:08:41 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: mtk.manpages@...il.com
Cc: linux-man@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: Patch for man unix(7)
Michael Kerrisk (man-pages) wrote:
> >> Therefore, the caller of getsockname(), getpeername(), accept() must not assume
> >> that sunaddr->sun_path contains a null-terminated pathname even if the returned
> >> addrlen is greater than sizeof(sa_family_t) and sun_path[0] != '\0'.
> >
> > Thanks. I see what you mean. However, I'm wondering, is the kernel
> > behavior simply a bug that should be fixed, so that a null terminator
> > is always placed in sun_path?
I thought it is a bug, but according to thread starting from
http://lkml.indiana.edu/hypermail/linux/kernel/0503.3/0954.html ,
sun_path seems to be designed to accept pathname without null terminator.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists