Index: config-scripts/cups-directories.m4
===================================================================
--- config-scripts/cups-directories.m4	(revision 6928)
+++ config-scripts/cups-directories.m4	(working copy)
@@ -223,6 +223,47 @@
 
 AC_SUBST(XINETD)
 
+dnl LPD sharing support...
+AC_ARG_WITH(lpdconfig, [  --with-lpdconfig        set URI for LPD config file],
+	LPDCONFIG="$withval", LPDCONFIG="")
+
+if test "x$LPDCONFIG" = x; then
+	if test -f /System/Library/LaunchDaemons/org.cups.cups-lpd.plist; then
+		LPDCONFIG="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
+	elif test "x$XINETD" != x; then
+		LPDCONFIG="xinetd://$XINETD/cups-lpd"
+	fi
+fi
+
+if test "x$LPDCONFIG" = xoff; then
+	AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "")
+else
+	AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "$LPDCONFIG")
+fi
+
+dnl SMB sharing support...
+AC_ARG_WITH(smbconfig, [  --with-smbconfig        set URI for Samba config file],
+	SMBCONFIG="$withval", SMBCONFIG="")
+
+if test "x$SMBCONFIG" = x; then
+	if test -f /System/Library/LaunchDaemons/smbd.plist; then
+		SMBCONFIG="launchd:///System/Library/LaunchDaemons/smbd.plist"
+	else
+		for dir in /etc /etc/samba /usr/local/etc; do
+			if test -f $dir/smb.conf; then
+				SMBCONFIG="samba://$dir/smb.conf"
+				break
+			fi
+		done
+	fi
+fi
+
+if test "x$SMBCONFIG" = xoff; then
+	AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "")
+else
+	AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "$SMBCONFIG")
+fi
+
 dnl Setup default locations...
 # Cache data...
 AC_ARG_WITH(cachedir, [  --with-cachedir         set path for cache files],cachedir="$withval",cachedir="")
Index: cups/adminutil.c
===================================================================
--- cups/adminutil.c	(revision 6928)
+++ cups/adminutil.c	(working copy)
@@ -1458,6 +1458,8 @@
               !strcasecmp(line, "BrowseAddress") ||
               !strcasecmp(line, "BrowseAllow") ||
               !strcasecmp(line, "BrowseDeny") ||
