Commit graph

6 commits

Author SHA1 Message Date
Daniel Golle
cfe1e75c91 sys: packagelist: allow listing all packages
Introduce optional boolean attribute 'all' to allow listing all
installed packages instead of only the user-selected ones.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-12-06 18:44:23 +01:00
Roman Yeryomin
74a784f037 sys: fix passwd path
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2017-11-28 18:17:02 +01:00
Daniel Golle
a0231be8fb sys: fix memory leak in packagelist
Fixes commit 4e483312b0.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-11-12 23:25:59 +01:00
Daniel Golle
4e483312b0 sys: add packagelist method
Add method to list installed software packages directly from
/usr/lib/opkg/status (ie. no need to have opkg installed).

ubus call rpc-sys packagelist

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-11-12 20:32:35 +01:00
Florian Fainelli
26c98ec94d sys: Check return values of chdir and write
Fixes the following warnings:

rpcd/sys.c: In function 'rpc_cgi_password_set':
rpcd/sys.c:116:8: error: ignoring return value of 'chdir', declared with attribute warn_unused_result [-Werror=unused-result]
   chdir("/");
        ^
rpcd/sys.c:125:8: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
   write(fds[1], blobmsg_data(tb[RPC_P_PASSWORD]),
        ^
rpcd/sys.c:127:8: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
   write(fds[1], "\n", 1);
        ^
rpcd/sys.c:131:8: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
   write(fds[1], blobmsg_data(tb[RPC_P_PASSWORD]),
        ^
rpcd/sys.c:133:8: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
   write(fds[1], "\n", 1);
        ^
cc1: all warnings being treated as errors

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2016-12-11 09:15:27 +01:00
John Crispin
032346f479 add a system object that allows us to set passwords and trigger sysupgrade
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-08-25 23:56:32 +02:00