From cb2fc1e5a402496dc1d650e2c4fbe69a3f6394e7 Mon Sep 17 00:00:00 2001 From: Dante Catalfamo Date: Sun, 4 Jul 2021 11:54:19 -0400 Subject: bsd-auth: update graph generation script --- content/posts/WIP-how-bsd-authentication-works/gen_dot.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb b/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb index bad2a90..5adb453 100755 --- a/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb +++ b/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb @@ -41,12 +41,12 @@ class FunctionDigraph @to = to end - def color(func) - Digest::MD5.hexdigest(func)[..5] + def emit + puts "#{from} -> #{to} [color = \"##{color}\"]" if to =~ /auth|login|^_/ end - def emit - puts "#{from} -> #{to} [color = \"##{color(from)}\"]" if to =~ /auth|login|^_/ + def color + Digest::MD5.hexdigest(from)[..5] end end -- cgit v1.2.3