cmds.c (133936) | cmds.c (161764) |
---|---|
1/* $NetBSD: cmds.c,v 1.23 2004-08-09 12:56:47 lukem Exp $ */ | 1/* $NetBSD: cmds.c,v 1.24 2006/02/01 14:20:12 christos Exp $ */ |
2 3/* 4 * Copyright (c) 1999-2004 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Luke Mewburn. 9 * --- 82 unchanged lines hidden (view full) --- 92 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 93 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 94 * SUCH DAMAGE. 95 */ 96 97 98#include <sys/cdefs.h> 99#ifndef lint | 2 3/* 4 * Copyright (c) 1999-2004 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Luke Mewburn. 9 * --- 82 unchanged lines hidden (view full) --- 92 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 93 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 94 * SUCH DAMAGE. 95 */ 96 97 98#include <sys/cdefs.h> 99#ifndef lint |
100__RCSID("$NetBSD: cmds.c,v 1.23 2004-08-09 12:56:47 lukem Exp $"); | 100__RCSID("$NetBSD: cmds.c,v 1.24 2006/02/01 14:20:12 christos Exp $"); |
101#endif /* not lint */ 102 103#include <sys/param.h> 104#include <sys/stat.h> 105 106#include <arpa/ftp.h> 107 108#include <dirent.h> --- 277 unchanged lines hidden (view full) --- 386 } 387 cprintf(stdout, "\r\n"); 388 fflush(stdout); 389 return; 390 } 391 392 /* default cases */ 393 if (ep != NULL && *ep != '\0') | 101#endif /* not lint */ 102 103#include <sys/param.h> 104#include <sys/stat.h> 105 106#include <arpa/ftp.h> 107 108#include <dirent.h> --- 277 unchanged lines hidden (view full) --- 386 } 387 cprintf(stdout, "\r\n"); 388 fflush(stdout); 389 return; 390 } 391 392 /* default cases */ 393 if (ep != NULL && *ep != '\0') |
394 REASSIGN(c->options, xstrdup(ep)); | 394 REASSIGN(c->options, ftpd_strdup(ep)); |
395 if (c->options != NULL) 396 reply(200, "Options for %s are '%s'.", c->name, 397 c->options); 398 else 399 reply(200, "No options defined for %s.", c->name); 400} 401 402void --- 30 unchanged lines hidden (view full) --- 433{ 434 struct stat st; 435 436 if (stat(name, &st) < 0) { 437 perror_reply(550, name); 438 return (NULL); 439 } 440 reply(350, "File exists, ready for destination name"); | 395 if (c->options != NULL) 396 reply(200, "Options for %s are '%s'.", c->name, 397 c->options); 398 else 399 reply(200, "No options defined for %s.", c->name); 400} 401 402void --- 30 unchanged lines hidden (view full) --- 433{ 434 struct stat st; 435 436 if (stat(name, &st) < 0) { 437 perror_reply(550, name); 438 return (NULL); 439 } 440 reply(350, "File exists, ready for destination name"); |
441 return (xstrdup(name)); | 441 return (ftpd_strdup(name)); |
442} 443 444void 445renamecmd(const char *from, const char *to) 446{ 447 char *p = NULL; 448 449 if (rename(from, to) < 0) { --- 524 unchanged lines hidden --- | 442} 443 444void 445renamecmd(const char *from, const char *to) 446{ 447 char *p = NULL; 448 449 if (rename(from, to) < 0) { --- 524 unchanged lines hidden --- |