Bug 9682 - WERR_NOMEM when running samba-tool dns query
Summary: WERR_NOMEM when running samba-tool dns query
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.0.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Amitay Isaacs
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-26 04:15 UTC by Michael Mol
Modified: 2022-08-20 02:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Mol 2013-02-26 04:15:29 UTC
While looking for a way to get a dump of a zone, I ran:

samba-tool dns query kaylee firefly.michael.mol.name '*' ALL


Here's the result:

$ samba-tool dns query kaylee firefly.michael.mol.name '*' ALL
Password for [administrator@FIREFLY.MICHAEL.MOL.NAME]:
ERROR(runtime): uncaught exception - (8, 'WERR_NOMEM')
  File "/usr/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/samba/netcmd/dns.py", line 974, in run
    None, record_type, select_flags, None, None)


I have 10GB of RAM on that box, 7GB that's free or disk cache.
Comment 1 Amitay Isaacs 2013-06-28 08:02:15 UTC
This is a problem with wild-card search.

If you want to search the entire zone, please use @ instead of '*'.
Comment 2 Stefan Metzmacher 2014-07-29 11:06:06 UTC
(In reply to comment #1)
> This is a problem with wild-card search.
> 
> If you want to search the entire zone, please use @ instead of '*'.

We should return WERR_DNS_ERROR_NAME_DOES_NOT_EXIST (as windows)
instead of WERR_NOMEM...
Comment 3 Amitay Isaacs 2014-07-30 01:15:55 UTC
Upstream already has a patch to netcmd/dns.py to dump correct message in case user specifies * in the name. 

  8e7f8a2 netcmd/dns: Catch wildcard patterns when querying for name
Comment 4 Stefan Metzmacher 2014-07-30 02:33:18 UTC
(In reply to comment #3)
> Upstream already has a patch to netcmd/dns.py to dump correct message in case
> user specifies * in the name. 
> 
>   8e7f8a2 netcmd/dns: Catch wildcard patterns when querying for name

I think we should also fix the server.
Comment 5 Andreas Schneider 2014-10-28 10:51:23 UTC
Ping!
Comment 6 Douglas Bagnall 2022-08-20 02:45:27 UTC
> Upstream already has a patch to netcmd/dns.py to dump correct message in case
> user specifies * in the name. 
> 
>   8e7f8a2 netcmd/dns: Catch wildcard patterns when querying for name

That patch was effectively reversed with 29b3a2b0d1e5abc1ca9f112f680251e34fa6e3af as part of the fix for bug #12952 ("Samba DNS server does not honour wildcards").

The fix for bug #12952 entails the server fix mentioned in comment 4.

Now in a testenv I see:

$ bin/samba-tool dns query -U$USERNAME%$PASSWORD $SERVER addom.samba.example.com '*' ALL
use "@" to dump entire domain, looking up *
ERROR: Record or zone does not exist