comment-formatting
authorLuke Leighton <lkcl@samba.org>
Mon, 10 Apr 2000 08:49:59 +0000 (08:49 +0000)
committerLuke Leighton <lkcl@samba.org>
Mon, 10 Apr 2000 08:49:59 +0000 (08:49 +0000)
source/include/lib_smb_proto.h
source/include/proto.h
source/smbd/reply.c

index f21bf9090b5e623eda9c4e9960cfd2b0cfd29412..3a6c5a6526220a7bec7d0ae9ede7f1cf117f218c 100644 (file)
@@ -33,23 +33,19 @@ BOOL policy_hnd_set_name(struct policy_cache *cache,
 const char *policy_hnd_get_name(struct policy_cache *cache,
                                const POLICY_HND *hnd);
 BOOL dup_policy_hnd(struct policy_cache *cache,
-                               POLICY_HND *hnd,
-                               const POLICY_HND *from);
+                   POLICY_HND *hnd, const POLICY_HND *from);
 BOOL register_policy_hnd(struct policy_cache *cache,
-                               const vuser_key *key,
-                               POLICY_HND *hnd,
-                               uint32 access_mask);
-BOOL open_policy_hnd(struct policy_cache *cache, 
-                               const vuser_key *key,
-                               POLICY_HND *hnd,
-                               uint32 access_mask);
-BOOL open_policy_hnd_link(struct policy_cache *cache, 
-                               const POLICY_HND *parent_hnd,
-                               POLICY_HND *hnd,
-                               uint32 access_mask);
+                        const vuser_key * key,
+                        POLICY_HND *hnd, uint32 access_mask);
+BOOL open_policy_hnd(struct policy_cache *cache,
+                    const vuser_key * key,
+                    POLICY_HND *hnd, uint32 access_mask);
+BOOL open_policy_hnd_link(struct policy_cache *cache,
+                         const POLICY_HND *parent_hnd,
+                         POLICY_HND *hnd, uint32 access_mask);
 int find_policy_by_hnd(struct policy_cache *cache, const POLICY_HND *hnd);
-BOOL set_policy_state(struct policy_cache *cache, POLICY_HND *hnd, 
-                               void(*fn)(void*), void *dev);
+BOOL set_policy_state(struct policy_cache *cache, POLICY_HND *hnd,
+                     void (*fn) (void *), void *dev);
 void *get_policy_state_info(struct policy_cache *cache, const POLICY_HND *hnd);
 BOOL policy_hnd_set_state_type(struct policy_cache *cache,
                               POLICY_HND *hnd, int type);
@@ -59,11 +55,11 @@ BOOL policy_hnd_check_state_type(struct policy_cache *cache,
                                 const POLICY_HND *hnd, int type);
 BOOL close_policy_hnd(struct policy_cache *cache, POLICY_HND *hnd);
 BOOL policy_link_key(struct policy_cache *cache, const POLICY_HND *hnd,
-                               POLICY_HND *to);
+                    POLICY_HND *to);
 const vuser_key *get_policy_vuser_key(struct policy_cache *cache,
-                               const POLICY_HND *hnd);
+                                     const POLICY_HND *hnd);
 BOOL pol_get_usr_sesskey(struct policy_cache *cache, const POLICY_HND *hnd,
-                               uchar usr_sess_key[16]);
+                        uchar usr_sess_key[16]);
 
 /*The following definitions come from  lib/vuser.c  */
 
index 829cf308d5e30ce92e7172f1feced706e113ef67..9bf38910fd2c7b2053623db71aba1ebe576bd235 100644 (file)
@@ -689,23 +689,19 @@ BOOL policy_hnd_set_name(struct policy_cache *cache,
 const char *policy_hnd_get_name(struct policy_cache *cache,
                                const POLICY_HND *hnd);
 BOOL dup_policy_hnd(struct policy_cache *cache,
-                               POLICY_HND *hnd,
-                               const POLICY_HND *from);
+                   POLICY_HND *hnd, const POLICY_HND *from);
 BOOL register_policy_hnd(struct policy_cache *cache,
-                               const vuser_key *key,
-                               POLICY_HND *hnd,
-                               uint32 access_mask);
-BOOL open_policy_hnd(struct policy_cache *cache, 
-                               const vuser_key *key,
-                               POLICY_HND *hnd,
-                               uint32 access_mask);
-BOOL open_policy_hnd_link(struct policy_cache *cache, 
-                               const POLICY_HND *parent_hnd,
-                               POLICY_HND *hnd,
-                               uint32 access_mask);
+                        const vuser_key * key,
+                        POLICY_HND *hnd, uint32 access_mask);
+BOOL open_policy_hnd(struct policy_cache *cache,
+                    const vuser_key * key,
+                    POLICY_HND *hnd, uint32 access_mask);
+BOOL open_policy_hnd_link(struct policy_cache *cache,
+                         const POLICY_HND *parent_hnd,
+                         POLICY_HND *hnd, uint32 access_mask);
 int find_policy_by_hnd(struct policy_cache *cache, const POLICY_HND *hnd);
