File: cronjack.t

package info (click to toggle)
adduser 3.154
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,584 kB
  • sloc: perl: 9,508; sh: 189; makefile: 22
file content (26 lines) | stat: -rwxr-xr-x 525 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/bin/perl -Idebian/tests/lib

# Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940577


use diagnostics;
use strict;
use warnings;

use AdduserTestsCommon;


END {
    remove_tree('/hacked');
    remove_tree('/home/bob');
}

assert_command_success('sh', '-c', q{/usr/sbin/useradd --badname -d /home/bob -m 'bob;>/hacked' 2>/dev/null});

assert_path_does_not_exist('/hacked');

`/usr/sbin/deluser 'bob;>/hacked' >/dev/null 2>&1`;

assert_path_does_not_exist('/hacked');

# vim: tabstop=4 shiftwidth=4 expandtab