+              !strcasecmp(line, "BrowseLocalProtocols") ||
+              !strcasecmp(line, "BrowseRemoteProtocols") ||
               !strcasecmp(line, "BrowseOrder")) &&
 	     (remote_printers >= 0 || share_printers >= 0))
     {
@@ -1474,6 +1476,11 @@
 
         if (new_remote_printers || new_share_printers)
 	{
+	  const char *localp = cupsGetOption("BrowseLocalProtocols",
+					     num_settings, settings);
+	  const char *remotep = cupsGetOption("BrowseRemoteProtocols",
+					      num_settings, settings);
+
 	  if (new_remote_printers && new_share_printers)
 	    cupsFilePuts(temp,
 	                 "# Enable printer sharing and shared printers.\n");
@@ -1488,10 +1495,30 @@
 	  cupsFilePuts(temp, "BrowseOrder allow,deny\n");
 
 	  if (new_remote_printers)
+	  {
 	    cupsFilePuts(temp, "BrowseAllow all\n");
 
+	    if (!remotep || !*remotep)
+	      cupsFilePuts(temp, "BrowseRemoteProtocols "
+	                         CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS "\n");
+            else if (remotep)
+	      cupsFilePrintf(temp, "BrowseRemoteProtocols %s\n", remotep);
+          }
+	  else
+	    cupsFilePuts(temp, "BrowseRemoteProtocols\n");
+
 	  if (new_share_printers)
+	  {
 	    cupsFilePuts(temp, "BrowseAddress @LOCAL\n");
+
+	    if (!localp || !*localp)
+	      cupsFilePuts(temp, "BrowseLocalProtocols "
+	                         CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "\n");
+            else if (localp)
+	      cupsFilePrintf(temp, "BrowseLocalProtocols %s\n", localp);
+	  }
+	  else
+	    cupsFilePuts(temp, "BrowseLocalProtocols\n");
         }
 	else
 	{
Index: templates/classes.tmpl
===================================================================
--- templates/classes.tmpl	(revision 6928)
+++ templates/classes.tmpl	(working copy)
@@ -10,7 +10,7 @@
 <TD VALIGN=TOP><B>Description:</B> {printer_info}<BR>
 <B>Location:</B> {printer_location}<BR>
 <B>Class State:</B> {printer_state=3?idle:{printer_state=4?processing:stopped}},
-{printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}, {printer_is_shared=0?not:} published{default_name={printer_name}?, default printer:}.
+{printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}, {server_is_sharing_printers=0?not:{printer_is_shared=0?not:}} shared{default_name={printer_name}?, default printer:}.
 {?member_uris=?:<BR>Members: {member_uris}}
 
 <P><TABLE CLASS="inset" WIDTH="100%" SUMMARY="Maintenance Commands">
@@ -29,10 +29,10 @@
 
 <P><TABLE CLASS="inset" WIDTH="100%" SUMMARY="Administration Commands">
 <CAPTION>Administration Commands</CAPTION>
-<TR><TD>{printer_is_shared=0?
-<FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-sharing"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}&amp;shared=1<INPUT TYPE="HIDDEN" NAME="is_class" VALUE="Y"><INPUT TYPE="SUBMIT" VALUE="Publish Printer"></FORM>
-:<FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-sharing"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}&amp;shared=0<INPUT TYPE="HIDDEN" NAME="is_class" VALUE="Y"><INPUT TYPE="SUBMIT" VALUE="Unpublish Printer"></FORM>
-}
+<TR><TD>{server_is_sharing_printers=0?:{printer_is_shared=0?
+<FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-sharing"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}&amp;shared=1<INPUT TYPE="HIDDEN" NAME="is_class" VALUE="Y"><INPUT TYPE="SUBMIT" VALUE="Share Class"></FORM>
+:<FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-sharing"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}&amp;shared=0<INPUT TYPE="HIDDEN" NAME="is_class" VALUE="Y"><INPUT TYPE="SUBMIT" VALUE="Unshare Class"></FORM>
+}}
 <FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="modify-class"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}"><INPUT TYPE="SUBMIT" VALUE="Modify Class"></FORM>
 <FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-class-options"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}"><INPUT TYPE="SUBMIT" VALUE="Set Printer Options"></FORM>
 <FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="delete-class"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}"><INPUT TYPE="SUBMIT" VALUE="Delete Class"></FORM>
Index: templates/printers.tmpl
===================================================================
--- templates/printers.tmpl	(revision 6928)
+++ templates/printers.tmpl	(working copy)
@@ -11,7 +11,7 @@
 <B>Location:</B> {printer_location}<BR>
 <B>Printer Driver:</B> {printer_make_and_model} ({color_supported=1?color:grayscale}{sides_supported?, 2-sided printing:})<BR>
 <B>Printer State:</B> {printer_state=3?idle:{printer_state=4?processing:stopped}},
-{printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}, {printer_is_shared=0?not:} published{default_name={printer_name}?, default printer:}.<BR>
+{printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}, {server_is_sharing_printers=0?not:{printer_is_shared=0?not:}} shared{default_name={printer_name}?, default printer:}.<BR>
 <B>Default Options:</B> job-sheets={job_sheets_default}
 media={media_default?{media_default}:unknown}
 {sides_default?sides={sides_default}:}
@@ -36,10 +36,10 @@
 
 <P><TABLE CLASS="inset" WIDTH="100%" SUMMARY="Administration Commands">
 <CAPTION>Administration Commands</CAPTION>
-<TR><TD>{printer_is_shared=0?
-<FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-sharing"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}&amp;shared=1"><INPUT TYPE="SUBMIT" VALUE="Publish Printer"></FORM>
-:<FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-sharing"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}&amp;shared=0"><INPUT TYPE="SUBMIT" VALUE="Unpublish Printer"></FORM>
-}
+<TR><TD>{server_is_sharing_printers=0?:{printer_is_shared=0?
+<FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-sharing"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}&amp;shared=1"><INPUT TYPE="SUBMIT" VALUE="Share Printer"></FORM>
+:<FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-sharing"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}&amp;shared=0"><INPUT TYPE="SUBMIT" VALUE="Unshare Printer"></FORM>
+}}
 <FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="modify-printer"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}"><INPUT TYPE="SUBMIT" VALUE="Modify Printer"></FORM>
 <FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-printer-options"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}"><INPUT TYPE="SUBMIT" VALUE="Set Printer Options"></FORM>
 <FORM ACTION="{admin_uri}" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="delete-printer"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{%printer_name}"><INPUT TYPE="SUBMIT" VALUE="Delete Printer"></FORM>
