Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 294801 Details for
Bug 432647
luseradd, lusermod ignore some command-line arguments
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
A patch fixing lusermod, from libuser-0.53.2.
lusermod-multichange.patch (text/plain), 3.33 KB, created by
Miloslav Trmač
on 2008-02-13 16:26:31 UTC
(
hide
)
Description:
A patch fixing lusermod, from libuser-0.53.2.
Filename:
MIME Type:
Creator:
Miloslav Trmač
Created:
2008-02-13 16:26:31 UTC
Size:
3.33 KB
patch
obsolete
>Index: lusermod.c >=================================================================== >RCS file: /usr/local/CVS/libuser/apps/lusermod.c,v >retrieving revision 1.31 >retrieving revision 1.32 >diff -u -r1.31 -r1.32 >--- lusermod.c 14 Nov 2004 01:33:07 -0000 1.31 >+++ lusermod.c 17 Jan 2005 01:13:38 -0000 1.32 >@@ -16,7 +16,7 @@ > * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. > */ > >-#ident "$Id: lusermod.c,v 1.31 2004/11/14 01:33:07 mitr Exp $" >+#ident "$Id: lusermod.c,v 1.32 2005/01/17 01:13:38 mitr Exp $" > > #ifdef HAVE_CONFIG_H > #include "config.h" >@@ -162,9 +162,50 @@ > return 3; > } > >+ /* If the user's password needs to be changed, try to change it. */ >+ if (userPassword != NULL) { >+ if (lu_user_setpass(ctx, ent, userPassword, FALSE, &error) >+ == FALSE) { >+ fprintf(stderr, >+ _("Failed to set password for user %s: %s.\n"), >+ user, lu_strerror(error)); >+ return 5; >+ } >+ } >+ >+ /* If we need to change a user's crypted password, try to change it, >+ * though it might fail if an underlying mechanism doesn't support >+ * using them. */ >+ if (cryptedUserPassword != NULL) { >+ if (lu_user_setpass(ctx, ent, cryptedUserPassword, TRUE, >+ &error) == FALSE) { >+ fprintf(stderr, >+ _("Failed to set password for user %s: %s.\n"), >+ user, lu_strerror(error)); >+ return 6; >+ } >+ } >+ >+ /* If we need to lock/unlock the user's account, do that. */ >+ if (lock) { >+ if (lu_user_lock(ctx, ent, &error) == FALSE) { >+ fprintf(stderr, >+ _("User %s could not be locked: %s.\n"), >+ user, lu_strerror(error)); >+ return 7; >+ } >+ } >+ if (unlock) { >+ if (lu_user_unlock(ctx, ent, &error) == FALSE) { >+ fprintf(stderr, >+ _("User %s could not be unlocked: %s.\n"), >+ user, lu_strerror(error)); >+ return 8; >+ } >+ } >+ > /* Determine if we actually need to change anything. */ >- change = userPassword || cryptedUserPassword || uid || gecos || >- homeDirectory || loginShell || >+ change = uid || gecos || homeDirectory || loginShell || > uidNumber != LU_VALUE_INVALID_ID || > gidNumber != LU_VALUE_INVALID_ID; > >@@ -223,48 +264,6 @@ > } > > g_value_unset(&val); >- >- /* If the user's password needs to be changed, try to change it. */ >- if (userPassword != NULL) { >- if (lu_user_setpass(ctx, ent, userPassword, FALSE, &error) >- == FALSE) { >- fprintf(stderr, >- _("Failed to set password for user %s: %s.\n"), >- user, lu_strerror(error)); >- return 5; >- } >- } >- >- /* If we need to change a user's crypted password, try to change it, >- * though it might fail if an underlying mechanism doesn't support >- * using them. */ >- if (cryptedUserPassword != NULL) { >- if (lu_user_setpass(ctx, ent, cryptedUserPassword, TRUE, >- &error) == FALSE) { >- fprintf(stderr, >- _("Failed to set password for user %s: %s.\n"), >- user, lu_strerror(error)); >- return 6; >- } >- } >- >- /* If we need to lock/unlock the user's account, do that. */ >- if (lock) { >- if (lu_user_lock(ctx, ent, &error) == FALSE) { >- fprintf(stderr, >- _("User %s could not be locked: %s.\n"), >- user, lu_strerror(error)); >- return 7; >- } >- } >- if (unlock) { >- if (lu_user_unlock(ctx, ent, &error) == FALSE) { >- fprintf(stderr, >- _("User %s could not be unlocked: %s.\n"), >- user, lu_strerror(error)); >- return 8; >- } >- } > > /* If we need to change anything about the user, do it. */ > if (change && (lu_user_modify(ctx, ent, &error) == FALSE)) {
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 432647
:
294800
| 294801