Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:15.0:Staging:A
shadow
userdel-script.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File userdel-script.patch of Package shadow
--- src/userdel.c +++ src/userdel.c @@ -762,13 +762,13 @@ static void update_user (void) * cron, at, or print jobs. */ -static void user_cancel (const char *user) +static void call_script (const char *program, const char *user) { const char *cmd; const char *argv[3]; int status; - cmd = getdef_str ("USERDEL_CMD"); + cmd = getdef_str (program); if (NULL == cmd) { return; } @@ -1163,9 +1163,10 @@ int main (int argc, char **argv) } /* - * Do the hard stuff - open the files, create the user entries, - * create the home directory, then close and update the files. + * Do the hard stuff - open the files, remove the user entries, + * remove the home directory, then close and update the files. */ + call_script ("USERDEL_PRECMD", user_name); open_files (); update_user (); update_groups (); @@ -1268,7 +1269,7 @@ int main (int argc, char **argv) * Cancel any crontabs or at jobs. Have to do this before we remove * the entry from /etc/passwd. */ - user_cancel (user_name); + call_script ("USERDEL_CMD", user_name); close_files (); #ifdef WITH_TCB @@ -1278,6 +1279,8 @@ int main (int argc, char **argv) nscd_flush_cache ("passwd"); nscd_flush_cache ("group"); + /* Call the post script, for example to rebuild NIS database */ + call_script ("USERDEL_POSTCMD", user_name); + return ((0 != errors) ? E_HOMEDIR : E_SUCCESS); } -
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor