You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#log_notice "DEBUG: Checking for malloc lib '$tmp'"
@@ -344,7 +337,7 @@ set_malloc_lib() {
344
337
done
345
338
346
339
if [ -z"$malloc_lib" ];then
347
-
log_error "no shared library for --malloc-lib=tcmalloc found in /usr/lib or $pkglibdir"
340
+
log_error "no shared library for --malloc-lib=tcmalloc found in $malloc_dirs"
348
341
exit 1
349
342
fi
350
343
fi
@@ -355,9 +348,21 @@ set_malloc_lib() {
355
348
case"$malloc_lib"in
356
349
/*)
357
350
if [ !-r"$malloc_lib" ];then
358
-
log_error "--malloc-lib '$malloc_lib' can not be read and will not be used"
351
+
log_error "--malloc-lib can not be read and will not be used"
359
352
exit 1
360
353
fi
354
+
355
+
# Restrict to a the list in $malloc_dirs above
356
+
case"$(dirname "$malloc_lib")"in
357
+
/usr/lib) ;;
358
+
/usr/lib64) ;;
359
+
/usr/lib/i386-linux-gnu) ;;
360
+
/usr/lib/x86_64-linux-gnu) ;;
361
+
*)
362
+
log_error "--malloc-lib must be located in one of the directories: $malloc_dirs"
363
+
exit 1
364
+
;;
365
+
esac
361
366
;;
362
367
*)
363
368
log_error "--malloc-lib must be an absolute path or 'tcmalloc'; " \
@@ -529,7 +534,9 @@ then
529
534
exit 1
530
535
fi
531
536
fi
532
-
rm -f "$safe_pid"
537
+
if [ !-h"$safe_pid" ];then
538
+
rm -f "$safe_pid"
539
+
fi
533
540
iftest -f "$safe_pid"
534
541
then
535
542
log_error "Fatal error: Can't remove the mysqld_safe pid file"
@@ -550,7 +557,9 @@ then
550
557
if [ $?-ne 0 ]
551
558
then
552
559
log_error "--syslog requested, but no 'logger' program found. Please ensure that 'logger' is in your PATH, or do not specify the --syslog option to mysqld_safe."
553
-
rm -f "$safe_pid"# Clean Up of mysqld_safe.pid file.
560
+
if [ !-h"$safe_pid" ];then
561
+
rm -f "$safe_pid"# Clean Up of mysqld_safe.pid file.
562
+
fi
554
563
exit 1
555
564
fi
556
565
fi
@@ -620,7 +629,7 @@ then
620
629
USER_OPTION="--user=$user"
621
630
fi
622
631
# Change the err log to the right user, if it is in use
0 commit comments