check_security_buffer(
char * buffer)
{
- socklen_t i;
+ socklen_t_equiv i;
struct sockaddr_in addr;
char *s, *fp, ch;
char *errstr = NULL;
/*NOTREACHED*/
}
skip_whitespace(s, ch);
- if (!check_security((struct sockaddr_storage *)&addr, s-1, 0, &errstr)) {
+ if (!check_security((sockaddr_union *)&addr, s-1, 0, &errstr)) {
error(_("security check failed: %s"), errstr);
/*NOTREACHED*/
}
char *buf = NULL;
int data_sock = -1;
in_port_t data_port = (in_port_t)-1;
- socklen_t socklen;
+ socklen_t_equiv socklen;
struct sockaddr_in addr;
GSList *dumpspecs;
tapelist_t *tapes = NULL;
safe_fd(-1, 0);
}
+#ifdef FORCE_USERID
+
+ /* we'd rather not run as root */
+
+ if(geteuid() == 0) {
+ if(client_uid == (uid_t) -1) {
+ error("error [cannot find user %s in passwd file]\n", CLIENT_LOGIN);
+ /*NOTREACHED*/
+ }
+
+ /*@ignore@*/
+ initgroups(CLIENT_LOGIN, client_gid);
+ /*@end@*/
+ setgid(client_gid);
+ setuid(client_uid);
+ }
+
+#endif /* FORCE_USERID */
+
/* initialize */
/* close stderr first so that debug file becomes it - amrestore
chats to stderr, which we don't want going to client */
}
amfree(buf);
+ if(!tapes && rst_flags->alt_tapedev){
+ dbprintf(("%s: Looks like we're restoring from a holding file...\n", debug_prefix_time(NULL)));
+ tapes = unmarshal_tapelist_str(rst_flags->alt_tapedev);
+ tapes->isafile = 1;
+ amfree(rst_flags->alt_tapedev);
+ rst_flags->alt_tapedev = NULL;
+ }
+
if(re_config) {
config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL, re_config);
dbrename(re_config, DBG_SUBDIR_SERVER);