Author: gd
Date: 2007-08-20 09:47:13 +0000 (Mon, 20 Aug 2007)
New Revision: 24573

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24573

Log:
Fix build without LDAP. Thanks Volker for pointing this out.

Guenther

Modified:
   branches/SAMBA_3_2/source/libgpo/gpo_ini.c
   branches/SAMBA_3_2/source/libgpo/gpo_ldap.c
   branches/SAMBA_3_2/source/libgpo/gpo_util.c
   branches/SAMBA_3_2_0/source/libgpo/gpo_ldap.c
   branches/SAMBA_3_2_0/source/libgpo/gpo_util.c


Changeset:
Modified: branches/SAMBA_3_2/source/libgpo/gpo_ini.c
===================================================================
--- branches/SAMBA_3_2/source/libgpo/gpo_ini.c  2007-08-20 09:32:30 UTC (rev 
24572)
+++ branches/SAMBA_3_2/source/libgpo/gpo_ini.c  2007-08-20 09:47:13 UTC (rev 
24573)
@@ -145,12 +145,8 @@
 
        talloc_set_destructor(ctx, gp_inifile_free_context);
 
-#ifdef HAVE_LDAP
        status = gp_find_file(mem_ctx, flags, unix_path, suffix,
                              &ini_filename);
-#else
-       status = NT_STATUS_NOT_IMPLEMENTED;
-#endif
 
        if (!NT_STATUS_IS_OK(status)) {
                goto failed;

Modified: branches/SAMBA_3_2/source/libgpo/gpo_ldap.c
===================================================================
--- branches/SAMBA_3_2/source/libgpo/gpo_ldap.c 2007-08-20 09:32:30 UTC (rev 
24572)
+++ branches/SAMBA_3_2/source/libgpo/gpo_ldap.c 2007-08-20 09:47:13 UTC (rev 
24573)
@@ -1,26 +1,24 @@
-/* 
+/*
  *  Unix SMB/CIFS implementation.
  *  Group Policy Object Support
  *  Copyright (C) Guenther Deschner 2005,2007
- *  
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "includes.h"
 
-#ifdef HAVE_LDAP
-
 /****************************************************************
  parse the raw extension string into a GP_EXT structure
 ****************************************************************/
@@ -149,6 +147,8 @@
        return ret;
 }
 
+#ifdef HAVE_LDAP
+
 /****************************************************************
  parse the raw link string into a GP_LINK structure
 ****************************************************************/
@@ -158,7 +158,7 @@
                                   uint32_t options,
                                   struct GP_LINK *gp_link)
 {
-       ADS_STATUS status = ADS_ERROR(LDAP_NO_MEMORY);
+       ADS_STATUS status = ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
        char **link_list;
        int i;
 

Modified: branches/SAMBA_3_2/source/libgpo/gpo_util.c
===================================================================
--- branches/SAMBA_3_2/source/libgpo/gpo_util.c 2007-08-20 09:32:30 UTC (rev 
24572)
+++ branches/SAMBA_3_2/source/libgpo/gpo_util.c 2007-08-20 09:47:13 UTC (rev 
24573)
@@ -19,8 +19,6 @@
 
 #include "includes.h"
 
-#ifdef HAVE_LDAP
-
 #define DEFAULT_DOMAIN_POLICY "Default Domain Policy"
 #define DEFAULT_DOMAIN_CONTROLLERS_POLICY "Default Domain Controllers Policy"
 
@@ -216,6 +214,8 @@
        }
 }
 
+#ifdef HAVE_LDAP
+
 /****************************************************************
 ****************************************************************/
 
@@ -395,6 +395,8 @@
        }
 }
 
+#endif /* HAVE_LDAP */
+
 /****************************************************************
 ****************************************************************/
 
@@ -441,7 +443,7 @@
 
                        if (!ads_parse_gp_ext(mem_ctx, gpo->machine_extensions,
                                              &gp_ext)) {
-                               return ADS_ERROR(LDAP_PARAM_ERROR);
+                               return 
ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
                        }
 
                } else {
@@ -455,7 +457,7 @@
 
                        if (!ads_parse_gp_ext(mem_ctx, gpo->user_extensions,
                                              &gp_ext)) {
-                               return ADS_ERROR(LDAP_PARAM_ERROR);
+                               return 
ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
                        }
                } else {
                        /* nothing to apply */
@@ -703,4 +705,3 @@
        return NT_STATUS_NO_SUCH_FILE;
 }
 
-#endif /* HAVE_LDAP */

Modified: branches/SAMBA_3_2_0/source/libgpo/gpo_ldap.c
===================================================================
--- branches/SAMBA_3_2_0/source/libgpo/gpo_ldap.c       2007-08-20 09:32:30 UTC 
(rev 24572)
+++ branches/SAMBA_3_2_0/source/libgpo/gpo_ldap.c       2007-08-20 09:47:13 UTC 
(rev 24573)
@@ -1,26 +1,24 @@
-/* 
+/*
  *  Unix SMB/CIFS implementation.
  *  Group Policy Object Support
  *  Copyright (C) Guenther Deschner 2005,2007
- *  
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "includes.h"
 
-#ifdef HAVE_LDAP
-
 /****************************************************************
  parse the raw extension string into a GP_EXT structure
 ****************************************************************/
@@ -149,6 +147,8 @@
        return ret;
 }
 
+#ifdef HAVE_LDAP
+
 /****************************************************************
  parse the raw link string into a GP_LINK structure
 ****************************************************************/
@@ -158,7 +158,7 @@
                                   uint32_t options,
                                   struct GP_LINK *gp_link)
 {
-       ADS_STATUS status = ADS_ERROR(LDAP_NO_MEMORY);
+       ADS_STATUS status = ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
        char **link_list;
        int i;
 

Modified: branches/SAMBA_3_2_0/source/libgpo/gpo_util.c
===================================================================
--- branches/SAMBA_3_2_0/source/libgpo/gpo_util.c       2007-08-20 09:32:30 UTC 
(rev 24572)
+++ branches/SAMBA_3_2_0/source/libgpo/gpo_util.c       2007-08-20 09:47:13 UTC 
(rev 24573)
@@ -19,8 +19,6 @@
 
 #include "includes.h"
 
-#ifdef HAVE_LDAP
-
 #define DEFAULT_DOMAIN_POLICY "Default Domain Policy"
 #define DEFAULT_DOMAIN_CONTROLLERS_POLICY "Default Domain Controllers Policy"
 
@@ -216,6 +214,8 @@
        }
 }
 
+#ifdef HAVE_LDAP
+
 /****************************************************************
 ****************************************************************/
 
@@ -395,6 +395,8 @@
        }
 }
 
+#endif /* HAVE_LDAP */
+
 /****************************************************************
 ****************************************************************/
 
@@ -441,7 +443,7 @@
 
                        if (!ads_parse_gp_ext(mem_ctx, gpo->machine_extensions,
                                              &gp_ext)) {
-                               return ADS_ERROR(LDAP_PARAM_ERROR);
+                               return 
ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
                        }
 
                } else {
@@ -455,7 +457,7 @@
 
                        if (!ads_parse_gp_ext(mem_ctx, gpo->user_extensions,
                                              &gp_ext)) {
-                               return ADS_ERROR(LDAP_PARAM_ERROR);
+                               return 
ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
                        }
                } else {
                        /* nothing to apply */
@@ -703,4 +705,3 @@
        return NT_STATUS_NO_SUCH_FILE;
 }
 
-#endif /* HAVE_LDAP */

Reply via email to