Index: templates/admin.tmpl
===================================================================
--- templates/admin.tmpl	(revision 6928)
+++ templates/admin.tmpl	(working copy)
@@ -43,7 +43,7 @@
 
 <P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Show printers shared by other systems<BR>
-<INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Share published printers connected to this system<BR>
+<INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Share printers connected to this system<BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Allow remote administration<BR>
 {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" {?kerberos}> Use Kerberos authentication (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)<BR>:}
Index: config.h.in
===================================================================
--- config.h.in	(revision 6928)
+++ config.h.in	(working copy)
@@ -70,6 +70,14 @@
 
 
 /*
+ * Default Samba and LPD config files...
+ */
+
+#define CUPS_DEFAULT_SMB_CONFIG_FILE	""
+#define CUPS_DEFAULT_LPD_CONFIG_FILE	""
+
+
+/*
  * Default MaxCopies value...
  */
 
Index: init/cups-lpd.in
===================================================================
--- init/cups-lpd.in	(revision 6928)
+++ init/cups-lpd.in	(working copy)
@@ -1,5 +1,6 @@
 service printer
 {
+	disable = yes
 	socket_type = stream
 	protocol = tcp
 	wait = no
Index: scheduler/conf.c
===================================================================
--- scheduler/conf.c	(revision 6928)
+++ scheduler/conf.c	(working copy)
@@ -126,6 +126,7 @@
   { "LimitRequestBody",		&MaxRequestSize,	CUPSD_VARTYPE_INTEGER },
   { "ListenBackLog",		&ListenBackLog,		CUPSD_VARTYPE_INTEGER },
   { "LogFilePerm",		&LogFilePerm,		CUPSD_VARTYPE_INTEGER },
+  { "LPDConfigFile",		&LPDConfigFile,		CUPSD_VARTYPE_STRING },
   { "MaxActiveJobs",		&MaxActiveJobs,		CUPSD_VARTYPE_INTEGER },
   { "MaxClients",		&MaxClients,		CUPSD_VARTYPE_INTEGER },
   { "MaxClientsPerHost",	&MaxClientsPerHost,	CUPSD_VARTYPE_INTEGER },
@@ -162,6 +163,7 @@
 #endif /* HAVE_SSL */
   { "ServerName",		&ServerName,		CUPSD_VARTYPE_STRING },
   { "ServerRoot",		&ServerRoot,		CUPSD_VARTYPE_PATHNAME },
+  { "SMBConfigFile",		&SMBConfigFile,		CUPSD_VARTYPE_STRING },
   { "StateDir",			&StateDir,		CUPSD_VARTYPE_STRING },
 #ifdef HAVE_AUTHORIZATION_H
   { "SystemGroupAuthKey",	&SystemGroupAuthKey,	CUPSD_VARTYPE_STRING },
@@ -547,6 +549,9 @@
   Browsing              = CUPS_DEFAULT_BROWSING;
   DefaultShared         = CUPS_DEFAULT_DEFAULT_SHARED;
 
+  cupsdSetString(&LPDConfigFile, CUPS_DEFAULT_LPD_CONFIG_FILE);
+  cupsdSetString(&SMBConfigFile, CUPS_DEFAULT_SMB_CONFIG_FILE);
+
   cupsdClearString(&BrowseLocalOptions);
   cupsdClearString(&BrowseRemoteOptions);
 
@@ -2020,6 +2025,10 @@
       protocols |= BROWSE_LDAP;
     else if (!strcasecmp(valstart, "dnssd") || !strcasecmp(valstart, "bonjour"))
       protocols |= BROWSE_DNSSD;
+    else if (!strcasecmp(valstart, "lpd"))
+      protocols |= BROWSE_LPD;
+    else if (!strcasecmp(valstart, "smb"))
+      protocols |= BROWSE_SMB;
     else if (!strcasecmp(valstart, "all"))
       protocols |= BROWSE_ALL;
     else if (strcasecmp(valstart, "none"))
Index: scheduler/dirsvc.c
===================================================================
--- scheduler/dirsvc.c	(revision 6928)
+++ scheduler/dirsvc.c	(working copy)
@@ -53,7 +53,9 @@
  *   slp_url_callback()            - SLP service url callback
  *   update_cups_browse()          - Update the browse lists using the CUPS
  *                                   protocol.
+ *   update_lpd()                  - Update the LPD configuration as needed.
  *   update_polling()              - Read status messages from the poll daemons.
+ *   update_smb()                  - Update the SMB configuration as needed.
  */
 
 /*
@@ -98,7 +100,9 @@
 static void	send_slp_browse(cupsd_printer_t *p);
 #endif /* HAVE_LIBSLP */
 static void	update_cups_browse(void);
+static void	update_lpd(int onoff);
 static void	update_polling(void);
+static void	update_smb(int onoff);
 
 
 #ifdef HAVE_OPENLDAP
@@ -1139,6 +1143,16 @@
 #endif /* HAVE_OPENLDAP */
 
  /*
+  * Enable LPD and SMB printer sharing as needed through external programs...
+  */
+
+  if (BrowseLocalProtocols & BROWSE_LPD)
+    update_lpd(1);
+
+  if (BrowseLocalProtocols & BROWSE_SMB)
+    update_smb(1);
+
+ /*
   * Register the individual printers
   */
 
@@ -1318,6 +1332,16 @@
     BrowseLDAPHandle = NULL;
   }
 #endif /* HAVE_OPENLDAP */
+
+ /*
+  * Disable LPD and SMB printer sharing as needed through external programs...
+  */
+
+  if (BrowseLocalProtocols & BROWSE_LPD)
+    update_lpd(0);
+
+  if (BrowseLocalProtocols & BROWSE_SMB)
+    update_smb(0);
 }
 
 
