diff --git a/.x-sc_prohibit_strncpy b/.x-sc_prohibit_strncpy
new file mode 100644
index 0000000000000000000000000000000000000000..10bc29c178fd384a7aa710be142bcce4c38624fe
--- /dev/null
+++ b/.x-sc_prohibit_strncpy
@@ -0,0 +1 @@
+src/util/util.c
diff --git a/cfg.mk b/cfg.mk
index 2d2dd7ec8ea1ef79d6f226429c723432043cad0a..c217332ac21e226d123fb8c40c0e8dcbe25e1d86 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -92,10 +92,9 @@ sc_prohibit_asprintf:
 	  $(_prohibit_regexp)
 
 sc_prohibit_strncpy:
-	@grep -nE 'strncpy *\('						\
-	    $$($(VC_LIST) | grep -v 'src/util.c') &&			\
-	  { echo '$(ME): use virStrncpy, not strncpy'			\
-		1>&2; exit 1; } || :
+	@re='strncpy *\('						\
+	msg='use virStrncpy, not strncpy'				\
+	  $(_prohibit_regexp)
 
 sc_prohibit_VIR_ERR_NO_MEMORY:
 	@re='\<V''IR_ERR_NO_MEMORY\>'					\