--- weex-2.6.1.orig/po/de.po +++ weex-2.6.1/po/de.po @@ -4,7 +4,6 @@ # German translations # Christian Ullrich , 1999-2000. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Fast Webpage Exchanger 2.5.0\n" @@ -75,18 +74,18 @@ msgid "" "When you set ChangePermissionDir, you must configure ChangePermission.\n" msgstr "" -"Wenn Sie ChangePermissionDir setzen, mssen Sie ChangePermission angeben.\n" +"Wenn Sie ChangePermissionDir setzen, müssen Sie ChangePermission angeben.\n" #: src/filedata.c:77 #, c-format msgid "Cannot expand symbolic link `%s'. Ignore this file.\n" msgstr "" -"Kann den symbolischen Link `%s' nicht auflsen. Ignoriere diese Datei.\n" +"Kann den symbolischen Link `%s' nicht auflösen. Ignoriere diese Datei.\n" #: src/filedata.c:78 #, c-format msgid "Expanding symbolic link failed: %s" -msgstr "Kann symbolischen Link nicht auflsen: %s" +msgstr "Kann symbolischen Link nicht auflösen: %s" #: src/filedata.c:117 #, c-format @@ -115,12 +114,12 @@ #: src/filedata.c:176 #, c-format msgid "Cannot open `%s'.\n" -msgstr "Kann `%s' nicht ffnen.\n" +msgstr "Kann `%s' nicht öffnen.\n" #: src/filedata.c:251 #, c-format msgid "Cannot remove `%s'.\n" -msgstr "Kann `%s' nicht lschen.\n" +msgstr "Kann `%s' nicht löschen.\n" #: src/filedata.c:298 src/filedata.c:305 src/filedata.c:316 msgid "Cannot get the remote directory list correctly.\n" @@ -133,7 +132,7 @@ #: src/ftpmain.c:74 #, c-format msgid "Complete: sent %d file(s), removed %d file(s)" -msgstr "Fertig: %d Datei(en) gesendet, %d Datei(en) gelscht" +msgstr "Fertig: %d Datei(en) gesendet, %d Datei(en) gelöscht" #: src/ftpmain.c:99 #, c-format @@ -196,19 +195,19 @@ #, c-format msgid "No password specified in configuration file for `%s'. Asking ...\n" msgstr "" -"In der Konfigurationsdatei ist kein Paßwort fr `%s' angegeben. Frage " +"In der Konfigurationsdatei ist kein Passwort für `%s' angegeben. Frage " "nach...\n" #: src/ftpmain.c:248 msgid "Password:" -msgstr "Paßwort:" +msgstr "Passwort:" #: src/ftpmain.c:253 msgid "" "Login failed. Check your ID and password.\n" "\n" msgstr "" -"Login gescheitert. Prfen Sie Ihre ID und das Paßwort.\n" +"Login gescheitert. Prüfen Sie Ihre ID und das Passwort.\n" "\n" #: src/ftpmain.c:254 @@ -219,7 +218,7 @@ #: src/ftpmain.c:314 #, c-format msgid "Cannot change %s current working directory to `%s'.\n" -msgstr "Kann %sArbeitsverzeichnis nicht nach `%s' wechseln.\n" +msgstr "Kann %s Arbeitsverzeichnis nicht nach `%s' wechseln.\n" #: src/ftpmain.c:314 src/ftpmain.c:315 msgid "local" @@ -233,7 +232,7 @@ #: src/ftpmain.c:315 #, c-format msgid "Changing %s current working directory failed: %s" -msgstr "Kann %sArbeitsverzeichnis nicht nach `%s' wechseln." +msgstr "Kann %s Arbeitsverzeichnis nicht nach `%s' wechseln." #: src/ftpmain.c:411 #, c-format @@ -248,7 +247,7 @@ #: src/ftpmain.c:431 #, c-format msgid "Changing the access permissions failed: %s%s" -msgstr "Kann die Zugriffsrechts nicht verändern: %s%s" +msgstr "Kann die Zugriffsrechte nicht verändern: %s%s" #: src/ftpmain.c:440 #, c-format @@ -272,32 +271,32 @@ #: src/ftpmain.c:469 #, c-format msgid "%s : sent %d file(s), removed %d file(s)" -msgstr "%s : %d Datei(en) gesendet, %d Datei(en) gelscht" +msgstr "%s : %d Datei(en) gesendet, %d Datei(en) gelöscht" #: src/ftpmain.c:613 #, c-format msgid "Cannot remove remote file `%s%s'.\n" -msgstr "Kann Remote-Datei `%s%s' nicht lschen.\n" +msgstr "Kann Remote-Datei `%s%s' nicht löschen.\n" #: src/ftpmain.c:614 #, c-format msgid "Removing failed: %s%s" -msgstr "Kann nicht lschen: %s%s" +msgstr "Kann nicht löschen: %s%s" #: src/ftpmain.c:619 #, c-format msgid "Removed: %s%s" -msgstr "Gelscht: %s%s" +msgstr "Gelöscht: %s%s" #: src/ftpmain.c:681 #, c-format msgid "Cannot remove remote directory `%s%s/'.\n" -msgstr "Kann Remote-Verzeichnis `%s%s/' nicht lschen.\n" +msgstr "Kann Remote-Verzeichnis `%s%s/' nicht löschen.\n" #: src/ftpmain.c:682 #, c-format msgid "Removing failed: %s%s/" -msgstr "Kann nicht lschen: %s%s/" +msgstr "Kann nicht löschen: %s%s/" #: src/ftpmain.c:709 #, c-format @@ -321,7 +320,7 @@ #. DISCONNECT #: src/message.c:52 msgid "Entering : " -msgstr "Wechsele nach : " +msgstr "Wechsle nach : " #. ENTER #: src/message.c:53 @@ -341,7 +340,7 @@ #. CHMOD #: src/message.c:57 msgid "Removing : " -msgstr "Lsche : " +msgstr "Lösche : " #. REMOVE #: src/message.c:58 @@ -351,7 +350,7 @@ #. BINARY_LOWER_SEND #: src/message.c:61 msgid "Processing : " -msgstr "" +msgstr "Verarbeite : " #: src/parsecfg.c:268 #, c-format @@ -398,7 +397,7 @@ "Invalid number\n" msgstr "" "%s(%d): %s\n" -"Ungltiger Wert\n" +"Ungültiger Wert\n" #: src/parsecfg.c:286 #, c-format @@ -407,7 +406,7 @@ "Out of range\n" msgstr "" "%s(%d): %s\n" -"Bereichsberlauf\n" +"Bereichsüberlauf\n" #: src/parsecfg.c:289 #, c-format @@ -425,7 +424,7 @@ "It must be specified TRUE or FALSE.\n" msgstr "" "%s(%d): %s\n" -"Es muß TRUE oder FALSE angegeben werden.\n" +"Es muss TRUE oder FALSE angegeben werden.\n" #: src/parsecfg.c:295 #, c-format @@ -455,7 +454,7 @@ #: src/shhopt.c:235 src/shhopt.c:261 #, c-format msgid "invalid number `%s'\n" -msgstr "Ungltiger Wert `%s'\n" +msgstr "Ungültiger Wert `%s'\n" #: src/shhopt.c:238 src/shhopt.c:264 #, c-format @@ -475,7 +474,7 @@ #: src/shhopt.c:388 #, c-format msgid "option `%s' doesn't allow an argument\n" -msgstr "Option `%s' läßt kein Argument zu\n" +msgstr "Option `%s' lässt kein Argument zu\n" #: src/shhopt.c:410 #, c-format @@ -489,7 +488,7 @@ #: src/sub.c:81 #, c-format msgid "Invalid wildcard `%s'.\n" -msgstr "Ungltiger Platzhalter `%s'.\n" +msgstr "Ungültiger Platzhalter `%s'.\n" #: src/weex.c:102 src/weex.c:141 #, c-format @@ -532,7 +531,7 @@ "\n" "Optionen:\n" " -h | --help Diese Hilfe anzeigen\n" -" -s | --silent Alle Meldungen außer Fehlern unterdrcken\n" +" -s | --silent Alle Meldungen außer Fehlern unterdrücken\n" " -f | --force Alle Dateien neu senden\n" " -m | --monochrome Meldungen monochrom ausgeben\n" " -t | --test\t Keine Änderungen an Remote-Dateien vornehmen\n" --- weex-2.6.1.orig/po/cat-id-tbl.c +++ weex-2.6.1/po/cat-id-tbl.c @@ -53,77 +53,81 @@ Login failed. Check your ID and password.\n\ \n", 40}, {"Login failed: %s (%s)", 41}, - {"Cannot change %s current working directory to `%s'.\n", 42}, - {"local", 43}, - {"remote", 44}, - {"Changing %s current working directory failed: %s", 45}, - {"Sent: %s%s", 46}, - {"Cannot change the access permissions of `%s%s' to `%s'.\n", 47}, - {"Changing the access permissions failed: %s%s", 48}, - {"Cannot send file `%s%s'.\n", 49}, - {"Sending failed: %s%s", 50}, - {"Retry to send: %s%s", 51}, - {"Retrying...\n", 52}, - {"%s : sent %d file(s), removed %d file(s)", 53}, - {"Cannot remove remote file `%s%s'.\n", 54}, - {"Removing failed: %s%s", 55}, - {"Removed: %s%s", 56}, - {"Cannot remove remote directory `%s%s/'.\n", 57}, - {"Removing failed: %s%s/", 58}, - {"Cannot make remote directory `%s%s/'.\n", 59}, - {"Making directory failed: %s%s/", 60}, - {"Connect : ", 61}, - {"Disconnect : ", 62}, - {"Entering : ", 63}, - {"Leaving : ", 64}, - {"Sending : ", 65}, - {"Changing : ", 66}, - {"Removing : ", 67}, - {"Making Dir : ", 68}, - {"Processing : ", 69}, - {"Configuration file `%s' is not found.\n", 70}, - {"Creating configuration file `%s' fails.\n", 71}, + {"\ +Authorization failed; try again\n\ +\n", 42}, + {"Cannot change %s current working directory to `%s'.\n", 43}, + {"local", 44}, + {"remote", 45}, + {"Changing %s current working directory failed: %s", 46}, + {"Sent: %s%s", 47}, + {"Cannot change the access permissions of `%s%s' to `%s'.\n", 48}, + {"Changing the access permissions failed: %s%s", 49}, + {"Cannot send file `%s%s'.\n", 50}, + {"Sending failed: %s%s", 51}, + {"Retry to send: %s%s", 52}, + {"Retrying...\n", 53}, + {"Cannot rename temporary file to `%s%s'.\n", 54}, + {"%s : sent %d file(s), removed %d file(s)", 55}, + {"Cannot remove remote file `%s%s'.\n", 56}, + {"Removing failed: %s%s", 57}, + {"Removed: %s%s", 58}, + {"Cannot remove remote directory `%s%s/'.\n", 59}, + {"Removing failed: %s%s/", 60}, + {"Cannot make remote directory `%s%s/'.\n", 61}, + {"Making directory failed: %s%s/", 62}, + {"Connect : ", 63}, + {"Disconnect : ", 64}, + {"Entering : ", 65}, + {"Leaving : ", 66}, + {"Sending : ", 67}, + {"Changing : ", 68}, + {"Removing : ", 69}, + {"Making Dir : ", 70}, + {"Processing : ", 71}, + {"Configuration file `%s' is not found.\n", 72}, + {"Creating configuration file `%s' fails.\n", 73}, {"\ %s(%d): %s\n\ -Syntax error\n", 72}, +Syntax error\n", 74}, {"\ %s(%d): %s\n\ -Unrecognized parameter\n", 73}, +Unrecognized parameter\n", 75}, {"\ %s(%d): %s\n\ -Internal error\n", 74}, +Internal error\n", 76}, {"\ %s(%d): %s\n\ -Invalid number\n", 75}, +Invalid number\n", 77}, {"\ %s(%d): %s\n\ -Out of range\n", 76}, +Out of range\n", 78}, {"\ %s(%d): %s\n\ -Cannot allocate memory.\n", 77}, +Cannot allocate memory.\n", 79}, {"\ %s(%d): %s\n\ -It must be specified TRUE or FALSE.\n", 78}, +It must be specified TRUE or FALSE.\n", 80}, {"\ %s(%d): %s\n\ -The section name is already used.\n", 79}, +The section name is already used.\n", 81}, {"\ %s(%d)\n\ -There is no closing brace.\n", 80}, +There is no closing brace.\n", 82}, {"\ %s(%d): %s\n\ -Unexplained error\n", 81}, - {"invalid number `%s'\n", 82}, - {"number `%s' to `%s' out of range\n", 83}, - {"unrecognized option `%s'\n", 84}, - {"option `%s' requires an argument\n", 85}, - {"option `%s' doesn't allow an argument\n", 86}, - {"unrecognized option `-%c'\n", 87}, - {"Cannot allocate memory.\n", 88}, - {"Invalid wildcard `%s'.\n", 89}, +Unexplained error\n", 83}, + {"invalid number `%s'\n", 84}, + {"number `%s' to `%s' out of range\n", 85}, + {"unrecognized option `%s'\n", 86}, + {"option `%s' requires an argument\n", 87}, + {"option `%s' doesn't allow an argument\n", 88}, + {"unrecognized option `-%c'\n", 89}, + {"Cannot allocate memory.\n", 90}, + {"Invalid wildcard `%s'.\n", 91}, {"\ Warning! Configuration file `%s/.weex/weexrc' does not exist.\n\ -\n", 90}, +\n", 92}, {"\ Fast Webpage Exchanger Ver %s Copyright (C) 1999-2000 Yuuki NINOMIYA\n\ \n\ @@ -142,27 +146,27 @@ -d | --debug-config display configuration of each hosts\n\ -D | --debug-ftplib output debugging information for ftplib\n\ -V | --version display version information and exit\n\ -\n", 91}, - {"Fast Webpage Exchanger Ver %s Copyright (C) 1999-2000 Yuuki NINOMIYA\n", 92}, - {"Cannot get a host name. Proceed anyway.\n", 93}, - {"Stopped.\n", 94}, +\n", 93}, + {"Fast Webpage Exchanger Ver %s Copyright (C) 1999-2000 Yuuki NINOMIYA\n", 94}, + {"Cannot get a host name. Proceed anyway.\n", 95}, + {"Stopped.\n", 96}, {"\ Log file `%s' seems to be always locked.\n\ -Remove lock file `%s'.\n", 95}, - {"Another weex is using log file `%s'. Just a moment.\n", 96}, - {"Jan", 97}, - {"Feb", 98}, - {"Mar", 99}, - {"Apr", 100}, - {"May", 101}, - {"Jun", 102}, - {"Jul", 103}, - {"Aug", 104}, - {"Sep", 105}, - {"Oct", 106}, - {"Nov", 107}, - {"Dec", 108}, - {"%s %2d %02d:%02d:%02d %s weex[%d]: %s\n", 109}, +Remove lock file `%s'.\n", 97}, + {"Another weex is using log file `%s'. Just a moment.\n", 98}, + {"Jan", 99}, + {"Feb", 100}, + {"Mar", 101}, + {"Apr", 102}, + {"May", 103}, + {"Jun", 104}, + {"Jul", 105}, + {"Aug", 106}, + {"Sep", 107}, + {"Oct", 108}, + {"Nov", 109}, + {"Dec", 110}, + {"%s %2d %02d:%02d:%02d %s weex[%d]: %s\n", 111}, }; -int _msg_tbl_length = 109; +int _msg_tbl_length = 111; --- weex-2.6.1.orig/man/weex.1 +++ weex-2.6.1/man/weex.1 @@ -169,6 +169,14 @@ mode for files not specified in this way is IMAGE(BINARY) mode. .TP +.B AuthorizationName +If you are using an FTP proxy server that requires challenge/response +authorization with the nonstandard AUTHORIZE and RESPONSE commands, +set this parameter to your authorization user name (or number). After +logging in to the proxy, weex will prompt you with the challenge and +read back a response. + +.TP .B ChangePermission The access permissions of the files in the directories specified with ChangePermissionDir are changed to this parameter. The format is a three @@ -293,8 +301,9 @@ .TP .B OverwriteOK -If the FTP server has trouble overwriting files, set this parameter to `false'. - +If the FTP server has trouble overwriting files, set this parameter to `false', +and each file will be deleted before a new version is put in place. + .TP .B Password Plaintext password granting access to the account. Note that this file uses @@ -314,6 +323,16 @@ When `true', weex create a log. .TP +.B RenameOK +If this parameter is set to `true', each file is uploaded under the +temporary name `weex.tmp', then renamed to its correct name only if +the upload succeeds. This avoids the problem of a user getting an +incomplete file if he downloads from your Web site while you are +uploading to it, and of incomplete files being uploaded if your FTP +connection breaks while weex is running . The default is `false' +since some FTP servers might not support renaming. + +.TP .B ShowHiddenFile Set `true' to get hidden files (starting with a dot) on FTP server which doesn't show hidden files by default. --- weex-2.6.1.orig/src/ftplib.c +++ weex-2.6.1/src/ftplib.c @@ -422,7 +422,11 @@ memset(&sin,0,sizeof(sin)); sin.sin_family = AF_INET; - lhost = strdup(host); + if (strncmp(host, "ftp://", 6) == 0) { + lhost = strdup(host + 6); + } else { + lhost = strdup(host); + } pnum = strchr(lhost,':'); if (pnum == NULL) { @@ -444,7 +448,11 @@ sin.sin_port = htons(atoi(pnum)); else { - pse = getservbyname(pnum,"tcp"); + if ((pse = getservbyname(pnum,"tcp")) == NULL) + { + /* perror("getservbyname"); */ + return 0; + } sin.sin_port = pse->s_port; } } @@ -603,6 +611,37 @@ return FtpSendCmd(tempbuf,'2',nControl); } +/* + * FtpAuthorize - authorize FTP proxy to send outgoing data; requires + * user interaction with cryptokey + */ +GLOBALDEF int FtpAuthorize(const char *user, netbuf *nControl) +{ + char tempbuf[64], respbuf[32]; + char *newline; + + if ((strlen(user) + 12) > sizeof(tempbuf)) + return 0; + sprintf(tempbuf,"AUTHORIZE %s",user); + if (!FtpSendCmd(tempbuf,'3',nControl)) + { + if (nControl->response[0] == '2') + return 1; + return 0; + } + fputs(nControl->response, stderr); + respbuf[0] = '\0'; + fgets(respbuf, sizeof(respbuf), stdin); + newline = strchr(respbuf, '\n'); + if (newline) *newline = '\0'; + sprintf(tempbuf,"RESPONSE %s",respbuf); + if (!FtpSendCmd(tempbuf,'2',nControl)){ + fprintf(stderr, "%s", nControl->response); + return 0; + } + return 1; +} + /* * FtpOpenPort - set up data connection * @@ -1164,6 +1203,9 @@ while ((l = fread(dbuf, 1, FTPLIB_BUFSIZ, local)) > 0){ if ((c = FtpWrite(dbuf, l, nData)) < l){ printf("short write: passed %d, wrote %d\n", l, c); + /* we should handle short writes more gracefully */ + FtpClose(nData); + return 0; } if(opt_silent){ continue; --- weex-2.6.1.orig/src/ftplib.h +++ weex-2.6.1/src/ftplib.h @@ -95,6 +95,7 @@ GLOBALREF int FtpConnect(const char *host, netbuf **nControl); GLOBALREF int FtpOptions(int opt, long val, netbuf *nControl); GLOBALREF int FtpLogin(const char *user, const char *pass, netbuf *nControl); +GLOBALREF int FtpAuthorize(const char *user, netbuf *nControl); GLOBALREF int FtpAccess(const char *path, int typ, int mode, netbuf *nControl, netbuf **nData); GLOBALREF int FtpRead(void *buf, int max, netbuf *nData); --- weex-2.6.1.orig/src/shhopt.c +++ weex-2.6.1/src/shhopt.c @@ -1,4 +1,4 @@ -/* $Id: shhopt.c,v 1.5 1999/09/10 19:19:48 sverrehu Exp $ */ +/* $Id: shhopt.c,v 1.1.1.1 2007/07/04 07:51:41 ldrolez Exp $ */ /*------------------------------------------------------------------------ | FILE shhopt.c | --- weex-2.6.1.orig/src/shhopt.h +++ weex-2.6.1/src/shhopt.h @@ -1,4 +1,4 @@ -/* $Id: shhopt.h,v 1.4 1997/05/27 21:14:45 sverrehu Exp $ */ +/* $Id: shhopt.h,v 1.1.1.1 2007/07/04 07:51:41 ldrolez Exp $ */ #ifndef SHHOPT_H #define SHHOPT_H --- weex-2.6.1.orig/src/variable.h +++ weex-2.6.1/src/variable.h @@ -86,6 +86,7 @@ /* configuration file options */ GLOBAL char **host_name; GLOBAL char **login_name; +GLOBAL char **authorization_name; GLOBAL char **password; GLOBAL char **src_dir; GLOBAL char **dest_dir; @@ -100,6 +101,7 @@ GLOBAL cfgList **preserve_permission_dir; GLOBAL int *conv_to_lower; GLOBAL int *overwrite_ok; +GLOBAL int *rename_ok; GLOBAL int *record_log; GLOBAL int *cfg_silent; GLOBAL int *cfg_force; --- weex-2.6.1.orig/src/log.c +++ weex-2.6.1/src/log.c @@ -24,6 +24,7 @@ # include "config.h" #endif +#include #include #include #include @@ -182,7 +183,7 @@ fp=log_open(); for(i=0;iremote_data[remote_num].date || (local_data[i].date==remote_data[remote_num].date && local_data[i].time>remote_data[remote_num].time)){ - if(!overwrite_ok[host_number]){ + if(!overwrite_ok[host_number] && !rename_ok[host_number]){ ftp_remove(file_name,dir_nest,&dir_removed_file); } if(is_ascii_file(file_name)){ @@ -400,11 +405,16 @@ } } if(!opt_test){ + int success = 0; opt_silent_bak=opt_silent; if(cfg_silent[host_number]){ opt_silent=1; } - put_temp=str_concat(current_dir[REMOTE],file_name,NULL); + if (rename_ok[host_number]) { + put_temp=str_concat(current_dir[REMOTE],"weex.tmp",NULL); + } else { + put_temp=str_concat(current_dir[REMOTE],file_name,NULL); + } for(j=0;;j++){ if(FtpPut(local_data[i].name,put_temp,trans_mode,ftp_buf)==1){ if(log_detail_level[host_number]>=3){ @@ -414,6 +424,8 @@ } dir_sent_file++; update_cache(file_name,local_data[i].date,local_data[i].time); + /* save the cache after each upload */ + save_cache(); if(is_change_permission_dir()){ mode_temp=str_dup(change_permission[host_number]); @@ -434,6 +446,7 @@ } free(mode_temp); } + success = 1; break; } if(j>=max_retry_to_send[host_number]){ @@ -449,6 +462,20 @@ free(temp); fprintf(stderr,_("Retrying...\n")); } + if (success && rename_ok[host_number]) { + char *put_temp2; + if(!overwrite_ok[host_number]){ + ftp_remove(file_name,dir_nest,&dir_removed_file); + } + put_temp2 = str_concat(current_dir[REMOTE],file_name,NULL); + if (!FtpRename(put_temp, put_temp2, ftp_buf)) { + fprintf(stderr,_("Cannot rename temporary file to `%s%s'.\n"),current_dir[REMOTE],file_name); + temp=str_dup_printf(_("Sending failed: %s%s"),current_dir[REMOTE],file_name); + log_write(temp); + free(temp); + } + free(put_temp2); + } free(put_temp); opt_silent=opt_silent_bak; } --- weex-2.6.1.orig/src/config.c +++ weex-2.6.1/src/config.c @@ -40,6 +40,7 @@ /* parameter type address of variable */ { "HostName", CFG_STRING, &host_name }, { "LoginName", CFG_STRING, &login_name }, + { "AuthorizationName", CFG_STRING, &authorization_name }, { "Password", CFG_STRING, &password }, { "SrcDir", CFG_STRING, &src_dir }, { "DestDir", CFG_STRING, &dest_dir }, @@ -54,6 +55,7 @@ { "PreservePermissionDir",CFG_STRING_LIST,&preserve_permission_dir}, { "ConvToLower", CFG_BOOL, &conv_to_lower }, { "OverwriteOK", CFG_BOOL, &overwrite_ok }, + { "RenameOK", CFG_BOOL, &rename_ok }, { "RecordLog", CFG_BOOL, &record_log }, { "Silent", CFG_BOOL, &cfg_silent }, { "Force", CFG_BOOL, &cfg_force }, @@ -187,6 +189,7 @@ } for(i=0;istr = str_dup(src->str); + + for (src = src->next; src != NULL; src = src->next) { + dest->next = str_malloc(sizeof(cfgList)); + dest = dest->next; + dest->str = str_dup(src->str); + } + dest->next = NULL; + + list_pointer[host] = head; } @@ -348,10 +370,11 @@ { cfgList *l; - if(list_pointer[host]==NULL){ + l=list_pointer[host]; + if(l==NULL || l->str==NULL){ return; - } - for(l=list_pointer[host];l!=NULL;l=l->next){ + } + for(;l!=NULL;l=l->next){ if(*(l->str+strlen(l->str)-1)!='/'){ l->str=str_realloc(l->str,strlen(l->str)+2); strcat(l->str,"/"); @@ -373,10 +396,11 @@ cfgList *l; char *temp; - if(list_absolute_path[host]==NULL){ + l=list_absolute_path[host]; + if(l==NULL || l->str==NULL){ return; } - for(l=list_absolute_path[host];l!=NULL;l=l->next){ + for(;l!=NULL;l=l->next){ if(strcmp(l->str,"./")==0){ temp=l->str; l->str=str_dup(base_dir); --- weex-2.6.1.orig/src/weex.c +++ weex-2.6.1/src/weex.c @@ -164,6 +164,7 @@ printf("HostName %s\n",host_name[i]==NULL ? "(NULL)" : host_name[i]); printf("LoginName %s\n",login_name[i]==NULL ? "(NULL)" : login_name[i]); printf("Password %s\n",password[i]==NULL ? "(NULL)" : password[i]); + printf("AuthorizationName %s\n",authorization_name[i]==NULL ? "(NULL)" : authorization_name[i]); printf("SrcDir %s\n",src_dir[i]==NULL ? "(NULL)" : src_dir[i]); printf("DestDir %s\n",dest_dir[i]==NULL ? "(NULL)" : dest_dir[i]); if(ignore_local_dir[i]!=NULL){ @@ -225,6 +226,7 @@ } printf("ConvToLower %s\n",conv_to_lower[i] ? "True" : "False"); printf("OverwriteOK %s\n",overwrite_ok[i] ? "True" : "False"); + printf("RenameOK %s\n",rename_ok[i] ? "True" : "False"); printf("RecordLog %s\n",record_log[i] ? "True" : "False"); printf("Silent %s\n",cfg_silent[i] ? "True" : "False"); printf("Force %s\n",cfg_force[i] ? "True" : "False"); --- weex-2.6.1.orig/src/cache.c +++ weex-2.6.1/src/cache.c @@ -279,7 +279,8 @@ FILE *fp; Cache *cache; int i,j; - + /* don't free the cache because of frequent cache saves */ + int freecache = 0; temp=str_concat(getenv("HOME"),"/.weex/weex.cache.",cfgSectionNumberToName(host_number),NULL); fp=fopen(temp,"w"); @@ -301,16 +302,16 @@ continue; } fprintf(fp,"%08ld %06ld %s\n",cache[j].date,cache[j].time,cache[j].name); - free(cache[j].name); + if (freecache) free(cache[j].name); } - free(cache); + if (freecache) free(cache); } - free(cache_dir[i].name); + if (freecache) free(cache_dir[i].name); } fclose(fp); free(temp); - free(cache_dir); + if (freecache) free(cache_dir); } --- weex-2.6.1.orig/src/strlib.c +++ weex-2.6.1/src/strlib.c @@ -38,10 +38,12 @@ #define TRUE 1 #if !defined (G_VA_COPY) -# if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) +# if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) || defined(__s390__) # define G_VA_COPY(ap1, ap2) (*(ap1) = *(ap2)) # elif defined (G_VA_COPY_AS_ARRAY) # define G_VA_COPY(ap1, ap2) g_memmove ((ap1), (ap2), sizeof (va_list)) +# elif defined (__x86_64__) +# define G_VA_COPY(ap1, ap2) memmove ((ap1), (ap2), sizeof (va_list)) # else /* va_list is a pointer */ # define G_VA_COPY(ap1, ap2) ((ap1) = (ap2)) # endif /* va_list is a pointer */ --- weex-2.6.1.orig/debian/docs +++ weex-2.6.1/debian/docs @@ -1,14 +1,13 @@ -doc/README -doc/ChangeLog -doc/ChangeLog.ja -doc/BUGS.ja -doc/TODO.ja +doc/AUTHORS doc/BUGS -doc/README.ja +doc/BUGS.ja +doc/ChangeLog.ja +doc/FAQ doc/FAQ.ja -doc/sample.weexrc +doc/README +doc/README.ja doc/THANKS doc/TODO -doc/FAQ -doc/AUTHORS +doc/TODO.ja +doc/sample.weexrc doc/weex.cat --- weex-2.6.1.orig/debian/control +++ weex-2.6.1/debian/control @@ -1,20 +1,21 @@ Source: weex Section: net Priority: optional -Maintainer: Yuuki NINOMIYA -Standards-Version: 3.0.1 +Maintainer: Ludovic Drolez +Standards-Version: 3.9.2 +Build-Depends: debhelper (>= 2.2.18), gettext Package: weex Architecture: any -Depends: ${shlibs:Depends} -Description: a non-interactive FTP client for updating webpages - Weex is a utility designed to automate the task +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Non-interactive FTP client for updating web pages + Weex is an utility designed to automate the task of remotely maintaining a web page or other FTP archive. With weex, the maintainer of a web site or archive that must be administered through FTP interaction can largely ignore that process. The archive administrator simply creates a local directory - that serves as an exact model for the offsite data. + that serves as an exact model for the off-site data. All modifications and direct interaction is done locally to this directory structure. When the administrator wishes to coordinate the data on the remote site with that of the --- weex-2.6.1.orig/debian/rules +++ weex-2.6.1/debian/rules @@ -5,8 +5,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# This is the debhelper compatability version to use. -export DH_COMPAT=1 build: build-stamp build-stamp: @@ -14,7 +12,7 @@ ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info # Add here commands to compile the package. - #$(MAKE) + $(MAKE) prefix=`pwd`/debian/weex/usr touch build-stamp @@ -22,11 +20,10 @@ dh_testdir dh_testroot rm -f build-stamp - # Add here commands to clean up after the build process. - -$(MAKE) distclean - + [ ! -f Makefile ] || $(MAKE) distclean dh_clean + rm -f debian/files* po/weex.pot install: build dh_testdir @@ -34,9 +31,8 @@ dh_clean -k dh_installdirs - # Add here commands to install the package into debian/tmp. - $(MAKE) install prefix=`pwd`/debian/tmp/usr - + # Add here commands to install the package into debian/weex. + $(MAKE) install prefix=`pwd`/debian/weex/usr # Build architecture-independent files here. binary-indep: build install @@ -49,6 +45,7 @@ dh_testroot # dh_installdebconf dh_installdocs + mv debian/weex/usr/share/doc/weex/ChangeLog.ja debian/weex/usr/share/doc/weex/changelog.ja # dh_installexamples # dh_installmenu # dh_installemacsen @@ -58,7 +55,7 @@ # dh_installmanpages # dh_installinfo # dh_undocumented - dh_installchangelogs + dh_installchangelogs doc/ChangeLog dh_link dh_strip dh_compress --- weex-2.6.1.orig/debian/changelog +++ weex-2.6.1/debian/changelog @@ -1,3 +1,70 @@ +weex (2.6.1-8) unstable; urgency=low + + * Better handling of short writes. Closes: #429353 + * Write the cache after each FTP upload. Closes: #304042 + + -- Ludovic Drolez Sun, 22 May 2011 11:15:17 +0200 + +weex (2.6.1-7) unstable; urgency=low + + * converted this file to UTF8. Closes: #454023 + * fixed config.c to avoid a segfault during parsing. Closes: #376988, #334926 + * changed the upstream URL. Closes: #304034 + * updated de.po. Closes: #313841 + + -- Ludovic Drolez Tue, 4 Dec 2007 18:23:10 +0100 + +weex (2.6.1-6sarge1) stable-security; urgency=high + + * Non-maintainer upload by the Security Team + * Applied patch by Ulf Härnhammar to fix format string vulnerability + [src/log.c, CAN-2005-3117] + + -- Martin Schulze Mon, 3 Oct 2005 19:46:05 +0200 + +weex (2.6.1-6) unstable; urgency=low + + * bugfix : FTBFS on amd64. Closes: Bug#253539 + + -- Ludovic Drolez Thu, 10 Jun 2004 23:14:04 +0200 + +weex (2.6.1-4woody1) stable; urgency=medium + + * Repackaged weex 2.6.1-5 for inclusion in Woody to fix the core dump bug. + Closes: Bug#150185 + + -- Ludovic Drolez Tue, 16 Jul 2002 22:54:52 +0200 + +weex (2.6.1-5) unstable; urgency=medium + + * Really fixed the mkstemp patch which could make weex core dump. + Closes: Bug#144577. + + -- Ludovic Drolez Fri, 26 Apr 2002 20:05:36 +0200 + +weex (2.6.1-4) unstable; urgency=medium + + * Fixed the mkstemp patch which could make weex core dump. + * Fixed the description. closes: Bug#143194 + + -- Ludovic Drolez Thu, 18 Apr 2002 00:00:14 +0200 + +weex (2.6.1-3) unstable; urgency=medium + + * Added Gerhard Tonn's patch to fix va_list compile problem on s390. + Also sent this patch to upstream. closes: Bug#142997 + + -- Ludovic Drolez Mon, 15 Apr 2002 22:54:59 +0200 + +weex (2.6.1-2) unstable; urgency=low + + * Applied the following patches from the author's web site: + fix_lack_includes, fix_refering_wrong_memory, fix_segv, mkstemp, + proxyauth, renameok. + * Initial upload. Closes Bug#141751 + + -- Ludovic Drolez Mon, 8 Apr 2002 10:56:23 +0200 + weex (2.6.1-1) unstable; urgency=low * New version. --- weex-2.6.1.orig/debian/compat +++ weex-2.6.1/debian/compat @@ -0,0 +1 @@ +5 --- weex-2.6.1.orig/debian/copyright +++ weex-2.6.1/debian/copyright @@ -1,9 +1,9 @@ This package was debianized by Yuuki NINOMIYA on Tue, 13 Jun 2000 20:56:56 +0900. -It was downloaded from http://www.enjoy.ne.jp/~gm/program/weex/ +It can be downloaded from http://weex.sourceforge.net/ -Upstream Author(s): Yuuki NINOMIYA +Upstream Author: Yuuki NINOMIYA Copyright (C) 1999-2000 Yuuki NINOMIYA @@ -11,3 +11,6 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'.