Debian Bug report logs - #628099
xdr(3): description of XDR codec API in some cases is incomplete

version graph

Package: manpages-dev; Maintainer for manpages-dev is Dr. Tobias Quathamer <toddy@debian.org>; Source for manpages-dev is src:manpages (PTS, buildd, popcon).

Reported by: Taisuke Yamada <tai@rakugaki.org>

Date: Fri, 27 May 2011 08:33:02 UTC

Severity: important

Tags: fixed-upstream, patch, upstream

Found in version manpages/3.27-1

Fixed in version manpages/4.04-0.1

Done: toddy@debian.org (Dr. Tobias Quathamer)

Bug is archived. No further changes may be made.

Forwarded to http://permalink.gmane.org/gmane.linux.man/8344

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#628099; Package manpages-dev. (Fri, 27 May 2011 08:33:06 GMT) (full text, mbox, link).


Acknowledgement sent to Taisuke Yamada <tai@rakugaki.org>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>. (Fri, 27 May 2011 08:33:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Taisuke Yamada <tai@rakugaki.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: manpages-dev: Missing description in xdr(3) fails XDR codec API in some cases
Date: Fri, 27 May 2011 17:23:10 +0900
Package: manpages-dev
Version: 3.27-1
Severity: important
Tags: patch

XDR (eXternal Data Representation) is a codec format
well known for its use by Sun/ONC-RPC (see rpcgen(1)).

XDR API (xdr_*) which is described in this manpage
can be used for generic data encoding/decoding purpose
without using RPC. In that case, s/he needs to call
either of

- xdr_create(3)
- xdrstdio_create(3)
- xdrrec_create(3)

to instantiate XDR* stream required by the API.

However, xdrrec_create(3) manpage lacks information to
make it work. When reading from xdrrec_create(3)-ed
XDR* stream, xdrrec_skiprecord(3) API must be called
first to find record boundary:

  // example of correct API call sequence
  xdrrec_create(&xdrs, 0, 0, handle, myread, NULL);
  xdrs.x_op = XDR_DECODE;
  xdrrec_skiprecord(&xdrs);

However, this is not documented. It only warns as follows:

  Warning: this XDR stream implements an intermediate record
  stream. Therefore there are additional bytes in the stream
  to provide record boundary information.

This is too vague, and should be fixed.

Also due to this "record boundary", it is not possible to
read xdrstdio_create(3)-ed XDR* stream with xdrrec_* API
and vise versa.

I will post a diff in next email.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-openvz-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=ja_JP.UTF-8 (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash

Versions of packages manpages-dev depends on:
ii  manpages                      3.25-1     Manual pages about using a GNU/Lin

manpages-dev recommends no packages.

Versions of packages manpages-dev suggests:
ii  man-db [man-browser]          2.5.6-5    on-line manual pager

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#628099; Package manpages-dev. (Fri, 27 May 2011 08:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Taisuke Yamada <tai@rakugaki.org>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. (Fri, 27 May 2011 08:39:03 GMT) (full text, mbox, link).


Message #10 received at 628099@bugs.debian.org (full text, mbox, reply):

From: Taisuke Yamada <tai@rakugaki.org>
To: 628099@bugs.debian.org
Subject: Re: Bug#628099: Acknowledgement (manpages-dev: Missing description in xdr(3) fails XDR codec API in some cases)
Date: Fri, 27 May 2011 17:35:17 +0900
[Message part 1 (text/plain, inline)]
Here's the patch.
[0001-Clarified-incompatibility-and-correct-usage-of-XDR-A.patch (text/x-patch, attachment)]

Added tag(s) upstream. Request was from Simon Paillard <spaillard@debian.org> to control@bugs.debian.org. (Mon, 11 Feb 2013 20:48:03 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#628099; Package manpages-dev. (Tue, 24 Feb 2015 18:30:09 GMT) (full text, mbox, link).


Acknowledgement sent to Stéphane Aulery <saulery@free.fr>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. (Tue, 24 Feb 2015 18:30:09 GMT) (full text, mbox, link).


Message #17 received at 628099@bugs.debian.org (full text, mbox, reply):

From: Stéphane Aulery <saulery@free.fr>
To: 628099@bugs.debian.org
Subject: [saulery@free.fr: [patch] Clarified incompatibility and correct usage of XDR API]
Date: Tue, 24 Feb 2015 19:21:06 +0100
[Message part 1 (text/plain, inline)]
-- 
Stéphane Aulery
[Message part 2 (message/rfc822, inline)]
From: saulery@free.fr
To: mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org, Stéphane Aulery <saulery@free.fr>
Subject: [patch] Clarified incompatibility and correct usage of XDR API
Date: Tue, 24 Feb 2015 19:20:07 +0100
From: Stéphane Aulery <saulery@free.fr>

Debian Bug #628099
Report and patch of Taisuke Yamada <tai@rakugaki.org>

Signed-off-by: Stéphane Aulery <saulery@free.fr>
---
 man3/xdr.3 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/man3/xdr.3 b/man3/xdr.3
index 8f931db..f4bb3e9 100644
--- a/man3/xdr.3
+++ b/man3/xdr.3
@@ -291,9 +291,11 @@ Note: the XDR stream's
 .I op
 field must be set by the caller.
 .IP
-Warning: this XDR stream implements an intermediate record stream.
-Therefore there are additional bytes in the stream
-to provide record boundary information.
+Warning: To read from XDR stream created by this API, you'll need to
+call xdrrec_skiprecord(3) first before calling any other XDR APIs.
+This is because this inserts additional bytes in the stream to provide
+record boundary information. Also, XDR streams created with different
+xdr*_create APIs are not compatible for the same reason.
 .LP
 .nf
 .BI "bool_t xdrrec_endofrecord(XDR *" xdrs ", int " sendnow );
-- 
2.1.4


Set Bug forwarded-to-address to 'http://permalink.gmane.org/gmane.linux.man/8344'. Request was from Stéphane Aulery <saulery@free.fr> to control@bugs.debian.org. (Tue, 24 Feb 2015 18:45:05 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#628099; Package manpages-dev. (Mon, 02 Mar 2015 21:12:05 GMT) (full text, mbox, link).


Acknowledgement sent to 20150224182106.GA14880@free.fr:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. (Mon, 02 Mar 2015 21:12:05 GMT) (full text, mbox, link).


Message #24 received at 628099@bugs.debian.org (full text, mbox, reply):

From: Stéphane Aulery <saulery@free.fr>
To: control@bugs.debian.org
Cc: linux-man@vger.kernel.org, 628099@bugs.debian.org
Subject: [fixed-upstream] manpages-dev: Missing description in xdr(3) fails XDR codec API in some cases
Date: Mon, 2 Mar 2015 22:02:48 +0100
tags 628099 + fixed-upstream
stop

----------------------------------------------------------------------

See commits:

[1] 2015-03-02 16:22:26 (GMT) 2915b726167ea9bee8cfe08be0861220d642bba6
[2] 2015-03-02 16:22:26 (GMT) 0e6be1168c15bee37aeae6239a78f5babf1886e3

[1] https://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/man3/xdr.3?id=2915b726167ea9bee8cfe08be0861220d642bba6
[2] https://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/man3/xdr.3?id=0e6be1168c15bee37aeae6239a78f5babf1886e3

Must be in next release of man-pages (3.82).

-- 
Stéphane Aulery



Added tag(s) fixed-upstream. Request was from Stéphane Aulery <saulery@free.fr> to control@bugs.debian.org. (Mon, 02 Mar 2015 21:12:08 GMT) (full text, mbox, link).


Changed Bug title to 'xdr(3): description of XDR codec API in some cases is incomplete' from 'manpages-dev: Missing description in xdr(3) fails XDR codec API in some cases' Request was from Stéphane Aulery <saulery@free.fr> to control@bugs.debian.org. (Sun, 08 Mar 2015 19:45:28 GMT) (full text, mbox, link).


Added tag(s) pending. Request was from Simon Paillard <spaillard@debian.org> to control@bugs.debian.org. (Sat, 18 Apr 2015 13:09:05 GMT) (full text, mbox, link).


Reply sent to toddy@debian.org (Dr. Tobias Quathamer):
You have taken responsibility. (Tue, 05 Jan 2016 11:36:47 GMT) (full text, mbox, link).


Notification sent to Taisuke Yamada <tai@rakugaki.org>:
Bug acknowledged by developer. (Tue, 05 Jan 2016 11:36:47 GMT) (full text, mbox, link).


Message #35 received at 628099-close@bugs.debian.org (full text, mbox, reply):

From: toddy@debian.org (Dr. Tobias Quathamer)
To: 628099-close@bugs.debian.org
Subject: Bug#628099: fixed in manpages 4.04-0.1
Date: Tue, 05 Jan 2016 11:33:46 +0000
Source: manpages
Source-Version: 4.04-0.1

We believe that the bug you reported is fixed in the latest version of
manpages, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 628099@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dr. Tobias Quathamer <toddy@debian.org> (supplier of updated manpages package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 05 Jan 2016 12:13:34 +0100
Source: manpages
Binary: manpages manpages-dev
Architecture: source all
Version: 4.04-0.1
Distribution: unstable
Urgency: medium
Maintainer: Martin Schulze <joey@debian.org>
Changed-By: Dr. Tobias Quathamer <toddy@debian.org>
Description:
 manpages   - Manual pages about using a GNU/Linux system
 manpages-dev - Manual pages about using GNU/Linux for development
Closes: 270368 298259 344233 396633 472447 527136 562890 621057 628099 728213 765592 765596 773443 774022 774852 775328 785178
Changes:
 manpages (4.04-0.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Imported Upstream version 4.04 (Closes: #785178)
     . cerf*.3 manpages have been removed upstream. (Closes: #765592)
     . vfprintf.3: Add note about thread safeness of %m. (Closes: #621057)
     . console.4: Is now included in this package. (Closes: #774022)
     . tzfile.5: Remove double "SEE ALSO" section (Closes: #765596)
   * Make build reproducible, thanks to Jérémy Bobbio. (Closes: #774852)
   * Update d/inst with current list of sid manpages
 .
 manpages (3.82-1) UNRELEASED; urgency=medium
 .
   * Imported Upstream version 3.82
     . clock.3: CLOCKS_PER_SEC = 1000000 is required by XSI, not POSIX
       (Closes: #728213)
     . hosts.5: Mention 127.0.1.1 for FQDN and IPv6 examples (Closes: #562890)
     . host.conf.5: Rework discussion of nospoof, spoofalert, spoof and
       RESOLV_SPOOF_CHECK (Closes: #773443)
     . host.conf.5, hosts.5, resolv.conf.5: Cross references of these pages
       (Closes: #298259)
     . ipv6.7: SOL_IPV6 and other SOL_* options socket are not portable
       (Closes: #472447)
     . random.4: Since Linux 3.16, reads from /dev/urandom return at most 32 MB
       (Closes: #775328)
     . resolver.3: Document missing options used by _res structure indicate
       defaults (Closes: #527136)
     . resolver.3, host.conf.5: host.conf 'order' option deprecated, replaced by
       nsswitch.conf(5) (Closes: #270368, #396633, #344233)
     . xdr.3: Clarified incompatibility and correct usage of XDR API
       (Closes: #628099)
Checksums-Sha1:
 68264540122a6206fa8730c70ee9ec424aff64d9 1920 manpages_4.04-0.1.dsc
 a8fe81cbea71d1b0bdf9e6d185dd5826da575010 1426380 manpages_4.04.orig.tar.xz
 ef54da3dc86768dec5f7ae3e7fcb575cd67a1944 63476 manpages_4.04-0.1.debian.tar.xz
 5d75ba0380aa0cf63e6795ed8431da171a99bc70 2046652 manpages-dev_4.04-0.1_all.deb
 ccd8221920ff4c78183aa7e747d29ad5a15106f4 1112962 manpages_4.04-0.1_all.deb
Checksums-Sha256:
 417b2acfde7b58d862ee95c4374682656cb60124e5a4a52cfd7ae303064b8b38 1920 manpages_4.04-0.1.dsc
 8fe1950df65ccf2b43ed64c329ccce0eedb2f7b42af12beff03d3aa609ee1f6d 1426380 manpages_4.04.orig.tar.xz
 a6e7dfac0c25642656abc82f5926ee39335888e505a45af7db20d548dc1fff9d 63476 manpages_4.04-0.1.debian.tar.xz
 858f7bfb910586ccd6504a334380d82a8a84c716b1791c832d232d904693705d 2046652 manpages-dev_4.04-0.1_all.deb
 0fb7ea8046ca9053794e1952afc646bf0153ed1bb2045f39a0af801bddfa0cbd 1112962 manpages_4.04-0.1_all.deb
Files:
 c504caf30c469b3e85d2509bcdf28e71 1920 doc important manpages_4.04-0.1.dsc
 c20326ff9687f3ded1c24aa319a3880d 1426380 doc important manpages_4.04.orig.tar.xz
 7d53702ccb9b9362e978e268df47d703 63476 doc important manpages_4.04-0.1.debian.tar.xz
 4c975f74d8cfe3b945cc5f3469248e6a 2046652 doc optional manpages-dev_4.04-0.1_all.deb
 89d7d196aac1d2388ab5dd6c494a7011 1112962 doc important manpages_4.04-0.1_all.deb

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJWi6XWAAoJEBMC8fA26+sZ3msP/iixnTMbwEWIRLeRPHglGm4S
fTgg4srwXziKMrIjMv93eGtXBA0yhVKr6yQq7abpsWMr9NryENaWJdFGXKM+uq6k
jh90BC54wYcuy1UFTj1LhkQq0D5GUC6t0ucz3W3KPv71JGnype5DImQ+swOmvdDn
LqeUQeXjlIDZ22AWnXS7znZVvoUtQ//pb3xLwMmSSMbwjJsvMCIcex4kQhAz2mtm
7Zecfey9pjKYa4ZZsT0qZyf+fsomdEoAEpMd+weSZ/d+MOrK30gFtV3ig4q/Dq1o
yY+hAmYlwnxD2aFmRBE0vdkyb1UD+7uGiTHYi3daR7ESmA6JIkkyfjT2VT7YIkbI
bdbmUwZa4jinP/qVOOhEZzFcfz+vtgx2b23HP18NrJhOLh9tYq5VZsxZzLyO3GEF
SKUkJjrAxnergBCZF7PwFETPv0k04UOrHq9Wuc3yvyz8vQST9fKhAPwtGWowVzGo
Dloq5dd7I3AnmqCiqLzygpoAN8hdbI5WizqDDuZIhfnWV7QVQ+8xC6cZ/4Wgo8IB
5dZbFx9guX7h5PX45JH5dRbgi+7xelqjEzE7Ew995M8W4IAy7c4rwsQ240KrogzJ
173YDimBsnT7b2L4Qbc9kfrvEEgyQ2Tcgy8/lQ/ZGkqLtMTqpaUibY9BT70EUVAm
t51FBqwszq/HnPtgLnTG
=J/n6
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 08 Feb 2016 07:51:18 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Mar 9 10:01:20 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.