Parse the master.cf file. This file is essentially a whitespace-delimited
    columnar file. The columns are: service, type, private (yes), unpriv (yes),
    chroot (yes), wakeup (never), maxproc (100), command + args.

    This function parses out the columns, leaving empty lines and comments
    intact. Where the value doesn't detract from the default, a dash (-) will
    be used.

    Returns a dict of the active config lines, and a list of the entire file,
    in order. These compliment each other.

def _parse_master(path=MASTER_CF):
    '''
    Parse the master.cf file. This file is essentially a whitespace-delimited
    columnar file. The columns are: service, type, private (yes), unpriv (yes),
    chroot (yes), wakeup (never), maxproc (100), command + args.

    This function parses out the columns, leaving empty lines and comments
    intact. Where the value doesn't detract from the default, a dash (-) will
    be used.

    Returns a dict of the active config lines, and a list of the entire file,
    in order. These compliment each other.
    '''
    with salt.utils.files.fopen(path, 'r') as fh_:
        full_conf = salt.utils.stringutils.to_unicode(fh_.read())

    # Condense the file based on line continuations, but keep order, comments
    # and whitespace
    conf_list = []
    conf_dict = {}
    for line in full_conf.splitlines():
        if not line.strip() or line.strip().startswith('#'):
            conf_list.append(line)
            continue
        comps = line.strip().split()
        conf_line = {
            'service': comps[0],
            'conn_type': comps[1],
            'private': comps[2],
            'unpriv': comps[3],
            'chroot': comps[4],
            'wakeup': comps[5],
            'maxproc': comps[6],
            'command': ' '.join(comps[7:]),
        }
        dict_key = '{0} {1}'.format(comps[0], comps[1])
        conf_list.append(conf_line)
        conf_dict[dict_key] = conf_line

    return conf_dict, conf_list