summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2003-06-02 06:12:54 +0000
committerRichard Sharpe <sharpe@samba.org>2003-06-02 06:12:54 +0000
commit989c2a374e58a05f680db67523c7adf38c3d0246 (patch)
treee4dfe526641029298ea424116536048e7171e4cd /source3/utils
parent371e80b4a408ba8ef9563b0b6a7266224f73a2d1 (diff)
downloadsamba-989c2a374e58a05f680db67523c7adf38c3d0246.tar.gz
samba-989c2a374e58a05f680db67523c7adf38c3d0246.tar.bz2
samba-989c2a374e58a05f680db67523c7adf38c3d0246.zip
More changes to editreg to make it less tetchy.
(This used to be commit 30e1431e937325da414493bf0a6d4281b9c1501f)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/editreg.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source3/utils/editreg.c b/source3/utils/editreg.c
index 27e3f7398c..54148fdcf8 100644
--- a/source3/utils/editreg.c
+++ b/source3/utils/editreg.c
@@ -412,16 +412,16 @@ typedef struct val_list_s {
#define MAXSUBAUTHS 15
#endif
-typedef struct dom_sid_s {
+typedef struct sid_s {
unsigned char ver, auths;
unsigned char auth[6];
unsigned int sub_auths[MAXSUBAUTHS];
-} DOM_SID;
+} sid_t;
typedef struct ace_struct_s {
unsigned char type, flags;
unsigned int perms; /* Perhaps a better def is in order */
- DOM_SID *trustee;
+ sid_t *trustee;
} ACE;
typedef struct acl_struct_s {
@@ -432,7 +432,7 @@ typedef struct acl_struct_s {
typedef struct sec_desc_s {
unsigned int rev, type;
- DOM_SID *owner, *group;
+ sid_t *owner, *group;
ACL *sacl, *dacl;
} SEC_DESC;
@@ -537,7 +537,7 @@ typedef struct ace_struct {
unsigned char flags;
unsigned short length;
unsigned int perms;
- DOM_SID trustee;
+ sid_t trustee;
} REG_ACE;
typedef struct acl_struct {
@@ -904,7 +904,7 @@ int nt_delete_key_by_name(REGF *regf, char *name)
}
static
-int nt_delete_sid(DOM_SID *sid)
+int nt_delete_sid(sid_t *sid)
{
if (sid) free(sid);
@@ -1173,15 +1173,15 @@ VAL_KEY *nt_delete_reg_value(REG_KEY *key, char *name)
* Convert a string of the form S-1-5-x[-y-z-r] to a SID
*/
static
-int sid_string_to_sid(DOM_SID **sid, const char *sid_str)
+int sid_string_to_sid(sid_t **sid, const char *sid_str)
{
int i = 0, auth;
const char *lstr;
- *sid = (DOM_SID *)malloc(sizeof(DOM_SID));
+ *sid = (sid_t *)malloc(sizeof(sid_t));
if (!*sid) return 0;
- bzero(*sid, sizeof(DOM_SID));
+ bzero(*sid, sizeof(sid_t));
if (strncmp(sid_str, "S-1-5", 5)) {
fprintf(stderr, "Does not conform to S-1-5...: %s\n", sid_str);
@@ -1829,9 +1829,9 @@ KEY_SEC_DESC *lookup_create_sec_key(REGF *regf, SK_MAP *sk_map, int sk_off)
* We could allocate the SID to be only the size needed, but I am too lazy.
*/
static
-DOM_SID *dup_sid(DOM_SID *sid)
+sid_t *dup_sid(sid_t *sid)
{
- DOM_SID *tmp = (DOM_SID *)malloc(sizeof(DOM_SID));
+ sid_t *tmp = (sid_t *)malloc(sizeof(sid_t));
int i;
if (!tmp) return NULL;
@@ -1916,12 +1916,12 @@ SEC_DESC *process_sec_desc(REGF *regf, REG_SEC_DESC *sec_desc)
IVAL(&sec_desc->group_off));
if (verbose) fprintf(stdout, "SEC_DESC DACL Off: %0X\n",
IVAL(&sec_desc->dacl_off));
- tmp->owner = dup_sid((DOM_SID *)((char *)sec_desc + IVAL(&sec_desc->owner_off)));
+ tmp->owner = dup_sid((sid_t *)((char *)sec_desc + IVAL(&sec_desc->owner_off)));
if (!tmp->owner) {
free(tmp);
return NULL;
}
- tmp->group = dup_sid((DOM_SID *)((char *)sec_desc + IVAL(&sec_desc->group_off)));
+ tmp->group = dup_sid((sid_t *)((char *)sec_desc + IVAL(&sec_desc->group_off)));
if (!tmp->group) {
free(tmp);
return NULL;
@@ -2618,7 +2618,7 @@ void *nt_alloc_regf_space(REGF *regf, int size, unsigned int *off)
* Compute the size of a SID stored ...
*/
static
-unsigned int sid_size(DOM_SID *sid)
+unsigned int sid_size(sid_t *sid)
{
unsigned int size;
@@ -2686,7 +2686,7 @@ unsigned int sec_desc_size(SEC_DESC *sd)
* Store a SID at the location provided
*/
static
-int nt_store_SID(REGF *regf, DOM_SID *sid, unsigned char *locn)
+int nt_store_SID(REGF *regf, sid_t *sid, unsigned char *locn)
{
int i;
unsigned char *p = locn;
@@ -3864,7 +3864,7 @@ void print_perms(int perms)
}
static
-void print_sid(DOM_SID *sid)
+void print_sid(sid_t *sid)
{
int i, comps = sid->auths;
fprintf(stdout, "S-%u-%u", sid->ver, sid->auth[5]);
@@ -3955,7 +3955,7 @@ int main(int argc, char *argv[])
char *cmd_file_name = NULL;
char *out_file_name = NULL;
CMD_FILE *cmd_file = NULL;
- DOM_SID *lsid;
+ sid_t *lsid;
if (argc < 2) {
usage();