Re: [PATCH] Fix option for master read wait

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ian,

Any feedback on this? The fix is not included in 5.1.7.

Reproduction scenario:

# automount -M 2 -d -f
Segmentation fault (core dumped)

On  8:59 23/10, Goldwyn Rodrigues wrote:
> master wait expects a value, and if provided automount crashes with the
> following trace:
> 
> #0  __GI_____strtoul_l_internal (nptr=0x0, endptr=0x7fffffffe120, base=0, group=<optimized out>,
>     loc=0x7ffff77a63a0 <_nl_global_locale>) at ../stdlib/strtol_l.c:292
> #1  0x0000555555562c52 in getnumopt ()
> #2  0x0000555555564ec0 in main ()
> 
> This is because the options string is not correct and does not expect
> an argument for master wait (M), which sets optarg to NULL
> 
> Fixes: e68f07f ("autofs-5.1.2 - add master read wait option")
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx>
> 
> diff --git a/daemon/automount.c b/daemon/automount.c
> index 0391bfb..c2a0f58 100644
> --- a/daemon/automount.c
> +++ b/daemon/automount.c
> @@ -2219,7 +2219,7 @@ int main(int argc, char *argv[])
>  	time_t timeout;
>  	time_t age = monotonic_time(NULL);
>  	struct rlimit rlim;
> -	const char *options = "+hp:t:vmdD:SfVrO:l:n:CFM";
> +	const char *options = "+hp:t:vmdD:SfVrO:l:n:CFM:";
>  	static const struct option long_options[] = {
>  		{"help", 0, 0, 'h'},
>  		{"pid-file", 1, 0, 'p'},

-- 
Goldwyn



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux