• Home
  • Raw
  • Download

Lines Matching refs:namebuff

230       strcpy(daemon->namebuff, "/");  in tftp_request()
234 daemon->namebuff[0] = 0; in tftp_request()
235 strncat(daemon->namebuff, daemon->tftp_prefix, (MAXDNAME-1) - strlen(daemon->namebuff)); in tftp_request()
237 strncat(daemon->namebuff, "/", (MAXDNAME-1) - strlen(daemon->namebuff)); in tftp_request()
241 size_t oldlen = strlen(daemon->namebuff); in tftp_request()
244 strncat(daemon->namebuff, inet_ntoa(peer.sin_addr), (MAXDNAME-1) - strlen(daemon->namebuff)); in tftp_request()
245 strncat(daemon->namebuff, "/", (MAXDNAME-1) - strlen(daemon->namebuff)); in tftp_request()
248 if (stat(daemon->namebuff, &statbuf) == -1 || !S_ISDIR(statbuf.st_mode)) in tftp_request()
249 daemon->namebuff[oldlen] = 0; in tftp_request()
255 if (strstr(filename, daemon->namebuff) == filename) in tftp_request()
256 daemon->namebuff[0] = 0; in tftp_request()
262 daemon->namebuff[0] = 0; in tftp_request()
263 strncat(daemon->namebuff, filename, (MAXDNAME-1) - strlen(daemon->namebuff)); in tftp_request()
269 len = tftp_err_oops(packet, daemon->namebuff); in tftp_request()
282 …my_syslog(MS_TFTP | LOG_INFO, _("TFTP sent %s to %s"), daemon->namebuff, inet_ntoa(peer.sin_addr)); in tftp_request()
290 char *packet = daemon->packet, *namebuff = daemon->namebuff; in check_tftp_fileperm() local
298 if (daemon->tftp_prefix && strstr(namebuff, "/../")) in check_tftp_fileperm()
301 if ((fd = open(namebuff, O_RDONLY)) == -1) in check_tftp_fileperm()
305 *len = tftp_err(ERR_FNF, packet, _("file %s not found"), namebuff); in check_tftp_fileperm()
336 strcmp(t->file->filename, namebuff) == 0) in check_tftp_fileperm()
343 if (!(file = whine_malloc(sizeof(struct tftp_file) + strlen(namebuff) + 1))) in check_tftp_fileperm()
354 strcpy(file->filename, namebuff); in check_tftp_fileperm()
359 *len = tftp_err(ERR_PERM, packet, _("cannot access %s: %s"), namebuff); in check_tftp_fileperm()
365 *len = tftp_err_oops(packet, namebuff); in check_tftp_fileperm()