Chntpw ng 1.01 - #3
Conversation
Sorry, it's almost there. You need to create your pull request against our https://github.com/rescatux/chntpw/tree/chntpw-ng-1.01 branch. Not against our master branch. Thank you. |
|
Sorry. The target branch have been changed. |
|
|
||
| # Force 32 bit | ||
| CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -m32 | ||
| CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -m32 |
There was a problem hiding this comment.
This typo fixing need to go into its own commit.
| cheap_uni2ascii(vp + comment_offset,comment,comment_len); | ||
| cheap_uni2ascii(vp + homedir_offset,homedir,homedir_len); | ||
|
|
There was a problem hiding this comment.
This typo fixing need to go into its own commit.
|
|
||
| void sam_free_sid_array(struct sid_array *array) | ||
| { | ||
|
|
There was a problem hiding this comment.
If every function has an additional line you shouldn't remove it.
I haven't checked it.
Otherwise if removing this line matches the other functions style then this typo fixing need to go into its own commit.
(I mean all the typos fixing need to go into a single commit.)
| H_SAM = 0; | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Once again.
Check if it makes sense to remove this line.
If it makes sense you need to put this into the 'Typos' commit.
| if (gverbose) printf("put_grp_members_sid: ajusted: mofs = %x, mlen = %x (%d)\n", mofs + 0x34 ,mlen,mlen); | ||
|
|
||
| if (gverbose) hexdump(&c->data, 0, c->len, 1); | ||
| if (gverbose) hexdump((char *)&(c->data), 0, c->len, 1); |
There was a problem hiding this comment.
Can you explain why you change & into (char *)&( ?
Either as an in-code comment (better) or in the commit description.
| printf(" Member # %d = <%s>\n", i, str); | ||
| FREE(str); | ||
| } | ||
|
|
There was a problem hiding this comment.
gverbose should only be used to turn on or off the printf statement.
Else if gverbose is false then your code does not do anything useful.
| printf("sam_add_sid_to_grp: user SID is <%s>\n", str); | ||
| free(str); | ||
| } | ||
|
|
There was a problem hiding this comment.
gverbose should only be used to turn on or off the printf statement.
Else if gverbose is false then your code does not do anything useful.
| printf(" Member # %d = <%s>\n", o, str); | ||
| FREE(str); | ||
| } | ||
| } |
There was a problem hiding this comment.
gverbose should only be used to turn on or off the printf statement.
Else if gverbose is false then your code does not do anything useful.
| printf(" Member # %u = <%s>\n", o, str); | ||
| FREE(str); | ||
| } | ||
| } |
There was a problem hiding this comment.
gverbose should only be used to turn on or off the printf statement.
Else if gverbose is false then your code does not do anything useful.
| FREE(str); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
gverbose should only be used to turn on or off the printf statement.
Else if gverbose is false then your code does not do anything useful.
| printf(" Member # %u = <%s>\n", o, str); | ||
| FREE(str); | ||
| } | ||
| } |
There was a problem hiding this comment.
gverbose should only be used to turn on or off the printf statement.
Else if gverbose is false then your code does not do anything useful.
|
|
||
| if (human) printf("=== Group #%4x : %s\n",grp,groupname); | ||
| else if (!listmembers) printf("%x:%s:%d\n",grp,groupname,cd->grp_members); | ||
| else if (!listmembers) printf("%x:%s:%d\n",grp,groupname,cd->grp_members); |
There was a problem hiding this comment.
Identation fixes should be in a third commit different from the useful commit and the typos one.
| } | ||
| FREE(str); | ||
|
|
||
| } |
There was a problem hiding this comment.
This should go into the identation commit.
| H_SAM = 0; | ||
| } | ||
|
|
||
|
|
| } | ||
|
|
||
| if ( sid ) use_sid = 1; | ||
| if ( usr ) use_sid = 0; |
There was a problem hiding this comment.
There shouldn't be an additional line before the closing } in this function in order to match current style.
Codestyle's fixes. Removed useless changes. Fixed gverbose statment logic. Fixed compiler warnings in libsam.c lines 514, 542, hexdump require char *, but &c->data have type &int. Fixed compiler warnings in libsam.c line 531, printf %x require int, but sidptr have type void *.
0efa426 to
272e659
Compare
|
Sorry for the delay with fixes. |
double free fix
As you requested here, I have rebased my pull request to this branch.
Ready to discuss about bugs in my code.