Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Remove all the stderr error messages from pam/cgmanager.c
Browse files Browse the repository at this point in the history
Except the ones at connect time.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
hallyn committed Jan 18, 2016
1 parent c45fd0c commit 76c28a7
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pam/cgmanager.c
Expand Up @@ -109,7 +109,6 @@ bool cgm_create(const char *cg, int32_t *existed)
if ( cgmanager_create_sync(NULL, cgroup_manager, ctrl_list, cg, existed) != 0) {
NihError *nerr;
nerr = nih_error_get();
fprintf(stderr, "call to create failed (%s:%s): %s\n", ctrl_list, cg, nerr->message);
nih_free(nerr);
return false;
}
Expand All @@ -133,7 +132,6 @@ bool cgm_enter(const char *cg)
(int32_t) getpid()) != 0 ) {
NihError *nerr;
nerr = nih_error_get();
fprintf(stderr, "call to move_pid (%s:%s, %d) failed: %s\n", ctrl_list, cg, (int)getpid(), nerr->message);
nih_free(nerr);
return false;
}
Expand All @@ -145,7 +143,6 @@ bool cgm_chown(const char *cg, uid_t uid, gid_t gid)
if ( cgmanager_chown_sync(NULL, cgroup_manager, ctrl_list, cg, uid, gid) != 0) {
NihError *nerr;
nerr = nih_error_get();
fprintf(stderr, "call to chown (%s:%s, %d, %d) failed: %s\n", ctrl_list, cg, uid, gid, nerr->message);
nih_free(nerr);
return false;
}
Expand All @@ -158,7 +155,6 @@ char **cgm_list_controllers(void)
if ( cgmanager_list_controllers_sync(NULL, cgroup_manager, &controllers) != 0 ) {
NihError *nerr;
nerr = nih_error_get();
fprintf(stderr, "call to list_controllers failed: %s\n", nerr->message);
nih_free(nerr);
return NULL;
}
Expand All @@ -179,7 +175,6 @@ char **cgm_list_children(const char *cg)
if ( cgmanager_list_children_sync(NULL, cgroup_manager, ctrl, cg, &children) != 0 ) {
NihError *nerr;
nerr = nih_error_get();
fprintf(stderr, "call to list_children failed: %s\n", nerr->message);
nih_free(nerr);
return NULL;
}
Expand All @@ -194,7 +189,6 @@ bool cgm_cg_has_tasks(const char *cg)
if ( cgmanager_get_tasks_recursive_sync(NULL, cgroup_manager, ctrl_list, cg, &pids, &len) != 0 ) {
NihError *nerr;
nerr = nih_error_get();
fprintf(stderr, "call to get_tasks_recursive failed: %s\n", nerr->message);
nih_free(nerr);
return false;
}
Expand All @@ -209,7 +203,6 @@ void cgm_clear_cgroup(const char *cg)
if ( cgmanager_remove_sync(NULL, cgroup_manager, ctrl_list, cg, recursive, &existed) != 0) {
NihError *nerr;
nerr = nih_error_get();
fprintf(stderr, "warning: call to remove(%s) failed: %s\n", cg, nerr->message);
nih_free(nerr);
}
}
Expand All @@ -219,7 +212,6 @@ void cgm_escape(void)
if ( cgmanager_move_pid_abs_sync(NULL, cgroup_manager, ctrl_list, "/", (int32_t) getpid()) != 0) {
NihError *nerr;
nerr = nih_error_get();
fprintf(stderr, "warning: attempt to escape to root cgroup failed: %s\n", nerr->message);
nih_free(nerr);
}
}

0 comments on commit 76c28a7

Please sign in to comment.