--- inn-1.7.2.orig/samples/inncheck
+++ inn-1.7.2/samples/inncheck
@@ -99,16 +99,16 @@
 ##  The modes of the config files we can check.
 %modes = (
     'active',		0644,
-    'control.ctl',	0440,
-    'expire.ctl',	0440,
-    'hosts.nntp',	0440,
-    'inn.conf',		0444,
-    'moderators',	0444,
-    'newsfeeds',	0444,
-    'overview.fmt',	0444,
-    'nnrp.access',	0440,
-    'nntpsend.ctl',	0440,
-    'passwd.nntp',	0440
+    'control.ctl',	0644,
+    'expire.ctl',	0644,
+    'hosts.nntp',	0640,
+    'inn.conf',		0644,
+    'moderators',	0644,
+    'newsfeeds',	0644,
+    'overview.fmt',	0644,
+    'nnrp.access',	0640,
+    'nntpsend.ctl',	0644,
+    'passwd.nntp',	0640
 );
 
 
@@ -804,7 +804,7 @@
 }
 
 @directories = (
-    'archive', 'badnews', 'batchdir', 'ctlprogs', 'most_logs', 'newsbin',
+    'archive', 'badnews', 'batchdir', 'ctlprogs', 'most_logs', # 'newsbin',
     'newslib', 'oldlogs', 'rnewsprogs', 'spooltemp', 'spool', 'spoolnews'
 );
 @control_scripts = (
@@ -812,7 +812,7 @@
     'sendme', 'sendsys', 'senduuname', 'version'
 );
 @rnews_programs = (
-    'c7unbatch', 'decode', 'encode'
+    'c7unbatch', 'decode', 'encode', 'gunbatch'
 );
 @newsbin_public = (
     'archive', 'batcher', 'buffchan', 'convdate', 'cvtbatch', 'expire',
@@ -822,8 +822,8 @@
 );
 @newsbin_private = (
     'ctlinnd', 'expirerm', 'inncheck', 'innstat', 'innwatch',
-    'makegroup', 'news.daily', 'nntpsend', 'scanlogs', 'sendbatch',
-    'tally.control', 'tally.unwanted', 'updatemods', 'writelog'
+    'news.daily', 'nntpsend', 'scanlogs', 'sendbatch',
+    'tally.control', 'tally.unwanted', 'writelog'
 );
 @newslib_private = (
     'send-ihave', 'send-nntp', 'send-uucp'
@@ -834,12 +834,12 @@
 
 ## The modes for the various programs.
 %prog_modes = (
-    'inews',		02555,
-    'innd',		 0555,
-    'newsboot',		 0550,
-    'nnrpd',		 0555,
-    'parsectl',		 0550,
-    'rnews',		02555
+    'inews',		02755,
+    'innd',		 0755,
+    'newsboot',		 0755,
+    'nnrpd',		 0755,
+    'parsectl',		 0755,
+    'rnews',		02755
 );
 
 ##  Check the permissions of nearly every file in an INN installation.
@@ -852,13 +852,13 @@
     local ($newslib) = $paths{'newslib'};
 
     foreach ( @directories ) {
-	&checkperm($paths{$_}, 0775);
+	&checkperm($paths{$_}, $_ eq 'rnewsprogs' ? 0755 : 0775);
     }
-    &checkperm($paths{'innddir'}, 0770);
+    &checkperm($paths{'innddir'}, 0775);
     foreach ( keys %prog_modes ) {
-	&checkperm($paths{$_}, $prog_modes{$_});
+	&checkperm($paths{$_}, $prog_modes{$_}, 'root');
     }
-    &checkperm($paths{'inndstart'}, 0555, 'root', 'bin');
+    &checkperm($paths{'inndstart'}, 04754, 'root', 'news');
     foreach ( keys %paths ) {
 	&checkperm($paths{$_}, $modes{$_})
 	    if defined $modes{$_};
@@ -867,22 +867,22 @@
     &checkperm($paths{'history'} . ".dir", 0644);
     &checkperm($paths{'history'} . ".pag", 0644);
     foreach ( @newslib_private ) {
-	&checkperm("$newslib/$_", 0550);
+	&checkperm("/etc/news/scripts/$_", 0755);
     }
     foreach ( @newslib_private_read ) {
-	&checkperm("$newslib/$_", 0440);
+	&checkperm("$newsbin/$_", 0644, 'root', 'root');
     }
     foreach ( @newsbin_private ) {
-	&checkperm("$newsbin/$_", 0550);
+	&checkperm("$newsbin/$_", 0755, 'root', 'root');
     }
     foreach ( @newsbin_public ) {
-	&checkperm("$newsbin/$_", 0555);
+	&checkperm("$newsbin/$_", 0755, 'root', 'root');
     }
     foreach ( @control_scripts ) {
-	&checkperm("$ctlprogs/$_", 0550);
+	&checkperm("$ctlprogs/$_", 0755);
     }
     foreach ( @rnews_programs ) {
-	&checkperm("$rnewsprogs/$_", 0555);
+	&checkperm("$rnewsprogs/$_", 0755);
     }
 
     ##  Also make sure that @rnews_programs are the *only* programs in there;
@@ -999,8 +999,15 @@
 	print "$pfx$workfile:0: can't open $!\n";
 	next action;
     }
-    &checkperm($file, $modes{$workfile})
-	if $noperms == 0 && !$perms && defined $modes{$workfile};
+	if ($noperms == 0 && !$perms && defined $modes{$workfile}) {
+	if ($workfile eq 'active') {
+    &checkperm($file, $modes{$workfile});
+	} elsif (grep($workfile eq $_, qw(passwd.nntp nnrp.access hosts.nntp))) {
+    &checkperm($file, $modes{$workfile}, 'root', 'news');
+	} else {
+    &checkperm($file, $modes{$workfile}, 'root', 'root');
+	}
+	}
     $line = 0;
     eval "&$checklist{$workfile}" || warn "$@";
     close(IN);
