Changeset 60
- Timestamp:
- Aug 20, 2007, 10:20:30 PM (18 years ago)
- Location:
- trunk/samba/source/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/samba/source/lib/smbrun.c
r39 r60 74 74 } 75 75 76 #ifdef __EMX__ 77 78 { 79 char buf[8192]; 80 int n, w; 81 const char *newcmd = sanitize ? escape_shell_string(cmd) : cmd; 82 if (!newcmd) { 83 close(*outfd); 84 *outfd = -1; 85 return(82); 86 } 87 // execute script and capture stdout 88 FILE* pipe = popen( newcmd, "rb"); 89 if (pipe) { 90 // get stdout from pipe 91 while( !feof( pipe)) { 92 n = fread( buf, 1, 8192, pipe); 93 // write to file if required 94 if (n>0 && outfd!=NULL) 95 w = write( *outfd, buf, n); 96 } 97 // close and return status 98 pclose( pipe); 99 return 0; 100 } 101 // error, close files 102 close(*outfd); 103 *outfd = -1; 104 return 83; 105 } 106 107 #else 108 76 109 /* in this method we will exec /bin/sh with the correct 77 110 arguments, after first setting stdout to point at the file */ … … 185 218 exit(83); 186 219 return 1; 220 221 #endif // __EMX__ 222 187 223 } 188 224 -
trunk/samba/source/lib/util_str.c
r44 r60 2623 2623 *******************************************************************/ 2624 2624 2625 #define INCLUDE_LIST "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_/ \t., "2625 #define INCLUDE_LIST "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_/ \t.,:" 2626 2626 #define INSIDE_DQUOTE_LIST "$`\n\"\\" 2627 2627
Note:
See TracChangeset
for help on using the changeset viewer.