summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDante Catalfamo2021-07-04 11:54:19 -0400
committerDante Catalfamo2021-07-04 11:54:19 -0400
commitcb2fc1e5a402496dc1d650e2c4fbe69a3f6394e7 (patch)
treea7a28285853896b34ce447febdca07fae7f8ea9a
parent1a7fc12e8655d65620b19ad6e09592aef95f68c8 (diff)
downloadblog-cb2fc1e5a402496dc1d650e2c4fbe69a3f6394e7.tar.gz
blog-cb2fc1e5a402496dc1d650e2c4fbe69a3f6394e7.tar.bz2
blog-cb2fc1e5a402496dc1d650e2c4fbe69a3f6394e7.zip
bsd-auth: update graph generation script
-rwxr-xr-xcontent/posts/WIP-how-bsd-authentication-works/gen_dot.rb8
1 files 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