Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.

Commit 23c8292

Browse files
author
NerdOfCode
committed
Bug Patches.
Fixed Program Destroying Bugs :)
1 parent 306bc7a commit 23c8292

6 files changed

Lines changed: 7 additions & 22 deletions

File tree

Bin/cmd_src/hostname.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
3-
Gets hostname upon call
4-
5-
*/
6-
71
#include <stdio.h>
82
#include <stdlib.h>
93
#include "../../Src/globals.h"

Bin/cmd_src/rm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <stdio.h>
22
#include <string.h>
33
#include <stdlib.h>
4-
#include <limits.h> /* PATH_MAX */
4+
#include <limits.h>
55
#include "../../Src/globals.h"
66

77
int main(int argc, char **argv){

Bin/cmd_src/rmdir.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* Remove a directory full or not */
2-
31
#include <stdio.h>
42
#include <stdlib.h>
53
#include <unistd.h>

Bin/cmd_src/time.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/*
2-
3-
Display local time of system
4-
5-
*/
6-
7-
81
#include <stdio.h>
92
#include <time.h>
103

Src/globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
//#define USER_LOG "nLogs/user.log"
4444

4545
//Default path to command Bin
46-
#define CMD_BIN "/etc/Restricted-Shell/Bin/"
46+
#define CMD_BIN "/home/nerdofcode/Restricted-Shell/Bin/"
4747

4848
#define TRUE 1
4949
#define FALSE 0

run.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ then
146146

147147
clear
148148

149-
read -p "Enter Default Directory for Shell(Default: '/home/nerdocode/Restricted-Shell/): " location
149+
read -p "Enter Default Directory for Shell(Default: '/etc/Restricted-Shell/): " location
150150

151151
if [[ -z $location ]]
152152
then
153-
location="/home/nerdocode/Restricted-Shell/"
153+
location="/etc/Restricted-Shell/"
154154
else
155-
sed -i "s|/home/nerdocode/Restricted-Shell/|${location}|g" Src/global_bash_var
156-
sed -i "s|/home/nerdocode/Restricted-Shell/|${location}|g" Src/globals.h
157-
sed -i "s|/home/nerdocode/Restricted-Shell/|${location}|g" run.sh
155+
sed -i "s|${DEFAULT_LOCATION}|${location}|g" run.sh
156+
sed -i "s|${DEFAULT_LOCATION}|${location}|g" Src/globals.h
157+
sed -i "s|${DEFAULT_LOCATION}|${location}|g" Src/global_bash_var
158158
fi
159159

160160
#Prompt user to allow what commands

0 commit comments

Comments
 (0)