autofs-5.1.2 - Remove unused local 2KB buffer
PATCH 1/3 autofs-5.1.2 - Remove unused local 2KB buffer
--- daemon/automount.c | 3 --- 1 file changed, 3 deletions(-)
daemon/automount.c +0 -3
@@ -1901,7 +1901,6 @@ static void usage(void)static void show_build_info (void ) { -char buf[2048 ];int count =0 ;printf ("\nLinux automount version %s\n" , version);
@@ -1913,8 +1912,6 @@ static void show_build_info(void)printf ("\nCompile options:\n " ); -memset (buf,0 ,2048 ); -#ifndef ENABLE_MOUNT_LOCKING printf ("DISABLE_MOUNT_LOCKING " ); count =22 ;
Signature · 4 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe autofs" in
PATCH 2/3 autofs-5.1.2 - Fix typos in error messages
--- daemon/automount.c | 4 ++-- daemon/state.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
daemon/automount.c +2 -2
@@ -945,7 +945,7 @@ static int set_log_priority(const char *path, int priority)if (priority >LOG_DEBUG || priority <LOG_EMERG ) {fprintf (stderr,"Log priority %d is invalid.\n" , priority); -fprintf (stderr,"Please spcify a number in the range 0-7.\n" ); +fprintf (stderr,"Please specify a number in the range 0-7.\n" );return -1 ; }
@@ -1078,7 +1078,7 @@ int do_expire(struct autofs_point *ap, const char *name, int namelen) }if (!len) { -crit (ap->logopt,"path to long for buffer" ); +crit (ap->logopt,"path too long for buffer" );return 1 ; }
daemon/state.c +2 -2
@@ -575,7 +575,7 @@ static unsigned int st_readmap(struct autofs_point *ap) ra =malloc (sizeof (struct readmap_args ));if (!ra) { -error (ap->logopt,"failed to malloc reamap cond struct" ); +error (ap->logopt,"failed to malloc readmap cond struct" );/* It didn't work: return to ready */ st_ready (ap);if (!ap->submount)
@@ -600,7 +600,7 @@ static unsigned int st_readmap(struct autofs_point *ap) status =pthread_create (&thid, &th_attr_detached, do_readmap, ra);if (status) { -error (ap->logopt,"read map thread create failed" ); +error (ap->logopt,"readmap thread create failed" );st_readmap_cleanup (ra);free (ra);/* It didn't work: return to ready */
Signature · 4 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe autofs" in
PATCH 3/3 autofs-5.1.2 - Fix fgets(3) size argument (another one)
In reply to Tomohiro Kusumi1. fgets(3) reads at most 1 less then the size argument.
2. Each line of /proc/filesystem isn't a filesystem path.
So it doesn't really matter if the size argument is PATH_MAX-1 or PATH_MAX (=sizeof(buf)) as long as the buffer is large enough. We can just use sizeof(buf).
--- daemon/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
daemon/module.c +1 -1
@@ -38,7 +38,7 @@ int load_autofs4_module(void)return 0 ; } -while (fgets (buf,PATH_MAX -1 , fp)) { +while (fgets (buf,sizeof (buf), fp)) {if (strstr (buf,"autofs" )) {fclose (fp);return 1 ;
Signature · 4 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerQuoted 1 line · Tomohiro Kusumi
Signed-off-by Tomohiro Kusumi <[email protected]>
Thanks for the patches.
They all look fine, they look straight forward, I'll include them in the list of patches for the next commit.
I thought I'd take this opportunity to let you know what's going on with the kernel module patches.
I'm having trouble getting time to update and test my module rename patch series so I'm planning on sending the patches I have, mostly yours and possibly one or two of mine, as soon as I can get a chance.
Fact is I'm having trouble getting time even to do that but I am trying.
Quoted 17 lines
--- daemon/automount.c | 3 --- 1 file changed, 3 deletions(-)daemon/automount.c +0
-1@@ -1901,7 +1901,6 @@ static void usage(void)static void show_build_info (void ) { -char buf[2048 ];int count =0 ;printf ("\nLinux automount version %s\n" , version);
daemon/automount.c static void show_build_info(void) · line 1917
Quoted 8 lines
daemon/automount.c +0
-2@@ -1913,8 +1912,6 @@ static void show_build_info(void)printf ("\nCompile options:\n " ); -memset (buf,0 ,2048 ); -#ifndef ENABLE_MOUNT_LOCKING printf ("DISABLE_MOUNT_LOCKING " ); count =22 ;
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Thank you.
For the rest of the kernel stuff I've sent, feel free to check whenever you can, since they're not that big deal.
2016-07-31 12:23 GMT+09:00 Ian Kent <[email protected]>:
Quoted 35 lines · Tomohiro Kusumi
Quoted 1 line
Signed-off-by Tomohiro Kusumi <[email protected]>Thanks for the patches.
They all look fine, they look straight forward, I'll include them in the list of patches for the next commit.
I thought I'd take this opportunity to let you know what's going on with the kernel module patches.
I'm having trouble getting time to update and test my module rename patch series so I'm planning on sending the patches I have, mostly yours and possibly one or two of mine, as soon as I can get a chance.
Fact is I'm having trouble getting time even to do that but I am trying.
Quoted 18 lines
--- daemon/automount.c | 3 --- 1 file changed, 3 deletions(-)daemon/automount.c +0
-1@@ -1901,7 +1901,6 @@ static void usage(void)static void show_build_info (void ) { -char buf[2048 ];int count =0 ;printf ("\nLinux automount version %s\n" , version);@@ -1913,8 +1912,6 @@ static void show_build_info(void)
Quoted 7 lines
daemon/automount.c static void show_build_info(void) · line 1917
Quoted 7 lines
daemon/automount.c +0
-2printf ("\nCompile options:\n " ); -memset (buf,0 ,2048 ); -#ifndef ENABLE_MOUNT_LOCKING printf ("DISABLE_MOUNT_LOCKING " ); count =22 ;
--
To unsubscribe from this list: send the line "unsubscribe autofs" in