@@ -3781,6 +3805,90 @@
 
 
 /*
+ * 'update_lpd()' - Update the LPD configuration as needed.
+ */
+
+static void
+update_lpd(int onoff)			/* - 1 = turn on, 0 = turn off */
+{
+  if (!LPDConfigFile)
+    return;
+
+  if (!strncmp(LPDConfigFile, "xinetd:///", 10))
+  {
+   /*
+    * Enable/disable LPD via the xinetd.d config file for cups-lpd...
+    */
+
+    char	newfile[1024];		/* New cups-lpd.N file */
+    cups_file_t	*ofp,			/* Original file pointer */
+		*nfp;			/* New file pointer */
+    char	line[1024];		/* Line from file */
+
+
+    snprintf(newfile, sizeof(newfile), "%s.N", LPDConfigFile + 9);
+
+    if ((ofp = cupsFileOpen(LPDConfigFile + 9, "r")) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to open \"%s\" - %s",
+                      LPDConfigFile + 9, strerror(errno));
+      return;
+    }
+
+    if ((nfp = cupsFileOpen(newfile, "w")) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to create \"%s\" - %s",
+                      newfile, strerror(errno));
+      cupsFileClose(ofp);
+      return;
+    }
+
+   /*
+    * Copy all of the lines from the cups-lpd file...
+    */
+
+    while (cupsFileGets(ofp, line, sizeof(line)))
+    {
+      if (line[0] == '{')
+      {
+        cupsFilePrintf(nfp, "%s\n", line);
+        snprintf(line, sizeof(line), "\tdisable = %s",
+	         onoff ? "no" : "yes");
+      }
+      else if (strstr(line, "disable ="))
+        continue;
+
+      cupsFilePrintf(nfp, "%s\n", line);
+    }
+
+    cupsFileClose(nfp);
+    cupsFileClose(ofp);
+    rename(newfile, LPDConfigFile + 9);
+  }
+  else if (!strncmp(LPDConfigFile, "launchd:///", 11))
+  {
+   /*
+    * Enable/disable LPD via the launchctl command...
+    */
+
+    char	*argv[5],		/* Arguments for command */
+		*envp[MAX_ENV];		/* Environment for command */
+    int		pid;			/* Process ID */
+
+
+    cupsdLoadEnv(envp, (int)(sizeof(envp) / sizeof(envp[0])));
+    argv[0] = (char *)"launchctl";
+    argv[1] = (char *)(onoff ? "load" : "unload");
+    argv[2] = (char *)"-w";
+    argv[3] = LPDConfigFile + 10;
+    argv[4] = NULL;
+
+    cupsdStartProcess("/bin/launchctl", argv, envp, -1, -1, -1, -1, -1, 1, &pid);
+  }
+}
+
+
+/*
  * 'update_polling()' - Read status messages from the poll daemons.
  */
 
