summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-12-27 06:38:04 +0000
committerGerald Carter <jerry@samba.org>2001-12-27 06:38:04 +0000
commit04aff47c716a51a1039b44a81d6ff19eeaa09017 (patch)
treee2fc04ef3089c003baa711d55cd89310b824d44b /source3/include/smb.h
parentb6bbc39204a4676922099ab78b6c48009266d1bb (diff)
downloadsamba-04aff47c716a51a1039b44a81d6ff19eeaa09017.tar.gz
samba-04aff47c716a51a1039b44a81d6ff19eeaa09017.tar.bz2
samba-04aff47c716a51a1039b44a81d6ff19eeaa09017.zip
moving SAM_ACCOUNT to include a bit field for initialized
members (such as uid and gid). This way we will be able to keep ourselves from writing out default smb.conf settings when the admin doesn't want to, That part is not done yet. Tested compiles with ldap/tdb/smbpasswd. Tested connection with smbpasswd backend. oh...and smbpasswd doesn'y automatically expire accounts after 21 days from the last password change either now. Just ifdef'd out that code in build_sam_account(). Will merge updates into 2.2 as they are necessary. jerry (This used to be commit f0d43791157d8f04a13a07d029f203ad4384d317)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 8c0491a004..a048726fa2 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -588,8 +588,27 @@ typedef struct {
#define SHAREMODE_FN(fn) \
void (*fn)(share_mode_entry *, char*)
+/*
+ * bit flags representing initialized fields in SAM_ACCOUNT
+ */
+#define FLAG_SAM_UNINIT 0x00000000
+#define FLAG_SAM_UID 0x00000001
+#define FLAG_SAM_GID 0x00000002
+#define FLAG_SAM_SMBHOME 0x00000004
+#define FLAG_SAM_PROFILE 0x00000008
+#define FLAG_SAM_LOGONSCRIPT 0x00000010
+#define FLAG_SAM_DRIVE 0x00000020
+
+#define IS_SAM_UNIX_USER(x) \
+ (((x)->init_flag & FLAG_SAM_UID) \
+ && ((x)->init_flag & FLAG_SAM_GID))
+
+
typedef struct sam_passwd
{
+ /* initiailization flags */
+ uint32 init_flag;
+
time_t logon_time; /* logon time */
time_t logoff_time; /* logoff time */
time_t kickoff_time; /* kickoff time */
@@ -610,8 +629,8 @@ typedef struct sam_passwd
pstring unknown_str ; /* don't know what this is, yet. */
pstring munged_dial ; /* munged path name and dial-back tel number */
- uid_t *uid; /* this is a pointer to the unix uid_t */
- gid_t *gid; /* this is a pointer to the unix gid_t */
+ uid_t uid; /* this is a pointer to the unix uid_t */
+ gid_t gid; /* this is a pointer to the unix gid_t */
uint32 user_rid; /* Primary User ID */
uint32 group_rid; /* Primary Group ID */