]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #48805 from tserong/wip-57997-quincy
authorLaura Flores <lflores@redhat.com>
Fri, 17 Feb 2023 17:27:19 +0000 (11:27 -0600)
committerGitHub <noreply@github.com>
Fri, 17 Feb 2023 17:27:19 +0000 (11:27 -0600)
quincy: ceph-crash: drop privleges to run as "ceph" user, rather than root (CVE-2022-3650)

1  2 
src/ceph-crash.in

index 08284fc9ebc7790e9c2e582d88143671af763e5d,74e50e2b253f36df7a601e0251755b14ad37df22..0e02837fadd4dde8abd66985b485836402e10a37
@@@ -101,13 -128,12 +128,16 @@@ def main()
          log.error("directory %s does not exist; please create" % postdir)
          time.sleep(30)
  
 +    log.info("pinging cluster to exercise our key")
 +    pr = subprocess.Popen(args=['timeout', '30', 'ceph', '-s'])
 +    pr.wait()
 +
      log.info("monitoring path %s, delay %ds" % (args.path, args.delay * 60.0))
      while True:
-         scrape_path(args.path)
+         try:
+             scrape_path(args.path)
+         except Exception as e:
+             log.error(f"Error scraping {args.path}: {e}")
          if args.delay == 0:
              sys.exit(0)
          time.sleep(args.delay * 60)