Lines 115-120
Link Here
|
115 |
#include "helpers.h" |
115 |
#include "helpers.h" |
116 |
#include "types.h" |
116 |
#include "types.h" |
117 |
|
117 |
|
|
|
118 |
|
119 |
|
120 |
void make_jail_dir( char* dir ) |
121 |
{ |
122 |
for( ; *dir != '\0'; ++dir ) |
123 |
{ |
124 |
if( *dir == '.' ) |
125 |
{ |
126 |
*dir = '\0'; |
127 |
break; |
128 |
} |
129 |
} |
130 |
} |
131 |
|
118 |
////////////////////////////////////////////////////////////////////////////// |
132 |
////////////////////////////////////////////////////////////////////////////// |
119 |
// |
133 |
// |
120 |
// main() |
134 |
// main() |
Lines 211-216
Link Here
|
211 |
fprintf(stderr,"jail: can't get passwd info for uid %d\n",uid); |
225 |
fprintf(stderr,"jail: can't get passwd info for uid %d\n",uid); |
212 |
exit(-1); |
226 |
exit(-1); |
213 |
} |
227 |
} |
|
|
228 |
make_jail_dir(pwdent->dir); |
214 |
|
229 |
|
215 |
// |
230 |
// |
216 |
// create the terminal devices here |
231 |
// create the terminal devices here |
Lines 289-295
Link Here
|
289 |
free(pwdent->dir); |
304 |
free(pwdent->dir); |
290 |
pwdent->dir = tmp_str; |
305 |
pwdent->dir = tmp_str; |
291 |
|
306 |
|
292 |
|
|
|
293 |
#if DEBUG != 0 |
307 |
#if DEBUG != 0 |
294 |
fprintf(stderr,"jail: doing chdir(%s)\n",pwdent->dir); |
308 |
fprintf(stderr,"jail: doing chdir(%s)\n",pwdent->dir); |
295 |
#endif |
309 |
#endif |
Lines 494-497
Link Here
|
494 |
return(-4); |
508 |
return(-4); |
495 |
} |
509 |
} |
496 |
|
510 |
|
497 |
|
|
|