Calling "net usershare" returned error 255: [2022/01/22 17:25:39,0] ../../lib/util/debug.c:1100(reopen_one_log)reopen_one_log: Unable to open new log file 'shared/log.net': No such file or directorynet usershare add: share name /home/gerd/shared contains invalid characters (any of %<>*?|/\+-=;:,)
Looks like there is one parameter passed to net usershare incorrect: Instead of -l, the program expects --long.
Please fix.
Designs
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
There is an error in the documentation for the smbclient package, especially for the net command.
Reading through the documentation, you could get the impression that the -l and --long switches are equal, but in fact, they aren't.
See net man page:
-l|--long When listing data, give more information on each item.
But it also has this one:
-l|--log-basename=logdirectory Base directory name for log/debug files. The extension ".progname" will be appended (e.g. log.smbclient, log.smbd, etc...). The log file is never removed by the client.
Clearly an error in the documentation.
To circumvent, libshares/shares.c has to be patched:
Could you please make a patch out of it using git format-patch, so I can credit it to you (name, email)? Or if you prefer, you could open a MR (just granted you fork privileges).
Nah, still no name or email. If you dont want to be credited, fine for me, than I will push it in my name. :)
Just to make sure: You tested it, and it fixes the bug for you ? (smbd wont run for me for testing ... seems like I messed my smb.conf in some way :F)
EDIT: Hmm, got it to run now. Seeems like the parameter security = share suggested in the plugin documentation does not exist any more. Can you confirm that ? Than I would remove the line from the documentation.
Though I cannot reproduce the bug .. sharing some folder just works fine for me, with and without your fix. Anyhow, we for sure rather want --long here, instead of passing a log directory, so fine for me.
I am afraid that I do not understand fully. Am I supposed to include my name and e-mail in the diff itself? If yes, which format is required?
Reason for asking: patch is usually very picky about the file format. It is very easy to get errors like malformed patch or patch unexpectedly ending. Sometimes, the hunks are simply rejected without an error message.
That is why I usually avoid editing any diff files again after having created them with, e.g. git diff A B.