#include <crm_internal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/utsname.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <pwd.h>
#include <time.h>
#include <libgen.h>
#include <signal.h>
#include <grp.h>
#include <qb/qbdefs.h>
#include <crm/crm.h>
#include <crm/services.h>
#include <crm/cib/internal.h>
#include <crm/common/xml.h>
#include <crm/common/util.h>
#include <crm/common/ipc.h>
#include <crm/common/iso8601.h>
#include <crm/common/mainloop.h>
#include <libxml2/libxml/relaxng.h>
#include "crmcommon_private.h"
#include <crm/common/util_compat.h>
Go to the source code of this file.
|  | 
|  | CRM_TRACE_INIT_DATA (common) | 
|  | 
| bool | pcmk__is_user_in_group (const char *user, const char *group) | 
|  | 
| int | crm_user_lookup (const char *name, uid_t *uid, gid_t *gid) | 
|  | 
| int | pcmk_daemon_user (uid_t *uid, gid_t *gid) | 
|  | Get user and group IDs of pacemaker daemon user.  More... 
 | 
|  | 
| int | compare_version (const char *version1, const char *version2) | 
|  | 
| void | crm_abort (const char *file, const char *function, int line, const char *assert_condition, gboolean do_core, gboolean do_fork) | 
|  | 
| void | pcmk__daemonize (const char *name, const char *pidfile) | 
|  | 
| char * | crm_generate_uuid (void) | 
|  | 
| bool | pcmk_str_is_infinity (const char *s) | 
|  | 
| bool | pcmk_str_is_minus_infinity (const char *s) | 
|  | 
| void | pcmk__sleep_ms (unsigned int ms) | 
|  | 
| guint | crm_parse_interval_spec (const char *input) | 
|  | 
| char * | pcmk_hostname (void) | 
|  | 
◆ _GNU_SOURCE
◆ compare_version()
      
        
          | int compare_version | ( | const char * | version1, | 
        
          |  |  | const char * | version2 | 
        
          |  | ) |  |  | 
      
 
 
◆ crm_abort()
      
        
          | void crm_abort | ( | const char * | file, | 
        
          |  |  | const char * | function, | 
        
          |  |  | int | line, | 
        
          |  |  | const char * | assert_condition, | 
        
          |  |  | gboolean | do_core, | 
        
          |  |  | gboolean | do_fork | 
        
          |  | ) |  |  | 
      
 
 
◆ crm_generate_uuid()
      
        
          | char* crm_generate_uuid | ( | void |  | ) |  | 
      
 
 
◆ crm_parse_interval_spec()
      
        
          | guint crm_parse_interval_spec | ( | const char * | input | ) |  | 
      
 
 
◆ CRM_TRACE_INIT_DATA()
      
        
          | CRM_TRACE_INIT_DATA | ( | common |  | ) |  | 
      
 
 
◆ crm_user_lookup()
      
        
          | int crm_user_lookup | ( | const char * | name, | 
        
          |  |  | uid_t * | uid, | 
        
          |  |  | gid_t * | gid | 
        
          |  | ) |  |  | 
      
 
 
◆ pcmk__daemonize()
      
        
          | void pcmk__daemonize | ( | const char * | name, | 
        
          |  |  | const char * | pidfile | 
        
          |  | ) |  |  | 
      
 
 
◆ pcmk__is_user_in_group()
      
        
          | bool pcmk__is_user_in_group | ( | const char * | user, | 
        
          |  |  | const char * | group | 
        
          |  | ) |  |  | 
      
 
 
◆ pcmk__sleep_ms()
      
        
          | void pcmk__sleep_ms | ( | unsigned int | ms | ) |  | 
      
 
 
◆ pcmk_daemon_user()
      
        
          | int pcmk_daemon_user | ( | uid_t * | uid, | 
        
          |  |  | gid_t * | gid | 
        
          |  | ) |  |  | 
      
 
Get user and group IDs of pacemaker daemon user. 
- Parameters
- 
  
    | [out] | uid | If non-NULL, where to store daemon user ID |  | [out] | gid | If non-NULL, where to store daemon group ID |  
 
- Returns
- pcmk_ok on success, -errno otherwise 
Definition at line 125 of file utils.c.
 
 
◆ pcmk_hostname()
      
        
          | char* pcmk_hostname | ( | void |  | ) |  | 
      
 
 
◆ pcmk_str_is_infinity()
      
        
          | bool pcmk_str_is_infinity | ( | const char * | s | ) |  | 
      
 
 
◆ pcmk_str_is_minus_infinity()
      
        
          | bool pcmk_str_is_minus_infinity | ( | const char * | s | ) |  | 
      
 
 
◆ crm_config_error
      
        
          | gboolean crm_config_error = FALSE | 
      
 
- Deprecated:
- Pacemaker library functions set this when a configuration error is found, which turns on extra messages at the end of processing. It should not be used directly and will be removed from the public C API in a future release. 
Definition at line 48 of file utils.c.
 
 
◆ crm_config_warning
      
        
          | gboolean crm_config_warning = FALSE | 
      
 
- Deprecated:
- Pacemaker library functions set this when a configuration warning is found, which turns on extra messages at the end of processing. It should not be used directly and will be removed from the public C API in a future release. 
Definition at line 49 of file utils.c.
 
 
◆ crm_system_name
      
        
          | char* crm_system_name = NULL |