NetworkBlockDevice / nbd

Network Block Device
GNU General Public License v2.0
450 stars 116 forks source link

nbd gives access denied if export name is longer than 23 chars #80

Closed luizluca closed 6 years ago

luizluca commented 6 years ago

I'm using nbd server/client 3.17

Using this conf:

[12345678901234567890123]
    exportname = /dev/null
    readonly = true
[123456789012345678901234]
    exportname = /dev/null
    readonly = true

nbd fails to connect to the second export with a really non-obvious error:

# nbd-client -N 12345678901234567890123 localhost /dev/nbd0
Negotiation: ..size = 17592186044415MB
bs=1024, sz=18446744073709550592 bytes

# nbd-client -N 123456789012345678901234 localhost /dev/nbd0
Negotiation: ..Error: Connection not allowed by server policy. Server said: Access denied by server configurationguration for th1

BTW, 'configurationguration' seems to be a typo.

yoe commented 6 years ago

I can't reproduce this with 3.18. I believe this was fixed with commit 4c924b7b64fb1b6cb9be8e8f508d459c0ed05a60, so I'm going to close this.

If you can still reproduce this with a recent version of nbd-server, feel free to reopen this bug.