[dpdk-dev] [PATCH] pdump: fix dir permissions value in mkdir call

Tan, Jianfeng jianfeng.tan at intel.com
Thu Oct 13 13:24:10 CEST 2016



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Reshma Pattan
> Sent: Monday, October 10, 2016 10:36 PM
> To: dev at dpdk.org
> Cc: Pattan, Reshma
> Subject: [dpdk-dev] [PATCH] pdump: fix dir permissions value in mkdir call
> 
> From: Reshma Pattan <reshma.pattan at intel.com>
> 
> Inside the function pdump_get_socket_path(), pdump socket
> directories are created using mkdir() call with permissions 700,
> which was assigning wrong permissions to the directories
> i.e. "d-w-r-xr-T" instead of drwx---. The reason is mkdir() call
> doesn't consider 700 as an octal value until unless 0 is explicitly
> added before the value. Because of this, socket creation failure is
> observed when DPDK application was ran in non root user mode.
> DPDK application running in root user mode never reported the issue.
> 
> So 0 is prefixed to the value to create directories with
> the correct permissions.
> 
> Fixes: e4ffa2d3 ("pdump: fix error handlings")
> Fixes: bdd8dcc6 ("pdump: fix default socket path")
> 
> Reported-by: Jianfeng Tan <jianfeng.tan at intel.com>
> Signed-off-by: Reshma Pattan <reshma.pattan at intel.com>

Tested-by: Jianfeng Tan <jianfeng.tan at intel.com>

Thank you Reshma.


More information about the dev mailing list