FreeBSD Bugzilla – Attachment 147383 Details for
Bug 187189
[PATCH] pw(1): pw groupmod groupname -g ### creates duplicate groups
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
libutil patch mitigating duplicate groups when executing `pw group mod`
libutil.patch (text/plain), 555 bytes, created by
Rick Miller
on 2014-09-16 18:12:30 UTC
(
hide
)
Description:
libutil patch mitigating duplicate groups when executing `pw group mod`
Filename:
MIME Type:
Creator:
Rick Miller
Created:
2014-09-16 18:12:30 UTC
Size:
555 bytes
patch
obsolete
>@@ -170,14 +170,21 @@ gr_copy(int ffd, int tfd, const struct group *gr, struct group *old_gr) > size_t len; > int eof, readlen; > >- sgr = gr; >+ if (old_gr == NULL && gr == NULL) >+ return (-1); >+ >+ sgr = old_gr; >+ /* deleting a group */ > if (gr == NULL) { > line = NULL; >- if (old_gr == NULL) >+ } else { >+ if ((line = gr_make(gr)) == NULL) > return (-1); >- sgr = old_gr; >- } else if ((line = gr_make(gr)) == NULL) >- return (-1); >+ } >+ >+ /* adding a group */ >+ if (sgr == NULL) >+ sgr = gr; > > eof = 0; > len = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 187189
: 147383 |
147735