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);
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 */
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);
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 */
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)
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))
{