changeset 5160:867ecc2c61fc

librestrict: Nits.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Tue, 17 Feb 2009 16:13:27 +0100
parents ab0dccc775b4
children 0ea349a9dcea
files librestrict/restrict-stat.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/librestrict/restrict-stat.c	Mon Feb 16 16:17:11 2009 +0100
+++ b/librestrict/restrict-stat.c	Tue Feb 17 16:13:27 2009 +0100
@@ -10,11 +10,6 @@
 
 #include "restrict.c"
 
-static int sys_stat (char const *file_name, struct stat *buf)
-{
-  return syscall (SYS_stat, file_name, buf);
-}
-
 static int sys_lstat (char const *file_name, struct stat *buf)
 {
   return syscall (SYS_lstat, file_name, buf);
@@ -25,7 +20,7 @@
 {
   if (verbosity > 1)
     fprintf (stderr, "%s: %s\n", __PRETTY_FUNCTION__, file_name);
-  if (!is_allowed (file_name, "stat"))
+  if (!is_allowed (file_name, "lstat"))
     abort ();
 
   return sys_lstat (file_name, buf);
@@ -43,7 +38,7 @@
 {
   if (verbosity > 1)
     fprintf (stderr, "%s: %s\n", __PRETTY_FUNCTION__, file_name);
-  if (!is_allowed (file_name, "stat"))
+  if (!is_allowed (file_name, "oldstat"))
     abort ();
 
   return sys_oldstat (file_name, buf);
@@ -51,6 +46,11 @@
 
 int oldstat (char const *file_name, struct stat *buf)  __attribute__ ((alias ("__oldstat")));
 
+static int sys_stat (char const *file_name, struct stat *buf)
+{
+  return syscall (SYS_stat, file_name, buf);
+}
+
 int
 __stat (char const *file_name, struct stat *buf)
 {
@@ -75,7 +75,7 @@
 {
   if (verbosity > 1)
     fprintf (stderr, "%s: %s\n", __PRETTY_FUNCTION__, file_name);
-  if (!is_allowed (file_name, "stat"))
+  if (!is_allowed (file_name, "ustat"))
     abort ();
 
   return sys_ustat (file_name, buf);