„Pack/INFO“ ändern #28

Open
geimist wants to merge 47 commits from DSM7_dev into master
134 changed files with 511 additions and 195 deletions

View file

@ -1,6 +0,0 @@
text = synOTR
description = synOTR
icon_16 = images/synOTR_16.png
icon_32 = images/synOTR_32.png
type = embedded
path = /webman/3rdparty/synOTR/index.cgi

2
Build/bin/synOTR-cli Normal file
View file

@ -0,0 +1,2 @@
#!/bin/sh
/var/packages/synOTR/scripts/start-stop-status "$@"

View file

@ -1,19 +0,0 @@
{
".url": {
"SYNO.SDS.synOTR.Application": {
"type": "legacy",
"allUsers": false,
"allowMultiInstance": false,
"grantPrivilege": "all",
"advanceGrantPrivilege" : true,
"configablePrivilege" : true,
"title": "synOTR",
"desc": "",
"icon": "images/synOTR_{0}.png",
"appWindow": "SYNO.SDS.synOTR.Application",
"texts": "texts",
"width": 960,
"url": "/webman/3rdparty/synOTR/index.cgi"
}
}
}

View file

@ -1,58 +0,0 @@
<?PHP
//***********************************************************************//
// check_appprivilege.inc.php //
// Description: Script to query the active user permission for the //
// called application. //
// This will allow control of the permissions for //
// 3rdparty apps via Control Panel - Permissions //
// Now with query from SynoToken (DSM 4.x and onward) //
// Author: QTip from the german Synology support forum //
// Copyright: 2014-2016 by QTip //
// License: GNU GPLv3 (see LICENSE) //
// Thanks to MrSandman (German Synology support forum) for the nudge in //
// the right direction //
// ------------------------------------------------------------------- //
// Version: 0.31 - 18/09/2016 //
//***********************************************************************//
function check_privilege($appname) {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
$clientIP = $_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif (isset($_SERVER['HTTP_X_REAL_IP'])){
$clientIP = $_SERVER['HTTP_X_REAL_IP'];
} else {
$clientIP = $_SERVER['REMOTE_ADDR'];
}
putenv('HTTP_COOKIE='.$_SERVER['HTTP_COOKIE']);
putenv('REMOTE_ADDR='.$clientIP);
$login = shell_exec("/usr/syno/synoman/webman/login.cgi");
preg_match('/\"SynoToken\"\s*?:\s*?\"(.*)\"/',$login,$synotoken);
$synotoken = trim($synotoken[1]);
// backup the current state of QUERY_STRING
$tmpenv = getenv('QUERY_STRING');
putenv('QUERY_STRING=SynoToken='.$synotoken);
$synouser = shell_exec("/usr/syno/synoman/webman/modules/authenticate.cgi");
if ($synouser == '') return array('','',0);
// get dsm build
$dsmbuild = shell_exec("/bin/get_key_value /etc.defaults/VERSION buildnumber");
if ($dsmbuild >= 7307) {
$raw_data = shell_exec("/usr/syno/bin/synowebapi --exec api=SYNO.Core.Desktop.Initdata method=get version=1 runner=".$synouser);
$initdata = json_decode(trim($raw_data),true);
$appprivilege = (array_key_exists($appname, $initdata['data']['AppPrivilege']) && $initdata['data']['AppPrivilege'][$appname]) ? 1 : 0;
$is_admin = (array_key_exists('is_admin', $initdata['data']['Session']) && $initdata['data']['Session']['is_admin'] == 1) ? 1 : 0;
} else {
$raw_data = shell_exec("/usr/syno/synoman/webman/initdata.cgi");
$raw_data = substr($raw_data,strpos($raw_data,"{")-1);
$initdata = json_decode(trim($raw_data),true);
$appprivilege = (array_key_exists($appname, $initdata['AppPrivilege']) && $initdata['AppPrivilege'][$appname]) ? 1 : 0;
$is_admin = (array_key_exists('is_admin', $initdata['Session']) && $initdata['Session']['is_admin'] == 1) ? 1 : 0;
}
// print $synotoken." - ".$synouser." - ".$is_admin;
// if application not found or user not admin, return empty string
// restore the old state of QUERY_STRING
putenv('QUERY_STRING='.$tmpenv);
if (!$appprivilege && !$is_admin) return array('','',0);
return array($synotoken,$synouser,$is_admin);
}
?>

View file

@ -1,11 +0,0 @@
<?php require('includes/check_privilege.inc.php'); list($synotoken,
$synouser, $is_admin) =
check_privilege('SYNO.SDS.synOTR.Application'); if ($synouser == '')
{
echo "0";
}
else
{
echo "token: $synotoken user: $synouser admin: $is_admin";
}
?>

Binary file not shown.

View file

@ -0,0 +1,4 @@
#!/bin/bash
LIBDIR="/usr/syno/synoman/webman/3rdparty/synOTR/app/libARMv7l"
export LD_LIBRARY_PATH="$LIBDIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
$LIBDIR/otrpidecoder "$@"

Binary file not shown.

View file

@ -0,0 +1 @@
libcurl.so.4

View file

@ -0,0 +1 @@
libcurl.so.4.4.0

Binary file not shown.

View file

@ -0,0 +1 @@
libidn2.so.0.1.4

Binary file not shown.

View file

@ -0,0 +1 @@
libpsl.so.5.1.1

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
libssl.so.1.0.2

Binary file not shown.

View file

@ -0,0 +1 @@
libunistring.so.0.1.2

Binary file not shown.

Binary file not shown.

Binary file not shown.

20
Build/ui/config Normal file
View file

@ -0,0 +1,20 @@
{
".url": {
"SYNO.SDS.ThirdParty.App.synOTR": {
"type": "legacy",
"title": "synOTR",
"desc": "synOTR",
"allUsers": false,
"allowMultiInstance": false,
"grantPrivilege": "all",
"advanceGrantPrivilege": true,
"configablePrivilege": true,
"icon": "images/synOTR_{0}.png",
"appWindow": "SYNO.SDS.ThirdParty.App.synOTR",
"texts": "texts",
"width": 992,
"height": 560,
"url": "/webman/3rdparty/synOTR/index.cgi"
}
}
}

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View file

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 7 KiB

View file

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 857 B

View file

Before

Width:  |  Height:  |  Size: 855 B

After

Width:  |  Height:  |  Size: 855 B

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 676 B

View file

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 591 B

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View file

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B

View file

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

View file

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View file

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Some files were not shown because too many files have changed in this diff Show more