nt_printing_ads: add missing printShareName attribute when publishing printers
authorBjörn Jacke <bj@sernet.de>
Mon, 7 Sep 2020 21:53:21 +0000 (23:53 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 18 Sep 2020 01:58:22 +0000 (01:58 +0000)
Without printShareName attribute in LDAP, Windows doesn't list the pinters at all.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9771

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep 18 01:58:22 UTC 2020 on sn-devel-184

source3/printing/nt_printing_ads.c

index 478d1231b0012460a660cff62f0e0752334633be..b3176f88b15026ffff7873b40afaa46657dcc916 100644 (file)
@@ -345,6 +345,7 @@ static WERROR nt_printer_info_to_mods(TALLOC_CTX *ctx,
        char *info_str;
 
        ads_mod_str(ctx, mods, SPOOL_REG_PRINTERNAME, info2->sharename);
+       ads_mod_str(ctx, mods, SPOOL_REG_PRINTSHARENAME, info2->sharename);
        ads_mod_str(ctx, mods, SPOOL_REG_SHORTSERVERNAME, lp_netbios_name());
        ads_mod_str(ctx, mods, SPOOL_REG_SERVERNAME, get_mydnsfullname());