-BOOL set_policy_state(struct policy_cache *cache, POLICY_HND *hnd, 
-                               void(*fn)(void*), void *dev);
+BOOL set_policy_state(struct policy_cache *cache, POLICY_HND *hnd,
+                     void (*fn) (void *), void *dev);
 void *get_policy_state_info(struct policy_cache *cache, const POLICY_HND *hnd);
 BOOL policy_hnd_set_state_type(struct policy_cache *cache,
                               POLICY_HND *hnd, int type);
@@ -715,11 +711,11 @@ BOOL policy_hnd_check_state_type(struct policy_cache *cache,
                                 const POLICY_HND *hnd, int type);
 BOOL close_policy_hnd(struct policy_cache *cache, POLICY_HND *hnd);
 BOOL policy_link_key(struct policy_cache *cache, const POLICY_HND *hnd,
-                               POLICY_HND *to);
+                    POLICY_HND *to);
 const vuser_key *get_policy_vuser_key(struct policy_cache *cache,
-                               const POLICY_HND *hnd);
+                                     const POLICY_HND *hnd);
 BOOL pol_get_usr_sesskey(struct policy_cache *cache, const POLICY_HND *hnd,
-                               uchar usr_sess_key[16]);
+                        uchar usr_sess_key[16]);
 
 /*The following definitions come from  lib/util_pwdb.c  */
 
index c5d58e7072dfefdb57e31e090fb062f884693cf2..d851d9ac8c912567846809fbfc7828a50bc1289e 100644 (file)
@@ -577,21 +577,20 @@ user %s attempted down-level SMB connection\n",
 
                if (!doencrypt)
                {
-                       /* both Win95 and WinNT stuff up the password lengths for
-                          non-encrypting systems. Uggh. 
-
-                          if passlen1==24 its a win95 system, and its setting the
-                          password length incorrectly. Luckily it still works with the
-                          default code because Win95 will null terminate the password
-                          anyway 
-
-                          if passlen1>0 and passlen2>0 then maybe its a NT box and its
-                          setting passlen2 to some random value which really stuffs
-                          things up. we need to fix that one.
-
-                          LKCLXXXX: the random value can be random 16 bit.  old test
-                          used to have ... && passlen <= 24) which of course fails
-                          most of the time.
+                       /* both Win95 and WinNT stuff up the password
+                        * lengths for non-encrypting systems. Uggh. 
+                        * if passlen1==24 its a win95 system, and its 
+                        * setting the password length incorrectly. Luckily 
+                        * it still works with the default code because 
+                        * Win95 will null terminate the password anyway 
+                        * if passlen1>0 and passlen2>0 then maybe its a 
+                        * NT box and its setting passlen2 to some random
+                        * value which really stuffs things up. we need to 
+                        * fix that one.  
+                        *
+                        * LKCLXXXX: the random value can be random 16 bit.
+                        * old test used to have ... && passlen <= 24)
+                        * which of course fails most of the time.
                         */
 
                        if (passlen1 > 0 && passlen2 > 0 && passlen2 != 1)
@@ -669,9 +668,10 @@ user %s attempted down-level SMB connection\n",
 
        DEBUG(3, ("sesssetupX:name=[%s]\n", user));
 
-       /* If name ends in $ then I think it's asking about whether a */
-       /* computer with that name (minus the $) has access. For now */
-       /* say yes to everything ending in $. */
+       /*
+        * If name ends in $ it's a trust account.
+        */
+
        if ((user[strlen(user) - 1] == '$') && (smb_apasslen == 24)
            && (smb_ntpasslen == 24))
        {