Skip to content

ubus_rpc_session is not ignored when checking policy #335

@wryun

Description

@wryun

If you develop a ucode rpcd plugin, when you specify the possible args (i.e. the policy) you can leave out ubus_rpc_session due to:

https://github.com/openwrt/rpcd/blob/d4fa147470aab6aee4b23ef6327201c6be069ab1/ucode.c#L309

However, if you create a daemon and use ubus.publish, there is no equivalent code in lib/ubus.c, so you have to specify that it allows ubus_rpc_session manually if you want it to be called via uhttpd.

It would be good if the handling between these two were consistent. We ran across this when converting code from a plugin to a daemon, and the new 'works in backend, but frontend gives INVALID_ARGUMENT' behaviour was confusing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions