Skip to content

ubus_rpc_session is not ignored when checking policy #335

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions