Bug#941277: dispatch function missing in header file generated for RPC service

2019-09-28 Thread Simon Richter
Hi,

On 27.09.19 22:30, Florian Weimer wrote:

> Ugh, can you describe exactly what is missing?  Then I can file it
> here (or just submit a patch):

If you compile a service description for the server side, e.g.

rpcgen -m /usr/include/rpcsvc/mount.x

you get the dispatch function that takes an incoming request and calls
the appropriate server function. For single-service programs, you would
normally generate the main function as well, using

rpcgen -s tcp /usr/include/rpcsvc/mount.x

This way, the dispatch function is adequately registered. If you need to
provide your own main function (i.e. the RPC service is part of a larger
program), you need to call svc_register yourself, so you need a
declaration of this function, for the mount service that would be

void mountprog_1(struct svc_req *rqstp, register SVCXPRT *transp);

That function is absent from the header generated using

rpcgen -h /usr/include/rpcsvc/mount.x

If you generate dispatch tables using -T, the table is declared in the
header, so I'd also expect the dispatch function to be declared.

   Simon



signature.asc
Description: OpenPGP digital signature


Bug#941277: dispatch function missing in header file generated for RPC service

2019-09-27 Thread Florian Weimer
* Simon Richter:

> while implementing an RPC service (in 2019, no less!) I found out that the
> dispatch function generated by rpcgen is not listed in the generated header
> file, so if the service is generated without a main function or inetd
> interface, the code using it needs to create its own declaration.
>
> The signature is easy to guess, but nonetheless I think it should be
> provided by the header.

Ugh, can you describe exactly what is missing?  Then I can file it
here (or just submit a patch):

  

Thanks.

(I'm not sure if we are going to patch glibc's rpcgen for this; nobody
is supposed to use it these days.)



Bug#941277: dispatch function missing in header file generated for RPC service

2019-09-27 Thread Simon Richter
Package: libc-dev-bin
Version: 2.28-10
Severity: minor
Tags: upstream

Hi,

while implementing an RPC service (in 2019, no less!) I found out that the
dispatch function generated by rpcgen is not listed in the generated header
file, so if the service is generated without a main function or inetd
interface, the code using it needs to create its own declaration.

The signature is easy to guess, but nonetheless I think it should be
provided by the header.

   Simon

-- System Information:
Debian Release: 10.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-6-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libc-dev-bin depends on:
ii  libc6  2.28-10

Versions of packages libc-dev-bin recommends:
ii  manpages  4.16-2
ii  manpages-dev  4.16-2

libc-dev-bin suggests no packages.

-- no debconf information