summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/posts/WIP-how-bsd-authentication-works/gen_dot.rb3
1 files changed, 1 insertions, 2 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 9925d8c..d9e884a 100644
--- a/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb
+++ b/content/posts/WIP-how-bsd-authentication-works/gen_dot.rb
@@ -3,7 +3,7 @@
SOURCE_DIR = File.join Dir.home, 'src', 'github.com', 'openbsd', 'src', 'lib', 'libc', 'gen'
FILENAMES = %w[authenticate.c auth_subr.c login_cap.c].freeze
-FUNCTION_REGEX = /^\w.*?$\n(\w*)\(.*?\)\n\{(.*?)^\}/m.freeze
+FUNCTION_REGEX = /^\w.*?$\n(?!DEF)(\w*)\(.*?\)\n\{(.*?)^\}/m.freeze
ONELINE_FUNCTION_REFGEX = /^\w.*?(\w*)\(.*?\).*?\{(.*?)\}/.freeze
CALL_REGEX = /[^\n](\w+)\(.*?\)/.freeze
@@ -63,7 +63,6 @@ class FunctionDigraph
functions.each do |function|
function_name = function[0]
function_body = function[1]
- puts 'auth_open!' if function_name == 'auth_open'
subgraph.functions << function_name
function_body.scan(CALL_REGEX) do |call|
@pairs << Pair.new(function_name, call[0])