#997895 libsnmp-dev net-snmp-create-v2-user no longer sets ${datarootdir}

Package:
libsnmp-dev
Source:
net-snmp
Description:
SNMP (Simple Network Management Protocol) development files
Submitter:
Stefan Rubner
Date:
2022-05-25 22:39:04 UTC
Severity:
normal
Tags:
#997895#5
Date:
2021-10-26 17:15:24 UTC
From:
To:
When running `net-snmp-create-v3-user` I get an error message:

# net-snmp-create-v3-user -A <redacted> -a SHA -x <redacted> -X AES snmp_v3_user
adding the following line to /var/lib/snmp/snmpd.conf:
   createUser snmp_v3_user SHA "<redacted>" AES "<redacted>"
adding the following line to /snmp/snmpd.conf:
   rwuser snmp_v3_user
touch: cannot touch '/snmp/snmpd.conf': No such file or directory
/usr/bin/net-snmp-create-v3-user: 144: cannot create /snmp/snmpd.conf: Directory nonexistent

Note the last two lines. The reason is that in line 137 the variable òutfile`is set like this:

outfile="${datarootdir}/snmp/snmpd.conf“

but since `datarootdir` isn’t defined anywhere the tool goes right for `/snmp/snmpd.conf`.
Looking at an older version it seems that the whole section to set the variables is missing, e.g.
this part:

prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${prefix}/lib/x86_64-linux-gnu
datarootdir=${prefix}/share

This could probably get condensed into

datarootdir=/usr/share

or the path could be hardcoded into `net-snmp-create-v3-user`

#997895#14
Date:
2022-02-15 11:39:04 UTC
From:
To:
The problem still exists in Debian 11, but the package name is 'snmpd'.


John.

#997895#17
Date:
2022-03-06 04:12:28 UTC
From:
To:
Hello,

Bug #997895 in net-snmp reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/debian/net-snmp/-/commit/b4281b2fc9b7ae7897a01d8be586711df98abad7
* Fix path for net-snmp-create-v3-user Closes: #997895
* Use pidof for net-snmp-create-v3-user so don't need procps
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/997895

#997895#22
Date:
2022-03-06 04:12:28 UTC
From:
To:
Hello,

Bug #997895 in net-snmp reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/debian/net-snmp/-/commit/b4281b2fc9b7ae7897a01d8be586711df98abad7
* Fix path for net-snmp-create-v3-user Closes: #997895
* Use pidof for net-snmp-create-v3-user so don't need procps
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/997895

#997895#27
Date:
2022-05-25 22:34:09 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
net-snmp, 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 997895@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Craig Small <csmall@debian.org> (supplier of updated net-snmp 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)
Format: 1.8
Date: Wed, 25 May 2022 22:09:23 +1000
Source: net-snmp
Architecture: source
Version: 5.9.1+dfsg-2
Distribution: unstable
Urgency: medium
Maintainer: Debian SNMP Team <team+snmp@tracker.debian.org>
Changed-By: Craig Small <csmall@debian.org>
Closes: 997895 998152 1011440
Changes:
 net-snmp (5.9.1+dfsg-2) unstable; urgency=medium
 .
   * Fix path for net-snmp-create-v3-user Closes: #997895
   * Use pidof for net-snmp-create-v3-user so don't need procps
   * Make snmpd.conf group readable Closes: #998152
   * Reapplied perl callback patch Closes: #1011440
Checksums-Sha1:
 0622c151801626391c103f6c57aa878c08c252da 2812 net-snmp_5.9.1+dfsg-2.dsc
 24b605ff686e18d1e7ed830090c9616af509ae20 69120 net-snmp_5.9.1+dfsg-2.debian.tar.xz
 111486f050e1efd8c932c6cd3113a4dc571c310e 10433 net-snmp_5.9.1+dfsg-2_amd64.buildinfo
Checksums-Sha256:
 3c14de1c885f25ab10f6546b816394e58cddacd841d7f987d07c71c26bef1c77 2812 net-snmp_5.9.1+dfsg-2.dsc
 8851f207021c5622c9f2713230ff6c85542aa3db5a59178afbf6c29016e32cc0 69120 net-snmp_5.9.1+dfsg-2.debian.tar.xz
 6f96672dc4d42a3f38d7c0f1223a0f1614ce5b06004c8b4f3e08219082a340af 10433 net-snmp_5.9.1+dfsg-2_amd64.buildinfo
Files:
 e39fc03c0496ef931d4799d0cb38b1db 2812 net optional net-snmp_5.9.1+dfsg-2.dsc
 357b8feb99b1bc4577684fdc975c2676 69120 net optional net-snmp_5.9.1+dfsg-2.debian.tar.xz
 f25cf9e2afe661984ea6c9c9bbb62fec 10433 net optional net-snmp_5.9.1+dfsg-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEXT3w9TizJ8CqeneiAiFmwP88hOMFAmKOqy0ACgkQAiFmwP88
hOPA+w/9Fe833CAYk1EMwh1McPqwfzWvmRy+/9BuW+AT94NBgeVtdZcnVu1EWAQy
6Kkbz2YhSNJRy5buvYXTEjPL/RtUrUR2LEngdjTnYnKHYNo6CTH+NiiAqngGpQZx
BIjzLzAG+6+tDV8HpNEBuFJXiS/Q1tXWA6kZEBX/aTlgWIaZBjZLfkLbqChfnj9l
z7oxvjPoh0eiJ8Lg5WtOb9d9j2EK3YsnQR8FJpbQ+XKlxzvlX0+x8EB5U+ui31m8
lCASpwjHHJ5vfJlmSnEYFh5Gfi0zW5lk7krnImM6g8fyibTZI1da5egBMzVEfeEB
zny18MNycDvySpFCXrBsH1A1pZb3iMSc1ApxbgY2CY0aIFXrDYycU0Xbk3pzMSsV
PRFZljxVU6VRrtq9LaTyVtsiJiQWdcLy0pifrjutQK6nMfC1E42h55aBpiTFBVtq
nquRMUXjsnaHFUZx/bPHSaAVVut5ytha+v5uwlTGAb2EPAAVUIjH+HJntlVcv7y0
bEf+7cOZdcYJtkTTRF6/sD2nAuADrNAeMMgQaCpuPgiaFVWsCk/ZPureWO9hcFd0
drHmLluAdBFWQ8MdyYsk7gCa/edQysN5k6H9UUjf+Zg1vISJb6s1Sl4TKBZ57lzr
+fqEdMoC/9gBBsODtk/Iut2SlkUbG4VbUY3muZceUNoz1iauFEE=
=tQ85
-----END PGP SIGNATURE-----