The Samba-Bugzilla – Attachment 14826 Details for
Bug 13746
mDNS registration with avahi does not use fruit:model string
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch from master for v4.9 and v4.10
patch-v4-10 (text/plain), 2.73 KB, created by
Guenther Deschner
on 2019-02-06 15:36:52 UTC
(
hide
)
Description:
patch from master for v4.9 and v4.10
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2019-02-06 15:36:52 UTC
Size:
2.73 KB
patch
obsolete
>From ca64a0a93da6b6053392b9ec851d68bc877847f0 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org> >Date: Tue, 15 Jan 2019 14:26:17 +0100 >Subject: [PATCH] s3-smbd: use fruit:model string for mDNS registration >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >With this change we now allow to modify the icon to represent Samba in >Finder. Possible values are at least: > >fruit:model = iMac >fruit:model = MacBook >fruit:model = MacPro >fruit:model = Xserve >fruit:model = RackMac > >Prior to this change we only displayed the correct icon when a mac >client negotiated the apple create context over SMB. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13746 > >Based on proposed patch from Rouven WEILER <Rouven_Weiler@gmx.net> > >Guenther > >Signed-off-by: Guenther Deschner <gd@samba.org> >Reviewed-by: Ralph Boehme <slow@samba.org> > >Autobuild-User(master): Günther Deschner <gd@samba.org> >Autobuild-Date(master): Tue Jan 15 21:27:20 CET 2019 on sn-devel-144 > >(cherry picked from commit 538ce72f1b2fa78450e3b711e58bd0e238faf466) >--- > source3/smbd/avahi_register.c | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > >diff --git a/source3/smbd/avahi_register.c b/source3/smbd/avahi_register.c >index 6c87669ba36..883c862c374 100644 >--- a/source3/smbd/avahi_register.c >+++ b/source3/smbd/avahi_register.c >@@ -111,8 +111,10 @@ static void avahi_client_callback(AvahiClient *c, AvahiClientState status, > size_t dk = 0; > AvahiStringList *adisk = NULL; > AvahiStringList *adisk2 = NULL; >+ AvahiStringList *dinfo = NULL; > const char *hostname = NULL; > enum mdns_name_values mdns_name = lp_mdns_name(); >+ const char *model = NULL; > > DBG_DEBUG("AVAHI_CLIENT_S_RUNNING\n"); > >@@ -196,6 +198,31 @@ static void avahi_client_callback(AvahiClient *c, AvahiClientState status, > } > } > >+ model = lp_parm_const_string(-1, "fruit", "model", "MacSamba"); >+ >+ dinfo = avahi_string_list_add_printf(NULL, "model=%s", model); >+ if (dinfo == NULL) { >+ DBG_DEBUG("avahi_string_list_add_printf" >+ "failed: returned NULL\n"); >+ avahi_entry_group_free(state->entry_group); >+ state->entry_group = NULL; >+ break; >+ } >+ >+ error = avahi_entry_group_add_service_strlst( >+ state->entry_group, AVAHI_IF_UNSPEC, >+ AVAHI_PROTO_UNSPEC, 0, hostname, >+ "_device-info._tcp", NULL, NULL, 0, >+ dinfo); >+ avahi_string_list_free(dinfo); >+ if (error != AVAHI_OK) { >+ DBG_DEBUG("avahi_entry_group_add_service failed: %s\n", >+ avahi_strerror(error)); >+ avahi_entry_group_free(state->entry_group); >+ state->entry_group = NULL; >+ break; >+ } >+ > error = avahi_entry_group_commit(state->entry_group); > if (error != AVAHI_OK) { > DBG_DEBUG("avahi_entry_group_commit failed: %s\n", >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review+
Actions:
View
Attachments on
bug 13746
:
14812
| 14826 |
14827