Develop and Download Open Source Software

Browse Subversion Repository

Diff of /tags/REL-1.1/ftpauth.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7 by hirohitohigashi, Fri Feb 20 12:10:40 2009 UTC revision 11 by hirohitohigashi, Mon Feb 23 02:05:06 2009 UTC
# Line 73  int ftp_auth(int sck, char *usr, char *p Line 73  int ftp_auth(int sck, char *usr, char *p
73    
74      auth = malloc(strlen("USER ")+strlen(usr)+2);      auth = malloc(strlen("USER ")+strlen(usr)+2);
75                                    
76      sprintf(auth, "%s %s\n", "USER", usr);      sprintf(auth, "%s %s\r\n", "USER", usr);
77    
78      if (write(sck, auth, strlen(auth)) == -1) {      if (write(sck, auth, strlen(auth)) == -1) {
79    
# Line 175  int ftp_auth(int sck, char *usr, char *p Line 175  int ftp_auth(int sck, char *usr, char *p
175    
176      auth = malloc(strlen("PASS ")+strlen(pwd)+2);      auth = malloc(strlen("PASS ")+strlen(pwd)+2);
177    
178      sprintf(auth, "%s %s\n", "PASS", pwd);      sprintf(auth, "%s %s\r\n", "PASS", pwd);
179    
180      if (write(sck, auth, strlen(auth)) == -1) {      if (write(sck, auth, strlen(auth)) == -1) {
181    

Legend:
Removed from v.7  
changed lines
  Added in v.11

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26