Commit graph

23 commits

Author SHA1 Message Date
Paul Donald
d46da53bcd luci-lilb-nixio: Code quality fixes
future variants could use en/decodeURIComponent

ordering is important when handling "&"

Signed-off-by: Paul Donald <newtwen@gmail.com>
2024-01-31 02:55:05 +01:00
Xiang W
c2f679962d
luci-lib-nixio: Fix add_luci_conffiles adding duplicate files (#6568)
* luci-lib-nixio: Fix add_luci_conffiles adding duplicate files

add_luci_conffiles does not check whether the file already exists
when adding the file, which may result in redundant backups in the
sysupgrade backup.

Signed-off-by: Xiang W <wxjstz@126.com>
2023-12-04 21:48:19 +01:00
Eneas U de Queiroz
88b9088514
luci-lib-nixio: always build without TLS support
The build system fails to set up the chosen TLS provider and always
builds the package without TLS.

While this could be easily fixed, the package would fail to build with
axTLS and cyaSSL without further intervention.

The version of axTLS included with the source is outdated, as is the API
used with cyaSSL, now wolfSSL.

OpenSSL support could be enabled, but the TLS code limits connections to
TLS 1.0, deprecated by RFC 8996: "TLS 1.0 MUST NOT be used".

Remove the provider configuration from build options, and always build
the library without TLS.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-08-10 16:52:35 -03:00
Paul Spooren
c4a4e43e2e treewide: replace which with command -v
Fix shellcheck SC2230
> which is non-standard. Use builtin 'command -v' instead.

Once applied to everything concerning OpenWrt we can disable the busybox
feature `which` and save 3.8kB.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-20 15:54:54 -10:00
Rosen Penev
6555d3f587
move nixio__bin2hex to header and make static
This fixes compilation under GCC10.

There's no reason for this to be in a C file anyway.

Also fixed a -Wmissing-prototypes warning with nixio__addr_prefix.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-21 19:58:53 -07:00
Manuel BACHMANN
6c0b8a40f7 luci-lib-nixio: allow building with Lua5.2/LuaJIT
Lua 5.1 defines a "luaL_Reg" alias for deprecated
"luaL_reg", but Lua >= 5.2 and LuaJIT do not.
Replace by "luaL_Reg", and define a "luaL_reg"
alias in case we build with old Lua 5.0.

Signed-off-by: Manuel BACHMANN <tarnyko@tarnyko.net>
2020-02-24 11:04:54 +01:00
Balázs Úr
39196b0de9 luci-app-fwknopd: fix typos
Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
2019-12-20 23:12:48 +01:00
Jo-Philipp Wich
16f23de977 luci-lib-nixio: fix compilation
Fixes: #2921
Fixes: f3f42ff09 ("address: Replace ualarm with setitimer")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26 15:11:17 +02:00
Rosen Penev
f3f42ff099
address: Replace ualarm with setitimer
ualarm has been deprecated and may not be available in the libc.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-07-19 16:47:38 -07:00
yangfl
401382a459 treewide: Fix typos in comments
Signed-off-by: David Yang <mmyangfl@gmail.com>
2018-10-10 15:00:07 +08:00
Sophana KOK
f405d23990 restored nixio tls providers
Signed-off-by: Sophana KOK <ml-github@worldspot.net>
2018-09-27 21:12:40 +02:00
Jo-Philipp Wich
190b32452a luci-lib-nixio: fix spelling mistakes in documentation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-12 16:02:27 +01:00
Hannu Nyman
878a64f538 typo: fileystem --> filesystem
fix typo:
sed -i "s/fileystem/filesystem/"

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-12-28 14:15:16 +02:00
Quirin Hofstaetter
3b5a99340b luci-lib-nixio: add license tag
Signed-off-by: Quirin Hofstaetter <qh@dev.tdt.de>
2017-06-13 13:40:15 +02:00
Thorsten M
528f7ab512 changed stat to lstat in nixio_lstat function
Signed-off-by: Thorsten M. <thoto@devtal.de>
2016-09-16 11:06:12 +02:00
Daniel Dickinson
b130ca554f lib-nixio / luci-base: Fix for reading csrf token prevents file upload
The call to http.formvalue in order to read the csrf token causes
_parse_input to be triggered *before* controllers and cbi maps have
been built.  This results in the failure of file uploads because
the file handler is not yet in place when _parse_input gets called,
and it is in _parse_input that POST data is parsed (including files).

To fix this we add the ability to write file fields to temporary
files (using mkstemp and unlink in nixio.file) and use this to
store file data until the filehandler is registered, with a
fallback to reading the file data into memory.

Once the filehandler callback gets registered we iterate
though all previously parsed (saved) files and copy the
data to the file handler, and then close the temporary
file (which finally removes because we unlinked after
creating the file, but didn't close the file so unlink
was deferred).

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
2015-12-15 13:12:29 -05:00
Jo-Philipp Wich
376f038726 luci-lib-nixio: pass exact sockaddr length to getnameinfo()
Musl libc requires the length parameter of getnameinfo() to be exactly
`sizeof(struct sockaddr_in)` or `sizeof(struct sockaddr_in6)`, depending on
the passed sockaddr family.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-07-30 22:38:36 +02:00
Jo-Philipp Wich
fb69e15e8d luci-lib-nixio: move CHANGELOG and README into nixio namespace
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-28 22:29:45 +01:00
Jo-Philipp Wich
8cf1b1374d luci-lib-nixio: always assume Linux target (#307)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-22 15:01:50 +01:00
Jo-Philipp Wich
41d2b33087 Update my email addresses in the license headers
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-16 23:49:44 +01:00
Jo-Philipp Wich
575e1093ab luci-lib-nixio: drop "bit" compatibility class
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-15 16:05:31 +01:00
Jo-Philipp Wich
4cb3aed0ca Remove obsolete .mk files
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-08 16:49:42 +01:00
Jo-Philipp Wich
1bb4822dca Rework LuCI build system
* Rename subdirectories to their repective OpenWrt package names
 * Make each LuCI module its own standalone package
 * Deploy a shared luci.mk which is used by each module Makefile

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-08 16:26:20 +01:00