]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
misc-progs: Remove unused functions.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2013 14:23:41 +0000 (16:23 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2013 14:23:41 +0000 (16:23 +0200)
src/misc-progs/setuid.c
src/misc-progs/setuid.h

index d7fabd494122a947307dc9f82c19e313c95405cd..9e5a8f54effff0b0aa11a9e17c0c0c06491479cc 100644 (file)
@@ -174,31 +174,3 @@ int initsetuid(void)
 \r
        return 1;\r
 }\r
-\r
-/* check whether a file exists */\r
-int file_exists(const char *fname) {\r
-       struct stat st;\r
-       stat(fname, &st);\r
-       return S_ISREG(st.st_mode) ? 1 : 0;\r
-}\r
-\r
-/* check whether a file exists. fname is wildcard eg: file_exists (/tmp/foo*) */\r
-int file_exists_w(const char *fname)\r
-{\r
-       /* do a quick check first */\r
-       struct stat st;\r
-       stat(fname, &st);\r
-       if (S_ISREG(st.st_mode))\r
-               return 1;\r
-\r
-       /* check for possible wild cards in name */\r
-       glob_t globbuf;\r
-       int retval=0;\r
-       if (glob(fname, GLOB_ERR, NULL, &globbuf)==0) {\r
-               if (globbuf.gl_pathc>0) {\r
-                       retval=1;\r
-               }\r
-       }\r
-       globfree(&globbuf);\r
-       return retval;\r
-}\r
index e253a765704b0cdb0154293d59ce854faac48ee4..1e0aed2a08f0747243fc68c6433cf53760383707 100644 (file)
@@ -67,8 +67,4 @@ int unpriv_system(char* command, uid_t uid, gid_t gid);
 size_t strlcat(char *dst, const char *src, size_t len);
 int initsetuid(void);
 
-/* check whether a file exists */
-int file_exists(const char *fname);        
-int file_exists_w(const char *fname); //wildcard filename test
-
 #endif