Changeset 8ac1bcd
- Timestamp:
- 10/24/18 18:30:50 (7 years ago)
- Branches:
- master, perl-5.22
- Children:
- 6856db8
- Parents:
- 8b3c2d2
- Location:
- npl/syn3/webint
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
npl/syn3/webint/src/backup/syn3backup.php
r8b3c2d2 r8ac1bcd 41 41 function TestSmb($new_smbserver,$new_smbshare,$new_smbdomain,$new_smbuser,$new_smbpasswd) 42 42 { 43 $ret=Cmd( "smbclient - c 'put /etc/HOSTNAME syn3test.txt ; rm syn3test.txt' -U '$new_smbuser' -W '$new_smbdomain' '//$new_smbserver/$new_smbshare' '$new_smbpasswd'", '', $out, $err );43 $ret=Cmd( "smbclient -s /dev/null -c 'put /etc/HOSTNAME syn3test.txt ; rm syn3test.txt' -U '$new_smbuser' -W '$new_smbdomain' '//$new_smbserver/$new_smbshare' '$new_smbpasswd'", '', $out, $err ); 44 44 45 45 if ($ret!=0 || $out) -
npl/syn3/webint/src/fetchmail/editaccount.php
r8b3c2d2 r8ac1bcd 1 <? 1 <? 2 2 3 3 $LEVEL=10; … … 9 9 Title(_EditAccount($_REQUEST[name])); 10 10 11 Tip(_TipEditAcount()); 11 Tip(_TipEditAcount()); 12 12 13 13 //load current values … … 76 76 77 77 <? FormStart($TITLE);?> 78 78 79 79 <table> 80 80 <tr> … … 89 89 <td><?=_MailProtocol();?> 90 90 <td><?Select("new_proto",array("pop3"=>"POP3","imap"=>"IMAP"),$errors);?> 91 <? InputCheckBox("new_ssl");?> SSL 91 92 </tr> 92 93 <tr> … … 95 96 </tr> 96 97 </table> 97 98 98 99 <p> 99 100 <?InputCheckBox("new_keep");?> … … 104 105 105 106 <? 106 /* 107 /* 107 108 (C) 2004-2013 DatuX - info@datux.nl 108 109 … … 124 125 echo _UsedByMultipleUsers(); 125 126 echo "<p>"; 126 127 127 128 if ($new_multidrop=='on') 128 129 { … … 137 138 InputText("new_to",$errors); 138 139 } 139 ?> 140 ?> 140 141 141 142 <p> … … 146 147 147 148 <? 148 /* 149 /* 149 150 (C) 2004-2013 DatuX - info@datux.nl 150 151 … … 165 166 if ($test) 166 167 { 167 168 168 169 if ($test[ok]) 169 170 echo "<h2>"._MailBoxTestOK()."</h2>"; … … 176 177 177 178 <? Foot(); ?> 178 -
npl/syn3/webint/src/fetchmail/fm.php
r8b3c2d2 r8ac1bcd 1 1 <? 2 /* 2 /* 3 3 (C) 2004-2013 DatuX - info@datux.nl 4 4 … … 24 24 //returns configfile for accountname 25 25 function fm_ConfFile($account) 26 { 26 { 27 27 return (FM_CONFDIR."/$account"); 28 28 } … … 48 48 $ret[out]=$out; 49 49 $ret[err]=$err; 50 return ($ret); 50 return ($ret); 51 51 }*/ 52 52 … … 54 54 //the variables that are parsed and returned are defined in $vartypes. 55 55 //s=single value 56 //m=multiple values (stored in array) 56 //m=multiple values (stored in array) 57 57 //k=keyword (value will be set to 1 if keyword is found) 58 58 function fm_Load($account) … … 65 65 "proto" =>'s', 66 66 "keep" =>'k', 67 "ssl" =>'k', 67 68 "aka" =>'m', 68 69 "smtpaddress"=>'s' … … 78 79 $varname=$matches[1]; 79 80 $value=$matches[2]; 80 81 //strip quotes 81 82 //strip quotes 82 83 $value=str_replace("'","",$value); 83 84 $type=$vartypes[$varname]; … … 93 94 $ret[$varname]='on'; 94 95 break; 95 } 96 } 96 97 } 97 98 return ($ret); … … 102 103 $state=fm_GetState($account); 103 104 if ($state[pid]) 104 { 105 { 105 106 posix_kill($state[pid],9); 106 107 sleep(5); … … 124 125 $raw[]="server '$config[server]'"; 125 126 $raw[]="timeout 30"; 126 foreach ($config[aka] as $value) 127 foreach ($config[aka] as $value) 127 128 { 128 129 if ($value) … … 135 136 if ($config[keep]=='on') 136 137 $raw[]="keep"; 138 if ($config[ssl]=='on') 139 $raw[]="ssl"; 137 140 //$raw[]="bsmtp -"; 138 141 $raw[]="smtpaddress '$config[smtpaddress]'"; … … 145 148 function fm_TestConfig($config) 146 149 { 147 $raw=fm_ConfigToRaw($config); 150 $raw=fm_ConfigToRaw($config); 148 151 149 152 $tmp="/tmp/fetchmailtest"; … … 156 159 $ret[out]=$out; 157 160 $ret[err]=$err; 158 return ($ret); 161 return ($ret); 159 162 } 160 163 … … 167 170 $filename=fm_ConfFile($account); 168 171 169 $raw=fm_ConfigToRaw($config); 172 $raw=fm_ConfigToRaw($config); 170 173 171 174 FileWrite($filename,$raw); … … 192 195 193 196 //returns: 194 //[ok]=1 197 //[ok]=1 195 198 //[msg] message 196 199 //[time] timestamp … … 201 204 if ( 202 205 is_file($conffile.".out") && 203 is_file($conffile.".err") && 206 is_file($conffile.".err") && 204 207 is_file($conffile.".code")) 205 208 { 206 209 207 210 $code=FileReadRaw($conffile.".code"); 208 211 $ret[ok]=(($code==1)||($code==0)); … … 212 215 $msg=FileRead($conffile.".err"); 213 216 $ret[msg]=implode("<br>",$msg); 214 217 215 218 $stat=stat($conffile.".out"); 216 219 $ret['time']=$stat[mtime]; 217 220 } 218 221 219 222 //is running? 220 223 $pid=file_get_contents("/tmp/fetchmail.pid"); … … 226 229 $ret['pid']=$pid; 227 230 } 228 229 return ($ret); 230 } 231 232 233 234 231 232 return ($ret); 233 } -
npl/syn3/webint/src/sessionlock.php
r8b3c2d2 r8ac1bcd 1 1 <? 2 /* 2 /* 3 3 (C) 2004-2013 DatuX - info@datux.nl 4 4 … … 24 24 global $lock_fh; 25 25 global $lock_filename; 26 26 27 27 flock($lock_fh, LOCK_UN); 28 fclose($lock_fh); 29 28 fclose($lock_fh); 29 30 30 //kill any remaining sub processes that still have our file open 31 ` fuser -9 -k $lock_filename`;31 `/usr/bin/fuser -9 -k $lock_filename`; 32 32 33 33 unlink($lock_filename); 34 34 } 35 35 36 36 //in commandline mode we just use plain session starting... 37 37 if (!$_SERVER[argv]) … … 46 46 $session_id=session_id(); 47 47 } 48 48 49 49 //determine lockfile for this session 50 50 //preg replace is for security!! 51 51 $lock_filename="/tmp/lock.".preg_replace("/^[a-f0-9]/","",$session_id); 52 52 53 53 54 54 if ($_GET[lock_abort]) 55 { 55 { 56 56 //kill processes that holds the lock 57 ` fuser -9 -k $lock_filename`;57 `/usr/bin/fuser -9 -k $lock_filename`; 58 58 Redirect(preg_replace("/lock_abort=1/","",$URI)); 59 59 } 60 60 61 61 //see if this session can be locked 62 62 $lock_fh = fopen($lock_filename, "w"); … … 83 83 else 84 84 $abortURI="$URI?lock_abort=1"; 85 85 86 86 LinkButton(_AbortLockingProcess(),$abortURI); 87 87 echo "</tr>"; … … 94 94 Redirect($URI); 95 95 exit; 96 } 97 96 } 97 98 98 register_shutdown_function ("removelock"); 99 99 … … 112 112 } 113 113 } 114 114 115 115 session_start(); 116 116 ?> -
npl/syn3/webint/webint.build
r8b3c2d2 r8ac1bcd 1 656 71 6568 -
npl/syn3/webint/webint.md5
r8b3c2d2 r8ac1bcd 119 119 44e1f535bed6e7f16e41d96abeba5f56 ./src/backup/startrestorefiles.php 120 120 678555e8cf13f518a7377cd39824a64d ./src/backup/startrestore.php 121 f5f46a2712175be9659b2d227a6654f5./src/backup/syn3backup.php121 4ea6c1dfdd44a54c1454ec95b15f90f0 ./src/backup/syn3backup.php 122 122 06540e48b49b2b69168ccda00e865e50 ./src/backup/wizardchoose.php 123 123 818978bae75fd32160fbceb342002f2e ./src/backup/wizardman.php … … 198 198 3fb8ed50605a860855713f5836010ab4 ./src/examplemodule/wizardman.php 199 199 0ae0ac074ec96d4184545b12ee335ae1 ./src/favicon.ico 200 686325f0e39ea2b16992cca2c7805706./src/fetchmail/editaccount.php200 c1bb8926d59dfd15a54f5595f04fb723 ./src/fetchmail/editaccount.php 201 201 31fa0cae2724ac5f4b4e0cbb1201dc52 ./src/fetchmail/fetchmail.sh 202 fef605062944dc1cad3f4bd87d015979./src/fetchmail/fm.php202 ab8fc96fe04ad052ddd1e18c822779ec ./src/fetchmail/fm.php 203 203 ba743fea268407f080bca4e306748493 ./src/fetchmail/lang_deD.php 204 204 5f73887c0948c07cc2c612407926dac4 ./src/fetchmail/lang_de.php … … 1000 1000 840b923c6832539ffa374ab1b5bfd04c ./src/services/svcman.php 1001 1001 3fb6f3f7eea029703cb956069bf7ee2b ./src/services/svc.php 1002 cc7c71e5ca6a42047cd1a006437de0f4./src/sessionlock.php1002 963a714155112f9d49a6715cd7c39e73 ./src/sessionlock.php 1003 1003 27e9f8953c42935fd49355d38ff01215 ./src/settings/lang_deD.php 1004 1004 1667ffca522a9b7710d9c0abd8bc6f95 ./src/settings/lang_de.php … … 1160 1160 3d8b121024940b3004ca67bacb88b74e ./updatelang.sh 1161 1161 e15c0d77cf349ff3f2c55bf1b48ea567 ./upload.sh 1162 42fbe1c601c88923318f610cb2319f58./webint.pkg1162 f01bce7a60941ecf82a53039a6c807d5 ./webint.pkg 1163 1163 05d46c478b4e8c14eafeb686a5b8c064 ./webint.SlackBuild 1164 3db1ee2be91a49d10c7479486b5fb458./webint.SlackBuild.log.gz1164 d552136d85965a50bcf591ebdfa035a7 ./webint.SlackBuild.log.gz 1165 1165 693ffd7c59a1fe2b34276bec14f3ebfb ./zones.conf
Note: See TracChangeset
for help on using the changeset viewer.