@@ -3811,5 +3919,90 @@
 
 
 /*
+ * 'update_smb()' - Update the SMB configuration as needed.
+ */
+
+static void
+update_smb(int onoff)			/* I - 1 = turn on, 0 = turn off */
+{
+  if (!SMBConfigFile)
+    return;
+
+  if (!strncmp(SMBConfigFile, "samba:///", 9))
+  {
+   /*
+    * Enable/disable SMB via the specified smb.conf config file...
+    */
+
+    char	newfile[1024];		/* New smb.conf.N file */
+    cups_file_t	*ofp,			/* Original file pointer */
+		*nfp;			/* New file pointer */
+    char	line[1024];		/* Line from file */
+    int		in_printers;		/* In [printers] section? */
+
+
+    snprintf(newfile, sizeof(newfile), "%s.N", SMBConfigFile + 8);
+
+    if ((ofp = cupsFileOpen(SMBConfigFile + 8, "r")) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to open \"%s\" - %s",
+                      SMBConfigFile + 8, strerror(errno));
+      return;
+    }
+
+    if ((nfp = cupsFileOpen(newfile, "w")) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to create \"%s\" - %s",
+                      newfile, strerror(errno));
+      cupsFileClose(ofp);
+      return;
+    }
+
+   /*
+    * Copy all of the lines from the smb.conf file...
+    */
+
+    in_printers = 0;
+
+    while (cupsFileGets(ofp, line, sizeof(line)))
+    {
+      if (in_printers && strstr(line, "printable ="))
+        snprintf(line, sizeof(line), "    printable = %s",
+	         onoff ? "yes" : "no");
+
+      cupsFilePrintf(nfp, "%s\n", line);
+
+      if (line[0] == '[')
+        in_printers = !strcmp(line, "[printers]");
+    }
+
+    cupsFileClose(nfp);
+    cupsFileClose(ofp);
+    rename(newfile, SMBConfigFile + 8);
+  }
+  else if (!strncmp(SMBConfigFile, "launchd:///", 11))
+  {
+   /*
+    * Enable/disable SMB via the launchctl command...
+    */
+
+    char	*argv[5],		/* Arguments for command */
+		*envp[MAX_ENV];		/* Environment for command */
+    int		pid;			/* Process ID */
+
+
+    cupsdLoadEnv(envp, (int)(sizeof(envp) / sizeof(envp[0])));
+    argv[0] = (char *)"launchctl";
+    argv[1] = (char *)(onoff ? "load" : "unload");
+    argv[2] = (char *)"-w";
+    argv[3] = SMBConfigFile + 10;
+    argv[4] = NULL;
+
+    cupsdStartProcess("/bin/launchctl", argv, envp, -1, -1, -1, -1, -1, 1, &pid);
+  }
+}
+
+
+/*
  * End of "$Id$".
  */
Index: scheduler/dirsvc.h
===================================================================
--- scheduler/dirsvc.h	(revision 6928)
+++ scheduler/dirsvc.h	(working copy)
@@ -37,7 +37,9 @@
 #define	BROWSE_SLP	2		/* SLPv2 */
 #define BROWSE_LDAP	4		/* LDAP */
 #define BROWSE_DNSSD	8		/* DNS Service Discovery (aka Bonjour) */
-#define BROWSE_ALL	15		/* All protocols */
+#define BROWSE_SMB	16		/* SMB/Samba */
+#define BROWSE_LPD	32		/* LPD via xinetd or launchd */
+#define BROWSE_ALL	63		/* All protocols */
 
 
 /*
@@ -150,6 +152,10 @@
 			*BrowseLDAPCACertFile VALUE(NULL);
 					/* LDAP CA CERT file to use */
 #endif /* HAVE_LDAP */
+VAR char		*LPDConfigFile	VALUE(NULL),
+					/* LPD configuration file */
+			*SMBConfigFile	VALUE(NULL);
+					/* SMB configuration file */
 
 
 /*
Index: scheduler/printers.c
===================================================================
--- scheduler/printers.c	(revision 6928)
+++ scheduler/printers.c	(working copy)
@@ -571,6 +571,9 @@
        p;
        i ++, p = (cupsd_policy_t *)cupsArrayNext(Policies))
     attr->values[i].string.text = _cupsStrAlloc(p->name);
+
+  ippAddBoolean(CommonData, IPP_TAG_PRINTER, "server-is-sharing-printers",
+                BrowseLocalProtocols != 0 && Browsing);
 }
 
 
