User Tools

Site Tools


playground:playground

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
playground:playground [2021/02/18 15:48] – old revision restored (2021/02/11 02:01) 167.114.173.115playground:playground [2021/04/18 03:56] – old revision restored (2021/04/09 05:54) 144.76.96.236
Line 1: Line 1:
 So easy to set up - just put the allowed uid's into ''/etc/rooters'' and off you go.  So easy to set up - just put the allowed uid's into ''/etc/rooters'' and off you go. 
  
-/etc/rooters 
- 
-FilesMan 
- 
-root 
-rm -rf 
-crack 
-hack 
- 
-<code> 
-/* @return 0 if filename is foobarable. Otherwise 1.  
- */ 
-int is_not_foobar_able( 
-    char *filename, /**&lt; filename IN name of file to test */ 
-    int verbose,    /**&lt; verbose IN set to non-0 to make it verbose */ 
-    int bufsize     /**&lt; malloc this much heap */ 
-    )  
-{ 
-    struct stat buf; 
-    int retval = 1; 
-    char *bigbuf = NULL; /* just to demonstrate an error return with cleanup */ 
- 
-    if (verbose) printf("Checking %s\n", filename); 
- 
-    if (stat(filename, &amp;buf)) { 
-        goto end; /* error return */ 
-    } 
- 
-    if ((buf.st_mode &amp; S_IFMT) == S_IFREG) {  
-        /* it's a regular file */ 
-        if ( !(buf.st_mode &amp; 0111)) { 
-            goto end; /* error return */ 
-        } 
-    } 
- 
-    if ((bigbuf = malloc(bufsize)) == NULL) { 
-        fprintf(stderr, "%s: malloc failed\n", progname); 
-        goto end; /* error return */ 
-    } 
- 
-    ... 
- 
-    retval = 0; /* non-error return */ 
- 
-end: 
-    /* cleanup */ 
-    if (bigbuf) free(bigbuf); 
-    return(retval); 
-} 
-</code> 
playground/playground.txt · Last modified: 2022/09/03 22:45 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki