Make sure prototypes are always included, make some functions static and
[samba.git] / source4 / auth / auth_sam_reply.c
index 5ba2ab43064daf8c9ce7ece8d3df72f7ce6d8114..839553632ed4d3a3166fe365e03ddd0467cf89dd 100644 (file)
@@ -8,7 +8,7 @@
    
    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 2 of the License, or
+   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,
    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, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
 #include "auth/auth.h"
-#include "libcli/security/proto.h"
+#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
+#include "auth/auth_sam_reply.h"
 
 NTSTATUS auth_convert_server_info_sambaseinfo(TALLOC_CTX *mem_ctx, 
                                              struct auth_serversupplied_info *server_info, 
@@ -81,9 +82,7 @@ NTSTATUS auth_convert_server_info_sambaseinfo(TALLOC_CTX *mem_ctx,
                }
        }
 
-       sam->user_flags = 0; /* TODO: w2k3 uses 0x120.  We know 0x20
-                             * as extra sids (PAC doc) but what is
-                             * 0x100? */
+       sam->user_flags = 0; /* w2k3 uses NETLOGON_EXTRA_SIDS | NETLOGON_NTLMV2_ENABLED */
        sam->acct_flags = server_info->acct_flags;
        sam->logon_server.string = server_info->logon_server;
        sam->domain.string = server_info->domain_name;
@@ -134,7 +133,7 @@ NTSTATUS auth_convert_server_info_saminfo3(TALLOC_CTX *mem_ctx,
                        continue;
                }
                sam3->sids[sam3->sidcount].sid = talloc_reference(sam3->sids,server_info->domain_groups[i]);
-               sam3->sids[sam3->sidcount].attribute = 
+               sam3->sids[sam3->sidcount].attributes =
                        SE_GROUP_MANDATORY | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED;
                sam3->sidcount += 1;
        }