/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/plymouth.c

  • Committer: Teddy Hogeborn
  • Date: 2024-11-03 16:01:18 UTC
  • Revision ID: teddy@recompile.se-20241103160118-74csxmbgidxt9cx6
Make binary directory configurable

Reportedly, Arch Linux uses /bin for all binaries, not /sbin.
Therefore, make binary directory configurable.

From: Erich Eckner <mandos@eckner.net>
Signed-off-by: Teddy Hogeborn <teddy@recompile.se>

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Plymouth - Read a password from Plymouth and output it
4
4
 * 
5
 
 * Copyright © 2010-2021 Teddy Hogeborn
6
 
 * Copyright © 2010-2021 Björn Påhlsson
 
5
 * Copyright © 2010-2022 Teddy Hogeborn
 
6
 * Copyright © 2010-2022 Björn Påhlsson
7
7
 * 
8
8
 * This file is part of Mandos.
9
9
 * 
372
372
      error_plus(0, errno, "scandir");
373
373
    }
374
374
    if(ret > 0){
375
 
      for(int i = ret-1; i >= 0; i--){
 
375
      const int num_entries = ret;
 
376
      for(int i = 0; i < num_entries; i++){
376
377
        if(proc_id == 0){
377
378
          ret = sscanf(direntries[i]->d_name, "%" SCNuMAX, &proc_id);
378
379
          if(ret < 0){